From owner-svn-src-all@freebsd.org Sun May 14 00:12:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9907CD6BEF1; Sun, 14 May 2017 00:12:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 655251583; Sun, 14 May 2017 00:12:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4E0CTJJ019644; Sun, 14 May 2017 00:12:29 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4E0CT2S019643; Sun, 14 May 2017 00:12:29 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705140012.v4E0CT2S019643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 14 May 2017 00:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318260 - stable/11/sys/fs/nfsclient X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 00:12:30 -0000 Author: rmacklem Date: Sun May 14 00:12:29 2017 New Revision: 318260 URL: https://svnweb.freebsd.org/changeset/base/318260 Log: MFC: r317576 Modify the NFSv4.1/pNFS client to ask for a maximum length of layout. The code specified the length of a layout as INT64_MAX instead of UINT64_MAX. This could result in getting a layout for less than the full file for extremely large files. Although having little practical effect, this patch corrects this in the code. Detected during recent testing of the pNFS server. Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clrpcops.c Sat May 13 22:36:54 2017 (r318259) +++ stable/11/sys/fs/nfsclient/nfs_clrpcops.c Sun May 14 00:12:29 2017 (r318260) @@ -5238,7 +5238,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, v stateid.other[1] = stateidp->other[1]; stateid.other[2] = stateidp->other[2]; error = nfsrpc_layoutget(nmp, nfhp->nfh_fh, - nfhp->nfh_len, iomode, (uint64_t)0, INT64_MAX, + nfhp->nfh_len, iomode, (uint64_t)0, UINT64_MAX, (uint64_t)0, layoutlen, &stateid, &retonclose, &flh, cred, p, NULL); } else { @@ -5248,7 +5248,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, v stateid.other[1] = lyp->nfsly_stateid.other[1]; stateid.other[2] = lyp->nfsly_stateid.other[2]; error = nfsrpc_layoutget(nmp, nfhp->nfh_fh, - nfhp->nfh_len, iomode, off, INT64_MAX, + nfhp->nfh_len, iomode, off, UINT64_MAX, (uint64_t)0, layoutlen, &stateid, &retonclose, &flh, cred, p, NULL); } From owner-svn-src-all@freebsd.org Sun May 14 00:23:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3271D6135E; Sun, 14 May 2017 00:23:28 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DE0E1C0B; Sun, 14 May 2017 00:23:28 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4E0NRmA024041; Sun, 14 May 2017 00:23:27 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4E0NRMm024040; Sun, 14 May 2017 00:23:27 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705140023.v4E0NRMm024040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 14 May 2017 00:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318261 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 00:23:28 -0000 Author: rmacklem Date: Sun May 14 00:23:27 2017 New Revision: 318261 URL: https://svnweb.freebsd.org/changeset/base/318261 Log: MFC: r317576 Modify the NFSv4.1/pNFS client to ask for a maximum length of layout. The code specified the length of a layout as INT64_MAX instead of UINT64_MAX. This could result in getting a layout for less than the full file for extremely large files. Although having little practical effect, this patch corrects this in the code. Detected during recent testing of the pNFS server. Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sun May 14 00:12:29 2017 (r318260) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sun May 14 00:23:27 2017 (r318261) @@ -5235,7 +5235,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, v stateid.other[1] = stateidp->other[1]; stateid.other[2] = stateidp->other[2]; error = nfsrpc_layoutget(nmp, nfhp->nfh_fh, - nfhp->nfh_len, iomode, (uint64_t)0, INT64_MAX, + nfhp->nfh_len, iomode, (uint64_t)0, UINT64_MAX, (uint64_t)0, layoutlen, &stateid, &retonclose, &flh, cred, p, NULL); } else { @@ -5245,7 +5245,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, v stateid.other[1] = lyp->nfsly_stateid.other[1]; stateid.other[2] = lyp->nfsly_stateid.other[2]; error = nfsrpc_layoutget(nmp, nfhp->nfh_fh, - nfhp->nfh_len, iomode, off, INT64_MAX, + nfhp->nfh_len, iomode, off, UINT64_MAX, (uint64_t)0, layoutlen, &stateid, &retonclose, &flh, cred, p, NULL); } From owner-svn-src-all@freebsd.org Sun May 14 00:38:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A9F1D61781; Sun, 14 May 2017 00:38:43 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE57B12FE; Sun, 14 May 2017 00:38:42 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4E0cfnE028320; Sun, 14 May 2017 00:38:41 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4E0cfLN028319; Sun, 14 May 2017 00:38:41 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705140038.v4E0cfLN028319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 14 May 2017 00:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318262 - head/usr.sbin/mountd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 00:38:43 -0000 Author: rmacklem Date: Sun May 14 00:38:41 2017 New Revision: 318262 URL: https://svnweb.freebsd.org/changeset/base/318262 Log: Change the default uid/gid values for nobody/nogroup to 65534/65533. The default values found in /etc/passwd and /etc/group are 65534, 65533. In mountd.c, the defaults were -2, which was 65534 back when uid_t was 16bits. Without this patch, a file created by root on an NFS exported volume without the "-root=" export option will end up owned by uid 4**32 - 2. When discussed on freebsd-current@, it seemed that users preferred the values being changed to 65534/65533. I have not added code to acquire these values from the databases, since the mountd daemon might get "stuck" during startup waiting for a non-responsive password database server. Discussed on: freebsd-current Modified: head/usr.sbin/mountd/mountd.c Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Sun May 14 00:23:27 2017 (r318261) +++ head/usr.sbin/mountd/mountd.c Sun May 14 00:38:41 2017 (r318262) @@ -230,9 +230,9 @@ static char **exnames; static char **hosts = NULL; static struct xucred def_anon = { XUCRED_VERSION, - (uid_t)-2, + (uid_t)65534, 1, - { (gid_t)-2 }, + { (gid_t)65533 }, NULL }; static int force_v2 = 0; @@ -2893,8 +2893,8 @@ parsecred(char *namelist, struct xucred /* * Set up the unprivileged user. */ - cr->cr_uid = -2; - cr->cr_groups[0] = -2; + cr->cr_uid = 65534; + cr->cr_groups[0] = 65533; cr->cr_ngroups = 1; /* * Get the user's password table entry. From owner-svn-src-all@freebsd.org Sun May 14 03:35:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81EA6D61198; Sun, 14 May 2017 03:35:11 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4C0AFED7; Sun, 14 May 2017 03:35:10 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 8A37E3C5759; Sun, 14 May 2017 13:35:01 +1000 (AEST) Date: Sun, 14 May 2017 13:35:00 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Rick Macklem cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318262 - head/usr.sbin/mountd In-Reply-To: <201705140038.v4E0cfLN028319@repo.freebsd.org> Message-ID: <20170514132052.M1020@besplex.bde.org> References: <201705140038.v4E0cfLN028319@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=H1DrezM2EZjF7fugAWYA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 03:35:11 -0000 On Sun, 14 May 2017, Rick Macklem wrote: > Log: > Change the default uid/gid values for nobody/nogroup to 65534/65533. > > The default values found in /etc/passwd and /etc/group are 65534, 65533. > In mountd.c, the defaults were -2, which was 65534 back when uid_t was 16bits. > Without this patch, a file created by root on an NFS exported volume without > the "-root=" export option will end up owned by uid 4**32 - 2. > When discussed on freebsd-current@, it seemed that users preferred the > values being changed to 65534/65533. I got used to 4294967294. The large number makes it easy to see files created by root on another system. I mostly use nfs without maproot, and create such files often using tmp directories to transfer files. > I have not added code to acquire these values from the databases, since > the mountd daemon might get "stuck" during startup waiting for a non-responsive > password database server. > > Discussed on: freebsd-current > > Modified: > head/usr.sbin/mountd/mountd.c exports(5) is not modified, so still documents -2:-2 but not the actual value of 4294967294:4294967294. It seems dangerous to change the documented default. What happens if the server only supports 16-bit (or 15-bit, or 8-bit) uids? > Modified: head/usr.sbin/mountd/mountd.c > ============================================================================== > --- head/usr.sbin/mountd/mountd.c Sun May 14 00:23:27 2017 (r318261) > +++ head/usr.sbin/mountd/mountd.c Sun May 14 00:38:41 2017 (r318262) > @@ -230,9 +230,9 @@ static char **exnames; > static char **hosts = NULL; > static struct xucred def_anon = { > XUCRED_VERSION, > - (uid_t)-2, > + (uid_t)65534, > 1, > - { (gid_t)-2 }, > + { (gid_t)65533 }, > NULL > }; > static int force_v2 = 0; The casts are now bogus. They might have been needed to avoid warnings about possible sign extension bugs... > @@ -2893,8 +2893,8 @@ parsecred(char *namelist, struct xucred > /* > * Set up the unprivileged user. > */ > - cr->cr_uid = -2; > - cr->cr_groups[0] = -2; > + cr->cr_uid = 65534; > + cr->cr_groups[0] = 65533; > cr->cr_ngroups = 1; > /* > * Get the user's password table entry. But there were no casts here, and the warnings should be the same. Bruce From owner-svn-src-all@freebsd.org Sun May 14 09:07:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA4A9D6C6C2; Sun, 14 May 2017 09:07:14 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AA8D74A; Sun, 14 May 2017 09:07:14 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4E97DEB036988; Sun, 14 May 2017 09:07:13 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4E97DdX036987; Sun, 14 May 2017 09:07:13 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705140907.v4E97DdX036987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 14 May 2017 09:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318263 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 09:07:14 -0000 Author: np Date: Sun May 14 09:07:13 2017 New Revision: 318263 URL: https://svnweb.freebsd.org/changeset/base/318263 Log: cxgbe(4): netmap-only interrupts for a VI do not have an associated rxq or ofld_rxq and should be ignored by vi_intr_iq. MFC after: 3 days. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Sun May 14 00:38:41 2017 (r318262) +++ head/sys/dev/cxgbe/t4_sge.c Sun May 14 09:07:13 2017 (r318263) @@ -969,6 +969,11 @@ vi_intr_iq(struct vi_info *vi, int idx) return (&sc->sge.fwq); nintr = vi->nintr; +#ifdef DEV_NETMAP + /* Do not consider any netmap-only interrupts */ + if (vi->flags & INTR_RXQ && vi->nnmrxq > vi->nrxq) + nintr -= vi->nnmrxq - vi->nrxq; +#endif KASSERT(nintr != 0, ("%s: vi %p has no exclusive interrupts, total interrupts = %d", __func__, vi, sc->intr_count)); From owner-svn-src-all@freebsd.org Sun May 14 10:15:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 655E9D69BD1; Sun, 14 May 2017 10:15:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CAC289D; Sun, 14 May 2017 10:15:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EAF5L6065529; Sun, 14 May 2017 10:15:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EAF5Qd065528; Sun, 14 May 2017 10:15:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705141015.v4EAF5Qd065528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 14 May 2017 10:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318264 - in stable: 10/release/scripts 11/release/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 10:15:06 -0000 Author: gjb Date: Sun May 14 10:15:04 2017 New Revision: 318264 URL: https://svnweb.freebsd.org/changeset/base/318264 Log: MFC r318190: Update release/scripts/atlas-upload.sh to account for API changes made recently by Atlas Hashicorp. The data returned from GET and POST requests has changed, which caused a number of regex patterns to fail to be properly identified as 'success' or 'failure', which ended up in upload/publish failures. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/scripts/atlas-upload.sh Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/scripts/atlas-upload.sh Directory Properties: stable/11/ (props changed) Modified: stable/10/release/scripts/atlas-upload.sh ============================================================================== --- stable/10/release/scripts/atlas-upload.sh Sun May 14 09:07:13 2017 (r318263) +++ stable/10/release/scripts/atlas-upload.sh Sun May 14 10:15:04 2017 (r318264) @@ -132,20 +132,20 @@ main () { echo "Failed to get the token from the API" exit 2; fi - echo ${TOKENRESULT} | grep "\"token\":" > /dev/null + echo ${TOKENRESULT} | grep -E "\"(token|upload_path)\":" > /dev/null if [ $? != 0 ]; then echo "No token found from the API" exit 2 else - TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/".*//') + TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/.*upload_path":"//' -e 's/}$//g' -e 's/"//g') echo "Uploading to Atlas" - UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${ATLAS_UPLOAD_URL}/${TOKEN}) + UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${TOKEN}) # Validate the Upload echo "Validating" VALIDRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") - HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*hosted_token":"//' -e 's/".*//') - if [ ! -z ${HOSTED_TOKEN} -a ! -z ${TOKEN} -a ${HOSTED_TOKEN} != ${TOKEN} ]; then + HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*"hosted"://' -e 's/,.*$//') + if [ ! -z ${TOKEN} -a "${HOSTED_TOKEN}" != "true" ]; then echo "Upload failed, try again." exit 2 fi From owner-svn-src-all@freebsd.org Sun May 14 10:15:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4EF8D69BD7; Sun, 14 May 2017 10:15:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C63889E; Sun, 14 May 2017 10:15:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EAF5jY065536; Sun, 14 May 2017 10:15:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EAF59u065535; Sun, 14 May 2017 10:15:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705141015.v4EAF59u065535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 14 May 2017 10:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318264 - in stable: 10/release/scripts 11/release/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 10:15:06 -0000 Author: gjb Date: Sun May 14 10:15:04 2017 New Revision: 318264 URL: https://svnweb.freebsd.org/changeset/base/318264 Log: MFC r318190: Update release/scripts/atlas-upload.sh to account for API changes made recently by Atlas Hashicorp. The data returned from GET and POST requests has changed, which caused a number of regex patterns to fail to be properly identified as 'success' or 'failure', which ended up in upload/publish failures. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/scripts/atlas-upload.sh Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/scripts/atlas-upload.sh Directory Properties: stable/10/ (props changed) Modified: stable/11/release/scripts/atlas-upload.sh ============================================================================== --- stable/11/release/scripts/atlas-upload.sh Sun May 14 09:07:13 2017 (r318263) +++ stable/11/release/scripts/atlas-upload.sh Sun May 14 10:15:04 2017 (r318264) @@ -132,20 +132,20 @@ main () { echo "Failed to get the token from the API" exit 2; fi - echo ${TOKENRESULT} | grep "\"token\":" > /dev/null + echo ${TOKENRESULT} | grep -E "\"(token|upload_path)\":" > /dev/null if [ $? != 0 ]; then echo "No token found from the API" exit 2 else - TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/".*//') + TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/.*upload_path":"//' -e 's/}$//g' -e 's/"//g') echo "Uploading to Atlas" - UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${ATLAS_UPLOAD_URL}/${TOKEN}) + UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${TOKEN}) # Validate the Upload echo "Validating" VALIDRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") - HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*hosted_token":"//' -e 's/".*//') - if [ ! -z ${HOSTED_TOKEN} -a ! -z ${TOKEN} -a ${HOSTED_TOKEN} != ${TOKEN} ]; then + HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*"hosted"://' -e 's/,.*$//') + if [ ! -z ${TOKEN} -a "${HOSTED_TOKEN}" != "true" ]; then echo "Upload failed, try again." exit 2 fi From owner-svn-src-all@freebsd.org Sun May 14 10:48:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5D6DD6C69D; Sun, 14 May 2017 10:48:48 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 885F41B02; Sun, 14 May 2017 10:48:48 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EAmlJ1077678; Sun, 14 May 2017 10:48:47 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EAmlON077677; Sun, 14 May 2017 10:48:47 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201705141048.v4EAmlON077677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Sun, 14 May 2017 10:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318265 - stable/11/sbin/mksnap_ffs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 10:48:48 -0000 Author: sobomax Date: Sun May 14 10:48:47 2017 New Revision: 318265 URL: https://svnweb.freebsd.org/changeset/base/318265 Log: MFC r316718, r316738: make mksnap_ffs functional in the chroot'ed environment. Modified: stable/11/sbin/mksnap_ffs/mksnap_ffs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/mksnap_ffs/mksnap_ffs.c ============================================================================== --- stable/11/sbin/mksnap_ffs/mksnap_ffs.c Sun May 14 10:15:04 2017 (r318264) +++ stable/11/sbin/mksnap_ffs/mksnap_ffs.c Sun May 14 10:48:47 2017 (r318265) @@ -58,6 +58,33 @@ usage(void) errx(EX_USAGE, "usage: mksnap_ffs snapshot_name"); } +static int +isdir(const char *path, struct stat *stbufp) +{ + + if (stat(path, stbufp) < 0) + return (-1); + if (!S_ISDIR(stbufp->st_mode)) + return (0); + return (1); +} + +static int +issamefs(const char *path, struct statfs *stfsp) +{ + struct statfs stfsbuf; + struct stat stbuf; + + if (isdir(path, &stbuf) != 1) + return (-1); + if (statfs(path, &stfsbuf) < 0) + return (-1); + if ((stfsbuf.f_fsid.val[0] != stfsp->f_fsid.val[0]) || + (stfsbuf.f_fsid.val[1] != stfsp->f_fsid.val[1])) + return (0); + return (1); +} + int main(int argc, char **argv) { @@ -96,16 +123,33 @@ main(int argc, char **argv) } if (statfs(path, &stfsbuf) < 0) err(1, "%s", path); - if (stat(path, &stbuf) < 0) + switch (isdir(path, &stbuf)) { + case -1: err(1, "%s", path); - if (!S_ISDIR(stbuf.st_mode)) + case 0: errx(1, "%s: Not a directory", path); + default: + break; + } if (access(path, W_OK) < 0) err(1, "Lack write permission in %s", path); if ((stbuf.st_mode & S_ISTXT) && stbuf.st_uid != getuid()) errx(1, "Lack write permission in %s: Sticky bit set", path); /* + * Work around an issue when mksnap_ffs is started in chroot'ed + * environment and f_mntonname contains absolute path within + * real root. + */ + for (cp = stfsbuf.f_mntonname; issamefs(cp, &stfsbuf) != 1; + cp = strchrnul(cp + 1, '/')) { + if (cp[0] == '\0') + errx(1, "%s: Not a mount point", stfsbuf.f_mntonname); + } + if (cp != stfsbuf.f_mntonname) + strlcpy(stfsbuf.f_mntonname, cp, sizeof(stfsbuf.f_mntonname)); + + /* * Having verified access to the directory in which the * snapshot is to be built, proceed with creating it. */ From owner-svn-src-all@freebsd.org Sun May 14 11:51:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D045D6CB6A; Sun, 14 May 2017 11:51:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20C461C0B; Sun, 14 May 2017 11:51:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EBpVlU002793; Sun, 14 May 2017 11:51:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EBpVIY002792; Sun, 14 May 2017 11:51:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705141151.v4EBpVIY002792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 14 May 2017 11:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318266 - stable/11/sys/ufs/ffs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 11:51:32 -0000 Author: kib Date: Sun May 14 11:51:30 2017 New Revision: 318266 URL: https://svnweb.freebsd.org/changeset/base/318266 Log: MFC r317908: Remove spl() calls from UFS code. Modified: stable/11/sys/ufs/ffs/ffs_rawread.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_rawread.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_rawread.c Sun May 14 10:48:47 2017 (r318265) +++ stable/11/sys/ufs/ffs/ffs_rawread.c Sun May 14 11:51:30 2017 (r318266) @@ -270,7 +270,6 @@ ffs_rawread_main(struct vnode *vp, int error, nerror; struct buf *bp, *nbp, *tbp; u_int iolen; - int spl; caddr_t udata; long resid; off_t offset; @@ -330,10 +329,7 @@ ffs_rawread_main(struct vnode *vp, } } - spl = splbio(); bwait(bp, PRIBIO, "rawrd"); - splx(spl); - vunmapbuf(bp); iolen = bp->b_bcount - bp->b_resid; @@ -400,9 +396,7 @@ ffs_rawread_main(struct vnode *vp, relpbuf(bp, &ffsrawbufcnt); } if (nbp != NULL) { /* Run down readahead buffer */ - spl = splbio(); bwait(nbp, PRIBIO, "rawrd"); - splx(spl); vunmapbuf(nbp); pbrelvp(nbp); relpbuf(nbp, &ffsrawbufcnt); From owner-svn-src-all@freebsd.org Sun May 14 12:00:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B44A4D6104A; Sun, 14 May 2017 12:00:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DAFF1F1E; Sun, 14 May 2017 12:00:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EC00Wg005985; Sun, 14 May 2017 12:00:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EC00uq005984; Sun, 14 May 2017 12:00:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705141200.v4EC00uq005984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 14 May 2017 12:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318267 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 12:00:01 -0000 Author: kib Date: Sun May 14 12:00:00 2017 New Revision: 318267 URL: https://svnweb.freebsd.org/changeset/base/318267 Log: MFC r317908: Remove spl() calls from UFS code. Modified: stable/10/sys/ufs/ffs/ffs_rawread.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_rawread.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_rawread.c Sun May 14 11:51:30 2017 (r318266) +++ stable/10/sys/ufs/ffs/ffs_rawread.c Sun May 14 12:00:00 2017 (r318267) @@ -274,7 +274,6 @@ ffs_rawread_main(struct vnode *vp, struct buf *bp, *nbp, *tbp; caddr_t sa, nsa, tsa; u_int iolen; - int spl; caddr_t udata; long resid; off_t offset; @@ -339,10 +338,7 @@ ffs_rawread_main(struct vnode *vp, } } - spl = splbio(); bwait(bp, PRIBIO, "rawrd"); - splx(spl); - vunmapbuf(bp); iolen = bp->b_bcount - bp->b_resid; @@ -415,9 +411,7 @@ ffs_rawread_main(struct vnode *vp, relpbuf(bp, &ffsrawbufcnt); } if (nbp != NULL) { /* Run down readahead buffer */ - spl = splbio(); bwait(nbp, PRIBIO, "rawrd"); - splx(spl); vunmapbuf(nbp); pbrelvp(nbp); relpbuf(nbp, &ffsrawbufcnt); From owner-svn-src-all@freebsd.org Sun May 14 12:42:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33020D6C590; Sun, 14 May 2017 12:42:00 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBB601A31; Sun, 14 May 2017 12:41:59 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ECfwmc026106; Sun, 14 May 2017 12:41:58 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ECfwgE026105; Sun, 14 May 2017 12:41:58 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201705141241.v4ECfwgE026105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Sun, 14 May 2017 12:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318268 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 12:42:00 -0000 Author: sobomax Date: Sun May 14 12:41:58 2017 New Revision: 318268 URL: https://svnweb.freebsd.org/changeset/base/318268 Log: MFC r316874: restore ability to shutdown(2) datagram sockets. Modified: stable/11/sys/kern/uipc_socket.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/uipc_socket.c ============================================================================== --- stable/11/sys/kern/uipc_socket.c Sun May 14 12:00:00 2017 (r318267) +++ stable/11/sys/kern/uipc_socket.c Sun May 14 12:41:58 2017 (r318268) @@ -2342,13 +2342,27 @@ int soshutdown(struct socket *so, int how) { struct protosw *pr = so->so_proto; - int error; + int error, soerror_enotconn; if (!(how == SHUT_RD || how == SHUT_WR || how == SHUT_RDWR)) return (EINVAL); + + soerror_enotconn = 0; if ((so->so_state & - (SS_ISCONNECTED | SS_ISCONNECTING | SS_ISDISCONNECTING)) == 0) - return (ENOTCONN); + (SS_ISCONNECTED | SS_ISCONNECTING | SS_ISDISCONNECTING)) == 0) { + /* + * POSIX mandates us to return ENOTCONN when shutdown(2) is + * invoked on a datagram sockets, however historically we would + * actually tear socket down. This is known to be leveraged by + * some applications to unblock process waiting in recvXXX(2) + * by other process that it shares that socket with. Try to meet + * both backward-compatibility and POSIX requirements by forcing + * ENOTCONN but still asking protocol to perform pru_shutdown(). + */ + if (so->so_type != SOCK_DGRAM) + return (ENOTCONN); + soerror_enotconn = 1; + } CURVNET_SET(so->so_vnet); if (pr->pr_usrreqs->pru_flush != NULL) @@ -2359,11 +2373,12 @@ soshutdown(struct socket *so, int how) error = (*pr->pr_usrreqs->pru_shutdown)(so); wakeup(&so->so_timeo); CURVNET_RESTORE(); - return (error); + return ((error == 0 && soerror_enotconn) ? ENOTCONN : error); } wakeup(&so->so_timeo); CURVNET_RESTORE(); - return (0); + + return (soerror_enotconn ? ENOTCONN : 0); } void From owner-svn-src-all@freebsd.org Sun May 14 13:14:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45F50D6CE32; Sun, 14 May 2017 13:14:21 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F20BCF02; Sun, 14 May 2017 13:14:20 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EDEK2G039114; Sun, 14 May 2017 13:14:20 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EDEJrd039111; Sun, 14 May 2017 13:14:19 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705141314.v4EDEJrd039111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 14 May 2017 13:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318269 - in head/bin/sh: . tests/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 13:14:21 -0000 Author: jilles Date: Sun May 14 13:14:19 2017 New Revision: 318269 URL: https://svnweb.freebsd.org/changeset/base/318269 Log: sh: Fix '-' from quoted arithmetic in case/glob pattern range. It does not make much sense to generate the '-' in a pattern bracket expression using arithmetic expansion, but it does not make sense to forbid it either. Try to avoid reprocessing the string if it is unnecessary. Added: head/bin/sh/tests/builtins/case22.0 (contents, props changed) Modified: head/bin/sh/expand.c head/bin/sh/tests/builtins/Makefile Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sun May 14 12:41:58 2017 (r318268) +++ head/bin/sh/expand.c Sun May 14 13:14:19 2017 (r318269) @@ -440,8 +440,15 @@ expari(const char *p, struct nodelist ** fmtstr(expdest, DIGITS(result), ARITH_FORMAT_STR, result); adj = strlen(expdest); STADJUST(adj, expdest); - if (!quoted) - reprocess(expdest - adj - stackblock(), flag, VSNORMAL, 0, dst); + /* + * If this is quoted, a '-' must not indicate a range in [...]. + * If this is not quoted, splitting may occur. + */ + if (quoted ? + result < 0 && begoff > 1 && flag & (EXP_GLOB | EXP_CASE) : + flag & EXP_SPLIT) + reprocess(expdest - adj - stackblock(), flag, VSNORMAL, quoted, + dst); return p; } Modified: head/bin/sh/tests/builtins/Makefile ============================================================================== --- head/bin/sh/tests/builtins/Makefile Sun May 14 12:41:58 2017 (r318268) +++ head/bin/sh/tests/builtins/Makefile Sun May 14 13:14:19 2017 (r318269) @@ -41,6 +41,7 @@ ${PACKAGE}FILES+= case18.0 ${PACKAGE}FILES+= case19.0 ${PACKAGE}FILES+= case20.0 ${PACKAGE}FILES+= case21.0 +${PACKAGE}FILES+= case22.0 ${PACKAGE}FILES+= cd1.0 ${PACKAGE}FILES+= cd2.0 ${PACKAGE}FILES+= cd3.0 Added: head/bin/sh/tests/builtins/case22.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/case22.0 Sun May 14 13:14:19 2017 (r318269) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +case 5 in +[0"$((-9))"]) echo bad1 ;; +esac + +case - in +[0"$((-9))"]) ;; +*) echo bad2 ;; +esac From owner-svn-src-all@freebsd.org Sun May 14 13:21:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30453D6CF9D; Sun, 14 May 2017 13:21:35 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670083.outbound.protection.outlook.com [40.107.67.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC746139B; Sun, 14 May 2017 13:21:34 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Sun, 14 May 2017 13:21:31 +0000 Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) with mapi id 15.01.1084.026; Sun, 14 May 2017 13:21:31 +0000 From: Rick Macklem To: Bruce Evans , Rick Macklem CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r318262 - head/usr.sbin/mountd Thread-Topic: svn commit: r318262 - head/usr.sbin/mountd Thread-Index: AQHSzGMb0lgM+E2Muk292CpYffx7q6Hz0MV0 Date: Sun, 14 May 2017 13:21:31 +0000 Message-ID: References: <201705140038.v4E0cfLN028319@repo.freebsd.org>, <20170514132052.M1020@besplex.bde.org> In-Reply-To: <20170514132052.M1020@besplex.bde.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: optusnet.com.au; dkim=none (message not signed) header.d=none;optusnet.com.au; dmarc=none action=none header.from=uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTXPR01MB0189; 7:CgsXGJ4P5TGehgX5zxp73W62lxBf1829LVzKOAkfKBoBvAcgLw4XRpQFfnn6EQ6khVsiDyR6Ode6MCOny9CwZ/RvWodp/ylXdN/VKNsYVp0g2251LerD6J9kbX7y5jHNPcgM6wT92DORVx6amwoVPQn1YUU8Sdni8NV6jjYWimoupwoUWTQG4KcyNBjkqiaC+r2mKGN2CSm52Nte6zwLMJnwxKALLQt9DRn01phTRyLZ3+075cXVjRy97TMqKaWatOybqr7GbB+JFGV3cDOeR+G6hHw3f/oXIV05FtcYCU11OQp+DVqNbzS/lTRmKxtnD2gnxtkWi9+27Fy2Je08GA== x-ms-office365-filtering-correlation-id: ba827066-d2f4-40a2-ae12-08d49acc2312 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:YTXPR01MB0189; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(46150409022019)(96448707832919); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123564025)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123562025)(20161123560025)(6072148); SRVR:YTXPR01MB0189; BCL:0; PCL:0; RULEID:; SRVR:YTXPR01MB0189; x-forefront-prvs: 03077579FF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(6009001)(39840400002)(39410400002)(39400400002)(39450400003)(24454002)(377454003)(229853002)(478600001)(8676002)(6506006)(77096006)(2906002)(33656002)(55016002)(2950100002)(38730400002)(8936002)(81166006)(6436002)(6246003)(54906002)(9686003)(53936002)(50986999)(74316002)(305945005)(7696004)(102836003)(54356999)(76176999)(5660300001)(189998001)(2900100001)(86362001)(122556002)(53546009)(551544002)(25786009)(3280700002)(3660700001)(74482002)(4326008)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0189; H:YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 14 May 2017 13:21:31.7421 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0189 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 13:21:35 -0000 Oh, and if the commit doesn't get reverted, I do plan on committing a change to the exports.5 man page. I just held off on that until the dust settles. I had expected more discussion on freebsd-current@ w.r.t. this, but after several days of no messages, I went ahead with what the two responders seemed to support. rick ________________________________________ From: Bruce Evans Sent: Saturday, May 13, 2017 11:35:00 PM To: Rick Macklem Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freeb= sd.org Subject: Re: svn commit: r318262 - head/usr.sbin/mountd On Sun, 14 May 2017, Rick Macklem wrote: > Log: > Change the default uid/gid values for nobody/nogroup to 65534/65533. > > The default values found in /etc/passwd and /etc/group are 65534, 65533. > In mountd.c, the defaults were -2, which was 65534 back when uid_t was 1= 6bits. > Without this patch, a file created by root on an NFS exported volume wit= hout > the "-root=3D" export option will end up owned by uid 4**32 - 2. > When discussed on freebsd-current@, it seemed that users preferred the > values being changed to 65534/65533. I got used to 4294967294. The large number makes it easy to see files created by root on another system. I mostly use nfs without maproot, and create such files often using tmp directories to transfer files. > I have not added code to acquire these values from the databases, since > the mountd daemon might get "stuck" during startup waiting for a non-res= ponsive > password database server. > > Discussed on: freebsd-current > > Modified: > head/usr.sbin/mountd/mountd.c exports(5) is not modified, so still documents -2:-2 but not the actual value of 4294967294:4294967294. It seems dangerous to change the documente= d default. What happens if the server only supports 16-bit (or 15-bit, or 8-bit) uids? > Modified: head/usr.sbin/mountd/mountd.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/usr.sbin/mountd/mountd.c Sun May 14 00:23:27 2017 (r3= 18261) > +++ head/usr.sbin/mountd/mountd.c Sun May 14 00:38:41 2017 (r3= 18262) > @@ -230,9 +230,9 @@ static char **exnames; > static char **hosts =3D NULL; > static struct xucred def_anon =3D { > XUCRED_VERSION, > - (uid_t)-2, > + (uid_t)65534, > 1, > - { (gid_t)-2 }, > + { (gid_t)65533 }, > NULL > }; > static int force_v2 =3D 0; The casts are now bogus. They might have been needed to avoid warnings about possible sign extension bugs... > @@ -2893,8 +2893,8 @@ parsecred(char *namelist, struct xucred > /* > * Set up the unprivileged user. > */ > - cr->cr_uid =3D -2; > - cr->cr_groups[0] =3D -2; > + cr->cr_uid =3D 65534; > + cr->cr_groups[0] =3D 65533; > cr->cr_ngroups =3D 1; > /* > * Get the user's password table entry. But there were no casts here, and the warnings should be the same. Bruce From owner-svn-src-all@freebsd.org Sun May 14 13:59:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66883D6CAEE; Sun, 14 May 2017 13:59:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32F876CF; Sun, 14 May 2017 13:59:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EDxbjF055847; Sun, 14 May 2017 13:59:37 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EDxbks055846; Sun, 14 May 2017 13:59:37 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141359.v4EDxbks055846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 13:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318270 - stable/11/sbin/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 13:59:38 -0000 Author: marius Date: Sun May 14 13:59:36 2017 New Revision: 318270 URL: https://svnweb.freebsd.org/changeset/base/318270 Log: MFC: r317343 In fill_ip6(), the value of the pointer av changes before it is free(3)ed. Thus, introduce a new variable to track the original value. Modified: stable/11/sbin/ipfw/ipv6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipv6.c ============================================================================== --- stable/11/sbin/ipfw/ipv6.c Sun May 14 13:14:19 2017 (r318269) +++ stable/11/sbin/ipfw/ipv6.c Sun May 14 13:59:36 2017 (r318270) @@ -339,6 +339,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i { int len = 0; struct in6_addr *d = &(cmd->addr6); + char *oav; /* * Needed for multiple address. * Note d[1] points to struct in6_add r mask6 of cmd @@ -365,7 +366,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i return (1); } - av = strdup(av); + oav = av = strdup(av); while (av) { /* * After the address we can have '/' indicating a mask, @@ -446,7 +447,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i if (len + 1 > F_LEN_MASK) errx(EX_DATAERR, "address list too long"); cmd->o.len |= len+1; - free(av); + free(oav); return (1); } From owner-svn-src-all@freebsd.org Sun May 14 13:59:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EEBAD6CB21; Sun, 14 May 2017 13:59:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5ECB26DD; Sun, 14 May 2017 13:59:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EDxeo7055896; Sun, 14 May 2017 13:59:40 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EDxeeg055895; Sun, 14 May 2017 13:59:40 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141359.v4EDxeeg055895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 13:59:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318271 - stable/10/sbin/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 13:59:41 -0000 Author: marius Date: Sun May 14 13:59:40 2017 New Revision: 318271 URL: https://svnweb.freebsd.org/changeset/base/318271 Log: MFC: r317343 In fill_ip6(), the value of the pointer av changes before it is free(3)ed. Thus, introduce a new variable to track the original value. Modified: stable/10/sbin/ipfw/ipv6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ipfw/ipv6.c ============================================================================== --- stable/10/sbin/ipfw/ipv6.c Sun May 14 13:59:36 2017 (r318270) +++ stable/10/sbin/ipfw/ipv6.c Sun May 14 13:59:40 2017 (r318271) @@ -338,6 +338,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i { int len = 0; struct in6_addr *d = &(cmd->addr6); + char *oav; /* * Needed for multiple address. * Note d[1] points to struct in6_add r mask6 of cmd @@ -375,7 +376,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i return (1); } - av = strdup(av); + oav = av = strdup(av); while (av) { /* * After the address we can have '/' indicating a mask, @@ -451,7 +452,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i if (len + 1 > F_LEN_MASK) errx(EX_DATAERR, "address list too long"); cmd->o.len |= len+1; - free(av); + free(oav); return (1); } From owner-svn-src-all@freebsd.org Sun May 14 14:04:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F1BAD6CD65; Sun, 14 May 2017 14:04:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE53ACC0; Sun, 14 May 2017 14:04:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EE4PwP059856; Sun, 14 May 2017 14:04:25 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EE4PJ0059855; Sun, 14 May 2017 14:04:25 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141404.v4EE4PJ0059855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 14:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318272 - stable/11/sys/sparc64/pci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 14:04:27 -0000 Author: marius Date: Sun May 14 14:04:25 2017 New Revision: 318272 URL: https://svnweb.freebsd.org/changeset/base/318272 Log: MFC: r317578 Fix a bug introduced as part of r287726; use the right device_t for determining the softc of the bridge in psycho_route_interrupt(). [1] While at it, update the corresponding comment that the code in question is also necessary for U30s in addition to E450s (a fact that has been known for ages). PR: 218478 [1] Submitted by: Yoshihiko Iwama [1] Modified: stable/11/sys/sparc64/pci/psycho.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sparc64/pci/psycho.c ============================================================================== --- stable/11/sys/sparc64/pci/psycho.c Sun May 14 13:59:40 2017 (r318271) +++ stable/11/sys/sparc64/pci/psycho.c Sun May 14 14:04:25 2017 (r318272) @@ -942,14 +942,14 @@ psycho_route_interrupt(device_t bridge, if (pin > 4) return (pin); /* - * Guess the INO; we always assume that this is a non-OBIO - * device, and that pin is a "real" intpin number. Determine - * the mapping register to be used by the slot number. - * We only need to do this on E450s, it seems; here, the slot numbers - * for bus A are one-based, while those for bus B seemingly have an - * offset of 2 (hence the factor of 3 below). + * Guess the INO; we always assume that this is a non-OBIO device, + * and that pin is a "real" intpin number. Determine the mapping + * register to be used by the slot number. + * We only need to do this on E450s and U30s, though; here, the + * slot numbers for bus A are one-based, while those for bus B + * seemingly have an offset of 2 (hence the factor of 3 below). */ - sc = device_get_softc(dev); + sc = device_get_softc(bridge); intrmap = PSR_PCIA0_INT_MAP + 8 * (pci_get_slot(dev) - 1 + 3 * sc->sc_half); mintr = INTINO(PSYCHO_READ8(sc, intrmap)) + pin - 1; From owner-svn-src-all@freebsd.org Sun May 14 14:04:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95E74D6CD9B; Sun, 14 May 2017 14:04:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C88CCF1; Sun, 14 May 2017 14:04:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EE4WaS059917; Sun, 14 May 2017 14:04:32 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EE4WHq059916; Sun, 14 May 2017 14:04:32 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141404.v4EE4WHq059916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 14:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318273 - stable/10/sys/sparc64/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 14:04:33 -0000 Author: marius Date: Sun May 14 14:04:32 2017 New Revision: 318273 URL: https://svnweb.freebsd.org/changeset/base/318273 Log: MFC: r317578 Fix a bug introduced as part of r287726 (MFCed to stable/10 in r292789); use the right device_t for determining the softc of the bridge in psycho_route_interrupt(). [1] While at it, update the corresponding comment that the code in question is also necessary for U30s in addition to E450s (a fact that has been known for ages). PR: 218478 [1] Submitted by: Yoshihiko Iwama [1] Modified: stable/10/sys/sparc64/pci/psycho.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sparc64/pci/psycho.c ============================================================================== --- stable/10/sys/sparc64/pci/psycho.c Sun May 14 14:04:25 2017 (r318272) +++ stable/10/sys/sparc64/pci/psycho.c Sun May 14 14:04:32 2017 (r318273) @@ -943,14 +943,14 @@ psycho_route_interrupt(device_t bridge, if (pin > 4) return (pin); /* - * Guess the INO; we always assume that this is a non-OBIO - * device, and that pin is a "real" intpin number. Determine - * the mapping register to be used by the slot number. - * We only need to do this on E450s, it seems; here, the slot numbers - * for bus A are one-based, while those for bus B seemingly have an - * offset of 2 (hence the factor of 3 below). + * Guess the INO; we always assume that this is a non-OBIO device, + * and that pin is a "real" intpin number. Determine the mapping + * register to be used by the slot number. + * We only need to do this on E450s and U30s, though; here, the + * slot numbers for bus A are one-based, while those for bus B + * seemingly have an offset of 2 (hence the factor of 3 below). */ - sc = device_get_softc(dev); + sc = device_get_softc(bridge); intrmap = PSR_PCIA0_INT_MAP + 8 * (pci_get_slot(dev) - 1 + 3 * sc->sc_half); mintr = INTINO(PSYCHO_READ8(sc, intrmap)) + pin - 1; From owner-svn-src-all@freebsd.org Sun May 14 14:21:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAE7BD6C563; Sun, 14 May 2017 14:21:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90F431866; Sun, 14 May 2017 14:21:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EEL94k064959; Sun, 14 May 2017 14:21:09 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EEL9eW064956; Sun, 14 May 2017 14:21:09 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141421.v4EEL9eW064956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 14:21:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318274 - in stable/11/sys: kern sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 14:21:11 -0000 Author: marius Date: Sun May 14 14:21:09 2017 New Revision: 318274 URL: https://svnweb.freebsd.org/changeset/base/318274 Log: MFC: r317982 - Also outside of the KOBJOPLOOKUP macro - which in turn is used by the code auto-generated for *.m - kobj_lookup_method(9) is useful; for example in back-ends or base class device drivers in order to determine whether a default method has been overridden. Thus, allow for the kobj_method_t pointer argument - used by KOBJOPLOOKUP in order to update the cache entry - of kobj_lookup_method(9), to be NULL. Actually, that pointer is redundant as it's just set to the same kobj_method_t that the kobj_lookup_method(9) function returns in the first place, but probably it serves to reduce the number of instructions generated for KOBJOPLOOKUP. - For the same reason, move updating kobj_lookup_{hits,misses} (if KOBJ_STATS is defined) from kobj_lookup_method(9) to KOBJOPLOOKUP. As a side-effect, this gets rid of the convoluted approach of always incrementing kobj_lookup_hits in KOBJOPLOOKUP and then in case of a cache miss, decrementing it in kobj_lookup_method(9) again. Modified: stable/11/sys/kern/subr_kobj.c stable/11/sys/sys/kobj.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_kobj.c ============================================================================== --- stable/11/sys/kern/subr_kobj.c Sun May 14 14:04:32 2017 (r318273) +++ stable/11/sys/kern/subr_kobj.c Sun May 14 14:21:09 2017 (r318274) @@ -213,19 +213,11 @@ kobj_lookup_method(kobj_class_t cls, { kobj_method_t *ce; -#ifdef KOBJ_STATS - /* - * Correct for the 'hit' assumption in KOBJOPLOOKUP and record - * a 'miss'. - */ - kobj_lookup_hits--; - kobj_lookup_misses++; -#endif - ce = kobj_lookup_method_mi(cls, desc); if (!ce) ce = &desc->deflt; - *cep = ce; + if (cep) + *cep = ce; return ce; } Modified: stable/11/sys/sys/kobj.h ============================================================================== --- stable/11/sys/sys/kobj.h Sun May 14 14:04:32 2017 (r318273) +++ stable/11/sys/sys/kobj.h Sun May 14 14:21:09 2017 (r318274) @@ -226,10 +226,12 @@ extern u_int kobj_lookup_misses; kobj_method_t **_cep = \ &OPS->cache[_desc->id & (KOBJ_CACHE_SIZE-1)]; \ kobj_method_t *_ce = *_cep; \ - kobj_lookup_hits++; /* assume hit */ \ - if (_ce->desc != _desc) \ + if (_ce->desc != _desc) { \ _ce = kobj_lookup_method(OPS->cls, \ _cep, _desc); \ + kobj_lookup_misses++; \ + } else \ + kobj_lookup_hits++; \ _m = _ce->func; \ } while(0) #else From owner-svn-src-all@freebsd.org Sun May 14 14:21:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52EA8D6C577; Sun, 14 May 2017 14:21:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08435186D; Sun, 14 May 2017 14:21:12 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EELC8G065008; Sun, 14 May 2017 14:21:12 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EELBeA065006; Sun, 14 May 2017 14:21:11 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141421.v4EELBeA065006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 14:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318275 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 14:21:13 -0000 Author: marius Date: Sun May 14 14:21:11 2017 New Revision: 318275 URL: https://svnweb.freebsd.org/changeset/base/318275 Log: MFC: r317982 - Also outside of the KOBJOPLOOKUP macro - which in turn is used by the code auto-generated for *.m - kobj_lookup_method(9) is useful; for example in back-ends or base class device drivers in order to determine whether a default method has been overridden. Thus, allow for the kobj_method_t pointer argument - used by KOBJOPLOOKUP in order to update the cache entry - of kobj_lookup_method(9), to be NULL. Actually, that pointer is redundant as it's just set to the same kobj_method_t that the kobj_lookup_method(9) function returns in the first place, but probably it serves to reduce the number of instructions generated for KOBJOPLOOKUP. - For the same reason, move updating kobj_lookup_{hits,misses} (if KOBJ_STATS is defined) from kobj_lookup_method(9) to KOBJOPLOOKUP. As a side-effect, this gets rid of the convoluted approach of always incrementing kobj_lookup_hits in KOBJOPLOOKUP and then in case of a cache miss, decrementing it in kobj_lookup_method(9) again. Modified: stable/10/sys/kern/subr_kobj.c stable/10/sys/sys/kobj.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_kobj.c ============================================================================== --- stable/10/sys/kern/subr_kobj.c Sun May 14 14:21:09 2017 (r318274) +++ stable/10/sys/kern/subr_kobj.c Sun May 14 14:21:11 2017 (r318275) @@ -213,19 +213,11 @@ kobj_lookup_method(kobj_class_t cls, { kobj_method_t *ce; -#ifdef KOBJ_STATS - /* - * Correct for the 'hit' assumption in KOBJOPLOOKUP and record - * a 'miss'. - */ - kobj_lookup_hits--; - kobj_lookup_misses++; -#endif - ce = kobj_lookup_method_mi(cls, desc); if (!ce) ce = &desc->deflt; - *cep = ce; + if (cep) + *cep = ce; return ce; } Modified: stable/10/sys/sys/kobj.h ============================================================================== --- stable/10/sys/sys/kobj.h Sun May 14 14:21:09 2017 (r318274) +++ stable/10/sys/sys/kobj.h Sun May 14 14:21:11 2017 (r318275) @@ -226,10 +226,12 @@ extern u_int kobj_lookup_misses; kobj_method_t **_cep = \ &OPS->cache[_desc->id & (KOBJ_CACHE_SIZE-1)]; \ kobj_method_t *_ce = *_cep; \ - kobj_lookup_hits++; /* assume hit */ \ - if (_ce->desc != _desc) \ + if (_ce->desc != _desc) { \ _ce = kobj_lookup_method(OPS->cls, \ _cep, _desc); \ + kobj_lookup_misses++; \ + } else \ + kobj_lookup_hits++; \ _m = _ce->func; \ } while(0) #else From owner-svn-src-all@freebsd.org Sun May 14 14:28:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28A9ED6C8F9; Sun, 14 May 2017 14:28:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED04B1E59; Sun, 14 May 2017 14:28:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EERx9c068414; Sun, 14 May 2017 14:27:59 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EERxAX068413; Sun, 14 May 2017 14:27:59 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141427.v4EERxAX068413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 14:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318276 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 14:28:01 -0000 Author: marius Date: Sun May 14 14:27:59 2017 New Revision: 318276 URL: https://svnweb.freebsd.org/changeset/base/318276 Log: Describe Intel Apollo Lake and Braswell USB 3.0 controllers. Modified: head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Sun May 14 14:21:11 2017 (r318275) +++ head/sys/dev/usb/controller/xhci_pci.c Sun May 14 14:27:59 2017 (r318276) @@ -116,6 +116,10 @@ xhci_pci_match(device_t self) case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); + case 0x22b58086: + return ("Intel Braswell USB 3.0 controller"); + case 0x5aa88086: + return ("Intel Apollo Lake USB 3.0 controller"); case 0x8c318086: return ("Intel Lynx Point USB 3.0 controller"); case 0x8cb18086: From owner-svn-src-all@freebsd.org Sun May 14 17:10:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58186D6C8C7; Sun, 14 May 2017 17:10:57 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28011BA3; Sun, 14 May 2017 17:10:57 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EHAuwP032858; Sun, 14 May 2017 17:10:56 GMT (envelope-from jasone@FreeBSD.org) Received: (from jasone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EHAuGg032848; Sun, 14 May 2017 17:10:56 GMT (envelope-from jasone@FreeBSD.org) Message-Id: <201705141710.v4EHAuGg032848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jasone set sender to jasone@FreeBSD.org using -f From: Jason Evans Date: Sun, 14 May 2017 17:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318277 - stable/11/lib/libthr/thread X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 17:10:57 -0000 Author: jasone Date: Sun May 14 17:10:55 2017 New Revision: 318277 URL: https://svnweb.freebsd.org/changeset/base/318277 Log: MFC r318254: Fix __pthread_mutex_trylock() to call THR_CRITICAL_LEAVE() on failure rather than on success. This regression was introduced by r300043 (Add implementation of robust mutexes...). Modified: stable/11/lib/libthr/thread/thr_mutex.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libthr/thread/thr_mutex.c ============================================================================== --- stable/11/lib/libthr/thread/thr_mutex.c Sun May 14 14:27:59 2017 (r318276) +++ stable/11/lib/libthr/thread/thr_mutex.c Sun May 14 17:10:55 2017 (r318277) @@ -631,7 +631,7 @@ __pthread_mutex_trylock(pthread_mutex_t } /* else {} */ if (robust) _mutex_leave_robust(curthread, m); - if ((ret == 0 || ret == EOWNERDEAD) && + if (ret != 0 && ret != EOWNERDEAD && (m->m_flags & PMUTEX_FLAG_PRIVATE) != 0) THR_CRITICAL_LEAVE(curthread); return (ret); From owner-svn-src-all@freebsd.org Sun May 14 18:47:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CFDCD6C894; Sun, 14 May 2017 18:47:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 582FAE4; Sun, 14 May 2017 18:47:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EIlARS073017; Sun, 14 May 2017 18:47:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EIlAdK073015; Sun, 14 May 2017 18:47:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705141847.v4EIlAdK073015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 14 May 2017 18:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318278 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 18:47:11 -0000 Author: ngie Date: Sun May 14 18:47:09 2017 New Revision: 318278 URL: https://svnweb.freebsd.org/changeset/base/318278 Log: Mark errf _Noreturn, and mark errf and warn __printflike The _Noreturn attribute was added to placate Coverity and other static analysis tools. The __printflike attribute was added to catch issues with the calls related to printf(3) abuse. - Modify the code to facilitate the __printflike attribute addition. - Convert errf calls in to_mb(..) and to_mb_string(..) to warn(..) so the calls will return instead of exiting, as the code suggests it should. Differential Revision: D10704 MFC after: 1 month Reviewed by: pfg Sponsored by: Dell EMC Isilon Modified: head/usr.bin/localedef/localedef.c head/usr.bin/localedef/localedef.h head/usr.bin/localedef/wide.c Modified: head/usr.bin/localedef/localedef.c ============================================================================== --- head/usr.bin/localedef/localedef.c Sun May 14 17:10:55 2017 (r318277) +++ head/usr.bin/localedef/localedef.c Sun May 14 18:47:09 2017 (r318278) @@ -119,7 +119,7 @@ open_category(void) */ file = fopen(category_file(), "w"); if (file == NULL) { - errf(strerror(errno)); + errf("%s", strerror(errno)); return (NULL); } return (file); @@ -131,11 +131,11 @@ close_category(FILE *f) if (fchmod(fileno(f), 0644) < 0) { (void) fclose(f); (void) unlink(category_file()); - errf(strerror(errno)); + errf("%s", strerror(errno)); } if (fclose(f) < 0) { (void) unlink(category_file()); - errf(strerror(errno)); + errf("%s", strerror(errno)); } if (verbose) { (void) fprintf(stdout, "done.\n"); @@ -195,13 +195,13 @@ putl_category(const char *s, FILE *f) if (s && fputs(s, f) == EOF) { (void) fclose(f); (void) unlink(category_file()); - errf(strerror(errno)); + errf("%s", strerror(errno)); return (EOF); } if (fputc('\n', f) == EOF) { (void) fclose(f); (void) unlink(category_file()); - errf(strerror(errno)); + errf("%s", strerror(errno)); return (EOF); } return (0); @@ -216,7 +216,7 @@ wr_category(void *buf, size_t sz, FILE * if (fwrite(buf, sz, 1, f) < 1) { (void) fclose(f); (void) unlink(category_file()); - errf(strerror(errno)); + errf("%s", strerror(errno)); return (EOF); } return (0); @@ -331,7 +331,7 @@ main(int argc, char **argv) while ((dir = opendir(locname)) == NULL) { if ((errno != ENOENT) || (mkdir(locname, 0755) < 0)) { - errf(strerror(errno)); + errf("%s", strerror(errno)); } } (void) closedir(dir); Modified: head/usr.bin/localedef/localedef.h ============================================================================== --- head/usr.bin/localedef/localedef.h Sun May 14 17:10:55 2017 (r318277) +++ head/usr.bin/localedef/localedef.h Sun May 14 18:47:09 2017 (r318278) @@ -35,6 +35,7 @@ */ /* Common header files. */ +#include #include #include #include @@ -54,8 +55,8 @@ extern int warnings; int yylex(void); void yyerror(const char *); -void errf(const char *, ...); -void warn(const char *, ...); +_Noreturn void errf(const char *, ...) __printflike(1, 2); +void warn(const char *, ...) __printflike(1, 2); int putl_category(const char *, FILE *); int wr_category(void *, size_t, FILE *); Modified: head/usr.bin/localedef/wide.c ============================================================================== --- head/usr.bin/localedef/wide.c Sun May 14 17:10:55 2017 (r318277) +++ head/usr.bin/localedef/wide.c Sun May 14 18:47:09 2017 (r318278) @@ -598,7 +598,7 @@ to_mb(char *mb, wchar_t wc) int rv; if ((rv = _tomb(mb, wc)) < 0) { - errf(widemsg); + warn("%s", widemsg); free(widemsg); widemsg = NULL; } @@ -614,7 +614,7 @@ to_mb_string(const wchar_t *wcs) mbs = malloc((wcslen(wcs) * mb_cur_max) + 1); if (mbs == NULL) { - errf("out of memory"); + warn("out of memory"); return (NULL); } ptr = mbs; From owner-svn-src-all@freebsd.org Sun May 14 20:17:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F4FD6D42B; Sun, 14 May 2017 20:17:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C9371C96; Sun, 14 May 2017 20:17:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EKHplk011011; Sun, 14 May 2017 20:17:51 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EKHop0011008; Sun, 14 May 2017 20:17:50 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705142017.v4EKHop0011008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 14 May 2017 20:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318279 - in stable/11/bin/sh: . tests/builtins X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 20:17:52 -0000 Author: jilles Date: Sun May 14 20:17:50 2017 New Revision: 318279 URL: https://svnweb.freebsd.org/changeset/base/318279 Log: MFC r317912: sh: Fix INTOFF leak after a builtin with different locale settings. After executing a builtin with different locale settings such as LC_ALL=C true SIGINT handling was left disabled indefinitely. Added: stable/11/bin/sh/tests/builtins/locale2.0 - copied unchanged from r317912, head/bin/sh/tests/builtins/locale2.0 Modified: stable/11/bin/sh/tests/builtins/Makefile stable/11/bin/sh/var.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/sh/tests/builtins/Makefile ============================================================================== --- stable/11/bin/sh/tests/builtins/Makefile Sun May 14 18:47:09 2017 (r318278) +++ stable/11/bin/sh/tests/builtins/Makefile Sun May 14 20:17:50 2017 (r318279) @@ -117,6 +117,7 @@ ${PACKAGE}FILES+= local7.0 .if ${MK_NLS} != "no" ${PACKAGE}FILES+= locale1.0 .endif +${PACKAGE}FILES+= locale2.0 ${PACKAGE}FILES+= printf1.0 ${PACKAGE}FILES+= printf2.0 ${PACKAGE}FILES+= printf3.0 Copied: stable/11/bin/sh/tests/builtins/locale2.0 (from r317912, head/bin/sh/tests/builtins/locale2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/builtins/locale2.0 Sun May 14 20:17:50 2017 (r318279, copy of r317912, head/bin/sh/tests/builtins/locale2.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +$SH -c 'LC_ALL=C true; kill -INT $$; echo continued' +r=$? +[ "$r" -gt 128 ] && [ "$(kill -l "$r")" = INT ] Modified: stable/11/bin/sh/var.c ============================================================================== --- stable/11/bin/sh/var.c Sun May 14 18:47:09 2017 (r318278) +++ stable/11/bin/sh/var.c Sun May 14 20:17:50 2017 (r318279) @@ -512,7 +512,7 @@ bltinunsetlocale(void) if (localevar(cmdenviron->args[i])) { setlocale(LC_ALL, ""); updatecharset(); - return; + break; } } INTON; From owner-svn-src-all@freebsd.org Sun May 14 20:39:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7933D6DBE8; Sun, 14 May 2017 20:39:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84B0EC31; Sun, 14 May 2017 20:39:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EKd19d019389; Sun, 14 May 2017 20:39:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EKd1MQ019388; Sun, 14 May 2017 20:39:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705142039.v4EKd1MQ019388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 14 May 2017 20:39:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318280 - head/usr.bin/getconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 20:39:02 -0000 Author: ngie Date: Sun May 14 20:39:01 2017 New Revision: 318280 URL: https://svnweb.freebsd.org/changeset/base/318280 Log: getconf: use nitems(..) to compute NWORDS instead of hardcoding the equivalent macro MFC after: 1 month Sponsored by: Dell EMC Isilon Modified: head/usr.bin/getconf/fake-gperf.awk Modified: head/usr.bin/getconf/fake-gperf.awk ============================================================================== --- head/usr.bin/getconf/fake-gperf.awk Sun May 14 20:17:50 2017 (r318279) +++ head/usr.bin/getconf/fake-gperf.awk Sun May 14 20:39:01 2017 (r318280) @@ -36,7 +36,8 @@ state == 1 { print; next; } state = 3; print "\t{ NULL, 0, 0 }"; print "};"; - print "#define\tNWORDS\t(sizeof(wordlist)/sizeof(wordlist[0]) - 1)"; + print "#include "; + print "#define\tNWORDS\t(nitems(wordlist) - 1)"; print "static const struct map *"; print "in_word_set(const char *word)"; print "{"; From owner-svn-src-all@freebsd.org Sun May 14 21:18:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA5FCD6CCE7; Sun, 14 May 2017 21:18:02 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC453298; Sun, 14 May 2017 21:18:02 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ELI1qH035278; Sun, 14 May 2017 21:18:01 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ELI1FH035277; Sun, 14 May 2017 21:18:01 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705142118.v4ELI1FH035277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 14 May 2017 21:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318281 - head/contrib/ipfilter/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 21:18:03 -0000 Author: cy Date: Sun May 14 21:18:01 2017 New Revision: 318281 URL: https://svnweb.freebsd.org/changeset/base/318281 Log: Separate the ipfilter function/static string from the error with a colon (:) in error messages to assist the user in parsing out the error from where or which object the error message refers to. MFC after: 3 days Modified: head/contrib/ipfilter/lib/ipf_perror.c Modified: head/contrib/ipfilter/lib/ipf_perror.c ============================================================================== --- head/contrib/ipfilter/lib/ipf_perror.c Sun May 14 20:39:01 2017 (r318280) +++ head/contrib/ipfilter/lib/ipf_perror.c Sun May 14 21:18:01 2017 (r318281) @@ -10,7 +10,7 @@ ipf_perror(err, string) if (err == 0) fprintf(stderr, "%s\n", string); else - fprintf(stderr, "%s %s\n", string, ipf_strerror(err)); + fprintf(stderr, "%s: %s\n", string, ipf_strerror(err)); } int From owner-svn-src-all@freebsd.org Sun May 14 21:33:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2C24D6A20A; Sun, 14 May 2017 21:33:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77525D91; Sun, 14 May 2017 21:33:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ELX1WB043235; Sun, 14 May 2017 21:33:01 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ELX1kf043233; Sun, 14 May 2017 21:33:01 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705142133.v4ELX1kf043233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 21:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318282 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 21:33:02 -0000 Author: marius Date: Sun May 14 21:33:01 2017 New Revision: 318282 URL: https://svnweb.freebsd.org/changeset/base/318282 Log: - Unlike as in the PCI case, when attached to ACPI, Intel Bay Trail and Braswell eMMC and SDXC controllers share the same IDs. Like in the PCI case, Braswell eMMC needs the SDHCI_QUIRK_DATA_TIMEOUT_1MHZ quirk (see r311794 for the corresponding change to the sdhci(4) PCI PCI front-end), though. However, due to the shared ACPI IDs, this is trickier to do. - Intel Apollo Lake eMMC and SDXC controllers are affected by the APL18 ("Using 32-bit Addressing Mode With SD/eMMC Controller May Lead to Unpredictable System Behavior") silicon bug [1]. When this erratum hits, typically both SDHCI and XHCI controllers wedge. According to Intel, using ADMA2 with 64-bit addressing and 96-bit descriptors serves as a workaround. Until such times when sdhci(4) has ADMA2 support, flag DMA as broken for affected interfaces. This turns out to work around the problem, too, at the cost of performance. - In the sdhci(4) ACPI front-end, probe the Intel Apollo Lake eMMC and SDXC controllers, too. 1: http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/pentium-celeron-n-series-j-series-datasheet-spec-update.pdf Modified: head/sys/dev/sdhci/sdhci_acpi.c head/sys/dev/sdhci/sdhci_pci.c Modified: head/sys/dev/sdhci/sdhci_acpi.c ============================================================================== --- head/sys/dev/sdhci/sdhci_acpi.c Sun May 14 21:18:01 2017 (r318281) +++ head/sys/dev/sdhci/sdhci_acpi.c Sun May 14 21:33:01 2017 (r318282) @@ -57,25 +57,39 @@ static const struct sdhci_acpi_device { const char *desc; u_int quirks; } sdhci_acpi_devices[] = { - { "80860F14", 1, "Intel Bay Trail eMMC 4.5 Controller", + { "80860F14", 1, "Intel Bay Trail/Braswell eMMC 4.5/4.5.1 Controller", SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | SDHCI_QUIRK_INTEL_POWER_UP_RESET | SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_MMC_DDR52 | SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, - { "80860F14", 3, "Intel Bay Trail SDXC Controller", + { "80860F14", 3, "Intel Bay Trail/Braswell SDXC Controller", SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, - { "80860F16", 0, "Intel Bay Trail SDXC Controller", + { "80860F16", 0, "Intel Bay Trail/Braswell SDXC Controller", SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, + { "80865ACA", 0, "Intel Apollo Lake SDXC Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ + SDHCI_QUIRK_WAIT_WHILE_BUSY | + SDHCI_QUIRK_PRESET_VALUE_BROKEN }, + { "80865ACC", 0, "Intel Apollo Lake eMMC 5.0 Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ + SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | + SDHCI_QUIRK_INTEL_POWER_UP_RESET | + SDHCI_QUIRK_WAIT_WHILE_BUSY | + SDHCI_QUIRK_MMC_DDR52 | + SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | + SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { NULL, 0, NULL, 0} }; static char *sdhci_ids[] = { "80860F14", "80860F16", + "80865ACA", + "80865ACC", NULL }; @@ -249,6 +263,11 @@ sdhci_acpi_attach(device_t dev) return (ENOMEM); } + /* Intel Braswell eMMC 4.5.1 controller quirk */ + if (strcmp(acpi_dev->hid, "80860F14") == 0 && acpi_dev->uid == 1 && + SDHCI_READ_4(dev, &sc->slot, SDHCI_CAPABILITIES) == 0x446cc8b2 && + SDHCI_READ_4(dev, &sc->slot, SDHCI_CAPABILITIES2) == 0x00000807) + sc->quirks |= SDHCI_QUIRK_DATA_TIMEOUT_1MHZ; sc->quirks &= ~sdhci_quirk_clear; sc->quirks |= sdhci_quirk_set; sc->slot.quirks = sc->quirks; Modified: head/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- head/sys/dev/sdhci/sdhci_pci.c Sun May 14 21:18:01 2017 (r318281) +++ head/sys/dev/sdhci/sdhci_pci.c Sun May 14 21:33:01 2017 (r318282) @@ -132,9 +132,11 @@ static const struct sdhci_device { SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { 0x5aca8086, 0xffff, "Intel Apollo Lake SDXC Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { 0x5acc8086, 0xffff, "Intel Apollo Lake eMMC 5.0 Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | SDHCI_QUIRK_INTEL_POWER_UP_RESET | SDHCI_QUIRK_WAIT_WHILE_BUSY | @@ -340,6 +342,7 @@ sdhci_pci_attach(device_t dev) } sc->quirks &= ~sdhci_quirk_clear; sc->quirks |= sdhci_quirk_set; + /* Some controllers need to be bumped into the right mode. */ if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY) sdhci_lower_frequency(dev); From owner-svn-src-all@freebsd.org Sun May 14 23:45:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5FA8D6D65E; Sun, 14 May 2017 23:45:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7936BA61; Sun, 14 May 2017 23:45:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ENjAC7095405; Sun, 14 May 2017 23:45:10 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ENjAKp095404; Sun, 14 May 2017 23:45:10 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705142345.v4ENjAKp095404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 14 May 2017 23:45:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318283 - head/contrib/ipfilter/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 23:45:11 -0000 Author: cy Date: Sun May 14 23:45:10 2017 New Revision: 318283 URL: https://svnweb.freebsd.org/changeset/base/318283 Log: As of r318281, there is no need to put a colon (:) in the message string. MFC after: 3 days X-MFC with: r318281 Modified: head/contrib/ipfilter/lib/printhash_live.c Modified: head/contrib/ipfilter/lib/printhash_live.c ============================================================================== --- head/contrib/ipfilter/lib/printhash_live.c Sun May 14 21:33:01 2017 (r318282) +++ head/contrib/ipfilter/lib/printhash_live.c Sun May 14 23:45:10 2017 (r318283) @@ -59,7 +59,7 @@ printhash_live(hp, fd, name, opts, field printed++; } if (last == 0) - ipferror(fd, "walking hash nodes:"); + ipferror(fd, "walking hash nodes"); if (printed == 0) putchar(';'); From owner-svn-src-all@freebsd.org Mon May 15 03:39:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 673BCD6D790; Mon, 15 May 2017 03:39:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F8E01436; Mon, 15 May 2017 03:39:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4F3daKI088636; Mon, 15 May 2017 03:39:36 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4F3daFF088635; Mon, 15 May 2017 03:39:36 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705150339.v4F3daFF088635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 15 May 2017 03:39:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318284 - head/contrib/ipfilter/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 03:39:37 -0000 Author: cy Date: Mon May 15 03:39:35 2017 New Revision: 318284 URL: https://svnweb.freebsd.org/changeset/base/318284 Log: Just like r318173, which was for outputting IPv6 addresses in tree pools, implement outputting of IPv6 addresses in the ippool debug list of hash type pools (ippool -l -d -t hash). Currently IPv6 in ippool tree type pool handling is mostly implemented. This continues theseries of commits to remediate ippool. This will be MFCed with a yet to be committed series of fixes to ippool after it has been fully remediated. PR: 218433 Modified: head/contrib/ipfilter/lib/printhashnode.c Modified: head/contrib/ipfilter/lib/printhashnode.c ============================================================================== --- head/contrib/ipfilter/lib/printhashnode.c Sun May 14 23:45:10 2017 (r318283) +++ head/contrib/ipfilter/lib/printhashnode.c Mon May 15 03:39:35 2017 (r318284) @@ -35,18 +35,47 @@ printhashnode(iph, ipep, copyfunc, opts, } printf("\n"); } else if ((opts & OPT_DEBUG) != 0) { - PRINTF("\t%d\tAddress: %s", hv, - inet_ntoa(ipe.ipe_addr.in4)); - printmask(ipe.ipe_family, (u_32_t *)&ipe.ipe_mask.in4_addr); - PRINTF("\tRef. Count: %d\tGroup: %s\n", ipe.ipe_ref, - ipe.ipe_group); +#ifdef AF_INET6 + if (ipe.ipe_family == AF_INET6) { + char buf[INET6_ADDRSTRLEN + 1]; + const char *str; + + buf[0] = '\0'; + str = inet_ntop(AF_INET6, &ipe.ipe_addr.in6, + buf, sizeof(buf) - 1); + if (str == NULL) + str = "???"; + PRINTF("\t%d\tAddress: %s", hv, str); + printmask(ipe.ipe_family, (u_32_t *)&ipe.ipe_mask.in4_addr); + PRINTF("\tRef. Count: %d\tGroup: %s\n", ipe.ipe_ref, + ipe.ipe_group); +#ifdef USE_QUAD_T + PRINTF("\tHits: %"PRIu64"\tBytes: %"PRIu64"\n", + ipe.ipe_hits, ipe.ipe_bytes); +#else + PRINTF("\tHits: %lu\tBytes: %lu\n", + ipe.ipe_hits, ipe.ipe_bytes); +#endif /* USE_QUAD_T */ + } else if (ipe.ipe_family == AF_INET) { +#else + if (ipe.ipe_family == AF_INET) { +#endif /* AF_INET6 */ + PRINTF("\t%d\tAddress: %s", hv, + inet_ntoa(ipe.ipe_addr.in4)); + printmask(ipe.ipe_family, (u_32_t *)&ipe.ipe_mask.in4_addr); + PRINTF("\tRef. Count: %d\tGroup: %s\n", ipe.ipe_ref, + ipe.ipe_group); #ifdef USE_QUAD_T - PRINTF("\tHits: %"PRIu64"\tBytes: %"PRIu64"\n", - ipe.ipe_hits, ipe.ipe_bytes); + PRINTF("\tHits: %"PRIu64"\tBytes: %"PRIu64"\n", + ipe.ipe_hits, ipe.ipe_bytes); #else - PRINTF("\tHits: %lu\tBytes: %lu\n", - ipe.ipe_hits, ipe.ipe_bytes); -#endif + PRINTF("\tHits: %lu\tBytes: %lu\n", + ipe.ipe_hits, ipe.ipe_bytes); +#endif /* USE_QUAD_T */ + } else { + PRINTF("\tAddress: family: %d\n", + ipe.ipe_family); + } } else { putchar(' '); printip(ipe.ipe_family, (u_32_t *)&ipe.ipe_addr.in4_addr); From owner-svn-src-all@freebsd.org Mon May 15 10:02:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8B3FD6DDC1; Mon, 15 May 2017 10:02:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66FE5802; Mon, 15 May 2017 10:02:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FA2jdk045124; Mon, 15 May 2017 10:02:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FA2jqi045123; Mon, 15 May 2017 10:02:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705151002.v4FA2jqi045123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 May 2017 10:02:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318285 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 10:02:46 -0000 Author: kib Date: Mon May 15 10:02:45 2017 New Revision: 318285 URL: https://svnweb.freebsd.org/changeset/base/318285 Log: mnt_vnode_next_active: use conventional lock order when trylock fails. Previously, when the VI_TRYLOCK failed, we would spin under the mutex that protects the vnode active list until we either succeeded or noticed that we had hogged the CPU. Since we were violating the lock order, this would guarantee that we would become a hog under any deadlock condition (e.g. a race with vdrop(9) on the same vnode). In the presence of many concurrent threads in sync(2) or vdrop etc, the victim could hang for a long time. Now, avoid spinning by dropping and reacquiring the locks in the conventional lock order when the trylock fails. This requires a dance with the vnode hold count. Submitted by: Tom Rix Tested by: pho Differential revision: https://reviews.freebsd.org/D10692 Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Mon May 15 03:39:35 2017 (r318284) +++ head/sys/kern/vfs_subr.c Mon May 15 10:02:45 2017 (r318285) @@ -5362,6 +5362,84 @@ mnt_vnode_markerfree_active(struct vnode *mvp = NULL; } +/* + * Relock the mp mount vnode list lock with the vp vnode interlock in the + * conventional lock order during mnt_vnode_next_active iteration. + * + * On entry, the mount vnode list lock is held and the vnode interlock is not. + * The list lock is dropped and reacquired. On success, both locks are held. + * On failure, the mount vnode list lock is held but the vnode interlock is + * not, and the procedure may have yielded. + */ +static bool +mnt_vnode_next_active_relock(struct vnode *mvp, struct mount *mp, + struct vnode *vp) +{ + const struct vnode *tmp; + bool held, ret; + + VNASSERT(mvp->v_mount == mp && mvp->v_type == VMARKER && + TAILQ_NEXT(mvp, v_actfreelist) != NULL, mvp, + ("%s: bad marker", __func__)); + VNASSERT(vp->v_mount == mp && vp->v_type != VMARKER, vp, + ("%s: inappropriate vnode", __func__)); + ASSERT_VI_UNLOCKED(vp, __func__); + mtx_assert(&mp->mnt_listmtx, MA_OWNED); + + ret = false; + + TAILQ_REMOVE(&mp->mnt_activevnodelist, mvp, v_actfreelist); + TAILQ_INSERT_BEFORE(vp, mvp, v_actfreelist); + + /* + * Use a hold to prevent vp from disappearing while the mount vnode + * list lock is dropped and reacquired. Normally a hold would be + * acquired with vhold(), but that might try to acquire the vnode + * interlock, which would be a LOR with the mount vnode list lock. + */ + held = vfs_refcount_acquire_if_not_zero(&vp->v_holdcnt); + mtx_unlock(&mp->mnt_listmtx); + if (!held) + goto abort; + VI_LOCK(vp); + if (!vfs_refcount_release_if_not_last(&vp->v_holdcnt)) { + vdropl(vp); + goto abort; + } + mtx_lock(&mp->mnt_listmtx); + + /* + * Determine whether the vnode is still the next one after the marker, + * excepting any other markers. If the vnode has not been doomed by + * vgone() then the hold should have ensured that it remained on the + * active list. If it has been doomed but is still on the active list, + * don't abort, but rather skip over it (avoid spinning on doomed + * vnodes). + */ + tmp = mvp; + do { + tmp = TAILQ_NEXT(tmp, v_actfreelist); + } while (tmp != NULL && tmp->v_type == VMARKER); + if (tmp != vp) { + mtx_unlock(&mp->mnt_listmtx); + VI_UNLOCK(vp); + goto abort; + } + + ret = true; + goto out; +abort: + maybe_yield(); + mtx_lock(&mp->mnt_listmtx); +out: + if (ret) + ASSERT_VI_LOCKED(vp, __func__); + else + ASSERT_VI_UNLOCKED(vp, __func__); + mtx_assert(&mp->mnt_listmtx, MA_OWNED); + return (ret); +} + static struct vnode * mnt_vnode_next_active(struct vnode **mvp, struct mount *mp) { @@ -5371,22 +5449,19 @@ mnt_vnode_next_active(struct vnode **mvp KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); restart: vp = TAILQ_NEXT(*mvp, v_actfreelist); - TAILQ_REMOVE(&mp->mnt_activevnodelist, *mvp, v_actfreelist); while (vp != NULL) { if (vp->v_type == VMARKER) { vp = TAILQ_NEXT(vp, v_actfreelist); continue; } - if (!VI_TRYLOCK(vp)) { - if (mp_ncpus == 1 || should_yield()) { - TAILQ_INSERT_BEFORE(vp, *mvp, v_actfreelist); - mtx_unlock(&mp->mnt_listmtx); - pause("vnacti", 1); - mtx_lock(&mp->mnt_listmtx); - goto restart; - } - continue; - } + /* + * Try-lock because this is the wrong lock order. If that does + * not succeed, drop the mount vnode list lock and try to + * reacquire it and the vnode interlock in the right order. + */ + if (!VI_TRYLOCK(vp) && + !mnt_vnode_next_active_relock(*mvp, mp, vp)) + goto restart; KASSERT(vp->v_type != VMARKER, ("locked marker %p", vp)); KASSERT(vp->v_mount == mp || vp->v_mount == NULL, ("alien vnode on the active list %p %p", vp, mp)); @@ -5396,6 +5471,7 @@ restart: VI_UNLOCK(vp); vp = nvp; } + TAILQ_REMOVE(&mp->mnt_activevnodelist, *mvp, v_actfreelist); /* Check if we are done */ if (vp == NULL) { From owner-svn-src-all@freebsd.org Mon May 15 10:10:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B39BCD6DF52; Mon, 15 May 2017 10:10:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31502A58; Mon, 15 May 2017 10:10:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4FA9xrT076856 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 May 2017 13:09:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4FA9xrT076856 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4FA9xNY076855; Mon, 15 May 2017 13:09:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 15 May 2017 13:09:59 +0300 From: Konstantin Belousov To: Ryan Libby Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318285 - head/sys/kern Message-ID: <20170515100959.GB1622@kib.kiev.ua> References: <201705151002.v4FA2jqi045123@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705151002.v4FA2jqi045123@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 10:10:12 -0000 On Mon, May 15, 2017 at 10:02:45AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon May 15 10:02:45 2017 > New Revision: 318285 > URL: https://svnweb.freebsd.org/changeset/base/318285 > > Log: > mnt_vnode_next_active: use conventional lock order when trylock fails. > > Previously, when the VI_TRYLOCK failed, we would spin under the mutex > that protects the vnode active list until we either succeeded or > noticed that we had hogged the CPU. Since we were violating the lock > order, this would guarantee that we would become a hog under any > deadlock condition (e.g. a race with vdrop(9) on the same vnode). In > the presence of many concurrent threads in sync(2) or vdrop etc, the > victim could hang for a long time. > > Now, avoid spinning by dropping and reacquiring the locks in the > conventional lock order when the trylock fails. This requires a dance > with the vnode hold count. > > Submitted by: Tom Rix This must be Ryan Libby , I am sorry. > Tested by: pho > Differential revision: https://reviews.freebsd.org/D10692 From owner-svn-src-all@freebsd.org Mon May 15 13:05:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1B4BD6D59F; Mon, 15 May 2017 13:05:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A216BC8; Mon, 15 May 2017 13:05:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FD521J018324; Mon, 15 May 2017 13:05:02 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FD522V018323; Mon, 15 May 2017 13:05:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151305.v4FD522V018323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 13:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318286 - stable/11/tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 13:05:03 -0000 Author: emaste Date: Mon May 15 13:05:02 2017 New Revision: 318286 URL: https://svnweb.freebsd.org/changeset/base/318286 Log: MFC r316706: makeman: don't copy $FreeBSD$ tags from source files into output Copying the source VCS ID from WITH_/WITHOUT_* into the generated src.conf.5 is not necessary, as it is generally possible to determine the same information using the VCS to examine commit metadata. The individual source files also match the name of the option recorded in the generated file, so it is clear from where the content originated. The copied IDs generate extraneous, non-content noise in the generated src.conf.5 in some cases, including the first time the file is generated on a stable branch. In addition, the source file $FreeBSD$ tags are not expanded by git or other non-Subversion VCSs, which means that makeman previously could not be used in a non-Subversion working tree. I accept that there's some desire to keep these, but on balance believe there is more benefit in removing them. Sponsored by: The FreeBSD Foundation Modified: stable/11/tools/build/options/makeman Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/options/makeman ============================================================================== --- stable/11/tools/build/options/makeman Mon May 15 10:02:45 2017 (r318285) +++ stable/11/tools/build/options/makeman Mon May 15 13:05:02 2017 (r318286) @@ -1,12 +1,12 @@ #!/bin/sh # # This file is in the public domain. +# +# $FreeBSD$ set -o errexit export LC_ALL=C -ident='$FreeBSD$' - t=$(mktemp -d -t makeman) trap 'test -d $t && rm -rf $t' exit @@ -119,12 +119,9 @@ show() main() { - ident=${ident#$} - ident=${ident% $} fbsdid='$'FreeBSD'$' cat < Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A79FD6DA69; Mon, 15 May 2017 13:14:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C25712BF; Mon, 15 May 2017 13:14:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FDED11022482; Mon, 15 May 2017 13:14:13 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FDEDlF022481; Mon, 15 May 2017 13:14:13 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705151314.v4FDEDlF022481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 15 May 2017 13:14:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318287 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 13:14:14 -0000 Author: rmacklem Date: Mon May 15 13:14:13 2017 New Revision: 318287 URL: https://svnweb.freebsd.org/changeset/base/318287 Log: Make nfscl_mtofh() return ENXIO when *nfhpp == NULL. r317272 introduced a case where nfscl_mtofh() could return 0 when *nfhpp is NULL. This patch makes it return ENXIO for this case. MFC after: 1 week Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 15 13:05:02 2017 (r318286) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 15 13:14:13 2017 (r318287) @@ -475,6 +475,7 @@ nfscl_mtofh(struct nfsrv_descript *nd, s if (*++tl != 0) { nd->nd_flag |= ND_NOMOREDATA; flag = 0; + error = ENXIO; /* Return ENXIO so *nfhpp isn't used. */ } } if (flag) { From owner-svn-src-all@freebsd.org Mon May 15 13:41:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A29FDD6D0D5; Mon, 15 May 2017 13:41:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 726F01DF; Mon, 15 May 2017 13:41:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FDfchG031842; Mon, 15 May 2017 13:41:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FDfcln031841; Mon, 15 May 2017 13:41:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151341.v4FDfcln031841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 13:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318288 - stable/11/tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 13:41:39 -0000 Author: emaste Date: Mon May 15 13:41:38 2017 New Revision: 318288 URL: https://svnweb.freebsd.org/changeset/base/318288 Log: MFC r317156: makeman: add a comment describing purpose and invocation Sponsored by: The FreeBSD Foundation Modified: stable/11/tools/build/options/makeman Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/options/makeman ============================================================================== --- stable/11/tools/build/options/makeman Mon May 15 13:14:13 2017 (r318287) +++ stable/11/tools/build/options/makeman Mon May 15 13:41:38 2017 (r318288) @@ -1,8 +1,22 @@ #!/bin/sh # # This file is in the public domain. -# # $FreeBSD$ +# +# This script is used to create the src.conf.5 man page, using template text +# contained herein and the contents of the WITH_* and WITHOUT_* files in the +# same directory. Each WITH_* and WITHOUT_* file documents the effect of the +# /etc/src.conf knob with the same name. +# +# This script invokes "make showconfig" for each supported architecture in +# order to determine, for each option, whether the default setting is always +# WITH, always WITHOUT, or is architecture-dependent. It also determines +# and describes dependencies between options. +# +# Usage: +# +# cd tools/build/options +# sh makeman > ../../../share/man/man5/src.conf.5 set -o errexit export LC_ALL=C @@ -121,7 +135,7 @@ main() fbsdid='$'FreeBSD'$' cat < Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE5C9D6D4D2; Mon, 15 May 2017 13:50:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E1B8B05; Mon, 15 May 2017 13:50:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FDoLAS035535; Mon, 15 May 2017 13:50:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FDoLVU035534; Mon, 15 May 2017 13:50:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151350.v4FDoLVU035534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 13:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318289 - stable/11/tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 13:50:22 -0000 Author: emaste Date: Mon May 15 13:50:21 2017 New Revision: 318289 URL: https://svnweb.freebsd.org/changeset/base/318289 Log: MFC r310271 (gjb): Comment the RCSID (in WITH_REPRODUCIBLE_BUILD) Sponsored by: The FreeBSD Foundation Modified: stable/11/tools/build/options/WITH_REPRODUCIBLE_BUILD Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/options/WITH_REPRODUCIBLE_BUILD ============================================================================== --- stable/11/tools/build/options/WITH_REPRODUCIBLE_BUILD Mon May 15 13:41:38 2017 (r318288) +++ stable/11/tools/build/options/WITH_REPRODUCIBLE_BUILD Mon May 15 13:50:21 2017 (r318289) @@ -1,4 +1,4 @@ -$FreeBSD$ +.\" $FreeBSD$ Set to exclude build metadata (such as the build time, user, or host) from the kernel, boot loaders, and uname output, so that builds produce bit-for-bit identical output. From owner-svn-src-all@freebsd.org Mon May 15 14:11:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 514B0D6DBFE; Mon, 15 May 2017 14:11:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C2C518E9; Mon, 15 May 2017 14:11:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FEBJiL046484; Mon, 15 May 2017 14:11:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FEBJRP046483; Mon, 15 May 2017 14:11:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151411.v4FEBJRP046483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 14:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318290 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 14:11:20 -0000 Author: emaste Date: Mon May 15 14:11:18 2017 New Revision: 318290 URL: https://svnweb.freebsd.org/changeset/base/318290 Log: Regenerate src.conf.5 after r318286 r318286 removed the $FreeBSD$ tags copied from the source WITH_/WITHOUT_ description snippets. Regenerate src.conf.5 now so that only relevant changes appear in it when it is next regenerated after an MFC. Sponsored by: The FreeBSD Foundation Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Mon May 15 13:50:21 2017 (r318289) +++ stable/11/share/man/man5/src.conf.5 Mon May 15 14:11:18 2017 (r318290) @@ -1,7 +1,6 @@ -.\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: stable/11/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery +.\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd April 2, 2017 +.Dd May 15, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -94,56 +93,45 @@ The following list provides a name and s that can be used for source builds. .Bl -tag -width indent .It Va WITHOUT_ACCT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed Set to not build process accounting tools such as .Xr accton 8 and .Xr sa 8 . .It Va WITHOUT_ACPI -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru Set to not build .Xr acpiconf 8 , .Xr acpidump 8 and related programs. .It Va WITHOUT_AMD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam Set to not build .Xr amd 8 , and related programs. .It Va WITHOUT_APM -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr apm 8 , .Xr apmd 8 and related programs. .It Va WITHOUT_ASSERT_DEBUG -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru Set to compile programs and libraries without the .Xr assert 3 checks. .It Va WITHOUT_AT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam Set to not build .Xr at 1 and related utilities. .It Va WITHOUT_ATM -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to ATM networking. .It Va WITHOUT_AUDIT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru Set to not build audit support into system programs. .It Va WITHOUT_AUTHPF -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . .It Va WITHOUT_AUTOFS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AUTOFS 296264 2016-03-01 11:36:10Z trasz Set to not build .Xr autofs 5 related programs, libraries, and kernel modules. .It Va WITH_AUTO_OBJ -.\" from FreeBSD: stable/11/tools/build/options/WITH_AUTO_OBJ 284708 2015-06-22 20:21:57Z sjg Enable automatic creation of objdirs. .Pp This must be set in the environment, make command line, or @@ -151,14 +139,12 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITHOUT_BHYVE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BHYVE 277727 2015-01-26 06:44:48Z ngie Set to not build or install .Xr bhyve 8 , associated utilities, and examples. .Pp This option only affects amd64/amd64. .It Va WITHOUT_BINUTILS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BINUTILS 286332 2015-08-05 18:30:00Z emaste Set to not build or install binutils (as, ld, objcopy, and objdump ) as part of the normal system build. The resulting system cannot build programs from source. @@ -166,14 +152,12 @@ The resulting system cannot build progra It is a default setting on arm64/aarch64. .It Va WITH_BINUTILS -.\" from FreeBSD: stable/11/tools/build/options/WITH_BINUTILS 295491 2016-02-11 00:14:00Z emaste Set to build and install binutils (as, ld, objcopy, and objdump) as part of the normal system build. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BINUTILS_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP 295490 2016-02-10 23:57:09Z emaste Set to not build binutils (as, ld, objcopy and objdump) as part of the bootstrap process. .Bf -symbolic @@ -184,14 +168,12 @@ toolchain is provided. It is a default setting on arm64/aarch64. .It Va WITH_BINUTILS_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITH_BINUTILS_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste Set build binutils (as, ld, objcopy and objdump) as part of the bootstrap process. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BLACKLIST -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BLACKLIST 301554 2016-06-07 16:35:55Z lidl Set this if you do not want to build blacklistd / blacklistctl. When set, it also enforces the following options: .Pp @@ -200,7 +182,6 @@ When set, it also enforces the following .Va WITHOUT_BLACKLIST_SUPPORT .El .It Va WITHOUT_BLACKLIST_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BLACKLIST_SUPPORT 301554 2016-06-07 16:35:55Z lidl Set to build some programs without blacklistd support, like .Xr fingerd 8 , .Xr ftpd 8 , @@ -209,39 +190,30 @@ Set to build some programs without black and .Xr sshd 8 . .It Va WITHOUT_BLUETOOTH -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. .It Va WITHOUT_BOOT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. .It Va WITHOUT_BOOTPARAMD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BOOTPARAMD 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr bootparamd 8 . .It Va WITHOUT_BOOTPD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BOOTPD 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr bootpd 8 . .It Va WITHOUT_BSDINSTALL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BSDINSTALL 277677 2015-01-25 04:43:13Z ngie Set to not build .Xr bsdinstall 8 , .Xr sade 8 , and related programs. .It Va WITHOUT_BSD_CPIO -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on .Xr libarchive 3 . .It Va WITH_BSD_GREP -.\" from FreeBSD: stable/11/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien Install BSD-licensed grep as '[ef]grep' instead of GNU grep. .It Va WITHOUT_BSNMP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install .Xr bsnmpd 1 and related libraries and data files. .It Va WITHOUT_BZIP2 -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru Set to not build contributed bzip2 software as a part of the base system. .Bf -symbolic The option has no effect yet. @@ -253,14 +225,11 @@ When set, it also enforces the following .Va WITHOUT_BZIP2_SUPPORT .El .It Va WITHOUT_BZIP2_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij Set to build some programs without optional bzip2 support. .It Va WITHOUT_CALENDAR -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr calendar 1 . .It Va WITHOUT_CAPSICUM -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson Set to not build Capsicum support into system programs. When set, it also enforces the following options: .Pp @@ -269,10 +238,8 @@ When set, it also enforces the following .Va WITHOUT_CASPER .El .It Va WITHOUT_CASPER -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CASPER 258838 2013-12-02 08:21:28Z pjd Set to not build Casper program and related libraries. .It Va WITH_CCACHE_BUILD -.\" from FreeBSD: stable/11/tools/build/options/WITH_CCACHE_BUILD 297436 2016-03-30 23:53:12Z bdrewery Set to use .Xr ccache 1 for the build. @@ -312,12 +279,10 @@ See .Xr ccache 1 for more configuration options. .It Va WITHOUT_CCD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CCD 277678 2015-01-25 04:52:48Z ngie Set to not build .Xr geom_ccd 4 and related utilities. .It Va WITHOUT_CDDL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. When set, it also enforces the following options: .Pp @@ -328,7 +293,6 @@ When set, it also enforces the following .Va WITHOUT_ZFS .El .It Va WITHOUT_CLANG -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CLANG 264660 2014-04-18 17:03:58Z imp Set to not build the Clang C/C++ compiler during the regular phase of the build. .Pp It is a default setting on @@ -342,13 +306,11 @@ When set, it also enforces the following .Va WITHOUT_CLANG_FULL .El .It Va WITH_CLANG -.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG 264660 2014-04-18 17:03:58Z imp Set to build the Clang C/C++ compiler during the normal phase of the build. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_CLANG_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CLANG_BOOTSTRAP 273177 2014-10-16 18:28:11Z skreuzer Set to not build the Clang C/C++ compiler during the bootstrap phase of the build. You must enable either gcc or clang bootstrap to be able to build the system, unless an alternative compiler is provided via @@ -357,30 +319,25 @@ XCC. It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_CLANG_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp Set to build the Clang C/C++ compiler during the bootstrap phase of the build. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_CLANG_EXTRAS -.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim Set to build additional clang and llvm tools, such as bugpoint. .It Va WITHOUT_CLANG_FULL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CLANG_FULL 246259 2013-02-02 22:28:29Z dim Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp It is a default setting on sparc64/sparc64. .It Va WITH_CLANG_FULL -.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG_FULL 246259 2013-02-02 22:28:29Z dim Set to build the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_CLANG_IS_CC -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CLANG_IS_CC 242629 2012-11-05 21:53:23Z brooks Set to install the GCC compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -390,7 +347,6 @@ and It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_CLANG_IS_CC -.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb Set to install the Clang C/C++ compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -400,11 +356,9 @@ and It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITHOUT_CPP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build .Xr cpp 1 . .It Va WITHOUT_CROSS_COMPILER -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CROSS_COMPILER 275138 2014-11-26 20:43:09Z gjb Set to not build any cross compiler in the cross-tools stage of buildworld. If you are compiling a different version of .Fx @@ -430,7 +384,6 @@ When set, it also enforces the following .Va WITHOUT_GCC_BOOTSTRAP .El .It Va WITHOUT_CRYPT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru Set to not build any crypto code. When set, it also enforces the following options: .Pp @@ -454,20 +407,16 @@ When set, the following options are also is set explicitly) .El .It Va WITH_CTF -.\" from FreeBSD: stable/11/tools/build/options/WITH_CTF 228159 2011-11-30 18:22:44Z fjoe Set to compile with CTF (Compact C Type Format) data. CTF data encapsulates a reduced form of debugging information similar to DWARF and the venerable stabs and is required for DTrace. .It Va WITHOUT_CTM -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ctm 1 and related utilities. .It Va WITHOUT_CUSE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CUSE 270171 2014-08-19 15:40:26Z hselasky Set to not build CUSE-related programs and libraries. .It Va WITHOUT_CXX -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CXX 281053 2015-04-03 23:55:04Z bdrewery Set to not build .Xr c++ 1 and related libraries. @@ -490,14 +439,11 @@ When set, it also enforces the following .Va WITHOUT_GROFF .El .It Va WITHOUT_DEBUG_FILES -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DEBUG_FILES 290059 2015-10-27 20:49:56Z emaste Set to avoid building or installing standalone debug files for each executable binary and shared library. .It Va WITHOUT_DICT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru Set to not build the Webster dictionary files. .It Va WITH_DIRDEPS_BUILD -.\" from FreeBSD: stable/11/tools/build/options/WITH_DIRDEPS_BUILD 298007 2016-04-14 22:00:49Z bdrewery This is an experimental build system. For details see http://www.crufty.net/sjg/docs/freebsd-meta-mode.htm. @@ -577,7 +523,6 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITH_DIRDEPS_CACHE -.\" from FreeBSD: stable/11/tools/build/options/WITH_DIRDEPS_CACHE 290816 2015-11-14 03:24:48Z sjg Cache result of dirdeps.mk which can save significant time for subsequent builds. Depends on @@ -588,47 +533,38 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITHOUT_DMAGENT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DMAGENT 262335 2014-02-22 13:05:23Z bapt Set to not build dma Mail Transport Agent .It Va WITHOUT_DOCCOMPRESS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DOCCOMPRESS 266752 2014-05-27 15:52:27Z gjb Set to not to install compressed system documentation. Only the uncompressed version will be installed. .It Va WITH_DTRACE_TESTS -.\" from FreeBSD: stable/11/tools/build/options/WITH_DTRACE_TESTS 286174 2015-08-02 00:37:33Z markj Set to build and install the DTrace test suite in .Pa /usr/tests/cddl/usr.sbin/dtrace . This test suite is considered experimental on architectures other than amd64/amd64 and running it may cause system instability. .It Va WITHOUT_DYNAMICROOT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru Set this if you do not want to link .Pa /bin and .Pa /sbin dynamically. .It Va WITHOUT_ED_CRYPTO -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ED_CRYPTO 235660 2012-05-19 20:05:27Z marcel Set to build .Xr ed 1 without support for encryption/decryption. .It Va WITHOUT_EE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_EE 277663 2015-01-25 00:03:44Z ngie Set to not build and install .Xr edit 1 , .Xr ee 1 , and related programs. .It Va WITH_EISA -.\" from FreeBSD: stable/11/tools/build/options/WITH_EISA 264654 2014-04-18 16:53:06Z imp Set to build EISA kernel modules. .It Va WITHOUT_ELFCOPY_AS_OBJCOPY -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ELFCOPY_AS_OBJCOPY 296193 2016-02-29 16:39:38Z emaste Set to build and install .Xr objcopy 1 from GNU Binutils, instead of the one from ELF Tool Chain. This option is provided as a transition aid and will be removed in due time. .It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ELFTOOLCHAIN_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste Set to not build ELF Tool Chain tools (addr2line, nm, size, strings and strip) as part of the bootstrap process. @@ -636,76 +572,60 @@ as part of the bootstrap process. An alternate bootstrap tool chain must be provided. .Ef .It Va WITHOUT_EXAMPLES -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to .Pa /usr/share/examples/ . .It Va WITH_EXTRA_TCP_STACKS -.\" from FreeBSD: stable/11/tools/build/options/WITH_EXTRA_TCP_STACKS 302247 2016-06-28 13:37:01Z jtl Set to build extra TCP stack modules. .It Va WITHOUT_FDT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru Set to not build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. .It Va WITHOUT_FILE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FILE 278193 2015-02-04 10:24:40Z ngie Set to not build .Xr file 1 and related programs. .It Va WITHOUT_FINGER -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FINGER 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr finger 1 and .Xr fingerd 8 . .It Va WITHOUT_FLOPPY -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs for operating floppy disk driver. .It Va WITHOUT_FMTREE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FMTREE 261299 2014-01-30 21:37:43Z brooks Set to not build and install .Pa /usr/sbin/fmtree . .It Va WITHOUT_FORMAT_EXTENSIONS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FORMAT_EXTENSIONS 250658 2013-05-15 13:04:10Z brooks Set to not enable .Fl fformat-extensions when compiling the kernel. Also disables all format checking. .It Va WITHOUT_FORTH -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru Set to build bootloaders without Forth support. .It Va WITHOUT_FP_LIBC -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru Set to build .Nm libc without floating-point support. .It Va WITHOUT_FREEBSD_UPDATE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr freebsd-update 8 . .It Va WITHOUT_FTP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FTP 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr ftp 1 and .Xr ftpd 8 . .It Va WITHOUT_GAMES -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. .It Va WITHOUT_GCC -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GCC 264660 2014-04-18 17:03:58Z imp Set to not build and install gcc and g++ as part of the normal build process. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_GCC -.\" from FreeBSD: stable/11/tools/build/options/WITH_GCC 255326 2013-09-06 20:49:48Z zeising Set to build and install gcc and g++. .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCC_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GCC_BOOTSTRAP 273177 2014-10-16 18:28:11Z skreuzer Set to not build gcc and g++ as part of the bootstrap process. You must enable either gcc or clang bootstrap to be able to build the system, unless an alternative compiler is provided via @@ -714,32 +634,27 @@ XCC. It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_GCC_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITH_GCC_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp Set to build gcc and g++ as part of the bootstrap process. .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCOV -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr gcov 1 tool. .It Va WITHOUT_GDB -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru Set to not build .Xr gdb 1 . .Pp It is a default setting on arm64/aarch64. .It Va WITH_GDB -.\" from FreeBSD: stable/11/tools/build/options/WITH_GDB 295493 2016-02-11 00:30:51Z emaste Set to build .Xr gdb 1 . .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru Set to not build contributed GNU software as a part of the base system. This option can be useful if the system built must not contain any code covered by the GNU Public License due to legal reasons. @@ -753,37 +668,30 @@ When set, it also enforces the following .Va WITHOUT_GNU_SUPPORT .El .It Va WITHOUT_GNUCXX -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GNUCXX 255321 2013-09-06 20:08:03Z theraven Do not build the GNU C++ stack (g++, libstdc++). This is the default on platforms where clang is the system compiler. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_GNUCXX -.\" from FreeBSD: stable/11/tools/build/options/WITH_GNUCXX 255321 2013-09-06 20:08:03Z theraven Build the GNU C++ stack (g++, libstdc++). This is the default on platforms where gcc is the system compiler. .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU_GREP_COMPAT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GNU_GREP_COMPAT 273421 2014-10-21 20:44:33Z emaste Set this option to omit the gnu extensions to grep from being included in BSD grep. .It Va WITHOUT_GNU_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. .It Va WITHOUT_GPIO -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GPIO 228081 2011-11-28 17:54:34Z dim Set to not build .Xr gpioctl 8 as part of the base system. .It Va WITHOUT_GPL_DTC -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GPL_DTC 264515 2014-04-15 20:41:55Z imp Set to build the BSD licensed version of the device tree compiler, instead of the GPL'd one from elinux.org. .It Va WITHOUT_GROFF -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs Set to not build .Xr groff 1 and @@ -791,27 +699,20 @@ and You should consider installing the textproc/groff port to not break .Xr man 1 . .It Va WITHOUT_GSSAPI -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. .It Va WITHOUT_HAST -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_HAST 277725 2015-01-26 06:27:07Z ngie Set to not build .Xr hastd 8 and related utilities. .It Va WITH_HESIOD -.\" from FreeBSD: stable/11/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. .It Va WITHOUT_HTML -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru Set to not build HTML docs. .It Va WITHOUT_HYPERV -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_HYPERV 271493 2014-09-13 02:15:31Z delphij Set to not build or install HyperV utilities. .It Va WITHOUT_ICONV -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine Set to not build iconv as part of libc. .It Va WITHOUT_INCLUDES -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INCLUDES 275138 2014-11-26 20:43:09Z gjb Set to not install header files. This option used to be spelled .Va NO_INCS . @@ -819,7 +720,6 @@ This option used to be spelled The option does not work for build targets. .Ef .It Va WITHOUT_INET -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz Set to not build programs and libraries related to IPv4 networking. When set, it also enforces the following options: .Pp @@ -828,7 +728,6 @@ When set, it also enforces the following .Va WITHOUT_INET_SUPPORT .El .It Va WITHOUT_INET6 -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to IPv6 networking. When set, it also enforces the following options: @@ -838,17 +737,13 @@ When set, it also enforces the following .Va WITHOUT_INET6_SUPPORT .El .It Va WITHOUT_INET6_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build libraries, programs, and kernel modules without IPv6 support. .It Va WITHOUT_INETD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INETD 278192 2015-02-04 10:19:32Z ngie Set to not build .Xr inetd 8 . .It Va WITHOUT_INET_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz Set to build libraries, programs, and kernel modules without IPv4 support. .It Va WITHOUT_INSTALLLIB -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INSTALLLIB 297941 2016-04-13 21:01:58Z bdrewery Set this if you do not want to install optional libraries. For example when creating a .Xr nanobsd 8 @@ -857,7 +752,6 @@ image. The option does not work for build targets. .Ef .It Va WITH_INSTALL_AS_USER -.\" from FreeBSD: stable/11/tools/build/options/WITH_INSTALL_AS_USER 238021 2012-07-02 20:24:01Z marcel Set to make install targets succeed for non-root users by installing files with owner and group attributes set to that of the user running the @@ -867,13 +761,10 @@ The user still has to set the .Va DESTDIR variable to point to a directory where the user has write permissions. .It Va WITHOUT_IPFILTER -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru Set to not build IP Filter package. .It Va WITHOUT_IPFW -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam Set to not build IPFW tools. .It Va WITHOUT_IPSEC_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_IPSEC_SUPPORT 316250 2017-03-30 06:09:39Z ngie Set to not build the kernel with .Xr ipsec 4 support. @@ -882,22 +773,18 @@ This option is needed for and .Xr tcpmd5 4 . .It Va WITHOUT_ISCSI -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ISCSI 277675 2015-01-25 04:20:11Z ngie Set to not build .Xr iscid 8 and related utilities. .It Va WITHOUT_JAIL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_JAIL 249966 2013-04-27 04:09:09Z eadler Set to not build tools for the support of jails; e.g., .Xr jail 8 . .It Va WITHOUT_KDUMP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KDUMP 240690 2012-09-19 11:38:37Z zeising Set to not build .Xr kdump 1 and .Xr truss 1 . .It Va WITHOUT_KERBEROS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru Set this if you do not want to build Kerberos 5 (KTH Heimdal). When set, it also enforces the following options: .Pp @@ -915,7 +802,6 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_KERBEROS_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KERBEROS_SUPPORT 251794 2013-06-15 20:29:07Z eadler Set to build some programs without Kerberos support, like .Xr ssh 1 , .Xr telnet 1 , @@ -923,13 +809,11 @@ Set to build some programs without Kerbe and .Xr telnetd 8 . .It Va WITHOUT_KERNEL_SYMBOLS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp Set to not install kernel symbol files. .Bf -symbolic This option is recommended for those people who have small root partitions. .Ef .It Va WITHOUT_KVM -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru Set to not build the .Nm libkvm library as a part of the base system. @@ -943,12 +827,10 @@ When set, it also enforces the following .Va WITHOUT_KVM_SUPPORT .El .It Va WITHOUT_KVM_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin Set to build some programs without optional .Nm libkvm support. .It Va WITHOUT_LDNS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LDNS 255591 2013-09-15 13:11:13Z des Setting this variable will prevent the LDNS library from being built. When set, it also enforces the following options: .Pp @@ -959,27 +841,22 @@ When set, it also enforces the following .Va WITHOUT_UNBOUND .El .It Va WITHOUT_LDNS_UTILS -.\" from FreeBSD: stable/11/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 . .It Va WITHOUT_LEGACY_CONSOLE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LEGACY_CONSOLE 296264 2016-03-01 11:36:10Z trasz Set to not build programs that support a legacy PC console; e.g., .Xr kbdcontrol 1 and .Xr vidcontrol 1 . .It Va WITHOUT_LIB32 -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LIB32 274664 2014-11-18 17:06:48Z imp On 64-bit platforms, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. .It Va WITHOUT_LIBCPLUSPLUS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim Set to avoid building libcxxrt and libc++. .It Va WITHOUT_LIBPTHREAD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the .Nm libpthread providing library, @@ -991,17 +868,14 @@ When set, it also enforces the following .Va WITHOUT_LIBTHR .El .It Va WITH_LIBSOFT -.\" from FreeBSD: stable/11/tools/build/options/WITH_LIBSOFT 300325 2016-05-20 19:23:07Z bdrewery On armv6 only, set to enable soft float ABI compatibility libraries. This option is for transitioning to the new hard float ABI. .It Va WITHOUT_LIBTHR -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru Set to not build the .Nm libthr (1:1 threading) library. .It Va WITHOUT_LLD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LLD 310618 2016-12-26 20:36:37Z dim Set to not build LLVM's lld linker. .Pp It is a default setting on @@ -1013,31 +887,26 @@ When set, it also enforces the following .Va WITHOUT_LLD_IS_LD .El .It Va WITH_LLD -.\" from FreeBSD: stable/11/tools/build/options/WITH_LLD 310618 2016-12-26 20:36:37Z dim Set to build LLVM's lld linker. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITHOUT_LLDB -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LLDB 289275 2015-10-14 00:23:31Z emaste Set to not build the LLDB debugger. .Pp It is a default setting on arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_LLDB -.\" from FreeBSD: stable/11/tools/build/options/WITH_LLDB 255722 2013-09-20 01:52:02Z emaste Set to build the LLDB debugger. .Pp It is a default setting on amd64/amd64 and arm64/aarch64. .It Va WITHOUT_LLD_IS_LD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LLD_IS_LD 316423 2017-04-02 17:24:58Z dim Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_LLD_IS_LD -.\" from FreeBSD: stable/11/tools/build/options/WITH_LLD_IS_LD 316423 2017-04-02 17:24:58Z dim Set to use LLVM's LLD as the system linker, instead of GNU binutils ld. .Pp It is a default setting on @@ -1051,41 +920,33 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_LLVM_LIBUNWIND -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LLVM_LIBUNWIND 293450 2016-01-09 00:42:07Z emaste Set to use GCC's stack unwinder (instead of LLVM's libunwind). .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_LLVM_LIBUNWIND -.\" from FreeBSD: stable/11/tools/build/options/WITH_LLVM_LIBUNWIND 293450 2016-01-09 00:42:07Z emaste Set to use LLVM's libunwind stack unwinder (instead of GCC's unwinder). .Pp It is a default setting on arm64/aarch64. .It Va WITHOUT_LOCALES -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru Set to not build localization files; see .Xr locale 1 . .It Va WITHOUT_LOCATE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr locate 1 and related programs. .It Va WITHOUT_LPR -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr lpr 1 and related programs. .It Va WITHOUT_LS_COLORS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LS_COLORS 235660 2012-05-19 20:05:27Z marcel Set to build .Xr ls 1 without support for colors to distinguish file types. .It Va WITHOUT_LZMA_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LZMA_SUPPORT 245171 2013-01-08 18:37:12Z obrien Set to build some programs without optional lzma compression support. .It Va WITHOUT_MAIL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam Set to not build any mail support (MUA or MTA). When set, it also enforces the following options: .Pp @@ -1098,17 +959,14 @@ When set, it also enforces the following .Va WITHOUT_SENDMAIL .El .It Va WITHOUT_MAILWRAPPER -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr mailwrapper 8 MTA selector. .It Va WITHOUT_MAKE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam Set to not install .Xr make 1 and related support files. .It Va WITHOUT_MAN -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru Set to not build manual pages. When set, the following options are also in effect: .Pp @@ -1119,11 +977,9 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_MANCOMPRESS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MANCOMPRESS 266752 2014-05-27 15:52:27Z gjb Set to not to install compressed man pages. Only the uncompressed versions will be installed. .It Va WITHOUT_MANDOCDB -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MANDOCDB 311528 2017-01-06 18:08:42Z emaste Use the version of .Xr makewhatis 1 introduced in @@ -1133,7 +989,6 @@ instead of the database and utilities from .Xr mandoc 1 . .It Va WITHOUT_MAN_UTILS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim Set to not build utilities for manual pages, .Xr apropos 1 , .Xr catman 1 , @@ -1143,7 +998,6 @@ Set to not build utilities for manual pa .Xr manctl 8 , and related support files. .It Va WITH_META_MODE -.\" from FreeBSD: stable/11/tools/build/options/WITH_META_MODE 301889 2016-06-14 16:20:25Z bdrewery Creates .Xr make 1 meta files when building, which can provide a reliable incremental build when @@ -1211,19 +1065,15 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITH_NAND -.\" from FreeBSD: stable/11/tools/build/options/WITH_NAND 235537 2012-05-17 10:11:18Z gber Set to build the NAND Flash components. .It Va WITHOUT_NDIS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam Set to not build programs and libraries related to NDIS emulation support. .It Va WITHOUT_NETCAT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru Set to not build .Xr nc 1 utility. .It Va WITHOUT_NETGRAPH -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam Set to not build applications to support .Xr netgraph 4 . When set, it also enforces the following options: @@ -1237,10 +1087,8 @@ When set, it also enforces the following .Va WITHOUT_NETGRAPH_SUPPORT .El .It Va WITHOUT_NETGRAPH_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam Set to build libraries, programs, and kernel modules without netgraph support. .It Va WITHOUT_NIS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru Set to not build .Xr NIS 8 support and related programs. @@ -1250,14 +1098,11 @@ and remove .Sq nis entries. .It Va WITHOUT_NLS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalogs. .It Va WITHOUT_NLS_CATALOGS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalog support for .Xr csh 1 . .It Va WITHOUT_NS_CACHING -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru Set to disable name caching in the .Pa nsswitch subsystem. @@ -1265,23 +1110,18 @@ The generic caching daemon, .Xr nscd 8 , will not be built either if this option is set. .It Va WITHOUT_NTP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ntpd 8 and related programs. .It Va WITH_OFED -.\" from FreeBSD: stable/11/tools/build/options/WITH_OFED 228081 2011-11-28 17:54:34Z dim Set to build the .Dq "OpenFabrics Enterprise Distribution" Infiniband software stack. .It Va WITH_OPENLDAP -.\" from FreeBSD: stable/11/tools/build/options/WITH_OPENLDAP 264902 2014-04-24 23:17:31Z imp Enable building openldap support for kerberos. .It Va WITHOUT_OPENSSH -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSH. .It Va WITHOUT_OPENSSL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSL. When set, it also enforces the following options: .Pp @@ -1303,7 +1143,6 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_PAM -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PAM 174550 2007-12-12 16:43:17Z ru Set to not build PAM library and modules. .Bf -symbolic This option is deprecated and does nothing. @@ -1315,18 +1154,15 @@ When set, it also enforces the following .Va WITHOUT_PAM_SUPPORT .El .It Va WITHOUT_PAM_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PAM_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without PAM support, particularly .Xr ftpd 8 and .Xr ppp 8 . .It Va WITHOUT_PC_SYSINSTALL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PC_SYSINSTALL 245606 2013-01-18 15:57:09Z eadler Set to not build .Xr pc-sysinstall 8 and related programs. .It Va WITHOUT_PF -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PF 156932 2006-03-21 07:50:50Z ru Set to not build PF firewall package. When set, it also enforces the following options: .Pp @@ -1335,45 +1171,36 @@ When set, it also enforces the following .Va WITHOUT_AUTHPF .El .It Va WITHOUT_PKGBOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PKGBOOTSTRAP 258924 2013-12-04 15:58:42Z bdrewery Set to not build .Xr pkg 7 bootstrap tool. .It Va WITHOUT_PMC -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PMC 183242 2008-09-21 22:02:26Z sam Set to not build .Xr pmccontrol 8 and related programs. .It Va WITHOUT_PORTSNAP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PORTSNAP 183242 2008-09-21 22:02:26Z sam Set to not build or install .Xr portsnap 8 and related files. .It Va WITHOUT_PPP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PPP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ppp 8 and related programs. .It Va WITHOUT_PROFILE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PROFILE 228196 2011-12-02 09:09:54Z fjoe Set to avoid compiling profiled libraries. .It Va WITHOUT_QUOTAS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_QUOTAS 296264 2016-03-01 11:36:10Z trasz Set to not build .Xr quota 1 and related programs. .It Va WITHOUT_RADIUS_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_RADIUS_SUPPORT 278182 2015-02-04 06:53:45Z ngie Set to not build radius support into various applications, like .Xr pam_radius 8 and .Xr ppp 8 . .It Va WITHOUT_RBOOTD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_RBOOTD 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr rbootd 8 . .It Va WITHOUT_RCMDS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru Disable building of the .Bx r-commands. @@ -1382,53 +1209,43 @@ This includes .Xr rsh 1 , etc. .It Va WITHOUT_RCS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_RCS 275138 2014-11-26 20:43:09Z gjb Set to not build .Xr rcs 1 , .Xr etcupdate 8 , and related utilities. .It Va WITH_REPRODUCIBLE_BUILD -from FreeBSD: stable/11/tools/build/options/WITH_REPRODUCIBLE_BUILD 312730 2017-01-25 01:04:51Z emaste Set to exclude build metadata (such as the build time, user, or host) from the kernel, boot loaders, and uname output, so that builds produce bit-for-bit identical output. .It Va WITHOUT_RESCUE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru Set to not build .Xr rescue 8 . .It Va WITHOUT_ROUTED -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ROUTED 183242 2008-09-21 22:02:26Z sam Set to not build .Xr routed 8 utility. .It Va WITHOUT_SENDMAIL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_SENDMAIL 156932 2006-03-21 07:50:50Z ru Set to not build .Xr sendmail 8 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 15 14:22:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 973F9D6E322; Mon, 15 May 2017 14:22:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65306B7D; Mon, 15 May 2017 14:22:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FEM3xl049085; Mon, 15 May 2017 14:22:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FEM3VR049084; Mon, 15 May 2017 14:22:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151422.v4FEM3VR049084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 14:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318291 - stable/11/release/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 14:22:04 -0000 Author: emaste Date: Mon May 15 14:22:03 2017 New Revision: 318291 URL: https://svnweb.freebsd.org/changeset/base/318291 Log: MFC r317376: Add sysutils/tmux to the DVD package set The zsh + tmux combination is commonly wanted. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/scripts/pkg-stage.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/release/scripts/pkg-stage.sh ============================================================================== --- stable/11/release/scripts/pkg-stage.sh Mon May 15 14:11:18 2017 (r318290) +++ stable/11/release/scripts/pkg-stage.sh Mon May 15 14:22:03 2017 (r318291) @@ -24,6 +24,7 @@ shells/bash shells/zsh security/sudo sysutils/screen +sysutils/tmux www/firefox www/links x11-drivers/xf86-video-vmware From owner-svn-src-all@freebsd.org Mon May 15 14:23:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49861D6E3D3; Mon, 15 May 2017 14:23:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24930D7C; Mon, 15 May 2017 14:23:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FENsFZ051867; Mon, 15 May 2017 14:23:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FENrt1051858; Mon, 15 May 2017 14:23:53 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151423.v4FENrt1051858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 14:23:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318292 - in stable/11/sys: conf modules/linux modules/linux64 modules/svr4 modules/vmm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 14:23:55 -0000 Author: emaste Date: Mon May 15 14:23:53 2017 New Revision: 318292 URL: https://svnweb.freebsd.org/changeset/base/318292 Log: MFC r314054: Exclude -flto when building *genassym.o The build process generates *assym.h using nm from *genassym.o (which is in turn created from *genassym.c). When compiling with link-time optimization (LTO) using -flto, .o files are LLVM bitcode, not ELF objects. This is not usable by genassym.sh, so remove -flto from those ${CC} invocations. Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/files.amd64 stable/11/sys/conf/files.i386 stable/11/sys/conf/kern.post.mk stable/11/sys/conf/kmod.mk stable/11/sys/modules/linux/Makefile stable/11/sys/modules/linux64/Makefile stable/11/sys/modules/svr4/Makefile stable/11/sys/modules/vmm/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files.amd64 ============================================================================== --- stable/11/sys/conf/files.amd64 Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/conf/files.amd64 Mon May 15 14:23:53 2017 (r318292) @@ -34,7 +34,7 @@ cloudabi64_vdso_blob.o optional compat_ # linux32_genassym.o optional compat_linux32 \ dependency "$S/amd64/linux32/linux32_genassym.c" \ - compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux32_genassym.o" # @@ -58,7 +58,7 @@ linux32_vdso.so optional compat_linux32 # ia32_genassym.o standard \ dependency "$S/compat/ia32/ia32_genassym.c" \ - compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "ia32_genassym.o" # Modified: stable/11/sys/conf/files.i386 ============================================================================== --- stable/11/sys/conf/files.i386 Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/conf/files.i386 Mon May 15 14:23:53 2017 (r318292) @@ -21,7 +21,7 @@ cloudabi32_vdso_blob.o optional compat_ # linux_genassym.o optional compat_linux \ dependency "$S/i386/linux/linux_genassym.c" \ - compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux_genassym.o" # @@ -45,7 +45,7 @@ linux_vdso.so optional compat_linux \ # svr4_genassym.o optional compat_svr4 \ dependency "$S/i386/svr4/svr4_genassym.c" \ - compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "svr4_genassym.o" # Modified: stable/11/sys/conf/kern.post.mk ============================================================================== --- stable/11/sys/conf/kern.post.mk Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/conf/kern.post.mk Mon May 15 14:23:53 2017 (r318292) @@ -189,7 +189,7 @@ assym.s: $S/kern/genassym.sh genassym.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: $S/$M/$M/genassym.c - ${CC} -c ${CFLAGS:N-fno-common} $S/$M/$M/genassym.c + ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/$M/$M/genassym.c ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h Modified: stable/11/sys/conf/kmod.mk ============================================================================== --- stable/11/sys/conf/kmod.mk Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/conf/kmod.mk Mon May 15 14:23:53 2017 (r318292) @@ -462,7 +462,7 @@ assym.s: ${SYSDIR}/kern/genassym.sh sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c genassym.o: ${SRCS:Mopt_*.h} - ${CC} -c ${CFLAGS:N-fno-common} \ + ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c .endif Modified: stable/11/sys/modules/linux/Makefile ============================================================================== --- stable/11/sys/modules/linux/Makefile Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/modules/linux/Makefile Mon May 15 14:23:53 2017 (r318292) @@ -71,7 +71,7 @@ ${VDSO}.so: linux${SFX}_locore.o .endif linux${SFX}_genassym.o: - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .if !defined(KERNBUILDDIR) .if defined(KTR) Modified: stable/11/sys/modules/linux64/Makefile ============================================================================== --- stable/11/sys/modules/linux64/Makefile Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/modules/linux64/Makefile Mon May 15 14:23:53 2017 (r318292) @@ -44,7 +44,7 @@ linux_support.o: assym.s linux_assym.h ${.IMPSRC} -o ${.TARGET} linux_genassym.o: - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .if !defined(KERNBUILDDIR) .if defined(DEBUG) Modified: stable/11/sys/modules/svr4/Makefile ============================================================================== --- stable/11/sys/modules/svr4/Makefile Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/modules/svr4/Makefile Mon May 15 14:23:53 2017 (r318292) @@ -22,7 +22,7 @@ svr4_locore.o: svr4_locore.s svr4_assym. ${.IMPSRC} -o ${.TARGET} svr4_genassym.o: svr4_genassym.c svr4.h - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .if !defined(KERNBUILDDIR) && defined(DEBUG) opt_svr4.h: Modified: stable/11/sys/modules/vmm/Makefile ============================================================================== --- stable/11/sys/modules/vmm/Makefile Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/modules/vmm/Makefile Mon May 15 14:23:53 2017 (r318292) @@ -71,9 +71,9 @@ svm_support.o: ${.IMPSRC} -o ${.TARGET} vmx_genassym.o: - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} svm_genassym.o: - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .include From owner-svn-src-all@freebsd.org Mon May 15 14:41:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2267D6E93D; Mon, 15 May 2017 14:41:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C21811E12; Mon, 15 May 2017 14:41:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FEflkt059640; Mon, 15 May 2017 14:41:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FEflD1059639; Mon, 15 May 2017 14:41:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151441.v4FEflD1059639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 14:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318293 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 14:41:49 -0000 Author: emaste Date: Mon May 15 14:41:47 2017 New Revision: 318293 URL: https://svnweb.freebsd.org/changeset/base/318293 Log: MFC r315685: tighten buffer bounds in imgact_binmisc_populate_interp We must ensure there's space for the terminating null in the temporary buffer in imgact_binmisc_populate_interp(). Note that there's no buffer overflow here because xbe->xbe_interpreter's length and null termination is checked in imgact_binmisc_add_entry() before imgact_binmisc_populate_interp() is called. However, the latter should correctly enforce its own bounds. Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/kern/imgact_binmisc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/imgact_binmisc.c ============================================================================== --- stable/11/sys/kern/imgact_binmisc.c Mon May 15 14:23:53 2017 (r318292) +++ stable/11/sys/kern/imgact_binmisc.c Mon May 15 14:41:47 2017 (r318293) @@ -120,7 +120,7 @@ imgact_binmisc_populate_interp(char *str sp = str; tp = t; while (*sp != '\0') { if (*sp == ' ' || *sp == '\t') { - if (++len > IBE_INTERP_LEN_MAX) + if (++len >= IBE_INTERP_LEN_MAX) break; *tp++ = ' '; argc++; From owner-svn-src-all@freebsd.org Mon May 15 15:18:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A560D6D53F; Mon, 15 May 2017 15:18:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0486E1757; Mon, 15 May 2017 15:18:37 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FFIb02073132; Mon, 15 May 2017 15:18:37 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FFIbRJ073131; Mon, 15 May 2017 15:18:37 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705151518.v4FFIbRJ073131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 15 May 2017 15:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318294 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 15:18:38 -0000 Author: gjb Date: Mon May 15 15:18:36 2017 New Revision: 318294 URL: https://svnweb.freebsd.org/changeset/base/318294 Log: Correct the URL to instructions for updated system sources. MFC after: 3 days Submitted by: schaiba gmail com PR: 219303 Sponsored by: The FreeBSD Foundation Modified: head/README Modified: head/README ============================================================================== --- head/README Mon May 15 14:41:47 2017 (r318293) +++ head/README Mon May 15 15:18:36 2017 (r318294) @@ -81,4 +81,4 @@ usr.sbin System administration commands. For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see: - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html From owner-svn-src-all@freebsd.org Mon May 15 15:28:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B319D6D7DF; Mon, 15 May 2017 15:28:01 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 167281CF2; Mon, 15 May 2017 15:28:01 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FFS06q077011; Mon, 15 May 2017 15:28:00 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FFS0k9077007; Mon, 15 May 2017 15:28:00 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705151528.v4FFS0k9077007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 15 May 2017 15:28:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318295 - in stable/10: lib/libmt usr.bin/mt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 15:28:01 -0000 Author: ken Date: Mon May 15 15:27:59 2017 New Revision: 318295 URL: https://svnweb.freebsd.org/changeset/base/318295 Log: MFC r318185: Add LTO-8 density codes. lib/libmt/mtlib.c: Add the LTO-8 density code to the density table in libmt. usr.bin/mt/mt.1: Add the LTO-8 density code, tracks, bpmm, and bpi to the density table in the mt(1) man page. Sponsored by: Spectra Logic Modified: stable/10/lib/libmt/mtlib.c stable/10/usr.bin/mt/mt.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libmt/mtlib.c ============================================================================== --- stable/10/lib/libmt/mtlib.c Mon May 15 15:18:36 2017 (r318294) +++ stable/10/lib/libmt/mtlib.c Mon May 15 15:27:59 2017 (r318295) @@ -644,6 +644,7 @@ static struct densities { { 0x58, 15142, 384607, "LTO-5" }, { 0x5A, 15142, 384607, "LTO-6" }, { 0x5C, 19107, 485318, "LTO-7" }, + { 0x5E, 20669, 524993, "LTO-8" }, { 0x71, 11800, 299720, "3592A1 (encrypted)" }, { 0x72, 11800, 299720, "3592A2 (encrypted)" }, { 0x73, 13452, 341681, "3592A3 (encrypted)" }, Modified: stable/10/usr.bin/mt/mt.1 ============================================================================== --- stable/10/usr.bin/mt/mt.1 Mon May 15 15:18:36 2017 (r318294) +++ stable/10/usr.bin/mt/mt.1 Mon May 15 15:27:59 2017 (r318295) @@ -29,7 +29,7 @@ .\" @(#)mt.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 5, 2017 +.Dd May 11, 2017 .Dt MT 1 .Os .Sh NAME @@ -521,6 +521,7 @@ Value Width Tracks Density 0x58 12.7 (0.5) 1280 15,142 (384,607) C LTO-5 0x5A 12.7 (0.5) 2176 15,142 (384,607) C LTO-6 0x5C 12.7 (0.5) 3584 19,107 (485,318) C LTO-7 +0x5E 12.7 (0.5) 6656 20,669 (524,993) C LTO-8 0x71 12.7 (0.5) 512 11,800 (299,720) C 3592A1 (encrypted) 0x72 12.7 (0.5) 896 11,800 (299,720) C 3592A2 (encrypted) 0x73 12.7 (0.5) 1152 13,452 (341,681) C 3592A3 (encrypted) From owner-svn-src-all@freebsd.org Mon May 15 15:28:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 070B5D6D7E7; Mon, 15 May 2017 15:28:03 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B440B1CF6; Mon, 15 May 2017 15:28:02 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FFS1ZV077062; Mon, 15 May 2017 15:28:01 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FFS1Df077060; Mon, 15 May 2017 15:28:01 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705151528.v4FFS1Df077060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 15 May 2017 15:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318296 - in stable/11: lib/libmt usr.bin/mt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 15:28:03 -0000 Author: ken Date: Mon May 15 15:28:01 2017 New Revision: 318296 URL: https://svnweb.freebsd.org/changeset/base/318296 Log: MFC r318185: Add LTO-8 density codes. lib/libmt/mtlib.c: Add the LTO-8 density code to the density table in libmt. usr.bin/mt/mt.1: Add the LTO-8 density code, tracks, bpmm, and bpi to the density table in the mt(1) man page. Sponsored by: Spectra Logic Modified: stable/11/lib/libmt/mtlib.c stable/11/usr.bin/mt/mt.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libmt/mtlib.c ============================================================================== --- stable/11/lib/libmt/mtlib.c Mon May 15 15:27:59 2017 (r318295) +++ stable/11/lib/libmt/mtlib.c Mon May 15 15:28:01 2017 (r318296) @@ -644,6 +644,7 @@ static struct densities { { 0x58, 15142, 384607, "LTO-5" }, { 0x5A, 15142, 384607, "LTO-6" }, { 0x5C, 19107, 485318, "LTO-7" }, + { 0x5E, 20669, 524993, "LTO-8" }, { 0x71, 11800, 299720, "3592A1 (encrypted)" }, { 0x72, 11800, 299720, "3592A2 (encrypted)" }, { 0x73, 13452, 341681, "3592A3 (encrypted)" }, Modified: stable/11/usr.bin/mt/mt.1 ============================================================================== --- stable/11/usr.bin/mt/mt.1 Mon May 15 15:27:59 2017 (r318295) +++ stable/11/usr.bin/mt/mt.1 Mon May 15 15:28:01 2017 (r318296) @@ -29,7 +29,7 @@ .\" @(#)mt.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 5, 2017 +.Dd May 11, 2017 .Dt MT 1 .Os .Sh NAME @@ -521,6 +521,7 @@ Value Width Tracks Density 0x58 12.7 (0.5) 1280 15,142 (384,607) C LTO-5 0x5A 12.7 (0.5) 2176 15,142 (384,607) C LTO-6 0x5C 12.7 (0.5) 3584 19,107 (485,318) C LTO-7 +0x5E 12.7 (0.5) 6656 20,669 (524,993) C LTO-8 0x71 12.7 (0.5) 512 11,800 (299,720) C 3592A1 (encrypted) 0x72 12.7 (0.5) 896 11,800 (299,720) C 3592A2 (encrypted) 0x73 12.7 (0.5) 1152 13,452 (341,681) C 3592A3 (encrypted) From owner-svn-src-all@freebsd.org Mon May 15 16:53:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83751D6E6DA; Mon, 15 May 2017 16:53:03 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4723A198; Mon, 15 May 2017 16:53:03 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FGr2Lq016291; Mon, 15 May 2017 16:53:02 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FGr2Pj016290; Mon, 15 May 2017 16:53:02 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201705151653.v4FGr2Pj016290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 15 May 2017 16:53:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318297 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 16:53:03 -0000 Author: tsoome Date: Mon May 15 16:53:02 2017 New Revision: 318297 URL: https://svnweb.freebsd.org/changeset/base/318297 Log: e1000api: misleading-indentation Two blocks in e1000_ich8lan.c are misaligned, causing noise with some compilers (gcc 6). Reviewed by: imp, erj Differential Revision: https://reviews.freebsd.org/D10741 Modified: head/sys/dev/e1000/e1000_ich8lan.c Modified: head/sys/dev/e1000/e1000_ich8lan.c ============================================================================== --- head/sys/dev/e1000/e1000_ich8lan.c Mon May 15 15:28:01 2017 (r318296) +++ head/sys/dev/e1000/e1000_ich8lan.c Mon May 15 16:53:02 2017 (r318297) @@ -1496,24 +1496,24 @@ s32 e1000_disable_ulp_lpt_lp(struct e100 ret_val = e1000_read_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, &phy_reg); if (ret_val) goto release; - phy_reg &= ~(I218_ULP_CONFIG1_IND | - I218_ULP_CONFIG1_STICKY_ULP | - I218_ULP_CONFIG1_RESET_TO_SMBUS | - I218_ULP_CONFIG1_WOL_HOST | - I218_ULP_CONFIG1_INBAND_EXIT | - I218_ULP_CONFIG1_EN_ULP_LANPHYPC | - I218_ULP_CONFIG1_DIS_CLR_STICKY_ON_PERST | - I218_ULP_CONFIG1_DISABLE_SMB_PERST); - e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg); - - /* Commit ULP changes by starting auto ULP configuration */ - phy_reg |= I218_ULP_CONFIG1_START; - e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg); - - /* Clear Disable SMBus Release on PERST# in MAC */ - mac_reg = E1000_READ_REG(hw, E1000_FEXTNVM7); - mac_reg &= ~E1000_FEXTNVM7_DISABLE_SMB_PERST; - E1000_WRITE_REG(hw, E1000_FEXTNVM7, mac_reg); + phy_reg &= ~(I218_ULP_CONFIG1_IND | + I218_ULP_CONFIG1_STICKY_ULP | + I218_ULP_CONFIG1_RESET_TO_SMBUS | + I218_ULP_CONFIG1_WOL_HOST | + I218_ULP_CONFIG1_INBAND_EXIT | + I218_ULP_CONFIG1_EN_ULP_LANPHYPC | + I218_ULP_CONFIG1_DIS_CLR_STICKY_ON_PERST | + I218_ULP_CONFIG1_DISABLE_SMB_PERST); + e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg); + + /* Commit ULP changes by starting auto ULP configuration */ + phy_reg |= I218_ULP_CONFIG1_START; + e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg); + + /* Clear Disable SMBus Release on PERST# in MAC */ + mac_reg = E1000_READ_REG(hw, E1000_FEXTNVM7); + mac_reg &= ~E1000_FEXTNVM7_DISABLE_SMB_PERST; + E1000_WRITE_REG(hw, E1000_FEXTNVM7, mac_reg); release: hw->phy.ops.release(hw); @@ -1556,13 +1556,13 @@ static s32 e1000_check_for_copper_link_i if (!mac->get_link_status) return E1000_SUCCESS; - /* First we want to see if the MII Status Register reports - * link. If so, then we want to get the current speed/duplex - * of the PHY. - */ - ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link); - if (ret_val) - return ret_val; + /* First we want to see if the MII Status Register reports + * link. If so, then we want to get the current speed/duplex + * of the PHY. + */ + ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link); + if (ret_val) + return ret_val; if (hw->mac.type == e1000_pchlan) { ret_val = e1000_k1_gig_workaround_hv(hw, link); From owner-svn-src-all@freebsd.org Mon May 15 17:14:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D27FBD6ECC5; Mon, 15 May 2017 17:14:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADDCB10A6; Mon, 15 May 2017 17:14:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FHErT0025525; Mon, 15 May 2017 17:14:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FHEr2m025524; Mon, 15 May 2017 17:14:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705151714.v4FHEr2m025524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 May 2017 17:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318298 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:14:54 -0000 Author: kib Date: Mon May 15 17:14:53 2017 New Revision: 318298 URL: https://svnweb.freebsd.org/changeset/base/318298 Log: Fix several buffer overflows in realpath(3). - The statement "left_len -= s - left;" does not take the slash into account if one was found. This results in the invariant "left[left_len] == '\0'" being violated (and possible buffer overflows). The patch replaces the variable "s" with a size_t "next_token_len" for more clarity. - "slen" from readlink(2) can be 0 when encountering empty symlinks. Then, further down, "symlink[slen - 1]" underflows the buffer. When slen == 0, realpath(3) should probably return ENOENT (http://austingroupbugs.net/view.php?id=825, https://lwn.net/Articles/551224/). Some other minor issues: - The condition "resolved_len >= PATH_MAX" cannot be true. - Similarly, "s - left >= sizeof(next_token)" cannot be true, as long as "sizeof(next_token) >= sizeof(left)". - Return ENAMETOOLONG when a resolved symlink from readlink(2) is too long for the symlink buffer (instead of just truncating it). - "resolved_len > 1" below the call to readlink(2) is always true as "strlcat(resolved, next_token, PATH_MAX);" always results in a string of length > 1. Also, "resolved[resolved_len - 1] = '\0';" is not needed; there can never be a trailing slash here. - The truncation check for "strlcat(symlink, left, sizeof(symlink));" should be against "sizeof(symlink)" (the third argument to strlcat) instead of "sizeof(left)". Submitted by: Jan Kokemц╪ller PR: 219154 MFC after: 2 weeks Modified: head/lib/libc/stdlib/realpath.c Modified: head/lib/libc/stdlib/realpath.c ============================================================================== --- head/lib/libc/stdlib/realpath.c Mon May 15 16:53:02 2017 (r318297) +++ head/lib/libc/stdlib/realpath.c Mon May 15 17:14:53 2017 (r318298) @@ -51,10 +51,11 @@ char * realpath(const char * __restrict path, char * __restrict resolved) { struct stat sb; - char *p, *q, *s; - size_t left_len, resolved_len; + char *p, *q; + size_t left_len, resolved_len, next_token_len; unsigned symlinks; - int m, slen; + int m; + ssize_t slen; char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; if (path == NULL) { @@ -109,18 +110,19 @@ realpath(const char * __restrict path, c * and its length. */ p = strchr(left, '/'); - s = p ? p : left + left_len; - if (s - left >= sizeof(next_token)) { - if (m) - free(resolved); - errno = ENAMETOOLONG; - return (NULL); + + next_token_len = p ? p - left : left_len; + memcpy(next_token, left, next_token_len); + next_token[next_token_len] = '\0'; + + if (p != NULL) { + left_len -= next_token_len + 1; + memmove(left, p + 1, left_len + 1); + } else { + left[0] = '\0'; + left_len = 0; } - memcpy(next_token, left, s - left); - next_token[s - left] = '\0'; - left_len -= s - left; - if (p != NULL) - memmove(left, s + 1, left_len + 1); + if (resolved[resolved_len - 1] != '/') { if (resolved_len + 1 >= PATH_MAX) { if (m) @@ -173,19 +175,25 @@ realpath(const char * __restrict path, c errno = ELOOP; return (NULL); } - slen = readlink(resolved, symlink, sizeof(symlink) - 1); - if (slen < 0) { + slen = readlink(resolved, symlink, sizeof(symlink)); + if (slen <= 0 || slen >= sizeof(symlink)) { if (m) free(resolved); + if (slen < 0) { + /* keep errno from readlink(2) call */ + } else if (slen == 0) { + errno = ENOENT; + } else { + errno = ENAMETOOLONG; + } return (NULL); } symlink[slen] = '\0'; if (symlink[0] == '/') { resolved[1] = 0; resolved_len = 1; - } else if (resolved_len > 1) { + } else { /* Strip the last path component. */ - resolved[resolved_len - 1] = '\0'; q = strrchr(resolved, '/') + 1; *q = '\0'; resolved_len = q - resolved; @@ -209,7 +217,7 @@ realpath(const char * __restrict path, c } left_len = strlcat(symlink, left, sizeof(symlink)); - if (left_len >= sizeof(left)) { + if (left_len >= sizeof(symlink)) { if (m) free(resolved); errno = ENAMETOOLONG; From owner-svn-src-all@freebsd.org Mon May 15 17:29:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9096D6D180; Mon, 15 May 2017 17:29:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3CB11A1B; Mon, 15 May 2017 17:29:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 3CEC610A82E; Mon, 15 May 2017 13:29:01 -0400 (EDT) From: John Baldwin To: Warner Losh Cc: Ngie Cooper , "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Date: Mon, 15 May 2017 10:13:13 -0700 Message-ID: <2229085.lB46rKsq7o@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 15 May 2017 13:29:01 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:29:03 -0000 On Saturday, May 13, 2017 10:39:15 AM Warner Losh wrote: > >> - It's really easy to screw up a mergemaster call if you edit the files, and install the stock version which removes the edits. > > > > Also, programmatically removing the entries means you have to bake the metadata into etc/Makefile, which is already complicated enough as-is. > > Why do you care about removing them at all? They are no-ops if the > files don't exist. Why not just always install all these files is > where I'm going with this... I think this is actually the bigger question. I think it is perfectly sensible to support conf.d/* files for ports to use and as a way to manage logs for application logs on an appliance, etc. However, this shuffling is a bit of a merge nightmare for anyone using mergemaster or etcupdate, and the biggest cost is that newsyslog will create a one-line file in /var/log for entries with 'C'. -- John Baldwin From owner-svn-src-all@freebsd.org Mon May 15 17:34:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90313D6D677; Mon, 15 May 2017 17:34:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D3FB22B; Mon, 15 May 2017 17:34:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FHYHtp035246; Mon, 15 May 2017 17:34:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FHYHPv035245; Mon, 15 May 2017 17:34:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705151734.v4FHYHPv035245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 May 2017 17:34:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318299 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:34:18 -0000 Author: kib Date: Mon May 15 17:34:17 2017 New Revision: 318299 URL: https://svnweb.freebsd.org/changeset/base/318299 Log: Simplify cleanup on failure in realpath(3). If realpath() allocated memory for result and failed, the memory is freed in each place where return is performed. More, the function needs to track the allocation status, to not free user-supplied buffer. Consolidate the memory handling in the wrapper, freeing the buffer if the actual worker failed. Reviewed by: emaste (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D10670 Modified: head/lib/libc/stdlib/realpath.c Modified: head/lib/libc/stdlib/realpath.c ============================================================================== --- head/lib/libc/stdlib/realpath.c Mon May 15 17:14:53 2017 (r318298) +++ head/lib/libc/stdlib/realpath.c Mon May 15 17:34:17 2017 (r318299) @@ -47,32 +47,16 @@ __FBSDID("$FreeBSD$"); * components. Returns (resolved) on success, or (NULL) on failure, * in which case the path which caused trouble is left in (resolved). */ -char * -realpath(const char * __restrict path, char * __restrict resolved) +static char * +realpath1(const char *path, char *resolved) { struct stat sb; char *p, *q; size_t left_len, resolved_len, next_token_len; unsigned symlinks; - int m; ssize_t slen; char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; - if (path == NULL) { - errno = EINVAL; - return (NULL); - } - if (path[0] == '\0') { - errno = ENOENT; - return (NULL); - } - if (resolved == NULL) { - resolved = malloc(PATH_MAX); - if (resolved == NULL) - return (NULL); - m = 1; - } else - m = 0; symlinks = 0; if (path[0] == '/') { resolved[0] = '/'; @@ -83,20 +67,14 @@ realpath(const char * __restrict path, c left_len = strlcpy(left, path + 1, sizeof(left)); } else { if (getcwd(resolved, PATH_MAX) == NULL) { - if (m) - free(resolved); - else { - resolved[0] = '.'; - resolved[1] = '\0'; - } + resolved[0] = '.'; + resolved[1] = '\0'; return (NULL); } resolved_len = strlen(resolved); left_len = strlcpy(left, path, sizeof(left)); } if (left_len >= sizeof(left) || resolved_len >= PATH_MAX) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -125,8 +103,6 @@ realpath(const char * __restrict path, c if (resolved[resolved_len - 1] != '/') { if (resolved_len + 1 >= PATH_MAX) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -158,27 +134,18 @@ realpath(const char * __restrict path, c */ resolved_len = strlcat(resolved, next_token, PATH_MAX); if (resolved_len >= PATH_MAX) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } - if (lstat(resolved, &sb) != 0) { - if (m) - free(resolved); + if (lstat(resolved, &sb) != 0) return (NULL); - } if (S_ISLNK(sb.st_mode)) { if (symlinks++ > MAXSYMLINKS) { - if (m) - free(resolved); errno = ELOOP; return (NULL); } slen = readlink(resolved, symlink, sizeof(symlink)); if (slen <= 0 || slen >= sizeof(symlink)) { - if (m) - free(resolved); if (slen < 0) { /* keep errno from readlink(2) call */ } else if (slen == 0) { @@ -207,8 +174,6 @@ realpath(const char * __restrict path, c if (p != NULL) { if (symlink[slen - 1] != '/') { if (slen + 1 >= sizeof(symlink)) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -218,16 +183,12 @@ realpath(const char * __restrict path, c left_len = strlcat(symlink, left, sizeof(symlink)); if (left_len >= sizeof(symlink)) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } } left_len = strlcpy(left, symlink, sizeof(left)); } else if (!S_ISDIR(sb.st_mode) && p != NULL) { - if (m) - free(resolved); errno = ENOTDIR; return (NULL); } @@ -241,3 +202,29 @@ realpath(const char * __restrict path, c resolved[resolved_len - 1] = '\0'; return (resolved); } + +char * +realpath(const char * __restrict path, char * __restrict resolved) +{ + char *m, *res; + + if (path == NULL) { + errno = EINVAL; + return (NULL); + } + if (path[0] == '\0') { + errno = ENOENT; + return (NULL); + } + if (resolved != NULL) { + m = NULL; + } else { + m = resolved = malloc(PATH_MAX); + if (resolved == NULL) + return (NULL); + } + res = realpath1(path, resolved); + if (res == NULL) + free(m); + return (res); +} From owner-svn-src-all@freebsd.org Mon May 15 17:43:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7B49D6DD24 for ; Mon, 15 May 2017 17:43:38 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F350E7B for ; Mon, 15 May 2017 17:43:37 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 005dc5f5-3996-11e7-b96e-2378c10e3beb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 005dc5f5-3996-11e7-b96e-2378c10e3beb; Mon, 15 May 2017 17:43:28 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4FHhLUd001587; Mon, 15 May 2017 11:43:21 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1494870201.59865.103.camel@freebsd.org> Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk From: Ian Lepore To: John Baldwin , Warner Losh Cc: Ngie Cooper , "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Mon, 15 May 2017 11:43:21 -0600 In-Reply-To: <2229085.lB46rKsq7o@ralph.baldwin.cx> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:43:38 -0000 On Mon, 2017-05-15 at 10:13 -0700, John Baldwin wrote: > On Saturday, May 13, 2017 10:39:15 AM Warner Losh wrote: > > > > > > > > > > > > > - It's really easy to screw up a mergemaster call if you edit > > > > the files, and install the stock version which removes the > > > > edits. > > > Also, programmatically removing the entries means you have to > > > bake the metadata into etc/Makefile, which is already complicated > > > enough as-is. > > Why do you care about removing them at all? They are no-ops if the > > files don't exist. Why not just always install all these files is > > where I'm going with this... > I think this is actually the bigger question.  I think it is > perfectly > sensible to support conf.d/* files for ports to use and as a way to > manage logs for application logs on an appliance, etc.  However, this > shuffling is a bit of a merge nightmare for anyone using mergemaster > or etcupdate, and the biggest cost is that newsyslog will create a > one-line file in /var/log for entries with 'C'. > That's only a good argument for keeping the lines in the monolithic file if those lines will be ignored when a file in the .conf.d directory provides conflicting config.  Otherwise my embedded product that drops different rules for rotating /var/log/messages into .conf.d STILL has to programmatically edit the monolithic file to remove the standard rule(s). -- Ian From owner-svn-src-all@freebsd.org Mon May 15 17:45:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2613ED6DE67; Mon, 15 May 2017 17:45:07 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 004361088; Mon, 15 May 2017 17:45:06 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FHj5g1040384; Mon, 15 May 2017 17:45:05 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FHj5UV040382; Mon, 15 May 2017 17:45:05 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705151745.v4FHj5UV040382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 15 May 2017 17:45:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318300 - stable/11/sys/dev/qlnx/qlnxe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:45:07 -0000 Author: davidcs Date: Mon May 15 17:45:05 2017 New Revision: 318300 URL: https://svnweb.freebsd.org/changeset/base/318300 Log: MFC r318126 llh_func_filter needs to be configured for 100G Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_dev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_dev.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore_dev.c Mon May 15 17:34:17 2017 (r318299) +++ stable/11/sys/dev/qlnx/qlnxe/ecore_dev.c Mon May 15 17:45:05 2017 (r318300) @@ -1986,6 +1986,15 @@ static enum _ecore_status_t ecore_hw_ini } } #endif + /* Add an LLH filter with the primary MAC address. */ + if (p_hwfn->p_dev->num_hwfns > 1 && IS_LEAD_HWFN(p_hwfn)) { + rc = ecore_llh_add_mac_filter(p_hwfn, p_ptt, + p_hwfn->hw_info.hw_mac_addr); + if (rc != ECORE_SUCCESS) + DP_NOTICE(p_hwfn, false, + "Failed to add an LLH filter with the primary MAC\n"); + } + if (b_hw_start) { /* enable interrupts */ rc = ecore_int_igu_enable(p_hwfn, p_ptt, int_mode); @@ -2473,6 +2482,11 @@ enum _ecore_status_t ecore_hw_stop(struc rc2 = ECORE_UNKNOWN_ERROR; } } + + /* remove the LLH filter with the primary MAC addres */ + if (p_hwfn->p_dev->num_hwfns > 1 && IS_LEAD_HWFN(p_hwfn)) + ecore_llh_remove_mac_filter(p_hwfn, p_ptt, + p_hwfn->hw_info.hw_mac_addr); } /* hwfn loop */ if (IS_PF(p_dev)) { @@ -4569,7 +4583,7 @@ enum _ecore_status_t ecore_llh_add_mac_f } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx is added at %d\n", + "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx is added at LLH entry %d\n", p_filter[0], p_filter[1], p_filter[2], p_filter[3], p_filter[4], p_filter[5], entry_num); @@ -4651,7 +4665,7 @@ void ecore_llh_remove_mac_filter(struct } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx was removed from %d\n", + "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx was removed from LLH entry %d\n", p_filter[0], p_filter[1], p_filter[2], p_filter[3], p_filter[4], p_filter[5], entry_num); } @@ -4760,37 +4774,37 @@ ecore_llh_add_protocol_filter(struct eco switch (type) { case ECORE_LLH_FILTER_ETHERTYPE: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "ETH type %x is added at %d\n", + "ETH type %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_TCP_SRC_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP src port %x is added at %d\n", + "TCP src port %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_UDP_SRC_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP src port %x is added at %d\n", + "UDP src port %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_TCP_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP dst port %x is added at %d\n", + "TCP dst port %x is added at LLH entry %d\n", dest_port, entry_num); break; case ECORE_LLH_FILTER_UDP_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP dst port %x is added at %d\n", + "UDP dst port %x is added at LLH entry %d\n", dest_port, entry_num); break; case ECORE_LLH_FILTER_TCP_SRC_AND_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP src/dst ports %x/%x are added at %d\n", + "TCP src/dst ports %x/%x are added at LLH entry %d\n", source_port_or_eth_type, dest_port, entry_num); break; case ECORE_LLH_FILTER_UDP_SRC_AND_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP src/dst ports %x/%x are added at %d\n", + "UDP src/dst ports %x/%x are added at LLH entry %d\n", source_port_or_eth_type, dest_port, entry_num); break; } @@ -4917,7 +4931,7 @@ ecore_llh_remove_protocol_filter(struct } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "Protocol filter [type %d, source_port_or_eth_type 0x%x, dest_port 0x%x] was removed from %d\n", + "Protocol filter [type %d, source_port_or_eth_type 0x%x, dest_port 0x%x] was removed from LLH entry %d\n", type, source_port_or_eth_type, dest_port, entry_num); } From owner-svn-src-all@freebsd.org Mon May 15 17:47:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E713D6E012; Mon, 15 May 2017 17:47:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D2C1B138D; Mon, 15 May 2017 17:47:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-io0-x244.google.com with SMTP id o12so12304835iod.2; Mon, 15 May 2017 10:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=eJ0Gs7spmmlOLPK4RVCjlIW8YYmI6O8MgRMrPW11qfg=; b=lXEI+D8lEg2JI2xdmtPQLGnj0ULDKKv+3bRJgDl72cyb0wCHm4kXpeYVAVuTgtsgBE AtlJdUarEL9igjm7SGl4EcEopWPmRsk/XnGBqJIrEOjEGnVZ72RDLO3o1SvEhQZ5zLIw /WLiibZOy3AVmMt8qhdDaY/V6cxjFNOYuHhj5QYonFddPskZuVx2b4SwWgwzILeA/eTe KruHwIuPkeh/v9LC+M0go7kCSQkj4WlmutrIw6y/EZZFslM8S5uu84JwenJ6RnPi7hgn LdHArlbbID4/4SEfYUjTkGFyYRKX300/qWKoKryYkRDvLS0wUPqm9tMB3MFF0n6lts1r tMFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=eJ0Gs7spmmlOLPK4RVCjlIW8YYmI6O8MgRMrPW11qfg=; b=N63ia7rMVY1+R+5YlYfUqZhz8WqWvRIpRrjL9jnUFo3LS2h4hNGZ7OcOyYTZeTRwqb jYfYGkWB3aDRdJ6HJ+9om/pTPDB//hlSiRKCsCaBNPolqrD5nv5KbC2W/h5dibikAk40 JjN1zDBJ+axGolzppOr5qVj1u8gG6aTuZkbI+U6kNqnG4Hv0UVEfSIyRCaYn7AQTHJy3 CStTnuatKJg5wnr8LvbwTrX1TTPWPLpaI4n35cGNsfiQv7gjRIJqKpOetykVNSNJ0Slz T2ETu2QJtwq3rCeku63UtxuT7qM6JPv+oLUMGIXOEG70KYamLn6J5BhB6s7ZG79lUO+k Qh4Q== X-Gm-Message-State: AODbwcCR6n7SY7Gbc9mAvX0U7p0JUsfUs9cQ8tlYK3InlvDIISXjL31i RoxZxl83dpzFJw== X-Received: by 10.107.205.71 with SMTP id d68mr6517373iog.155.1494870434227; Mon, 15 May 2017 10:47:14 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id n42sm5403141ioi.4.2017.05.15.10.47.12 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 May 2017 10:47:13 -0700 (PDT) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_048ED5CE-CDA4-4314-B0C7-3D519B240C80"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <1494870201.59865.103.camel@freebsd.org> Date: Mon, 15 May 2017 10:47:11 -0700 Cc: John Baldwin , Warner Losh , "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <0B1B76CF-9CC4-422B-8356-AE425413850B@gmail.com> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> <1494870201.59865.103.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:47:15 -0000 --Apple-Mail=_048ED5CE-CDA4-4314-B0C7-3D519B240C80 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 15, 2017, at 10:43, Ian Lepore wrote: =E2=80=A6 > That's only a good argument for keeping the lines in the monolithic > file if those lines will be ignored when a file in the .conf.d > directory provides conflicting config. Otherwise my embedded product > that drops different rules for rotating /var/log/messages into .conf.d > STILL has to programmatically edit the monolithic file to remove the > standard rule(s). Bingo. This is part of the reason why I did this, apart from = being selfish in not wanting to handle a handful of unnecessary entries = in newsyslog/syslogd on all of my systems where I set these knobs to no. Literally all I did was `dd+p` in vim in the new files. I didn=E2=80=99t = add or subtract any overall entries. Thanks, -Ngie --Apple-Mail=_048ED5CE-CDA4-4314-B0C7-3D519B240C80 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZGemfAAoJEPWDqSZpMIYVY6UP/0sbKOIV5XS5DAHqw3M1gfar ypOus0HiyFEKEMQwJiZ42F2Z/lc4Sa7vNhTUfp8vk4z+VShPiNuvfFDseB5e2C8G B6hzSjWKrwjy004a98aAhxC33AGLeKXcpE/iZPYUYNqTwp7VjT6/3TPLB7WRod8w hIAeaSeWXCVnaV1oh0g4arbEg5qPKP6IJt51eFQ1alcOgl+eT5zBupyqyymsQ6hP /QWLe9GyqS/Bp2ofxvewMmF9l/QyZReRwuzJfPjom0e/hS2wClMjWL8aJ2XPzw6l KoznRDFPLzlfMY5NPlD6fiYxxhjVVcH+H/zr2nftqk3jSbq/0yfRHw0Go7HRUA9u N3cVY1F7ub0qCutaB8W3H+r+LE1Q4edJoXDubKdkNiCFrCV2vx4Xov4uHseHCYgL 16P7X8IvTk5C7F8FscMT5Oxy8SjhwJ5VDxIWLEzNdBtH9rb87aj7nxgdYSr+GlMg sCTvzrmmvpmC5pCunUNKi5CnfSMUFhQPj9SWXixWLzM8ZxRGUUSNgxmKIQdm5nSU 8FPyfzJWPK3ygQe8bJY/9qRaPbZ+eIlJ0GDg05I7nMkky0X8nUGN+q5wYVYvHYFy Z9aYcHDpxCzWgaxphl7tatwqO+iomtf8viQLOhvH9kp+CCxFOsAMS6XB9quKAO9j tqA9lqsVKANbCB/zLXkv =MdFF -----END PGP SIGNATURE----- --Apple-Mail=_048ED5CE-CDA4-4314-B0C7-3D519B240C80-- From owner-svn-src-all@freebsd.org Mon May 15 17:48:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9263ED6E130; Mon, 15 May 2017 17:48:59 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CEA715C0; Mon, 15 May 2017 17:48:59 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FHmwup040983; Mon, 15 May 2017 17:48:58 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FHmwHv040982; Mon, 15 May 2017 17:48:58 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705151748.v4FHmwHv040982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 15 May 2017 17:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318301 - stable/10/sys/dev/qlnx/qlnxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:48:59 -0000 Author: davidcs Date: Mon May 15 17:48:58 2017 New Revision: 318301 URL: https://svnweb.freebsd.org/changeset/base/318301 Log: MFC r318126 llh_func_filter needs to be configured for 100G Modified: stable/10/sys/dev/qlnx/qlnxe/ecore_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlnx/qlnxe/ecore_dev.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/ecore_dev.c Mon May 15 17:45:05 2017 (r318300) +++ stable/10/sys/dev/qlnx/qlnxe/ecore_dev.c Mon May 15 17:48:58 2017 (r318301) @@ -1986,6 +1986,15 @@ static enum _ecore_status_t ecore_hw_ini } } #endif + /* Add an LLH filter with the primary MAC address. */ + if (p_hwfn->p_dev->num_hwfns > 1 && IS_LEAD_HWFN(p_hwfn)) { + rc = ecore_llh_add_mac_filter(p_hwfn, p_ptt, + p_hwfn->hw_info.hw_mac_addr); + if (rc != ECORE_SUCCESS) + DP_NOTICE(p_hwfn, false, + "Failed to add an LLH filter with the primary MAC\n"); + } + if (b_hw_start) { /* enable interrupts */ rc = ecore_int_igu_enable(p_hwfn, p_ptt, int_mode); @@ -2473,6 +2482,11 @@ enum _ecore_status_t ecore_hw_stop(struc rc2 = ECORE_UNKNOWN_ERROR; } } + + /* remove the LLH filter with the primary MAC addres */ + if (p_hwfn->p_dev->num_hwfns > 1 && IS_LEAD_HWFN(p_hwfn)) + ecore_llh_remove_mac_filter(p_hwfn, p_ptt, + p_hwfn->hw_info.hw_mac_addr); } /* hwfn loop */ if (IS_PF(p_dev)) { @@ -4569,7 +4583,7 @@ enum _ecore_status_t ecore_llh_add_mac_f } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx is added at %d\n", + "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx is added at LLH entry %d\n", p_filter[0], p_filter[1], p_filter[2], p_filter[3], p_filter[4], p_filter[5], entry_num); @@ -4651,7 +4665,7 @@ void ecore_llh_remove_mac_filter(struct } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx was removed from %d\n", + "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx was removed from LLH entry %d\n", p_filter[0], p_filter[1], p_filter[2], p_filter[3], p_filter[4], p_filter[5], entry_num); } @@ -4760,37 +4774,37 @@ ecore_llh_add_protocol_filter(struct eco switch (type) { case ECORE_LLH_FILTER_ETHERTYPE: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "ETH type %x is added at %d\n", + "ETH type %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_TCP_SRC_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP src port %x is added at %d\n", + "TCP src port %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_UDP_SRC_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP src port %x is added at %d\n", + "UDP src port %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_TCP_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP dst port %x is added at %d\n", + "TCP dst port %x is added at LLH entry %d\n", dest_port, entry_num); break; case ECORE_LLH_FILTER_UDP_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP dst port %x is added at %d\n", + "UDP dst port %x is added at LLH entry %d\n", dest_port, entry_num); break; case ECORE_LLH_FILTER_TCP_SRC_AND_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP src/dst ports %x/%x are added at %d\n", + "TCP src/dst ports %x/%x are added at LLH entry %d\n", source_port_or_eth_type, dest_port, entry_num); break; case ECORE_LLH_FILTER_UDP_SRC_AND_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP src/dst ports %x/%x are added at %d\n", + "UDP src/dst ports %x/%x are added at LLH entry %d\n", source_port_or_eth_type, dest_port, entry_num); break; } @@ -4917,7 +4931,7 @@ ecore_llh_remove_protocol_filter(struct } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "Protocol filter [type %d, source_port_or_eth_type 0x%x, dest_port 0x%x] was removed from %d\n", + "Protocol filter [type %d, source_port_or_eth_type 0x%x, dest_port 0x%x] was removed from LLH entry %d\n", type, source_port_or_eth_type, dest_port, entry_num); } From owner-svn-src-all@freebsd.org Mon May 15 17:51:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC7E3D6E2AB; Mon, 15 May 2017 17:51:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 700001AF6; Mon, 15 May 2017 17:51:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FHp2VM042817; Mon, 15 May 2017 17:51:02 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FHp2gO042812; Mon, 15 May 2017 17:51:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151751.v4FHp2gO042812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 17:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318302 - in head: contrib/netbsd-tests/usr.bin/grep usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:51:03 -0000 Author: emaste Date: Mon May 15 17:51:01 2017 New Revision: 318302 URL: https://svnweb.freebsd.org/changeset/base/318302 Log: bsdgrep: don't allow negative -A / -B / -C Previously, when given a negative -A/-B/-C argument bsdgrep would overflow the respective context flag(s) and exhibited surprising behavior. Fix this by removing unsignedness of Aflag/Bflag and erroring out if we're given a value < 0. Also adjust the type used to track 'tail' context in procfile() so that it accurately reflects the Aflag value rather than overflowing and losing trailing context. This also fixes an inconsistency previously existing between -n and -C "n" behavior. They are now both limited to LLONG_MAX, to be consistent. Add some test cases to make sure grep errors out properly for both negative context values as well as non-numeric context values rather than giving bogus matches. Submitted by: Kyle Evans Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D10675 Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh head/usr.bin/grep/grep.c head/usr.bin/grep/grep.h head/usr.bin/grep/queue.c head/usr.bin/grep/util.c Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh ============================================================================== --- head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Mon May 15 17:48:58 2017 (r318301) +++ head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Mon May 15 17:51:01 2017 (r318302) @@ -517,6 +517,28 @@ grep_nomatch_flags_body() atf_check -o empty grep -q -A 1 -e "B" test1 atf_check -o empty grep -q -C 1 -e "B" test1 } + +atf_test_case badcontext +badcontext_head() +{ + atf_set "descr" "Check for handling of invalid context arguments" +} +badcontext_body() +{ + printf "A\nB\nC\n" > test1 + + atf_check -s not-exit:0 -e ignore grep -A "-1" "B" test1 + + atf_check -s not-exit:0 -e ignore grep -B "-1" "B" test1 + + atf_check -s not-exit:0 -e ignore grep -C "-1" "B" test1 + + atf_check -s not-exit:0 -e ignore grep -A "B" "B" test1 + + atf_check -s not-exit:0 -e ignore grep -B "B" "B" test1 + + atf_check -s not-exit:0 -e ignore grep -C "B" "B" test1 +} # End FreeBSD atf_init_test_cases() @@ -551,5 +573,6 @@ atf_init_test_cases() atf_add_test_case egrep_sanity atf_add_test_case grep_sanity atf_add_test_case grep_nomatch_flags + atf_add_test_case badcontext # End FreeBSD } Modified: head/usr.bin/grep/grep.c ============================================================================== --- head/usr.bin/grep/grep.c Mon May 15 17:48:58 2017 (r318301) +++ head/usr.bin/grep/grep.c Mon May 15 17:51:01 2017 (r318302) @@ -108,8 +108,8 @@ struct epat *dpattern, *fpattern; char re_error[RE_ERROR_BUF + 1]; /* Command-line flags */ -unsigned long long Aflag; /* -A x: print x lines trailing each match */ -unsigned long long Bflag; /* -B x: print x lines leading each match */ +long long Aflag; /* -A x: print x lines trailing each match */ +long long Bflag; /* -B x: print x lines leading each match */ bool Hflag; /* -H: always print file name */ bool Lflag; /* -L: only show names of files with no matches */ bool bflag; /* -b: show block numbers for each match */ @@ -351,7 +351,7 @@ main(int argc, char *argv[]) char **aargv, **eargv, *eopts; char *ep; const char *pn; - unsigned long long l; + long long l; unsigned int aargc, eargc, i; int c, lastc, needpattern, newarg, prevoptind; @@ -438,10 +438,11 @@ main(int argc, char *argv[]) case '5': case '6': case '7': case '8': case '9': if (newarg || !isdigit(lastc)) Aflag = 0; - else if (Aflag > LLONG_MAX / 10) { + else if (Aflag > LLONG_MAX / 10 - 1) { errno = ERANGE; err(2, NULL); } + Aflag = Bflag = (Aflag * 10) + (c - '0'); break; case 'C': @@ -454,14 +455,17 @@ main(int argc, char *argv[]) /* FALLTHROUGH */ case 'B': errno = 0; - l = strtoull(optarg, &ep, 10); - if (((errno == ERANGE) && (l == ULLONG_MAX)) || - ((errno == EINVAL) && (l == 0))) + l = strtoll(optarg, &ep, 10); + if (errno == ERANGE || errno == EINVAL) err(2, NULL); else if (ep[0] != '\0') { errno = EINVAL; err(2, NULL); + } else if (l < 0) { + errno = EINVAL; + err(2, "context argument must be non-negative"); } + if (c == 'A') Aflag = l; else if (c == 'B') Modified: head/usr.bin/grep/grep.h ============================================================================== --- head/usr.bin/grep/grep.h Mon May 15 17:48:58 2017 (r318301) +++ head/usr.bin/grep/grep.h Mon May 15 17:51:01 2017 (r318302) @@ -115,7 +115,7 @@ extern bool Eflag, Fflag, Gflag, Hflag, bflag, cflag, hflag, iflag, lflag, mflag, nflag, oflag, qflag, sflag, vflag, wflag, xflag; extern bool dexclude, dinclude, fexclude, finclude, lbflag, nullflag; -extern unsigned long long Aflag, Bflag; +extern long long Aflag, Bflag; extern long long mcount; extern long long mlimit; extern char fileeol; Modified: head/usr.bin/grep/queue.c ============================================================================== --- head/usr.bin/grep/queue.c Mon May 15 17:48:58 2017 (r318301) +++ head/usr.bin/grep/queue.c Mon May 15 17:51:01 2017 (r318302) @@ -49,7 +49,7 @@ struct qentry { }; static STAILQ_HEAD(, qentry) queue = STAILQ_HEAD_INITIALIZER(queue); -static unsigned long long count; +static long long count; static struct qentry *dequeue(void); Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Mon May 15 17:48:58 2017 (r318301) +++ head/usr.bin/grep/util.c Mon May 15 17:51:01 2017 (r318302) @@ -196,11 +196,12 @@ int procfile(const char *fn) { struct parsec pc; + long long tail; struct file *f; struct stat sb; struct str *ln; mode_t s; - int c, last_outed, t, tail; + int c, last_outed, t; bool doctx, printmatch, same_file; if (strcmp(fn, "-") == 0) { From owner-svn-src-all@freebsd.org Mon May 15 17:54:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D22F5D6E890; Mon, 15 May 2017 17:54:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FCAB201; Mon, 15 May 2017 17:54:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FHsax1045570; Mon, 15 May 2017 17:54:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FHsaxM045569; Mon, 15 May 2017 17:54:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705151754.v4FHsaxM045569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 May 2017 17:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318303 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:54:37 -0000 Author: kib Date: Mon May 15 17:54:36 2017 New Revision: 318303 URL: https://svnweb.freebsd.org/changeset/base/318303 Log: Style. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/lib/libc/stdlib/realpath.c Modified: head/lib/libc/stdlib/realpath.c ============================================================================== --- head/lib/libc/stdlib/realpath.c Mon May 15 17:51:01 2017 (r318302) +++ head/lib/libc/stdlib/realpath.c Mon May 15 17:54:36 2017 (r318303) @@ -89,7 +89,7 @@ realpath1(const char *path, char *resolv */ p = strchr(left, '/'); - next_token_len = p ? p - left : left_len; + next_token_len = p != NULL ? p - left : left_len; memcpy(next_token, left, next_token_len); next_token[next_token_len] = '\0'; @@ -112,10 +112,9 @@ realpath1(const char *path, char *resolv if (next_token[0] == '\0') { /* Handle consequential slashes. */ continue; - } - else if (strcmp(next_token, ".") == 0) + } else if (strcmp(next_token, ".") == 0) { continue; - else if (strcmp(next_token, "..") == 0) { + } else if (strcmp(next_token, "..") == 0) { /* * Strip the last path component except when we have * single "/" @@ -146,13 +145,12 @@ realpath1(const char *path, char *resolv } slen = readlink(resolved, symlink, sizeof(symlink)); if (slen <= 0 || slen >= sizeof(symlink)) { - if (slen < 0) { - /* keep errno from readlink(2) call */ - } else if (slen == 0) { + if (slen < 0) + ; /* keep errno from readlink(2) call */ + else if (slen == 0) errno = ENOENT; - } else { + else errno = ENAMETOOLONG; - } return (NULL); } symlink[slen] = '\0'; From owner-svn-src-all@freebsd.org Mon May 15 17:57:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA696D6E916; Mon, 15 May 2017 17:57:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79D7D3DC; Mon, 15 May 2017 17:57:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FHv9Kk045922; Mon, 15 May 2017 17:57:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FHv9Fk045921; Mon, 15 May 2017 17:57:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151757.v4FHv9Fk045921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 17:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318304 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:57:10 -0000 Author: emaste Date: Mon May 15 17:57:09 2017 New Revision: 318304 URL: https://svnweb.freebsd.org/changeset/base/318304 Log: getusershell: don't write past end of line buffer reading local shells _local_initshells did not reset cp to the beginning of the line buffer for every iteration that it called fgets(3), leading to writing past the end of line with fairly long /etc/shells or excessively long line lengths. Correct this by properly resetting cp. PR: 192528 Submitted by: Kyle Evans Reviewed by: cem, jilles Differential Revision: https://reviews.freebsd.org/D10690 Modified: head/lib/libc/gen/getusershell.c Modified: head/lib/libc/gen/getusershell.c ============================================================================== --- head/lib/libc/gen/getusershell.c Mon May 15 17:54:36 2017 (r318303) +++ head/lib/libc/gen/getusershell.c Mon May 15 17:57:09 2017 (r318304) @@ -115,8 +115,8 @@ _local_initshells(void *rv, void *cb_dat if ((fp = fopen(_PATH_SHELLS, "re")) == NULL) return NS_UNAVAIL; - cp = line; - while (fgets(cp, MAXPATHLEN + 1, fp) != NULL) { + while (fgets(line, MAXPATHLEN + 1, fp) != NULL) { + cp = line; while (*cp != '#' && *cp != '/' && *cp != '\0') cp++; if (*cp == '#' || *cp == '\0') @@ -124,7 +124,7 @@ _local_initshells(void *rv, void *cb_dat sp = cp; while (!isspace(*cp) && *cp != '#' && *cp != '\0') cp++; - *cp++ = '\0'; + *cp = '\0'; sl_add(sl, strdup(sp)); } (void)fclose(fp); From owner-svn-src-all@freebsd.org Mon May 15 18:02:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A29DD6EB5B; Mon, 15 May 2017 18:02:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46F21C2B; Mon, 15 May 2017 18:02:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FI2DNg047027; Mon, 15 May 2017 18:02:13 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FI2DIl047012; Mon, 15 May 2017 18:02:13 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151802.v4FI2DIl047012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 18:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318305 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:02:14 -0000 Author: emaste Date: Mon May 15 18:02:13 2017 New Revision: 318305 URL: https://svnweb.freebsd.org/changeset/base/318305 Log: makeman: reword description, based on feedback from wblock Modified: head/tools/build/options/makeman Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Mon May 15 17:57:09 2017 (r318304) +++ head/tools/build/options/makeman Mon May 15 18:02:13 2017 (r318305) @@ -3,15 +3,15 @@ # This file is in the public domain. # $FreeBSD$ # -# This script is used to create the src.conf.5 man page, using template text -# contained herein and the contents of the WITH_* and WITHOUT_* files in the -# same directory. Each WITH_* and WITHOUT_* file documents the effect of the +# This script creates the src.conf.5 man page using template text contained +# herein and the contents of the WITH_* and WITHOUT_* files in the same +# directory. Each WITH_* and WITHOUT_* file documents the effect of the # /etc/src.conf knob with the same name. # -# This script invokes "make showconfig" for each supported architecture in -# order to determine, for each option, whether the default setting is always -# WITH, always WITHOUT, or is architecture-dependent. It also determines -# and describes dependencies between options. +# For each supported architecture, "make showconfig" is invoked to determine +# the default setting of every option: always WITH_, always WITHOUT_, or +# architecture-dependent WITH_/WITHOUT_. It also determines and describes +# dependencies between options. # # Usage: # From owner-svn-src-all@freebsd.org Mon May 15 18:07:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32CCAD6EE97; Mon, 15 May 2017 18:07:59 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9FE5F42; Mon, 15 May 2017 18:07:58 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FI7vb0050044; Mon, 15 May 2017 18:07:57 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FI7vPJ050040; Mon, 15 May 2017 18:07:57 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705151807.v4FI7vPJ050040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 15 May 2017 18:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318306 - stable/11/sys/dev/qlxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:07:59 -0000 Author: davidcs Date: Mon May 15 18:07:57 2017 New Revision: 318306 URL: https://svnweb.freebsd.org/changeset/base/318306 Log: MFC r317996 Fix bug where MTX_DEF lock was held while taskqueue_drain() was invoked. Check IFF_DRV_RUNNING flag is set prior to calling ql_hw_set_multi() Modified: stable/11/sys/dev/qlxgbe/ql_isr.c stable/11/sys/dev/qlxgbe/ql_os.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_isr.c Mon May 15 18:02:13 2017 (r318305) +++ stable/11/sys/dev/qlxgbe/ql_isr.c Mon May 15 18:07:57 2017 (r318306) @@ -987,7 +987,8 @@ ql_isr(void *arg) fp = &ha->tx_fp[idx]; - if (fp->fp_taskqueue != NULL) + if ((fp->fp_taskqueue != NULL) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); return; Modified: stable/11/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_os.c Mon May 15 18:02:13 2017 (r318305) +++ stable/11/sys/dev/qlxgbe/ql_os.c Mon May 15 18:07:57 2017 (r318306) @@ -925,7 +925,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); QLA_LOCK(ha); - ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + } QLA_UNLOCK(ha); return (ret); @@ -1031,20 +1033,16 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 1)) - ret = EINVAL; - } + if (qla_set_multi(ha, 1)) + ret = EINVAL; break; case SIOCDELMULTI: QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 0)) - ret = EINVAL; - } + if (qla_set_multi(ha, 0)) + ret = EINVAL; break; case SIOCSIFMEDIA: @@ -1529,9 +1527,9 @@ qla_stop(qla_host_t *ha) ha->flags.qla_interface_up = 0; + QLA_UNLOCK(ha); qla_drain_fp_taskqueues(ha); - - ql_hw_stop_rcv(ha); + QLA_LOCK(ha); ql_del_hw_if(ha); @@ -1922,8 +1920,6 @@ qla_error_recovery(void *context, int pe ha->hw.imd_compl = 1; qla_mdelay(__func__, 300); - ql_hw_stop_rcv(ha); - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); for (i = 0; i < ha->hw.num_sds_rings; i++) { @@ -1943,6 +1939,8 @@ qla_error_recovery(void *context, int pe QLA_UNLOCK(ha); + qla_drain_fp_taskqueues(ha); + if ((ha->pci_func & 0x1) == 0) { if (!ha->msg_from_peer) { From owner-svn-src-all@freebsd.org Mon May 15 18:18:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72DEED6E5CC; Mon, 15 May 2017 18:18:34 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D07E1A53; Mon, 15 May 2017 18:18:34 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FIIXRL055078; Mon, 15 May 2017 18:18:33 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FIIXaO055077; Mon, 15 May 2017 18:18:33 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705151818.v4FIIXaO055077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 15 May 2017 18:18:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318307 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:18:34 -0000 Author: np Date: Mon May 15 18:18:32 2017 New Revision: 318307 URL: https://svnweb.freebsd.org/changeset/base/318307 Log: cxgbe(4): Avoid an out of bounds access when an attempt to unbind a tx queue from a traffic class fails. Reported by: x ksi MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Mon May 15 18:07:57 2017 (r318306) +++ head/sys/dev/cxgbe/t4_sge.c Mon May 15 18:18:32 2017 (r318307) @@ -5323,7 +5323,7 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) tc->refcount--; } txq->tc_idx = tc_idx; - } else { + } else if (tc_idx != -1) { tc = &pi->sched_params->cl_rl[tc_idx]; MPASS(tc->refcount > 0); tc->refcount--; From owner-svn-src-all@freebsd.org Mon May 15 18:21:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D70D9D6E68D; Mon, 15 May 2017 18:21:37 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 991E91DC7; Mon, 15 May 2017 18:21:37 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FILaaL056193; Mon, 15 May 2017 18:21:36 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FILaWg056191; Mon, 15 May 2017 18:21:36 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705151821.v4FILaWg056191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 15 May 2017 18:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318308 - stable/10/sys/dev/qlxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:21:38 -0000 Author: davidcs Date: Mon May 15 18:21:36 2017 New Revision: 318308 URL: https://svnweb.freebsd.org/changeset/base/318308 Log: MFC r317996 Fix bug where MTX_DEF lock was held while taskqueue_drain() was invoked. Check IFF_DRV_RUNNING flag is set prior to calling ql_hw_set_multi() Modified: stable/10/sys/dev/qlxgbe/ql_isr.c stable/10/sys/dev/qlxgbe/ql_os.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_isr.c Mon May 15 18:18:32 2017 (r318307) +++ stable/10/sys/dev/qlxgbe/ql_isr.c Mon May 15 18:21:36 2017 (r318308) @@ -988,7 +988,8 @@ ql_isr(void *arg) fp = &ha->tx_fp[idx]; - if (fp->fp_taskqueue != NULL) + if ((fp->fp_taskqueue != NULL) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); return; Modified: stable/10/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_os.c Mon May 15 18:18:32 2017 (r318307) +++ stable/10/sys/dev/qlxgbe/ql_os.c Mon May 15 18:21:36 2017 (r318308) @@ -930,7 +930,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); QLA_LOCK(ha); - ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + } QLA_UNLOCK(ha); return (ret); @@ -1036,20 +1038,16 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 1)) - ret = EINVAL; - } + if (qla_set_multi(ha, 1)) + ret = EINVAL; break; case SIOCDELMULTI: QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 0)) - ret = EINVAL; - } + if (qla_set_multi(ha, 0)) + ret = EINVAL; break; case SIOCSIFMEDIA: @@ -1534,9 +1532,9 @@ qla_stop(qla_host_t *ha) ha->flags.qla_interface_up = 0; + QLA_UNLOCK(ha); qla_drain_fp_taskqueues(ha); - - ql_hw_stop_rcv(ha); + QLA_LOCK(ha); ql_del_hw_if(ha); @@ -1927,8 +1925,6 @@ qla_error_recovery(void *context, int pe ha->hw.imd_compl = 1; qla_mdelay(__func__, 300); - ql_hw_stop_rcv(ha); - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); for (i = 0; i < ha->hw.num_sds_rings; i++) { @@ -1948,6 +1944,8 @@ qla_error_recovery(void *context, int pe QLA_UNLOCK(ha); + qla_drain_fp_taskqueues(ha); + if ((ha->pci_func & 0x1) == 0) { if (!ha->msg_from_peer) { From owner-svn-src-all@freebsd.org Mon May 15 18:24:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FD97D6E8BD; Mon, 15 May 2017 18:24:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E41DB155; Mon, 15 May 2017 18:24:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-io0-x241.google.com with SMTP id 12so12323172iol.1; Mon, 15 May 2017 11:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=6e8pj8sYPp7zyI2IZflyhshTyti/kZO4zhiSXc2bUIE=; b=dUeLq/DNPA0ayEzzXw4i97DiL9qtwhA0pJniqgCzkeV2/xrxaNjXAP1/f7Xsxu2woV HMwXEQJLrhfCJzTrqH0Ge60bdYUMANA3G90r7XlsGHAV2OzpCqY22WCO63ct0gK3owpx B3k7radgImtV1b3r4fsPx75dy1xDP2nY8MSTCwdGqB+IpO1MJiktmlQysoOwdnSDhJS1 DhgdlKNomlPpWD0vhGG5pa7I0SW792uqeVo6n3bbS+vTMoaJzEWYQDKFTt6BGMpbK/t3 fk39D/5Zg5d9ODJ+gHBxUknFrsrl55Ibx5sOGXC5QyoCTYhTb5ETByrKTexuGqHfj2O2 3FYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=6e8pj8sYPp7zyI2IZflyhshTyti/kZO4zhiSXc2bUIE=; b=fsK1BYdo7sRGoroiNbIt5PPSvhGpJ7+T1xvp6tu744SNuMB3LTHaOIqkPD6ntORFCm IJVahRmcQ9IfwNdS0oa+GGyCjl3vsIRuzjlskLEJ4qGDENTFb5lDVANpbsOGo58E7+5S VDs+PpPe17CaJ7dCuKmei4elkTS+usydtCKg5+iupU0fnr6LbfX/cNEi7bTWUv68UeOc wZxBJui8/V0ddu2CKw0S/Iig0dNriWFYsxww6NsOrLomI3vq/9mDUZpC6jKgHiZ4gKRG sO3UreShz4RnnO6SKSzqOQp3h9tkMruATtr24ajXVEanMDOBnj1v8wxGjziGh5JapBGt X50g== X-Gm-Message-State: AODbwcB5RRfAxxcVO2p34y2oWaEvBgMAWskhw+5ytQlgU++/dyCDwE6e cic8eK7a5n1Ukw== X-Received: by 10.107.41.193 with SMTP id p184mr6705145iop.211.1494872654323; Mon, 15 May 2017 11:24:14 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id c10sm5421430ioj.48.2017.05.15.11.24.12 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 May 2017 11:24:13 -0700 (PDT) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_079F2EEA-844F-442B-8099-418FC0674678"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <0B1B76CF-9CC4-422B-8356-AE425413850B@gmail.com> Date: Mon, 15 May 2017 11:24:12 -0700 Cc: John Baldwin , Warner Losh , "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <60A3FDE1-F68E-49D5-972F-A0C8993E0FEE@gmail.com> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> <1494870201.59865.103.camel@freebsd.org> <0B1B76CF-9CC4-422B-8356-AE425413850B@gmail.com> To: Ian Lepore X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:24:15 -0000 --Apple-Mail=_079F2EEA-844F-442B-8099-418FC0674678 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 15, 2017, at 10:47, Ngie Cooper (yaneurabeya) = wrote: >=20 >=20 >> On May 15, 2017, at 10:43, Ian Lepore wrote: >=20 > =E2=80=A6 >=20 >> That's only a good argument for keeping the lines in the monolithic >> file if those lines will be ignored when a file in the .conf.d >> directory provides conflicting config. Otherwise my embedded product >> that drops different rules for rotating /var/log/messages into = .conf.d >> STILL has to programmatically edit the monolithic file to remove the >> standard rule(s). >=20 > Bingo. This is part of the reason why I did this, apart from = being selfish in not wanting to handle a handful of unnecessary entries = in newsyslog/syslogd on all of my systems where I set these knobs to no. > Literally all I did was `dd+p` in vim in the new files. I didn=E2=80=99t= add or subtract any overall entries. And for context, we (Isilon) run newsyslog more frequently than upstream = (sometimes every couple minutes, sometimes multiple times an hour/day), = attributing to unnecessary creation and modification of log files (like = this) that we (Isilon) don=E2=80=99t care about at all, which causes = other potential issues with root media wear, potential for filesystem = corruption, reduced number of available inodes/space because it = allocates at least the frag size for a file, etc. Plus with the number of entries we have in syslog.conf (an order of = magnitude larger than upstream), having to walk a linked list to = evaluate how to handle messages when putting them out in log files does = tend to add up with all of the logging we do on our appliances (which is = considerably more chatty than I=E2=80=99ve seen other appliance vendors = that I=E2=80=99ve worked for). Thanks, -Ngie --Apple-Mail=_079F2EEA-844F-442B-8099-418FC0674678 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZGfJMAAoJEPWDqSZpMIYVmgEP/R/ysZiFHgtONDs4m76Eyeue UuKcusElG+sg2SKTe/V2a6HDaEgoa57A6HDxNzQ34KvOmiDvAord1B6oqeAEPkZx a1dAknhsLun9yLD2eGJWeoqm5jhl8HBUW8dV+Y7L4r9zKBb/c3b50742FAzKXtg/ 4JddGGWe7SRw4fZiIFxi6MR7b3K1h93CuN5m00uXflkJL5sfisv+ZBF2aXAzulB8 Sj8O3C6aCdRGi3xCQbUmR6tx8eg8DlZ/yaUtWaHBd8HaDVYcuptnn6i2qKQann7V WY/iRbfBGRNUQ01HTnunEt/wAwoRIhmnv2HO6wmhrfdM1kttuMGZU76BmNBZisnU shVe0luZACW0rFlOPW7aLh2HSQsQJq7zXLmv4w5pgcH+0mxH7ud3Sf9tU8kF1KVj +nt6n1b80A66NR0elYmrw64zrfQAA0radI9pvt6jgJ29qRwSbo9CDbvl1Fl05DkB Mxe1hSO7SpCxW8NreNaJMD4DeRbJ5q4rcVZHQPo6vpBXbSUPdvbS3R3oc1jfRHG8 95VObJYqXjnwo6Hb1y/DLG4OV8kj8sBNsckCd8NYub61BdiCBcZ+dfCzNVnmh7Ki xoXXJpXYyU2Rq59n9UyvbhEeSzmoYySVlhsagol6YXUKMjjhUUBZ0ae5gaCZTb0D +qjnmTNlAFj5rHLJ5odB =RwyB -----END PGP SIGNATURE----- --Apple-Mail=_079F2EEA-844F-442B-8099-418FC0674678-- From owner-svn-src-all@freebsd.org Mon May 15 18:24:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDCAED6E8C3; Mon, 15 May 2017 18:24:15 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2B32156; Mon, 15 May 2017 18:24:15 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FIOELb059616; Mon, 15 May 2017 18:24:14 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FIOEWi059614; Mon, 15 May 2017 18:24:14 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705151824.v4FIOEWi059614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 15 May 2017 18:24:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r318309 - stable/9/sys/dev/qlxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:24:16 -0000 Author: davidcs Date: Mon May 15 18:24:14 2017 New Revision: 318309 URL: https://svnweb.freebsd.org/changeset/base/318309 Log: MFC r317996 Fix bug where MTX_DEF lock was held while taskqueue_drain() was invoked. Check IFF_DRV_RUNNING flag is set prior to calling ql_hw_set_multi() Modified: stable/9/sys/dev/qlxgbe/ql_isr.c stable/9/sys/dev/qlxgbe/ql_os.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_isr.c Mon May 15 18:21:36 2017 (r318308) +++ stable/9/sys/dev/qlxgbe/ql_isr.c Mon May 15 18:24:14 2017 (r318309) @@ -983,7 +983,8 @@ ql_isr(void *arg) fp = &ha->tx_fp[idx]; - if (fp->fp_taskqueue != NULL) + if ((fp->fp_taskqueue != NULL) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); return; Modified: stable/9/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_os.c Mon May 15 18:21:36 2017 (r318308) +++ stable/9/sys/dev/qlxgbe/ql_os.c Mon May 15 18:24:14 2017 (r318309) @@ -930,7 +930,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); QLA_LOCK(ha); - ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + } QLA_UNLOCK(ha); return (ret); @@ -1036,20 +1038,16 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 1)) - ret = EINVAL; - } + if (qla_set_multi(ha, 1)) + ret = EINVAL; break; case SIOCDELMULTI: QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 0)) - ret = EINVAL; - } + if (qla_set_multi(ha, 0)) + ret = EINVAL; break; case SIOCSIFMEDIA: @@ -1550,9 +1548,9 @@ qla_stop(qla_host_t *ha) ha->flags.qla_interface_up = 0; + QLA_UNLOCK(ha); qla_drain_fp_taskqueues(ha); - - ql_hw_stop_rcv(ha); + QLA_LOCK(ha); ql_del_hw_if(ha); @@ -1943,8 +1941,6 @@ qla_error_recovery(void *context, int pe ha->hw.imd_compl = 1; qla_mdelay(__func__, 300); - ql_hw_stop_rcv(ha); - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); for (i = 0; i < ha->hw.num_sds_rings; i++) { @@ -1964,6 +1960,8 @@ qla_error_recovery(void *context, int pe QLA_UNLOCK(ha); + qla_drain_fp_taskqueues(ha); + if ((ha->pci_func & 0x1) == 0) { if (!ha->msg_from_peer) { From owner-svn-src-all@freebsd.org Mon May 15 18:38:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54CEED6EDD5; Mon, 15 May 2017 18:38:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26416F14; Mon, 15 May 2017 18:38:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FIc1dV065217; Mon, 15 May 2017 18:38:01 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FIc1UW065216; Mon, 15 May 2017 18:38:01 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705151838.v4FIc1UW065216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 15 May 2017 18:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318310 - stable/11/usr.bin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:38:02 -0000 Author: bdrewery Date: Mon May 15 18:38:01 2017 New Revision: 318310 URL: https://svnweb.freebsd.org/changeset/base/318310 Log: MFC r317658: Redo r288270: Hookup mkcsmapper_static and mkesdb_static for 'make clean' Modified: stable/11/usr.bin/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/Makefile ============================================================================== --- stable/11/usr.bin/Makefile Mon May 15 18:24:14 2017 (r318309) +++ stable/11/usr.bin/Makefile Mon May 15 18:38:01 2017 (r318310) @@ -303,6 +303,12 @@ SUBDIR.${MK_UTMPX}+= who SUBDIR.${MK_SVN}+= svn SUBDIR.${MK_SVNLITE}+= svn +# These are normally only handled for build-tools. +.if make(clean*) +SUBDIR+= mkcsmapper_static +SUBDIR+= mkesdb_static +.endif + .include SUBDIR:= ${SUBDIR:O:u} From owner-svn-src-all@freebsd.org Mon May 15 18:41:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4471ED6EF1D; Mon, 15 May 2017 18:41:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FCE01445; Mon, 15 May 2017 18:41:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FIfDsv069165; Mon, 15 May 2017 18:41:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FIfDYF069164; Mon, 15 May 2017 18:41:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705151841.v4FIfDYF069164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 15 May 2017 18:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318311 - stable/10/usr.bin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:41:14 -0000 Author: bdrewery Date: Mon May 15 18:41:12 2017 New Revision: 318311 URL: https://svnweb.freebsd.org/changeset/base/318311 Log: MFC r317658: Redo r288270: Hookup mkcsmapper_static and mkesdb_static for 'make clean' Modified: stable/10/usr.bin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Mon May 15 18:38:01 2017 (r318310) +++ stable/10/usr.bin/Makefile Mon May 15 18:41:12 2017 (r318311) @@ -403,6 +403,12 @@ SUBDIR+= who SUBDIR+= svn .endif +# These are normally only handled for build-tools. +.if make(clean*) +SUBDIR+= mkcsmapper_static +SUBDIR+= mkesdb_static +.endif + .include SUBDIR:= ${SUBDIR:O} From owner-svn-src-all@freebsd.org Mon May 15 18:46:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81D5CD6E165; Mon, 15 May 2017 18:46:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40E621990; Mon, 15 May 2017 18:46:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 5F8D87CD3; Mon, 15 May 2017 18:46:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 32CAA64F8; Mon, 15 May 2017 18:46:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id ULcu2vk0LUEL; Mon, 15 May 2017 18:46:01 +0000 (UTC) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 4A80D64F2 To: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705130310.v4D3ApUl085738@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <029ada53-e5fe-7abf-99ee-5227a623a171@FreeBSD.org> Date: Mon, 15 May 2017 11:45:38 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <201705130310.v4D3ApUl085738@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QNbD5nOmiMhMh3DIm8ATfvtUOhEEgee94" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:46:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --QNbD5nOmiMhMh3DIm8ATfvtUOhEEgee94 Content-Type: multipart/mixed; boundary="75URoF019homcg4NIP5s101p6xJVsFLmQ"; protected-headers="v1" From: Bryan Drewery To: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <029ada53-e5fe-7abf-99ee-5227a623a171@FreeBSD.org> Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk References: <201705130310.v4D3ApUl085738@repo.freebsd.org> In-Reply-To: <201705130310.v4D3ApUl085738@repo.freebsd.org> --75URoF019homcg4NIP5s101p6xJVsFLmQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 5/12/2017 8:10 PM, Ngie Cooper wrote: > Author: ngie > Date: Sat May 13 03:10:50 2017 > New Revision: 318250 > URL: https://svnweb.freebsd.org/changeset/base/318250 >=20 > Log: > Handle the logfiles in newsyslog and syslogd conditionally, based on > src.conf(5) knobs > =20 > This will allow consumers of FreeBSD to use the unmodified configurat= ion > files out of the box more than previously. > =20 > Both newsyslog.conf and syslog.conf: > - /var/log/lpd-errs (MK_LPR !=3D no) > - /var/log/ppp.log (MK_PPP !=3D no) > - /var/log/xferlog (MK_FTP !=3D no) > =20 > newsyslog.conf: > - /var/log/amd.log (MK_AMD !=3D no) > - /var/log/pflog (MK_PF !=3D no) > - /var/log/sendmail.st (MK_SENDMAIL !=3D no) > =20 > MFC after: 3 weeks > Sponsored by: Dell EMC Isilon >=20 > Added: > head/etc/newsyslog.conf.d/amd.conf (contents, props changed) > head/etc/newsyslog.conf.d/ftp.conf (contents, props changed) > head/etc/newsyslog.conf.d/lpr.conf (contents, props changed) > head/etc/newsyslog.conf.d/pf.conf (contents, props changed) > head/etc/newsyslog.conf.d/ppp.conf (contents, props changed) > head/etc/newsyslog.conf.d/sendmail.conf (contents, props changed) > head/etc/syslog.d/ > head/etc/syslog.d/Makefile (contents, props changed) > head/etc/syslog.d/ftp.conf (contents, props changed) > head/etc/syslog.d/lpr.conf (contents, props changed) > head/etc/syslog.d/ppp.conf (contents, props changed) > Modified: > head/etc/Makefile > head/etc/newsyslog.conf > head/etc/newsyslog.conf.d/Makefile > head/etc/syslog.conf > head/tools/build/mk/OptionalObsoleteFiles.inc +1 --=20 Regards, Bryan Drewery --75URoF019homcg4NIP5s101p6xJVsFLmQ-- --QNbD5nOmiMhMh3DIm8ATfvtUOhEEgee94 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJZGfdcAAoJEDXXcbtuRpfP1aQH+wSLvmwPH2Fa+RzWNO5vYT0B xztj2ovXHD0yrpW8AGrTVIiQrM9P1bhSUSZ1VfzRyDxLhZIZ6q3r9oiOdaA3RoTg mvrpF1sBdewYmkVCn2NRjuvq6UsHCviRSRpNW5FEI3uphwJ6/o9nq4PkOJUO+JZT Z45eUhhmpE1Rjeq9iT4UDnWMBMQg/I1zkm0pE/biflU5PGsAM2aAj/c0yvfXzlUk 8H3j15/fFdFqW/gyN9OOUEKpILMCeIpbmRqcGJIiBafqKckbl4Ih/HCA81mLKcYl AB58q9Ydsunp9VPCuTIxiPkrW38v8j0Sr4QNhkLIn6EdYz+BWHdM1L4W+fx+gLQ= =5GT5 -----END PGP SIGNATURE----- --QNbD5nOmiMhMh3DIm8ATfvtUOhEEgee94-- From owner-svn-src-all@freebsd.org Mon May 15 18:47:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47E86D6E224; Mon, 15 May 2017 18:47:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14ED51B0F; Mon, 15 May 2017 18:47:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FIlQGZ069988; Mon, 15 May 2017 18:47:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FIlQln069987; Mon, 15 May 2017 18:47:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705151847.v4FIlQln069987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 May 2017 18:47:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318312 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:47:27 -0000 Author: kib Date: Mon May 15 18:47:25 2017 New Revision: 318312 URL: https://svnweb.freebsd.org/changeset/base/318312 Log: Fix the AT_EXECFD functionality. If the mapped object is linked at specific address, we must obey it. If AT_EXECFD is not used, only in-kernel ELF image activator needed to keep the mapping address, since only binaries are linked at the fixed address, and binaries are mapped by kernel in this case. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 2 weeks X-Differential revision: https://reviews.freebsd.org/D10701 Modified: head/libexec/rtld-elf/map_object.c Modified: head/libexec/rtld-elf/map_object.c ============================================================================== --- head/libexec/rtld-elf/map_object.c Mon May 15 18:41:12 2017 (r318311) +++ head/libexec/rtld-elf/map_object.c Mon May 15 18:47:25 2017 (r318312) @@ -193,6 +193,8 @@ map_object(int fd, const char *path, con base_flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE; if (npagesizes > 1 && round_page(segs[0]->p_filesz) >= pagesizes[1]) base_flags |= MAP_ALIGNED_SUPER; + if (base_vaddr != 0) + base_flags |= MAP_FIXED | MAP_EXCL; mapbase = mmap(base_addr, mapsize, PROT_NONE, base_flags, -1, 0); if (mapbase == (caddr_t) -1) { From owner-svn-src-all@freebsd.org Mon May 15 18:48:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95615D6E2B5; Mon, 15 May 2017 18:48:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70D521D2F; Mon, 15 May 2017 18:48:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FImwC7070222; Mon, 15 May 2017 18:48:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FImwMW070221; Mon, 15 May 2017 18:48:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705151848.v4FImwMW070221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 May 2017 18:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318313 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:48:59 -0000 Author: kib Date: Mon May 15 18:48:58 2017 New Revision: 318313 URL: https://svnweb.freebsd.org/changeset/base/318313 Log: Make ld-elf.so.1 directly executable. Check if passed phdr is actually phdr of the interpreter itself, and decide that this is the case of direct execution. In this case, the binary to activate is specified in the argv[1]. After opening it, shift down on-stack structure with argv, env and aux vectors to emulate execution of the binary and not of the interpreter. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D10701 Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon May 15 18:47:25 2017 (r318312) +++ head/libexec/rtld-elf/rtld.c Mon May 15 18:48:58 2017 (r318313) @@ -339,13 +339,14 @@ _LD(const char *var) func_ptr_type _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) { - Elf_Auxinfo *aux, *auxp, *aux_info[AT_COUNT]; + Elf_Auxinfo *aux, *auxp, *auxpf, *aux_info[AT_COUNT]; Objlist_Entry *entry; Obj_Entry *last_interposer, *obj, *preload_tail; const Elf_Phdr *phdr; Objlist initlist; RtldLockState lockstate; - char **argv, *argv0, **env, *kexecpath, *library_path_rpath; + Elf_Addr *argcp; + char **argv, *argv0, **env, **envp, *kexecpath, *library_path_rpath; caddr_t imgentry; char buf[MAXPATHLEN]; int argc, fd, i, mib[2], phnum; @@ -359,6 +360,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ */ /* Find the auxiliary vector on the stack. */ + argcp = sp; argc = *sp++; argv = (char **) sp; sp += argc + 1; /* Skip over arguments and NULL terminator */ @@ -410,6 +412,57 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ md_abi_variant_hook(aux_info); + fd = -1; + if (aux_info[AT_EXECFD] != NULL) { + fd = aux_info[AT_EXECFD]->a_un.a_val; + } else { + assert(aux_info[AT_PHDR] != NULL); + phdr = (const Elf_Phdr *)aux_info[AT_PHDR]->a_un.a_ptr; + if (phdr == obj_rtld.phdr) { + dbg("opening main program in direct exec mode"); + if (argc >= 2) { + argv0 = argv[1]; + fd = open(argv0, O_RDONLY | O_CLOEXEC | O_VERIFY); + if (fd == -1) { + rtld_printf("Opening %s: %s\n", argv0, + rtld_strerror(errno)); + rtld_die(); + } + + /* + * For direct exec mode, argv[0] is the interpreter + * name, we must remove it and shift arguments left by + * 1 before invoking binary main. Since stack layout + * places environment pointers and aux vectors right + * after the terminating NULL, we must shift + * environment and aux as well. + * XXX Shift will be > 1 when options are implemented. + */ + do { + *argv = *(argv + 1); + argv++; + } while (*argv != NULL); + *argcp -= 1; + main_argc = argc - 1; + environ = env = envp = argv; + do { + *envp = *(envp + 1); + envp++; + } while (*envp != NULL); + aux = auxp = (Elf_Auxinfo *)envp; + auxpf = (Elf_Auxinfo *)(envp + 1); + for (;; auxp++, auxpf++) { + *auxp = *auxpf; + if (auxp->a_type == AT_NULL) + break; + } + } else { + rtld_printf("no binary\n"); + rtld_die(); + } + } + } + ld_bind_now = getenv(_LD("BIND_NOW")); /* @@ -470,8 +523,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ * Load the main program, or process its program header if it is * already loaded. */ - if (aux_info[AT_EXECFD] != NULL) { /* Load the main program. */ - fd = aux_info[AT_EXECFD]->a_un.a_val; + if (fd != -1) { /* Load the main program. */ dbg("loading main program"); obj_main = map_object(fd, argv0, NULL); close(fd); @@ -492,7 +544,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ rtld_die(); } - if (aux_info[AT_EXECPATH] != NULL) { + if (aux_info[AT_EXECPATH] != NULL && fd == -1) { kexecpath = aux_info[AT_EXECPATH]->a_un.a_ptr; dbg("AT_EXECPATH %p %s", kexecpath, kexecpath); if (kexecpath[0] == '/') @@ -504,7 +556,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ else obj_main->path = xstrdup(buf); } else { - dbg("No AT_EXECPATH"); + dbg("No AT_EXECPATH or direct exec"); obj_main->path = xstrdup(argv0); } dbg("obj_main path %s", obj_main->path); From owner-svn-src-all@freebsd.org Mon May 15 18:51:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0452D6E60B for ; Mon, 15 May 2017 18:51:49 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B17A235D for ; Mon, 15 May 2017 18:51:49 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 9db9ad73-399f-11e7-bfb5-0d159cd3c324 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 9db9ad73-399f-11e7-bfb5-0d159cd3c324; Mon, 15 May 2017 18:52:17 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4FIpfXJ001778; Mon, 15 May 2017 12:51:41 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1494874301.59865.116.camel@freebsd.org> Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk From: Ian Lepore To: "Ngie Cooper (yaneurabeya)" Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Mon, 15 May 2017 12:51:41 -0600 In-Reply-To: <60A3FDE1-F68E-49D5-972F-A0C8993E0FEE@gmail.com> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> <1494870201.59865.103.camel@freebsd.org> <0B1B76CF-9CC4-422B-8356-AE425413850B@gmail.com> <60A3FDE1-F68E-49D5-972F-A0C8993E0FEE@gmail.com> Content-Type: text/plain; charset="windows-1251" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:51:49 -0000 On Mon, 2017-05-15 at 11:24 -0700, Ngie Cooper (yaneurabeya) wrote: > > > > On May 15, 2017, at 10:47, Ngie Cooper (yaneurabeya) > mail.com> wrote: > > > > > > > > > > On May 15, 2017, at 10:43, Ian Lepore wrote: > > … > > > > > > > > That's only a good argument for keeping the lines in the > > > monolithic > > > file if those lines will be ignored when a file in the .conf.d > > > directory provides conflicting config.  Otherwise my embedded > > > product > > > that drops different rules for rotating /var/log/messages into > > > .conf.d > > > STILL has to programmatically edit the monolithic file to remove > > > the > > > standard rule(s). > > Bingo. This is part of the reason why I did this, apart from > > being selfish in not wanting to handle a handful of unnecessary > > entries in newsyslog/syslogd on all of my systems where I set these > > knobs to no. > > Literally all I did was `dd+p` in vim in the new files. I didn’t > > add or subtract any overall entries. > And for context, we (Isilon) run newsyslog more frequently than > upstream (sometimes every couple minutes, sometimes multiple times an > hour/day), attributing to unnecessary creation and modification of > log files (like this) that we (Isilon) don’t care about at all, which > causes other potential issues with root media wear, potential for > filesystem corruption, reduced number of available inodes/space > because it allocates at least the frag size for a file, etc. > We also run log rotation frequently (every 5 minutes) on our embedded systems.  That was super-important back when we logged to a ram filesystem, then newsyslog would rotate and compress from there to sdcard.  Now we just log to sdcard because when something goes wrong it's almost always the end of the log that has the clues (unless something triggers runaway log spewage) and we often lost it. A local modification we still apply to our syslogd allows you to specify in syslog.conf that for any given file, syslogd itself should limit the size of that file if the rotation doesn't take care of it soon enough.  That was important to prevent filling up a ram filesystem with runaway logging.  Now it's a feature we don't use much, but before I throw it overboard I thought I'd mention it here in case others have any use for it... The way the feature worked was you could put at the end of a line in syslog.conf "R nnnnK" -- the 'R' had a historical meaning that's now lost, so we bacronymed it to mean "Recycle" -- when the log grows to nnnnK in size, the last 32K of the file becomes a circular buffer that continually gets rewritten until a normal file rotation happens.  If something triggers runaway logging, the hope is that that event got captured somewhere before the final 32k of the file, so you still have some clues for postmortem analysis. -- Ian From owner-svn-src-all@freebsd.org Mon May 15 18:52:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D96AD6E6B2; Mon, 15 May 2017 18:52:37 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5084C7C8; Mon, 15 May 2017 18:52:37 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 775042EA; Mon, 15 May 2017 18:52:36 +0000 (UTC) Date: Mon, 15 May 2017 18:52:36 +0000 From: Alexey Dokuchaev To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515185236.GB1637@FreeBSD.org> References: <201705151848.v4FImwMW070221@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705151848.v4FImwMW070221@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:52:37 -0000 On Mon, May 15, 2017 at 06:48:58PM +0000, Konstantin Belousov wrote: > New Revision: 318313 > URL: https://svnweb.freebsd.org/changeset/base/318313 > > Log: > Make ld-elf.so.1 directly executable. Does it mean that old Linux' trick of /lib/ld-linux.so.2 /bin/chmod +x /bin/chmod would now be possible on FreeBSD as well? Does this have any security implications? ./danfe From owner-svn-src-all@freebsd.org Mon May 15 19:00:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 966A1D6E7CA; Mon, 15 May 2017 19:00:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 122409CF; Mon, 15 May 2017 19:00:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4FJ0UKb095174 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 May 2017 22:00:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4FJ0UKb095174 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4FJ0Uwt095172; Mon, 15 May 2017 22:00:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 15 May 2017 22:00:30 +0300 From: Konstantin Belousov To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515190030.GG1622@kib.kiev.ua> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170515185236.GB1637@FreeBSD.org> User-Agent: Mutt/1.8.2 (2017-04-18) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:00:37 -0000 On Mon, May 15, 2017 at 06:52:36PM +0000, Alexey Dokuchaev wrote: > On Mon, May 15, 2017 at 06:48:58PM +0000, Konstantin Belousov wrote: > > New Revision: 318313 > > URL: https://svnweb.freebsd.org/changeset/base/318313 > > > > Log: > > Make ld-elf.so.1 directly executable. > > Does it mean that old Linux' trick of /lib/ld-linux.so.2 /bin/chmod +x > /bin/chmod would now be possible on FreeBSD as well? Yes. > Does this have any security implications? What do you mean ? From owner-svn-src-all@freebsd.org Mon May 15 19:06:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA6E5D6ECAF; Mon, 15 May 2017 19:06:12 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD182110F; Mon, 15 May 2017 19:06:12 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 03C3176F; Mon, 15 May 2017 19:06:11 +0000 (UTC) Date: Mon, 15 May 2017 19:06:11 +0000 From: Alexey Dokuchaev To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515190611.GA16258@FreeBSD.org> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170515190030.GG1622@kib.kiev.ua> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:06:13 -0000 On Mon, May 15, 2017 at 10:00:30PM +0300, Konstantin Belousov wrote: > On Mon, May 15, 2017 at 06:52:36PM +0000, Alexey Dokuchaev wrote: > > On Mon, May 15, 2017 at 06:48:58PM +0000, Konstantin Belousov wrote: > > > New Revision: 318313 > > > URL: https://svnweb.freebsd.org/changeset/base/318313 > > > > > > Log: > > > Make ld-elf.so.1 directly executable. > ... > > Does this have any security implications? > > What do you mean ? I don't know, but was thinking of something like "this change makes X and Z scenarios now possible; if you're worried about this you might want to chmod -x /libexec/ld-elf.so.1 to restore previous behavior". BTW, would chmod -x /libexec/ld-elf.so.1 break anything from now on? If you cannot think of anything like this (specific), sorry for the noise, you can ignore me. ./danfe From owner-svn-src-all@freebsd.org Mon May 15 19:08:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 548B6D6ED30 for ; Mon, 15 May 2017 19:08:58 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30B4B12DA for ; Mon, 15 May 2017 19:08:57 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 064bb700-39a2-11e7-bfb5-0d159cd3c324 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 064bb700-39a2-11e7-bfb5-0d159cd3c324; Mon, 15 May 2017 19:09:31 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4FJ8tIF001821; Mon, 15 May 2017 13:08:55 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1494875335.59865.118.camel@freebsd.org> Subject: Re: svn commit: r318313 - head/libexec/rtld-elf From: Ian Lepore To: Konstantin Belousov , Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 15 May 2017 13:08:55 -0600 In-Reply-To: <20170515190030.GG1622@kib.kiev.ua> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:08:58 -0000 On Mon, 2017-05-15 at 22:00 +0300, Konstantin Belousov wrote: > On Mon, May 15, 2017 at 06:52:36PM +0000, Alexey Dokuchaev wrote: > > > > On Mon, May 15, 2017 at 06:48:58PM +0000, Konstantin Belousov > > wrote: > > > > > > New Revision: 318313 > > > URL: https://svnweb.freebsd.org/changeset/base/318313 > > > > > > Log: > > >   Make ld-elf.so.1 directly executable. > > Does it mean that old Linux' trick of /lib/ld-linux.so.2 /bin/chmod > > +x > > /bin/chmod would now be possible on FreeBSD as well? > Yes. > > > > > Does this have any security implications? > What do you mean ? > Well, for example, it seems like it would allow anyone to execute a binary even if the sysadmin had set it to -x specifically to prevent people from running it. -- Ian From owner-svn-src-all@freebsd.org Mon May 15 19:09:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88BB0D6ED9C; Mon, 15 May 2017 19:09:47 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FE0D1475; Mon, 15 May 2017 19:09:47 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from [10.11.0.121] (webassign-to-rtp-ip-asr-gw.ncren.net [128.109.111.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id 99A74239591; Mon, 15 May 2017 15:09:40 -0400 (EDT) Subject: Re: svn commit: r318313 - head/libexec/rtld-elf To: Alexey Dokuchaev , Konstantin Belousov Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> From: Nikolai Lifanov Message-ID: <6c327032-9eb5-2b0a-39ed-2140144a5a0d@FreeBSD.org> Date: Mon, 15 May 2017 15:09:33 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170515185236.GB1637@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4jFhDCnXjCGIA4r2h2RwG5GItMfrDGXwK" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:09:47 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4jFhDCnXjCGIA4r2h2RwG5GItMfrDGXwK Content-Type: multipart/mixed; boundary="cMpwKJqLw1EeQM8G9Ki0XhbWAxoJffejv"; protected-headers="v1" From: Nikolai Lifanov To: Alexey Dokuchaev , Konstantin Belousov Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Message-ID: <6c327032-9eb5-2b0a-39ed-2140144a5a0d@FreeBSD.org> Subject: Re: svn commit: r318313 - head/libexec/rtld-elf References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> In-Reply-To: <20170515185236.GB1637@FreeBSD.org> --cMpwKJqLw1EeQM8G9Ki0XhbWAxoJffejv Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 05/15/2017 14:52, Alexey Dokuchaev wrote: > On Mon, May 15, 2017 at 06:48:58PM +0000, Konstantin Belousov wrote: >> New Revision: 318313 >> URL: https://svnweb.freebsd.org/changeset/base/318313 >> >> Log: >> Make ld-elf.so.1 directly executable. >=20 > Does it mean that old Linux' trick of /lib/ld-linux.so.2 /bin/chmod +x > /bin/chmod would now be possible on FreeBSD as well? Does this have > any security implications? >=20 > ./danfe This is a use case for fixing accidentally hosed /bin/chmod binary and not some sort of an escalation thing. You will need to be root to do this. Likewise, with working chmod binary, you should be able to mark binaries with write access executable. - Nikolai Lifanov --cMpwKJqLw1EeQM8G9Ki0XhbWAxoJffejv-- --4jFhDCnXjCGIA4r2h2RwG5GItMfrDGXwK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKoBAEBCgCSFiEE5oT6TcuaWvG5gtjzZ6sv56ecR0UFAlkZ/O1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU2 ODRGQTREQ0I5QTVBRjFCOTgyRDhGMzY3QUIyRkU3QTc5QzQ3NDUUHGxpZmFub3ZA ZnJlZWJzZC5vcmcACgkQZ6sv56ecR0W13Q/8CTQVVfCNYpoKQchzQUQXsRR1rQCH PjyJSn2kOa4qn8inAxDwI9AYkr5P+p9W3bQKq6lnjRrTqR/cxn5QziXsM2X58eTD yzLWKfUm3ynCuOIyeSL/6ggl0m7Iyh6tVQeP45ftG+ZUflpKtNSS37FS7vYVsnlJ cjWcQ5QQjbxwBMxqtegzzbvCcsbwYHjtRiByNxGfDN2TvVpRX4fBwvMaSN6ZWcZz isLlbNyEGozfenPlDO/RiuH8zq/caL0JHZxvwhNZveSJyzfO0Comw07suTA5VCLR A6h+sTSD79YtfoP1YYUeg8DzOEYFU403/dFOZQBhBe4MVWxLc7yvPeO1E0kABUm2 MFI+X+vwLxFSGQG07sTQY9txjPlFFEhomMypDdKMJqh0jgC0apZdpKhDb2bU/Mbu f9OtNNlJ6y24OZGHx4pxKm88xMtjOL876bpsxzbzYqxX3B7fxUEf6R8jxOKuMVlq 3qRy2XjB4ZpCa2g5/+xS+DH1/qmXjRAgW1C8UD/Y3XM17f9lwUPGoooVl3SHazYc 5ZlNamFiQhBYbl80GAZ7+SVki3kW7z1nC3qnVD7nSovQzwD0wKTmGEalTFi0VyTv P8H2cTzDlSDKcLHMAVL2ltVKDq6A6L18y1D9AqONlmuwQ9vFycrFb/YqnIZC6lAo Bpq+tmUSNrVWJUc= =Xg2P -----END PGP SIGNATURE----- --4jFhDCnXjCGIA4r2h2RwG5GItMfrDGXwK-- From owner-svn-src-all@freebsd.org Mon May 15 19:13:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C77DD6E026; Mon, 15 May 2017 19:13:03 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2DFFF19D3; Mon, 15 May 2017 19:13:03 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 52BDBB26; Mon, 15 May 2017 19:13:02 +0000 (UTC) Date: Mon, 15 May 2017 19:13:02 +0000 From: Alexey Dokuchaev To: Ian Lepore Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515191302.GA28684@FreeBSD.org> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1494875335.59865.118.camel@freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:13:03 -0000 On Mon, May 15, 2017 at 01:08:55PM -0600, Ian Lepore wrote: > On Mon, 2017-05-15 at 22:00 +0300, Konstantin Belousov wrote: > > On Mon, May 15, 2017 at 06:52:36PM +0000, Alexey Dokuchaev wrote: > > > Does this have any security implications? > > > > What do you mean ? > > Well, for example, it seems like it would allow anyone to execute a > binary even if the sysadmin had set it to -x specifically to prevent > people from running it. Right, that was something I was subconsciously worried of but could not word it in timely fashion. Thanks Ian. ./danfe From owner-svn-src-all@freebsd.org Mon May 15 19:13:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47B2DD6E086 for ; Mon, 15 May 2017 19:13:20 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt0-x22e.google.com (mail-qt0-x22e.google.com [IPv6:2607:f8b0:400d:c0d::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E841E1AF5 for ; Mon, 15 May 2017 19:13:19 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt0-x22e.google.com with SMTP id v27so86238858qtg.2 for ; Mon, 15 May 2017 12:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZBN7P75CCyKstEABDytULiQ/0uQWMw/t1TXPbRUdxiw=; b=dmLbujS8L5YbhAWbRgAUUfOGaTkhVBAThCd78S4QqFqrY/CcG8fek8a9amICCMOIYy ZxsYkBbE8b2gBBjRfQhadQoW+ENEtZ77hlTtgQbqd0zCeVoFMLJv0V7kZ9OC+1AMTl2V fI7dNx2AMrKgsYTVe357BHApUPMXS8xM+PiolWGKJ0fj6CnwK4jXyK4BcEI+mNI5Ciai jZZ93CXDKbiIVRG6PSCZHHACtTcZ7mOfkSgImpqgonbSeY8cPL+VkEvXu9r+6e3tInu/ bTGQV5TFPESa7ns1rdX6hXV17bboDoyH5IxVNXypUtofWcMq/GGAWEDrPyw9u9j6C2if 4kvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ZBN7P75CCyKstEABDytULiQ/0uQWMw/t1TXPbRUdxiw=; b=HQNfTVD0siTWaIRPlsP9hdmG6B2NnMrrD+czmjzE4hQ1LiuLQ/rnj10IICgN/LpN0j UzgCCk0fAu7aPxEgCkM+u+Bmh19FT03J3UXUuNVqdes1pSPqerYlm8jNDJp5GCQHUjKL 1d//EKWWTrHC9WWThxZaGOCQI79I77ReNOHXpPyWfLqQUPjsXkz0gky9xRhMzty4PjSa kvOxQrkguL0DZKRbuh1zIgRJphoTzi0a9yNW1Z79jnIanW7aMjBefopmLg8zBQgdaHea 7QykS7OfpbRMnPZqEoI27eL2NF/eFf8aXvHId9L1vFDcpRW6+AiJMng1vNX3TFEuhyo/ hVCw== X-Gm-Message-State: AODbwcBPWcnzFFxRyNfj6oBg6gUeoWTHoBPOUoq3fdArDbozA9YNHPae kHCBeTiHehLJDDwx X-Received: by 10.200.36.66 with SMTP id d2mr7994059qtd.9.1494875599042; Mon, 15 May 2017 12:13:19 -0700 (PDT) Received: from mutt-hbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id x139sm9112833qkx.20.2017.05.15.12.13.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 May 2017 12:13:18 -0700 (PDT) Date: Mon, 15 May 2017 15:13:16 -0400 From: Shawn Webb To: Ian Lepore Cc: Konstantin Belousov , Alexey Dokuchaev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515191316.jjtxiynrh3jvo5sz@mutt-hbsd> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5io3g6j2hynitzvc" Content-Disposition: inline In-Reply-To: <1494875335.59865.118.camel@freebsd.org> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20170306 (1.8.0) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:13:20 -0000 --5io3g6j2hynitzvc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 15, 2017 at 01:08:55PM -0600, Ian Lepore wrote: > On Mon, 2017-05-15 at 22:00 +0300, Konstantin Belousov wrote: > > On Mon, May 15, 2017 at 06:52:36PM +0000, Alexey Dokuchaev wrote: > > >=20 > > > On Mon, May 15, 2017 at 06:48:58PM +0000, Konstantin Belousov > > > wrote: > > > >=20 > > > > New Revision: 318313 > > > > URL: https://svnweb.freebsd.org/changeset/base/318313 > > > >=20 > > > > Log: > > > > ? Make ld-elf.so.1 directly executable. > > > Does it mean that old Linux' trick of /lib/ld-linux.so.2 /bin/chmod > > > +x > > > /bin/chmod would now be possible on FreeBSD as well? > > Yes. > >=20 > > >=20 > > > Does this have any security implications? > > What do you mean ? > >=20 >=20 > Well, for example, it seems like it would allow anyone to execute a > binary even if the sysadmin had set it to -x specifically to prevent > people from running it. It additionally subverts application whitelisting schemes where all dependent shared objects (even the rtld) are checked (such is the case with Integriforce in HardenedBSD). Since even the rtld is checked, an attacker can now bypass the application whitelisting scheme by running: /libexec/ld-elf.so.1 /path/to/previously/disallowed/executable Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --5io3g6j2hynitzvc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlkZ/ckACgkQaoRlj1JF bu5B2w/+IwXqXEF1TEazfzGVK6C4+f9WoK12qRISJlVF7hGVFQ1Sk0Hbac4P3Mb0 +5WXXb4XFzYLCk8bXWUgO0rJdyVKmkeRQhQ0dREXUoSBOPZDbVk3/rTprlwiv3I5 dj2m3b012zcW7D3py3P/LwVztsw6WQ4EaIkgnYax4QT0YdOJP0vwRmVCHPegro47 F2Aw0zuAKY+Cjau7y/Act8aEZ7Vu5yaOeruKtJi7HaLCugq5JXd0zWuiwVZhZhaT NkOx0Rl+fEyZK8LuZ3v9yWCzjV4FmdYHB54ZzpNwCgIl6+a3LKgfV1DP36/CKacg TsGmSbv8vSDBIBJCq1lH/l+EWJb5qq+pk56bcbFEQs3bagtieD/yrrarM6hGIZir l2qJOAX7uRhR0uH7eofN6nKd5Sjdm6KymcBER6XLNBAciNsTK/VsAihtf7akD4w0 JX8OGBgBye+lBaAfk6f2swB8eUmwsdG+asX6brevF1Jh4L/M7QeJbYxVMV/1/L9/ NBBaKgDGPyyQYrfQQpu5heaZ7+ec/TdUaeV61+vJ8sKNCCyGJh/MoJGVAwjmgUaj 1mNvmv9CGSyk9nuoQXj/KkpWIa2F/SDHu2toO2wvgJmoP61tDC1yARCnL91aPDrE 5jEKCR3mMfjhfYwQuBuusBAsGHyuZslJFirXsPCrmynBPzZI4XI= =ipty -----END PGP SIGNATURE----- --5io3g6j2hynitzvc-- From owner-svn-src-all@freebsd.org Mon May 15 19:14:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76177D6E10D; Mon, 15 May 2017 19:14:27 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 557571CAF; Mon, 15 May 2017 19:14:27 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) Received: from [134.153.0.231] (unknown [127.0.1.132]) by freefall.freebsd.org (Postfix) with ESMTP id 1146ED62; Mon, 15 May 2017 19:14:26 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) From: "Jonathan Anderson" To: "Ian Lepore" Cc: "Konstantin Belousov" , "Alexey Dokuchaev" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Date: Mon, 15 May 2017 16:44:25 -0230 Message-ID: In-Reply-To: <1494875335.59865.118.camel@freebsd.org> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> MIME-Version: 1.0 X-Mailer: MailMate (1.9.6r5347) Content-Type: text/plain; format=flowed X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:14:27 -0000 On 15 May 2017, at 16:38, Ian Lepore wrote: > On Mon, 2017-05-15 at 22:00 +0300, Konstantin Belousov wrote: >> On Mon, May 15, 2017 at 06:52:36PM +0000, Alexey Dokuchaev wrote: >>> >>> Does this have any security implications? >> What do you mean ? >> > > Well, for example, it seems like it would allow anyone to execute a > binary even if the sysadmin had set it to -x specifically to prevent > people from running it. You can already execute "non-executable" binaries using the `exec` shell built-in: ``` $ cp /bin/sh . $ chmod -x sh $ exec sh ``` Jon -- Jonathan Anderson jonathan@FreeBSD.org From owner-svn-src-all@freebsd.org Mon May 15 19:18:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08B08D6E23D; Mon, 15 May 2017 19:18:25 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB27D1F9C; Mon, 15 May 2017 19:18:24 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) Received: from [134.153.0.231] (unknown [127.0.1.132]) by freefall.freebsd.org (Postfix) with ESMTP id 961DBFD1; Mon, 15 May 2017 19:18:23 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) From: "Jonathan Anderson" To: "Ian Lepore" Cc: "Konstantin Belousov" , "Alexey Dokuchaev" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Date: Mon, 15 May 2017 16:48:23 -0230 Message-ID: <1F314B80-B5EC-4384-AAF0-1F3D477ADC3B@FreeBSD.org> In-Reply-To: References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> MIME-Version: 1.0 X-Mailer: MailMate (1.9.6r5347) Content-Type: text/plain; format=flowed X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:18:25 -0000 On 15 May 2017, at 16:44, Jonathan Anderson wrote: > You can already execute "non-executable" binaries using the `exec` > shell built-in: > > ``` > $ cp /bin/sh . > $ chmod -x sh > $ exec sh > ``` Er, oops: I ought to have said, you can execute non-executable binaries by copying and marking them `+x`: ``` $ cp /bin/sh . $ chmod +x sh $ ./sh ``` (please ignore the bit about `exec`, that's from another mental thread) Jon -- Jonathan Anderson jonathan@FreeBSD.org From owner-svn-src-all@freebsd.org Mon May 15 19:21:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 556FFD6E426; Mon, 15 May 2017 19:21:37 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3439B37B; Mon, 15 May 2017 19:21:36 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from [10.11.0.121] (webassign-to-rtp-ip-asr-gw.ncren.net [128.109.111.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id 66181239431; Mon, 15 May 2017 15:21:35 -0400 (EDT) Subject: Re: svn commit: r318313 - head/libexec/rtld-elf To: Jonathan Anderson , Ian Lepore Cc: Konstantin Belousov , svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> <1F314B80-B5EC-4384-AAF0-1F3D477ADC3B@FreeBSD.org> From: Nikolai Lifanov Message-ID: <3daaaf74-3dd2-dcc9-03fb-5f6a7ccb991e@FreeBSD.org> Date: Mon, 15 May 2017 15:21:27 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <1F314B80-B5EC-4384-AAF0-1F3D477ADC3B@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="evothQLhOmJxo4EGjAttsLC0JAW86keK7" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:21:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --evothQLhOmJxo4EGjAttsLC0JAW86keK7 Content-Type: multipart/mixed; boundary="liucOQl8k9dOaIMtmTUw6V6DGK2jCxrlX"; protected-headers="v1" From: Nikolai Lifanov To: Jonathan Anderson , Ian Lepore Cc: Konstantin Belousov , svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org Message-ID: <3daaaf74-3dd2-dcc9-03fb-5f6a7ccb991e@FreeBSD.org> Subject: Re: svn commit: r318313 - head/libexec/rtld-elf References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> <1F314B80-B5EC-4384-AAF0-1F3D477ADC3B@FreeBSD.org> In-Reply-To: <1F314B80-B5EC-4384-AAF0-1F3D477ADC3B@FreeBSD.org> --liucOQl8k9dOaIMtmTUw6V6DGK2jCxrlX Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 05/15/2017 15:18, Jonathan Anderson wrote: > On 15 May 2017, at 16:44, Jonathan Anderson wrote: >=20 >> You can already execute "non-executable" binaries using the `exec` >> shell built-in: >> >> ``` >> $ cp /bin/sh . >> $ chmod -x sh >> $ exec sh >> ``` >=20 > Er, oops: I ought to have said, you can execute non-executable binaries= > by copying and marking them `+x`: >=20 > ``` > $ cp /bin/sh . > $ chmod +x sh > $ ./sh > ``` >=20 > (please ignore the bit about `exec`, that's from another mental thread)= >=20 >=20 > Jon And the default install doesn't mount /tmp noexec ... - Nikolai Lifanov --liucOQl8k9dOaIMtmTUw6V6DGK2jCxrlX-- --evothQLhOmJxo4EGjAttsLC0JAW86keK7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKoBAEBCgCSFiEE5oT6TcuaWvG5gtjzZ6sv56ecR0UFAlkZ/7hfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU2 ODRGQTREQ0I5QTVBRjFCOTgyRDhGMzY3QUIyRkU3QTc5QzQ3NDUUHGxpZmFub3ZA ZnJlZWJzZC5vcmcACgkQZ6sv56ecR0W21A/9Hgu1QZSENQYz5Pjl5mrvYxjHyGPl VfZC2dA9u3XIGCI2s7Coemw/59JpZ7ecsmbObBZEGL4MzNn/P3iHUU03CdyTsLek /xu3ls/I7ri+haKZsEkVBC8A12nzB2ldvlX2TWWqsixmrLTS91q7LxtRyPGTfbZJ YEwFYCRetbye2Mk/mzomfNymqCaOY4Tvq1X6rB/4ikjbbpYTG/Qxkzf1irYSTYll CBFOMt3UsJmy/f8mqNwps5TuW/Ce16btG3lsEaf6wHP+nY2Dg9CoOLxSYBdIlou3 g2tICUydkUdCcGFVUNNzt67uETVcZkW/4lpIsKrD1gsz0JhllRZZeffLNPHmw6Yf uQgYKlL7xUoravCRbaI6DeNZi6nS/IyJuPB2b6CGG1Rk0jpA8P24t/UKTRb548Sc DGm5+sIX3ZPH78vLViyjgO37pNwwq2iefRzVqHlMg1BUEkGoGk0Q9zckxQeg4BZc Ob89nl5jTyGq+Qe6eHouzC/8YWnUTT9+RqljDHmk9aHGv2heE9orzIQggaO9MprF XuI8rfch9gnx7C0S5SBzttri9Ka0pNGcoinaLesjt5ZFO/bANo+VzjV/6DX8bCH7 d08NjVmZGknfYa+XI2IbYX+g82s30ZMEpGjrRHS8uMbSNvt6u2WD3R/m5oy5pAV9 y7FFU17AZ80ZANs= =i5xV -----END PGP SIGNATURE----- --evothQLhOmJxo4EGjAttsLC0JAW86keK7-- From owner-svn-src-all@freebsd.org Mon May 15 19:23:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1492D6E4BB; Mon, 15 May 2017 19:23:27 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D2092838; Mon, 15 May 2017 19:23:27 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 03394125F; Mon, 15 May 2017 19:23:27 +0000 (UTC) Date: Mon, 15 May 2017 19:23:26 +0000 From: Alexey Dokuchaev To: Nikolai Lifanov Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515192326.GB28684@FreeBSD.org> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <6c327032-9eb5-2b0a-39ed-2140144a5a0d@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6c327032-9eb5-2b0a-39ed-2140144a5a0d@FreeBSD.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:23:28 -0000 On Mon, May 15, 2017 at 03:09:33PM -0400, Nikolai Lifanov wrote: > On 05/15/2017 14:52, Alexey Dokuchaev wrote: > > Does it mean that old Linux' trick of /lib/ld-linux.so.2 /bin/chmod +x > > /bin/chmod would now be possible on FreeBSD as well? Does this have > > any security implications? > > This is a use case for fixing accidentally hosed /bin/chmod binary and > not some sort of an escalation thing. You will need to be root to do > this. Because /bin/chmod is owned by root, not because /libexec/ld-elf.so.1 is limiting execution to root only, or is it (I might have missed uid check in that patch [1], but at a quick glance I didn't see it). On a living system, there are plenty of other ways to restore missing +x on /bin/chmod as long as you can call chmod(2), from simple Python script down to manually crafting small binary in hex. > Likewise, with working chmod binary, you should be able to mark > binaries with write access executable. Well, it's not just about chmod(1), this opens what can be a can of worms and I want to know how big it is. ./danfe [1] Idea for security.bsd.ld_elf_exec_root_only sysctl(8)? From owner-svn-src-all@freebsd.org Mon May 15 19:25:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5014D6E54B; Mon, 15 May 2017 19:25:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 850729A2; Mon, 15 May 2017 19:25:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 9A4CE1388; Mon, 15 May 2017 19:25:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id D141F6600; Mon, 15 May 2017 19:25:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id SIK0wDQicQOx; Mon, 15 May 2017 19:25:16 +0000 (UTC) Subject: Re: svn commit: r318313 - head/libexec/rtld-elf DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 8BE2265FB To: Konstantin Belousov , Alexey Dokuchaev References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <2493cfd2-1fab-d4cd-523c-0bd7413b1c86@FreeBSD.org> Date: Mon, 15 May 2017 12:25:20 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170515190030.GG1622@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FIBNq4MPs9g7XO3idsWtoeOkCiNO9wVti" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:25:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FIBNq4MPs9g7XO3idsWtoeOkCiNO9wVti Content-Type: multipart/mixed; boundary="cTJXegGkWXd4O3fHPXOudkouWIhUkFfcI"; protected-headers="v1" From: Bryan Drewery To: Konstantin Belousov , Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <2493cfd2-1fab-d4cd-523c-0bd7413b1c86@FreeBSD.org> Subject: Re: svn commit: r318313 - head/libexec/rtld-elf References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> In-Reply-To: <20170515190030.GG1622@kib.kiev.ua> --cTJXegGkWXd4O3fHPXOudkouWIhUkFfcI Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 5/15/2017 12:00 PM, Konstantin Belousov wrote: > On Mon, May 15, 2017 at 06:52:36PM +0000, Alexey Dokuchaev wrote: >> On Mon, May 15, 2017 at 06:48:58PM +0000, Konstantin Belousov wrote: >>> New Revision: 318313 >>> URL: https://svnweb.freebsd.org/changeset/base/318313 >>> >>> Log: >>> Make ld-elf.so.1 directly executable. >> >> Does it mean that old Linux' trick of /lib/ld-linux.so.2 /bin/chmod +x= >> /bin/chmod would now be possible on FreeBSD as well? > Yes. >=20 >> Does this have any security implications? > What do you mean ? >=20 I think for 3rd-party distributions it may be a problem. At the very least it needs to be communicated clearly in release notes or UPDATING. Consider a downstream vendor who has support for signed binary executions. If rtld allows a backdoor around exec(2) to run an unsigned binary, that could be a problem for them. It is on them to add support to exec(2) to validate the special case of execing rtld with an argument, or to just disable the feature in rtld from this commit. --=20 Regards, Bryan Drewery --cTJXegGkWXd4O3fHPXOudkouWIhUkFfcI-- --FIBNq4MPs9g7XO3idsWtoeOkCiNO9wVti Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJZGgCgAAoJEDXXcbtuRpfPXWAH/2Mi0uu/VhoCi+cTZaUwphAo OPFx6XFHODSG2DtSAuQgVKVjZWP2AP+kmqKkuHpyGARsuTVqjJyDu2YMKkd2OBS7 Ap53emckAzi/LFqQ46bianJWQzx9HJrSmvCxqMJzzBHKNa154OAh4TFtQMGBVwtc rQY6GIYDSir3ASTasHJrYtbFSaSG1olSHj5WWBMveoQHwzAlZ0Y17OOWF1IMxyIr jnTPx8W4nLVHbCuZsydoSNMqv7vw/aN1fJZZBKvGzbIxKWEAhBcKxE6jhVpKBeEd pdrXhFI6wgj4C6X0SZ1hIJL0QAsoIVW1/sGIFDzpqSq2vFVOajCclmf4p+mQEYA= =FUZz -----END PGP SIGNATURE----- --FIBNq4MPs9g7XO3idsWtoeOkCiNO9wVti-- From owner-svn-src-all@freebsd.org Mon May 15 19:25:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16544D6E5AF; Mon, 15 May 2017 19:25:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1446BA6F; Mon, 15 May 2017 19:25:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4FJPTca000765 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 May 2017 22:25:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4FJPTca000765 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4FJPTMq000764; Mon, 15 May 2017 22:25:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 15 May 2017 22:25:29 +0300 From: Konstantin Belousov To: Ian Lepore Cc: Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515192529.GH1622@kib.kiev.ua> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1494875335.59865.118.camel@freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:25:36 -0000 On Mon, May 15, 2017 at 01:08:55PM -0600, Ian Lepore wrote: > Well, for example, it seems like it would allow anyone to execute a > binary even if the sysadmin had set it to -x specifically to prevent > people from running it. The direct mode does not (and cannot) honor set{u,g}id modes of the executable, so any binary run this way would only exercise the existing power of the user which did it. The most advanced explanation that I was given in private was among the lines: "if you have an environment where users can upload content to a shared server, but have no access to chmod(2), no compilers, no scripting languages, etc." The person then admitted that (s)he does not consider it as an actual concern. If somebody is worried about this or similar scenario, I might add too restrictive check, e.g. requiring u+x if user is owner, g+x is primary user group is the group of file, and o+x otherwise. This would be strict subset of the normal unix checks and ACL would be also ignored. Still I am not convinced. From owner-svn-src-all@freebsd.org Mon May 15 19:29:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6552D6E6FF; Mon, 15 May 2017 19:29:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22FFCD06; Mon, 15 May 2017 19:29:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4FJTi3Y001723 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 May 2017 22:29:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4FJTi3Y001723 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4FJTitU001722; Mon, 15 May 2017 22:29:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 15 May 2017 22:29:44 +0300 From: Konstantin Belousov To: Bryan Drewery Cc: Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515192944.GI1622@kib.kiev.ua> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <2493cfd2-1fab-d4cd-523c-0bd7413b1c86@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2493cfd2-1fab-d4cd-523c-0bd7413b1c86@FreeBSD.org> User-Agent: Mutt/1.8.2 (2017-04-18) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:29:50 -0000 On Mon, May 15, 2017 at 12:25:20PM -0700, Bryan Drewery wrote: > On 5/15/2017 12:00 PM, Konstantin Belousov wrote: > > On Mon, May 15, 2017 at 06:52:36PM +0000, Alexey Dokuchaev wrote: > >> On Mon, May 15, 2017 at 06:48:58PM +0000, Konstantin Belousov wrote: > >>> New Revision: 318313 > >>> URL: https://svnweb.freebsd.org/changeset/base/318313 > >>> > >>> Log: > >>> Make ld-elf.so.1 directly executable. > >> > >> Does it mean that old Linux' trick of /lib/ld-linux.so.2 /bin/chmod +x > >> /bin/chmod would now be possible on FreeBSD as well? > > Yes. > > > >> Does this have any security implications? > > What do you mean ? > > > > I think for 3rd-party distributions it may be a problem. At the very > least it needs to be communicated clearly in release notes or UPDATING. > > Consider a downstream vendor who has support for signed binary > executions. If rtld allows a backdoor around exec(2) to run an unsigned > binary, that could be a problem for them. It is on them to add support > to exec(2) to validate the special case of execing rtld with an > argument, or to just disable the feature in rtld from this commit. Note the undocumented O_VERIFY flag in open(2) from the patch. This is very vendor-ish addition to request veriexec (?). From owner-svn-src-all@freebsd.org Mon May 15 19:29:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE96ED6E71E; Mon, 15 May 2017 19:29:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7495D18; Mon, 15 May 2017 19:29:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 885A210A7B9; Mon, 15 May 2017 15:29:53 -0400 (EDT) From: John Baldwin To: Ian Lepore Cc: Warner Losh , Ngie Cooper , "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Date: Mon, 15 May 2017 12:22:50 -0700 Message-ID: <4703731.Pl02uSWy7k@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <1494870201.59865.103.camel@freebsd.org> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> <1494870201.59865.103.camel@freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 15 May 2017 15:29:53 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:29:55 -0000 On Monday, May 15, 2017 11:43:21 AM Ian Lepore wrote: > On Mon, 2017-05-15 at 10:13 -0700, John Baldwin wrote: > > On Saturday, May 13, 2017 10:39:15 AM Warner Losh wrote: > > > > > > > > > > > > > > > > > - It's really easy to screw up a mergemaster call if you edit > > > > > the files, and install the stock version which removes the > > > > > edits. > > > > Also, programmatically removing the entries means you have to > > > > bake the metadata into etc/Makefile, which is already complicated > > > > enough as-is. > > > Why do you care about removing them at all? They are no-ops if the > > > files don't exist. Why not just always install all these files is > > > where I'm going with this... > > I think this is actually the bigger question. I think it is > > perfectly > > sensible to support conf.d/* files for ports to use and as a way to > > manage logs for application logs on an appliance, etc. However, this > > shuffling is a bit of a merge nightmare for anyone using mergemaster > > or etcupdate, and the biggest cost is that newsyslog will create a > > one-line file in /var/log for entries with 'C'. > > > > That's only a good argument for keeping the lines in the monolithic > file if those lines will be ignored when a file in the .conf.d > directory provides conflicting config. Otherwise my embedded product > that drops different rules for rotating /var/log/messages into .conf.d > STILL has to programmatically edit the monolithic file to remove the > standard rule(s). Now you have to programmatically edit the file in conf.d/foo. However, by this argument the monolithic conf file shouldn't even exist. The current approach is a half-way mix with the worst of both models it seems. Also, _you_ could just splat an empty /etc/newsyslog.conf file on your appliance and create a bunch of conf.d/foo files if that is easier for you to use on an appliance. The files we ship in a release aren't really tailored for an appliance (I've yet to see an appliance that doesn't use a FooBSD with local patches). OTOH, the existing setup is probably simpler to manage for an out-of-the-box install. I'm also suprised you don't manage the newsyslog.conf file yourself rather than trying to edit and merge in upstream changes? That is, I can see a few approaches: 1) Keep your real newsyslog.conf / syslogd.conf files in your FooBSD's VCS and when newsyslog.conf changes upstream you merge that in the way you normally merge changes. 2) Move the "vendor" newsyslog.conf out entirely and install your own versions of these files either as a monolithic assembled by config management rules or a bunch of conf.d/foo files (here I would probably opt for separate files). However, your approach doesn't seem to describe either of these since this commit doesn't impact those work flows (if 1), you would have already made any local changes you need and if anything merging this commit gives you the kind of merge conflicts people will get on the next mergemaster / etcupdate for non-appliance boxes, or if 2) you ignore these files) -- John Baldwin From owner-svn-src-all@freebsd.org Mon May 15 19:32:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3582DD6E893; Mon, 15 May 2017 19:32:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E72B11418; Mon, 15 May 2017 19:32:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id DC9CE19E0; Mon, 15 May 2017 19:32:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id DBE036F5C; Mon, 15 May 2017 19:32:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id iH6KTe2_rRBX; Mon, 15 May 2017 19:31:59 +0000 (UTC) Subject: Re: svn commit: r318313 - head/libexec/rtld-elf DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 0FD5966B4 To: Konstantin Belousov References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <2493cfd2-1fab-d4cd-523c-0bd7413b1c86@FreeBSD.org> <20170515192944.GI1622@kib.kiev.ua> Cc: Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <0b218455-d104-04be-d133-285f81d93456@FreeBSD.org> Date: Mon, 15 May 2017 12:32:02 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170515192944.GI1622@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FFLTjE6i9bxfXR2VegpjnuIwKpGNemOk6" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:32:09 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FFLTjE6i9bxfXR2VegpjnuIwKpGNemOk6 Content-Type: multipart/mixed; boundary="frbo5V5UHc3GFGXi1RewG7rIUQqtDnV22"; protected-headers="v1" From: Bryan Drewery To: Konstantin Belousov Cc: Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <0b218455-d104-04be-d133-285f81d93456@FreeBSD.org> Subject: Re: svn commit: r318313 - head/libexec/rtld-elf References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <2493cfd2-1fab-d4cd-523c-0bd7413b1c86@FreeBSD.org> <20170515192944.GI1622@kib.kiev.ua> In-Reply-To: <20170515192944.GI1622@kib.kiev.ua> --frbo5V5UHc3GFGXi1RewG7rIUQqtDnV22 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 5/15/2017 12:29 PM, Konstantin Belousov wrote: > On Mon, May 15, 2017 at 12:25:20PM -0700, Bryan Drewery wrote: >> On 5/15/2017 12:00 PM, Konstantin Belousov wrote: >>> On Mon, May 15, 2017 at 06:52:36PM +0000, Alexey Dokuchaev wrote: >>>> On Mon, May 15, 2017 at 06:48:58PM +0000, Konstantin Belousov wrote:= >>>>> New Revision: 318313 >>>>> URL: https://svnweb.freebsd.org/changeset/base/318313 >>>>> >>>>> Log: >>>>> Make ld-elf.so.1 directly executable. >>>> >>>> Does it mean that old Linux' trick of /lib/ld-linux.so.2 /bin/chmod = +x >>>> /bin/chmod would now be possible on FreeBSD as well? >>> Yes. >>> >>>> Does this have any security implications? >>> What do you mean ? >>> >> >> I think for 3rd-party distributions it may be a problem. At the very >> least it needs to be communicated clearly in release notes or UPDATING= =2E >> >> Consider a downstream vendor who has support for signed binary >> executions. If rtld allows a backdoor around exec(2) to run an unsign= ed >> binary, that could be a problem for them. It is on them to add suppor= t >> to exec(2) to validate the special case of execing rtld with an >> argument, or to just disable the feature in rtld from this commit. >=20 > Note the undocumented O_VERIFY flag in open(2) from the patch. > This is very vendor-ish addition to request veriexec (?). >=20 Ah nice. --=20 Regards, Bryan Drewery --frbo5V5UHc3GFGXi1RewG7rIUQqtDnV22-- --FFLTjE6i9bxfXR2VegpjnuIwKpGNemOk6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJZGgIyAAoJEDXXcbtuRpfPdnwH/2VQ2VMruk95NA49BgiHdEht /3/JhEHZfzLUjDlddARy5EqvILWP3TqNFgqpxKTAxxEea4KtOtBQaWUN6BVpz3x0 OkX/RlnWutl47vXf1u3sza+aJI5zjTxLBbzjCsrZclhrniVD7FdpROO751mk5KHZ 5uAKdurlQ6FKtiHr1n/nofti4/Bi/LGXKZC652a85cqmteZxcbvuEbeDbI0xuWEE l0hUBwuJLVxGmhk2GJ0d+t6xT4dFEkrhtiNb9Fjlx9uzHppTbNbdQhIF5QWRwdyh fCvQBMm/kLTgZEo5qPg6T3GViQl/8WOrQTBQ9XY8IgWZ+T4cDPmR+9kaeFjCduM= =cXXj -----END PGP SIGNATURE----- --FFLTjE6i9bxfXR2VegpjnuIwKpGNemOk6-- From owner-svn-src-all@freebsd.org Mon May 15 19:32:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7810D6E8F2; Mon, 15 May 2017 19:32:27 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9973615C8; Mon, 15 May 2017 19:32:27 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FJWQEa092470; Mon, 15 May 2017 19:32:26 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FJWQ16092469; Mon, 15 May 2017 19:32:26 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201705151932.v4FJWQ16092469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Mon, 15 May 2017 19:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318314 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:32:27 -0000 Author: stevek Date: Mon May 15 19:32:26 2017 New Revision: 318314 URL: https://svnweb.freebsd.org/changeset/base/318314 Log: Add information to open(2) man page about the O_VERIFY flag. Reviewed by: bjk wblock Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. Modified: head/lib/libc/sys/open.2 Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Mon May 15 18:48:58 2017 (r318313) +++ head/lib/libc/sys/open.2 Mon May 15 19:32:26 2017 (r318314) @@ -141,6 +141,7 @@ O_NOCTTY ignored O_TTY_INIT ignored O_DIRECTORY error if file is not a directory O_CLOEXEC set FD_CLOEXEC upon open +O_VERIFY verify the contents of the file .Ed .Pp Opening a file with @@ -259,6 +260,15 @@ may be used to set .Dv FD_CLOEXEC flag for the newly returned file descriptor. .Pp +.Dv O_VERIFY +may be used to indicate to the kernel that the contents of the file should +be verified before allowing the open to proceed. +The details of what +.Dq verified +means is implementation specific. +The run-time linker (rtld) uses this flag to ensure shared objects have +been verified before operating on them. +.Pp If successful, .Fn open returns a non-negative integer, termed a file descriptor. From owner-svn-src-all@freebsd.org Mon May 15 19:36:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 544CCD6EB1A; Mon, 15 May 2017 19:36:10 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FF9E17F5; Mon, 15 May 2017 19:36:10 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 53E301C64; Mon, 15 May 2017 19:36:09 +0000 (UTC) Date: Mon, 15 May 2017 19:36:09 +0000 From: Alexey Dokuchaev To: Konstantin Belousov Cc: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515193609.GC28684@FreeBSD.org> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> <20170515192529.GH1622@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170515192529.GH1622@kib.kiev.ua> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:36:10 -0000 On Mon, May 15, 2017 at 10:25:29PM +0300, Konstantin Belousov wrote: > On Mon, May 15, 2017 at 01:08:55PM -0600, Ian Lepore wrote: > > Well, for example, it seems like it would allow anyone to execute a > > binary even if the sysadmin had set it to -x specifically to prevent > > people from running it. > > The direct mode does not (and cannot) honor set{u,g}id modes of the > executable, so any binary run this way would only exercise the existing > power of the user which did it. > > The most advanced explanation that I was given in private was among > the lines: "if you have an environment where users can upload content > to a shared server, but have no access to chmod(2), no compilers, no > scripting languages, etc." The person then admitted that (s)he does not > consider it as an actual concern. Would this now allow executing binaries (with or without +x bit) from filesystems mounted with -o noexec? ./danfe From owner-svn-src-all@freebsd.org Mon May 15 19:37:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1E2CD6EBAC; Mon, 15 May 2017 19:37:17 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D8E71971; Mon, 15 May 2017 19:37:17 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from [10.11.0.121] (webassign-to-rtp-ip-asr-gw.ncren.net [128.109.111.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id CD720239591; Mon, 15 May 2017 15:37:15 -0400 (EDT) Subject: Re: svn commit: r318313 - head/libexec/rtld-elf To: Bryan Drewery , Konstantin Belousov Cc: svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <2493cfd2-1fab-d4cd-523c-0bd7413b1c86@FreeBSD.org> <20170515192944.GI1622@kib.kiev.ua> <0b218455-d104-04be-d133-285f81d93456@FreeBSD.org> From: Nikolai Lifanov Message-ID: Date: Mon, 15 May 2017 15:37:09 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <0b218455-d104-04be-d133-285f81d93456@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wxpbxHpui1EHqFIxTKLwQm0W5e7lPaDEp" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:37:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wxpbxHpui1EHqFIxTKLwQm0W5e7lPaDEp Content-Type: multipart/mixed; boundary="L2P74aJ3UV0PVmaSOjNsF8arptAjATXCA"; protected-headers="v1" From: Nikolai Lifanov To: Bryan Drewery , Konstantin Belousov Cc: svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org Message-ID: Subject: Re: svn commit: r318313 - head/libexec/rtld-elf References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <2493cfd2-1fab-d4cd-523c-0bd7413b1c86@FreeBSD.org> <20170515192944.GI1622@kib.kiev.ua> <0b218455-d104-04be-d133-285f81d93456@FreeBSD.org> In-Reply-To: <0b218455-d104-04be-d133-285f81d93456@FreeBSD.org> --L2P74aJ3UV0PVmaSOjNsF8arptAjATXCA Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 05/15/2017 15:32, Bryan Drewery wrote: > On 5/15/2017 12:29 PM, Konstantin Belousov wrote: >> On Mon, May 15, 2017 at 12:25:20PM -0700, Bryan Drewery wrote: >>> On 5/15/2017 12:00 PM, Konstantin Belousov wrote: >>>> On Mon, May 15, 2017 at 06:52:36PM +0000, Alexey Dokuchaev wrote: >>>>> On Mon, May 15, 2017 at 06:48:58PM +0000, Konstantin Belousov wrote= : >>>>>> New Revision: 318313 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/318313 >>>>>> >>>>>> Log: >>>>>> Make ld-elf.so.1 directly executable. >>>>> >>>>> Does it mean that old Linux' trick of /lib/ld-linux.so.2 /bin/chmod= +x >>>>> /bin/chmod would now be possible on FreeBSD as well? >>>> Yes. >>>> >>>>> Does this have any security implications? >>>> What do you mean ? >>>> >>> >>> I think for 3rd-party distributions it may be a problem. At the very >>> least it needs to be communicated clearly in release notes or UPDATIN= G. >>> >>> Consider a downstream vendor who has support for signed binary >>> executions. If rtld allows a backdoor around exec(2) to run an unsig= ned >>> binary, that could be a problem for them. It is on them to add suppo= rt >>> to exec(2) to validate the special case of execing rtld with an >>> argument, or to just disable the feature in rtld from this commit. >> >> Note the undocumented O_VERIFY flag in open(2) from the patch. >> This is very vendor-ish addition to request veriexec (?). >> >=20 > Ah nice. >=20 Note, this already does the right thing with noexec filesystems: # zfs create -o mountpoint=3D/mnt -o exec=3Doff tank/TEST # cp /bin/sh /mnt/ # /mnt/sh /mnt/sh: Permission denied. # /libexec/ld-elf.so.1 /mnt/sh /mnt/sh: mmap of data failed: Permission denied - Nikolai Lifanov --L2P74aJ3UV0PVmaSOjNsF8arptAjATXCA-- --wxpbxHpui1EHqFIxTKLwQm0W5e7lPaDEp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKoBAEBCgCSFiEE5oT6TcuaWvG5gtjzZ6sv56ecR0UFAlkaA2VfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU2 ODRGQTREQ0I5QTVBRjFCOTgyRDhGMzY3QUIyRkU3QTc5QzQ3NDUUHGxpZmFub3ZA ZnJlZWJzZC5vcmcACgkQZ6sv56ecR0VWPg/+Nn3OU1exF6WEhB7owrUnjU726A3R fJmkbgueDgPPqUGI5cktj1/FwG+C8iZsN25FL9CYAjDYUhkk1hEFOWMrY5aQl3qo N6gDe1FfoM8bbrrhNk21VnelPkNWfnh0Xr3Jd213HkKMxtCR1kGLri0fShnv3sqM TqrREVNSAZ1wVHVuudtv8+UAPco6rQ80owzPP+5vVeiMeRssSVNnM9NQKZ8D8UpI gCRshG8G4TeDbLcW7MZGzUNJ7RR+rxJrhJqtBzGrCjc7W8coTLHdRz3Ab4yJfNFg ST+/Ey8w/NXYJJXE46bhQoP7//KHrp6j5maj9qCEW+g+Y4fbnFJetfwoDcQdKMUs ag/4f6So+Cvn9MfM71S2iOl8iUJqYT9X6X2bXLW4qjlHVYtAgVebQzLqRKwodQAT yaoV41PG4bs9BfSEkXqM7bBJprJbLyohlkNOXMclg/n3pbXX7+nvQ4uBzk3vIEF7 cT0x1YNf+5NST9qPHGzw0xA+addQhB7u73hIApWxn864H+/n6XLikKmNDdHt6C7B fVGllzrQwhLAuirz3B1SLFg3d+4JqNbFmW+5Cji8iCoSeVQyKYVmc1xtf3uq7Ug6 6coz/hLkao2oZqH5FpSeAJCKPcnU3qRJ+B9I7aNc1iVjeyokeNWmK2f0/oXbScQy 1jKXcOcN+2Cir2U= =Rl6+ -----END PGP SIGNATURE----- --wxpbxHpui1EHqFIxTKLwQm0W5e7lPaDEp-- From owner-svn-src-all@freebsd.org Mon May 15 19:37:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 417ABD6EC17; Mon, 15 May 2017 19:37:44 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2007F1AC9; Mon, 15 May 2017 19:37:44 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from [10.11.0.121] (webassign-to-rtp-ip-asr-gw.ncren.net [128.109.111.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id 6651D239431; Mon, 15 May 2017 15:37:43 -0400 (EDT) Subject: Re: svn commit: r318313 - head/libexec/rtld-elf To: Alexey Dokuchaev , Konstantin Belousov Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> <20170515192529.GH1622@kib.kiev.ua> <20170515193609.GC28684@FreeBSD.org> From: Nikolai Lifanov Message-ID: Date: Mon, 15 May 2017 15:37:42 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170515193609.GC28684@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uOHMxvRmxjSE6aXADTnL36hrp0cTlkFVj" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:37:44 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uOHMxvRmxjSE6aXADTnL36hrp0cTlkFVj Content-Type: multipart/mixed; boundary="hoRJptTirN5Wea25lBaCMtmJ3ldXQq2ni"; protected-headers="v1" From: Nikolai Lifanov To: Alexey Dokuchaev , Konstantin Belousov Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore Message-ID: Subject: Re: svn commit: r318313 - head/libexec/rtld-elf References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> <20170515192529.GH1622@kib.kiev.ua> <20170515193609.GC28684@FreeBSD.org> In-Reply-To: <20170515193609.GC28684@FreeBSD.org> --hoRJptTirN5Wea25lBaCMtmJ3ldXQq2ni Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 05/15/2017 15:36, Alexey Dokuchaev wrote: > On Mon, May 15, 2017 at 10:25:29PM +0300, Konstantin Belousov wrote: >> On Mon, May 15, 2017 at 01:08:55PM -0600, Ian Lepore wrote: >>> Well, for example, it seems like it would allow anyone to execute a >>> binary even if the sysadmin had set it to -x specifically to prevent >>> people from running it. >> >> The direct mode does not (and cannot) honor set{u,g}id modes of the >> executable, so any binary run this way would only exercise the existin= g >> power of the user which did it. >> >> The most advanced explanation that I was given in private was among >> the lines: "if you have an environment where users can upload content >> to a shared server, but have no access to chmod(2), no compilers, no >> scripting languages, etc." The person then admitted that (s)he does no= t >> consider it as an actual concern. >=20 > Would this now allow executing binaries (with or without +x bit) from > filesystems mounted with -o noexec? >=20 > ./danfe No: # zfs create -o mountpoint=3D/mnt -o exec=3Doff tank/TEST # cp /bin/sh /mnt/ # /mnt/sh /mnt/sh: Permission denied. # /libexec/ld-elf.so.1 /mnt/sh /mnt/sh: mmap of data failed: Permission denied - Nikolai Lifanov --hoRJptTirN5Wea25lBaCMtmJ3ldXQq2ni-- --uOHMxvRmxjSE6aXADTnL36hrp0cTlkFVj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKoBAEBCgCSFiEE5oT6TcuaWvG5gtjzZ6sv56ecR0UFAlkaA4ZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU2 ODRGQTREQ0I5QTVBRjFCOTgyRDhGMzY3QUIyRkU3QTc5QzQ3NDUUHGxpZmFub3ZA ZnJlZWJzZC5vcmcACgkQZ6sv56ecR0U5phAAmRmHq9fmuJTe5tMECuYmixKCCnj6 kvNIU7kY2ZV4Um8UqISKEZHmpEDd8pJf288gkIGG06UPsrOwWWU/VJ8XIuF8bjii pVV4SMzW2aY4P6qKf1COHc1oFuhkrdZj6R9FsxOqdpyRwRk+79/DOG/6YcWXAK4f kb/4ylKnBbxPNmAWc96m6WD6n/b/Sn15ael4M80d/JJNMmzOik25AvUJIsCDVJFT 1jPmegEm2nh7hbiiqQSP86FbBbYy0+Z48imnsKyiw87V16/bu73jPRmJHnr7xnD/ nyElKNsJIfwKgRVcGEybCw1oKtT7jFikvUeJdVGmoLeS/LWAkp376Ll4LdHoqDIG aqub7XshH4qglivxl2qmuUsjXhYLegY2x0LZzYQ218UCTXRvLs6uUcseTE9r/shi NyEei3t68Cm1m7NZFJ1q9M5ceMcoa9QmseMEos6kX0A8SFK9ZCT1WBm1WxZAzyYG rPfXBLNSFxTciQLPHoHoCZZu1vYClhtLg2lPpBsIVWX3s2kBlDdJgJDMA6yey//g oUyWEmcRF3XkqMLNmCzH2CL7BcJ/IR9N3KF+ACY5IhMFhDzkO9ZUYNHlhcR9Dgsu NjlHppkcmrqBN7PdHcA1dAfuW1YwYfBFkkOayEoj6PMVzyZklvoYKL8Z4mvTfvtg LQAv3WBx8GMInyk= =35s1 -----END PGP SIGNATURE----- --uOHMxvRmxjSE6aXADTnL36hrp0cTlkFVj-- From owner-svn-src-all@freebsd.org Mon May 15 19:40:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 676E2D6ECDB; Mon, 15 May 2017 19:40:11 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47A9E1D56; Mon, 15 May 2017 19:40:11 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 701D420AE; Mon, 15 May 2017 19:40:10 +0000 (UTC) Date: Mon, 15 May 2017 19:40:10 +0000 From: Alexey Dokuchaev To: Nikolai Lifanov Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515194010.GD28684@FreeBSD.org> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> <20170515192529.GH1622@kib.kiev.ua> <20170515193609.GC28684@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:40:11 -0000 On Mon, May 15, 2017 at 03:37:42PM -0400, Nikolai Lifanov wrote: > On 05/15/2017 15:36, Alexey Dokuchaev wrote: > > On Mon, May 15, 2017 at 10:25:29PM +0300, Konstantin Belousov wrote: > >> ... > >> The most advanced explanation that I was given in private was among > >> the lines: "if you have an environment where users can upload content > >> to a shared server, but have no access to chmod(2), no compilers, no > >> scripting languages, etc." The person then admitted that (s)he does not > >> consider it as an actual concern. > > > > Would this now allow executing binaries (with or without +x bit) from > > filesystems mounted with -o noexec? > > No: > > # zfs create -o mountpoint=/mnt -o exec=off tank/TEST > # cp /bin/sh /mnt/ > # /mnt/sh > /mnt/sh: Permission denied. > # /libexec/ld-elf.so.1 /mnt/sh > /mnt/sh: mmap of data failed: Permission denied Good, thanks for conducting this test Nikolai. ./danfe From owner-svn-src-all@freebsd.org Mon May 15 19:40:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0E1DD6EE8D; Mon, 15 May 2017 19:40:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 217A81F10; Mon, 15 May 2017 19:40:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4FJenI3004804 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 May 2017 22:40:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4FJenI3004804 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4FJenlb004803; Mon, 15 May 2017 22:40:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 15 May 2017 22:40:49 +0300 From: Konstantin Belousov To: Nikolai Lifanov Cc: Alexey Dokuchaev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515194049.GJ1622@kib.kiev.ua> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> <20170515192529.GH1622@kib.kiev.ua> <20170515193609.GC28684@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:40:54 -0000 On Mon, May 15, 2017 at 03:37:42PM -0400, Nikolai Lifanov wrote: > On 05/15/2017 15:36, Alexey Dokuchaev wrote: > > On Mon, May 15, 2017 at 10:25:29PM +0300, Konstantin Belousov wrote: > >> On Mon, May 15, 2017 at 01:08:55PM -0600, Ian Lepore wrote: > >>> Well, for example, it seems like it would allow anyone to execute a > >>> binary even if the sysadmin had set it to -x specifically to prevent > >>> people from running it. > >> > >> The direct mode does not (and cannot) honor set{u,g}id modes of the > >> executable, so any binary run this way would only exercise the existing > >> power of the user which did it. > >> > >> The most advanced explanation that I was given in private was among > >> the lines: "if you have an environment where users can upload content > >> to a shared server, but have no access to chmod(2), no compilers, no > >> scripting languages, etc." The person then admitted that (s)he does not > >> consider it as an actual concern. > > > > Would this now allow executing binaries (with or without +x bit) from > > filesystems mounted with -o noexec? > > > > ./danfe > > No: > > # zfs create -o mountpoint=/mnt -o exec=off tank/TEST > # cp /bin/sh /mnt/ > # /mnt/sh > /mnt/sh: Permission denied. > # /libexec/ld-elf.so.1 /mnt/sh > /mnt/sh: mmap of data failed: Permission denied This is due to r313967 | kib | 2017-02-19 22:51:04 +0200 (Sun, 19 Feb 2017) | 24 lines Apply noexec mount option for mmap(PROT_EXEC). From owner-svn-src-all@freebsd.org Mon May 15 19:42:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 300B2D6E04D; Mon, 15 May 2017 19:42:24 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CCD87B6; Mon, 15 May 2017 19:42:24 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 344C82503; Mon, 15 May 2017 19:42:23 +0000 (UTC) Date: Mon, 15 May 2017 19:42:23 +0000 From: Alexey Dokuchaev To: Konstantin Belousov Cc: Nikolai Lifanov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515194223.GE28684@FreeBSD.org> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> <20170515192529.GH1622@kib.kiev.ua> <20170515193609.GC28684@FreeBSD.org> <20170515194049.GJ1622@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170515194049.GJ1622@kib.kiev.ua> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:42:24 -0000 On Mon, May 15, 2017 at 10:40:49PM +0300, Konstantin Belousov wrote: > On Mon, May 15, 2017 at 03:37:42PM -0400, Nikolai Lifanov wrote: > > On 05/15/2017 15:36, Alexey Dokuchaev wrote: > > > ... > > > Would this now allow executing binaries (with or without +x bit) from > > > filesystems mounted with -o noexec? > > > > No: > > > > # zfs create -o mountpoint=/mnt -o exec=off tank/TEST > > # cp /bin/sh /mnt/ > > # /mnt/sh > > /mnt/sh: Permission denied. > > # /libexec/ld-elf.so.1 /mnt/sh > > /mnt/sh: mmap of data failed: Permission denied > > This is due to > r313967 | kib | 2017-02-19 22:51:04 +0200 (Sun, 19 Feb 2017) | 24 lines > Apply noexec mount option for mmap(PROT_EXEC). Nice, good to know that. ./danfe From owner-svn-src-all@freebsd.org Mon May 15 19:52:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8FE8D6E302; Mon, 15 May 2017 19:52:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44FD3E5F; Mon, 15 May 2017 19:52:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4FJqaVl007300 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 May 2017 22:52:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4FJqaVl007300 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4FJqaQm007299; Mon, 15 May 2017 22:52:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 15 May 2017 22:52:36 +0300 From: Konstantin Belousov To: Alexey Dokuchaev Cc: Nikolai Lifanov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515195236.GK1622@kib.kiev.ua> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> <20170515192529.GH1622@kib.kiev.ua> <20170515193609.GC28684@FreeBSD.org> <20170515194049.GJ1622@kib.kiev.ua> <20170515194223.GE28684@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170515194223.GE28684@FreeBSD.org> User-Agent: Mutt/1.8.2 (2017-04-18) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:52:42 -0000 On Mon, May 15, 2017 at 07:42:23PM +0000, Alexey Dokuchaev wrote: > On Mon, May 15, 2017 at 10:40:49PM +0300, Konstantin Belousov wrote: > > On Mon, May 15, 2017 at 03:37:42PM -0400, Nikolai Lifanov wrote: > > > On 05/15/2017 15:36, Alexey Dokuchaev wrote: > > > > ... > > > > Would this now allow executing binaries (with or without +x bit) from > > > > filesystems mounted with -o noexec? > > > > > > No: > > > > > > # zfs create -o mountpoint=/mnt -o exec=off tank/TEST > > > # cp /bin/sh /mnt/ > > > # /mnt/sh > > > /mnt/sh: Permission denied. > > > # /libexec/ld-elf.so.1 /mnt/sh > > > /mnt/sh: mmap of data failed: Permission denied > > > > This is due to > > r313967 | kib | 2017-02-19 22:51:04 +0200 (Sun, 19 Feb 2017) | 24 lines > > Apply noexec mount option for mmap(PROT_EXEC). > > Nice, good to know that. [Replying to random mail in thread] I tried this on an up to date latest Fedora installation: [kostik@sandy ~]$ cp /bin/ls /tmp [kostik@sandy ~]$ chmod a-x /tmp/ls [kostik@sandy ~]$ /lib64/ld-linux-x86-64.so.2 /tmp/ls Dropbox intel tmp work I am not sure about one detail, the /tmp/ls file has some security context on it, but I do not believe that it may affect the outcome of the experiment. Please correct me if I am wrong. From owner-svn-src-all@freebsd.org Mon May 15 19:55:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81819D6E3C6; Mon, 15 May 2017 19:55:25 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6151210C8; Mon, 15 May 2017 19:55:25 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from [10.11.0.121] (webassign-to-rtp-ip-asr-gw.ncren.net [128.109.111.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id 971A7239431; Mon, 15 May 2017 15:55:23 -0400 (EDT) Subject: Re: svn commit: r318313 - head/libexec/rtld-elf To: Konstantin Belousov , Alexey Dokuchaev Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> <20170515192529.GH1622@kib.kiev.ua> <20170515193609.GC28684@FreeBSD.org> <20170515194049.GJ1622@kib.kiev.ua> <20170515194223.GE28684@FreeBSD.org> <20170515195236.GK1622@kib.kiev.ua> From: Nikolai Lifanov Message-ID: <78f83a15-86b0-763f-a122-5344b90c0e17@FreeBSD.org> Date: Mon, 15 May 2017 15:55:15 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170515195236.GK1622@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GHd0lrCCF0cpSSiIcr28B8a7aQdQ4wfIk" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:55:25 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GHd0lrCCF0cpSSiIcr28B8a7aQdQ4wfIk Content-Type: multipart/mixed; boundary="vCPRM0dSJ6FVFnw2D991D7ghMjfI05VMD"; protected-headers="v1" From: Nikolai Lifanov To: Konstantin Belousov , Alexey Dokuchaev Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore Message-ID: <78f83a15-86b0-763f-a122-5344b90c0e17@FreeBSD.org> Subject: Re: svn commit: r318313 - head/libexec/rtld-elf References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> <20170515192529.GH1622@kib.kiev.ua> <20170515193609.GC28684@FreeBSD.org> <20170515194049.GJ1622@kib.kiev.ua> <20170515194223.GE28684@FreeBSD.org> <20170515195236.GK1622@kib.kiev.ua> In-Reply-To: <20170515195236.GK1622@kib.kiev.ua> --vCPRM0dSJ6FVFnw2D991D7ghMjfI05VMD Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 05/15/2017 15:52, Konstantin Belousov wrote: > On Mon, May 15, 2017 at 07:42:23PM +0000, Alexey Dokuchaev wrote: >> On Mon, May 15, 2017 at 10:40:49PM +0300, Konstantin Belousov wrote: >>> On Mon, May 15, 2017 at 03:37:42PM -0400, Nikolai Lifanov wrote: >>>> On 05/15/2017 15:36, Alexey Dokuchaev wrote: >>>>> ... >>>>> Would this now allow executing binaries (with or without +x bit) fr= om >>>>> filesystems mounted with -o noexec? >>>> >>>> No: >>>> >>>> # zfs create -o mountpoint=3D/mnt -o exec=3Doff tank/TEST >>>> # cp /bin/sh /mnt/ >>>> # /mnt/sh >>>> /mnt/sh: Permission denied. >>>> # /libexec/ld-elf.so.1 /mnt/sh >>>> /mnt/sh: mmap of data failed: Permission denied >>> >>> This is due to >>> r313967 | kib | 2017-02-19 22:51:04 +0200 (Sun, 19 Feb 2017) | 24 lin= es >>> Apply noexec mount option for mmap(PROT_EXEC). >> >> Nice, good to know that. >=20 > [Replying to random mail in thread] >=20 > I tried this on an up to date latest Fedora installation: > [kostik@sandy ~]$ cp /bin/ls /tmp > [kostik@sandy ~]$ chmod a-x /tmp/ls > [kostik@sandy ~]$ /lib64/ld-linux-x86-64.so.2 /tmp/ls > Dropbox intel tmp work >=20 > I am not sure about one detail, the /tmp/ls file has some security cont= ext > on it, but I do not believe that it may affect the outcome of the exper= iment. > Please correct me if I am wrong. >=20 This is because /tmp is exec. On Linux it does the same thing: # mount -t tmpfs none -o noexec,mode=3D1777 /mnt # cp /bin/bash /mnt/ # /lib64/ld-linux-x86-64.so.2 /mnt/bash /mnt/bash: error while loading shared libraries: /mnt/bash: failed to map segment from shared object: Operation not permitted - Nikolai Lifanov --vCPRM0dSJ6FVFnw2D991D7ghMjfI05VMD-- --GHd0lrCCF0cpSSiIcr28B8a7aQdQ4wfIk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKoBAEBCgCSFiEE5oT6TcuaWvG5gtjzZ6sv56ecR0UFAlkaB6NfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU2 ODRGQTREQ0I5QTVBRjFCOTgyRDhGMzY3QUIyRkU3QTc5QzQ3NDUUHGxpZmFub3ZA ZnJlZWJzZC5vcmcACgkQZ6sv56ecR0WAaQ/8CWEpIDWPtbhWsb143JM9kZGheHb4 DM36ywJLSEuZYX9jOBw0iL1GRmc1qpfWJkFNQt1MrAmzMihgoMzQqMEi43V9frAM rTX1oKNOz11bN0XB+SzGvTeJnPYEYbolaDITGgwOVtQ/ixkiSzFAZw3kXhlV4UUy kTQmJnnBpVHP54dFgjBFYXxNJcrJIm/kC8Q652ruxpU4QbYM6rZmDR85k2iNPf3l MI7ke1M/2M9ZvPDjYZNEgMv6hBPDT44D8/ZfZyDK+T9Pqb+cH2hnuKu25W83Fmzt /5JcGfJo0E7oLnm7Z3bgezN9USISgDL4vJriLAX4GGq0IiNrCn3tbwBXGwtbqPy2 wTIFsyeoGc4ZJZh5Pe571weamrMbgZ95wsPz/elAvf/uTQrmeiH5R2CgPNNhKnLQ 73K78UL+23EaeXGliwnsVjReUqWahARZzoDIy2eQtkhuiGuLOSAngCrbgzPOIygh M5+iuaxrWZP/DVaS/Ie7XzJDd7Rg/A70Hn77YfErO70REA9vVqdI9Svb7i5ZQP1M n5bWKqN+aY6zvdjrF0pirX4d/gq8Ad1+SS5TYnhru9+NCx5GU7hw9nBSq+tRhmtt o2TBaa/AqIdsOGY5w8nes1JN1bFzEmtCYK9fVV/q2ol1o25DQYFaFPuJk0BvkO5q Fti/73umfs/mlpg= =kCFJ -----END PGP SIGNATURE----- --GHd0lrCCF0cpSSiIcr28B8a7aQdQ4wfIk-- From owner-svn-src-all@freebsd.org Mon May 15 19:58:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EED5AD6E4FB; Mon, 15 May 2017 19:58:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEFE212DE; Mon, 15 May 2017 19:58:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FJw1IL001174; Mon, 15 May 2017 19:58:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FJw1jn001173; Mon, 15 May 2017 19:58:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705151958.v4FJw1jn001173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 15 May 2017 19:58:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318315 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:58:03 -0000 Author: ngie Date: Mon May 15 19:58:01 2017 New Revision: 318315 URL: https://svnweb.freebsd.org/changeset/base/318315 Log: lib/libc/gen/realpath_test: make check result from getcwd(3) This is being done to avoid dereferencing a NULL pointer via strlcat, obscuring the underlying issue with the getcwd(3) call. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/lib/libc/gen/t_realpath.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_realpath.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_realpath.c Mon May 15 19:32:26 2017 (r318314) +++ head/contrib/netbsd-tests/lib/libc/gen/t_realpath.c Mon May 15 19:58:01 2017 (r318315) @@ -34,6 +34,9 @@ __RCSID("$NetBSD: t_realpath.c,v 1.2 201 #include #include +#ifdef __FreeBSD__ +#include +#endif #include #include #include @@ -122,8 +125,15 @@ ATF_TC_BODY(realpath_symlink, tc) char resb[MAXPATHLEN] = { 0 }; int fd; +#ifdef __FreeBSD__ + ATF_REQUIRE_MSG(getcwd(path, sizeof(path)) != NULL, + "getcwd(path) failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(getcwd(slnk, sizeof(slnk)) != NULL, + "getcwd(slnk) failed: %s", strerror(errno)); +#else (void)getcwd(path, sizeof(path)); (void)getcwd(slnk, sizeof(slnk)); +#endif (void)strlcat(path, "/realpath", sizeof(path)); (void)strlcat(slnk, "/symbolic", sizeof(slnk)); From owner-svn-src-all@freebsd.org Mon May 15 20:00:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 665A2D6E5DE; Mon, 15 May 2017 20:00:56 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 483E2151D; Mon, 15 May 2017 20:00:55 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v4FK0nS1054534; Mon, 15 May 2017 13:00:49 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v4FK0meq054533; Mon, 15 May 2017 13:00:48 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201705152000.v4FK0meq054533@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r318313 - head/libexec/rtld-elf In-Reply-To: <20170515192326.GB28684@FreeBSD.org> To: Alexey Dokuchaev Date: Mon, 15 May 2017 13:00:48 -0700 (PDT) CC: Nikolai Lifanov , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 20:00:56 -0000 > On Mon, May 15, 2017 at 03:09:33PM -0400, Nikolai Lifanov wrote: > > On 05/15/2017 14:52, Alexey Dokuchaev wrote: > > > Does it mean that old Linux' trick of /lib/ld-linux.so.2 /bin/chmod +x > > > /bin/chmod would now be possible on FreeBSD as well? Does this have > > > any security implications? > > > > This is a use case for fixing accidentally hosed /bin/chmod binary and > > not some sort of an escalation thing. You will need to be root to do > > this. > > Because /bin/chmod is owned by root, not because /libexec/ld-elf.so.1 is > limiting execution to root only, or is it (I might have missed uid check > in that patch [1], but at a quick glance I didn't see it). > > On a living system, there are plenty of other ways to restore missing > +x on /bin/chmod as long as you can call chmod(2), from simple Python > script down to manually crafting small binary in hex. Simple tool to get out of this is use of install(8) to "install" your broken chmod to another file with proper modes. And if you lost that one you could use mtree(8) with a easily crafted input file. > > Likewise, with working chmod binary, you should be able to mark > > binaries with write access executable. > > Well, it's not just about chmod(1), this opens what can be a can of worms > and I want to know how big it is. Big.. very very big... and painted Blue! > ./danfe > > [1] Idea for security.bsd.ld_elf_exec_root_only sysctl(8)? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon May 15 20:11:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E5CED6E942 for ; Mon, 15 May 2017 20:11:56 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FB0A1D5F for ; Mon, 15 May 2017 20:11:56 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: d205ac75-39aa-11e7-bfb5-0d159cd3c324 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id d205ac75-39aa-11e7-bfb5-0d159cd3c324; Mon, 15 May 2017 20:12:29 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4FKBr7s002029; Mon, 15 May 2017 14:11:53 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1494879113.59865.129.camel@freebsd.org> Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk From: Ian Lepore To: John Baldwin Cc: Warner Losh , Ngie Cooper , "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Mon, 15 May 2017 14:11:53 -0600 In-Reply-To: <4703731.Pl02uSWy7k@ralph.baldwin.cx> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> <1494870201.59865.103.camel@freebsd.org> <4703731.Pl02uSWy7k@ralph.baldwin.cx> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 20:11:56 -0000 On Mon, 2017-05-15 at 12:22 -0700, John Baldwin wrote: > On Monday, May 15, 2017 11:43:21 AM Ian Lepore wrote: > > > > On Mon, 2017-05-15 at 10:13 -0700, John Baldwin wrote: > > > > > > On Saturday, May 13, 2017 10:39:15 AM Warner Losh wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > - It's really easy to screw up a mergemaster call if you > > > > > > edit > > > > > > the files, and install the stock version which removes the > > > > > > edits. > > > > > Also, programmatically removing the entries means you have to > > > > > bake the metadata into etc/Makefile, which is already > > > > > complicated > > > > > enough as-is. > > > > Why do you care about removing them at all? They are no-ops if > > > > the > > > > files don't exist. Why not just always install all these files > > > > is > > > > where I'm going with this... > > > I think this is actually the bigger question.  I think it is > > > perfectly > > > sensible to support conf.d/* files for ports to use and as a way > > > to > > > manage logs for application logs on an appliance, etc.  However, > > > this > > > shuffling is a bit of a merge nightmare for anyone using > > > mergemaster > > > or etcupdate, and the biggest cost is that newsyslog will create > > > a > > > one-line file in /var/log for entries with 'C'. > > > > > That's only a good argument for keeping the lines in the monolithic > > file if those lines will be ignored when a file in the .conf.d > > directory provides conflicting config.  Otherwise my embedded > > product > > that drops different rules for rotating /var/log/messages into > > .conf.d > > STILL has to programmatically edit the monolithic file to remove > > the > > standard rule(s). > Now you have to programmatically edit the file in > conf.d/foo.  However, > by this argument the monolithic conf file shouldn't even exist.  The > current approach is a half-way mix with the worst of both models it > seems. > Programmatically editing a single file containing only config for a single component typically means just rewriting the entire file with your new contents.  In particular, you don't need to attempt to preserve other information, the format of which you may not even know, including free-form comments and who knows what-else. > Also, _you_ could just splat an empty /etc/newsyslog.conf file on > your > appliance and create a bunch of conf.d/foo files if that is easier > for > you to use on an appliance.  The files we ship in a release aren't > really > tailored for an appliance (I've yet to see an appliance that doesn't > use > a FooBSD with local patches).  OTOH, the existing setup is probably > simpler to manage for an out-of-the-box install. > > I'm also suprised you don't manage the newsyslog.conf file yourself > rather than trying to edit and merge in upstream changes?  That is, I > can see a few approaches: > You seem to be picturing some sort of etcupdate kind of thing.  I'm more talking about a GUI or other config-management tool within an embedded product that has to edit or rewrite configuration on the fly based on user choices. Of course, separate files does also simplify the update process, for the most part.  If a new subsystem is added in a new freebsd release, I have zero work to do to upgrade a system in the field if that new subsystem just drops a new file into a .conf.d directory.  If it has new entries in a monolithic file, then I do have to do some sort of merge/edit operation. > 1) Keep your real newsyslog.conf / syslogd.conf files in your > FooBSD's >    VCS and when newsyslog.conf changes upstream you merge that in the >    way you normally merge changes. > > 2) Move the "vendor" newsyslog.conf out entirely and install your own >    versions of these files either as a monolithic assembled by config >    management rules or a bunch of conf.d/foo files (here I would > probably >    opt for separate files). > > However, your approach doesn't seem to describe either of these since > this commit doesn't impact those work flows (if 1), you would have > already > made any local changes you need and if anything merging this commit > gives > you the kind of merge conflicts people will get on the next > mergemaster / > etcupdate for non-appliance boxes, or if 2) you ignore these files) > This seems to be an argument for everyone doing for themselves the operation of splitting the distributed monolithic file into finer grained files, and re-performing that operation (or at least the analysis part of it) on every update. In general a lot of this feels like "I only needed 6 big config files to control my whole system in 1988, and so I should only need those same 6 files now."  Sure, all us old-timers have the finger memory for editing rc.conf and syslog.conf and so on, but how often do you crack open syslog.conf with the plan of editing 12 different lines in it at once?  Because the main objection to .conf.d directories seems to be that there are more files to edit, and that just doesn't feel like a big problem in actual daily use. -- Ian From owner-svn-src-all@freebsd.org Mon May 15 20:18:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D007D6EC96; Mon, 15 May 2017 20:18:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A2CACF; Mon, 15 May 2017 20:18:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FKIETu009427; Mon, 15 May 2017 20:18:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FKIE99009425; Mon, 15 May 2017 20:18:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705152018.v4FKIE99009425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 20:18:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318316 - head/usr.bin/uniq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 20:18:15 -0000 Author: emaste Date: Mon May 15 20:18:14 2017 New Revision: 318316 URL: https://svnweb.freebsd.org/changeset/base/318316 Log: uniq: allow -c to be used with -d or -u Bring in some bits from NetBSD and lift the restriction in uniq(1) that -c cannot be used with the -d and -u options. This restriction seems unnecessary and is supported at least by GNU, OpenBSD, and NetBSD. Lift the restriction and simplify the show() logic a little bit to maintain functionality when -c is provided with -d/-u. Also with this change, -d and -u are now actually a mutually exclusive, albeit valid, combination. Given that they both indicate opposite behavior, uniq(1) will no longer output anything if both -d and -u are supplied. This is in line with NetBSD as well as GNU. Adjust the man page and usage() to reflect that -c is its own standalone option. PR: 200553 Submitted by: Kyle Evans Reviewed by: cem, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10694 Modified: head/usr.bin/uniq/uniq.1 head/usr.bin/uniq/uniq.c Modified: head/usr.bin/uniq/uniq.1 ============================================================================== --- head/usr.bin/uniq/uniq.1 Mon May 15 19:58:01 2017 (r318315) +++ head/usr.bin/uniq/uniq.1 Mon May 15 20:18:14 2017 (r318316) @@ -31,7 +31,7 @@ .\" From: @(#)uniq.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 17, 2009 +.Dd May 15, 2017 .Dt UNIQ 1 .Os .Sh NAME @@ -39,7 +39,8 @@ .Nd report or filter out repeated lines in a file .Sh SYNOPSIS .Nm -.Op Fl c | Fl d | Fl u +.Op Fl c +.Op Fl d | Fl u .Op Fl i .Op Fl f Ar num .Op Fl s Ar chars Modified: head/usr.bin/uniq/uniq.c ============================================================================== --- head/usr.bin/uniq/uniq.c Mon May 15 19:58:01 2017 (r318315) +++ head/usr.bin/uniq/uniq.c Mon May 15 20:18:14 2017 (r318316) @@ -129,13 +129,6 @@ main (int argc, char *argv[]) argc -= optind; argv += optind; - /* If no flags are set, default is -d -u. */ - if (cflag) { - if (dflag || uflag) - usage(); - } else if (!dflag && !uflag) - dflag = uflag = 1; - if (argc > 2) usage(); @@ -182,9 +175,6 @@ main (int argc, char *argv[]) } tprev = convert(prevline); - if (!cflag && uflag && dflag) - show(ofp, prevline); - tthis = NULL; while (getline(&thisline, &thisbuflen, ifp) >= 0) { if (tthis != NULL) @@ -200,8 +190,7 @@ main (int argc, char *argv[]) if (comp) { /* If different, print; set previous to new value. */ - if (cflag || !dflag || !uflag) - show(ofp, prevline); + show(ofp, prevline); p = prevline; b1 = prevbuflen; prevline = thisline; @@ -209,8 +198,6 @@ main (int argc, char *argv[]) if (tprev != NULL) free(tprev); tprev = tthis; - if (!cflag && uflag && dflag) - show(ofp, prevline); thisline = p; thisbuflen = b1; tthis = NULL; @@ -220,8 +207,7 @@ main (int argc, char *argv[]) } if (ferror(ifp)) err(1, "%s", ifn); - if (cflag || !dflag || !uflag) - show(ofp, prevline); + show(ofp, prevline); exit(0); } @@ -286,9 +272,11 @@ static void show(FILE *ofp, const char *str) { + if ((dflag && repeats == 0) || (uflag && repeats > 0)) + return; if (cflag) (void)fprintf(ofp, "%4d %s", repeats + 1, str); - if ((dflag && repeats) || (uflag && !repeats)) + else (void)fprintf(ofp, "%s", str); } @@ -351,6 +339,6 @@ static void usage(void) { (void)fprintf(stderr, -"usage: uniq [-c | -d | -u] [-i] [-f fields] [-s chars] [input [output]]\n"); +"usage: uniq [-c] [-d | -u] [-i] [-f fields] [-s chars] [input [output]]\n"); exit(1); } From owner-svn-src-all@freebsd.org Mon May 15 20:20:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CF96D6EE0F for ; Mon, 15 May 2017 20:20:08 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9701864D for ; Mon, 15 May 2017 20:20:07 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: e05c9caa-39ab-11e7-b96e-2378c10e3beb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id e05c9caa-39ab-11e7-b96e-2378c10e3beb; Mon, 15 May 2017 20:20:03 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4FKJukI002046; Mon, 15 May 2017 14:19:56 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1494879596.59865.131.camel@freebsd.org> Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk From: Ian Lepore To: John Baldwin Cc: Warner Losh , Ngie Cooper , "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Mon, 15 May 2017 14:19:56 -0600 In-Reply-To: <1494879113.59865.129.camel@freebsd.org> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> <1494870201.59865.103.camel@freebsd.org> <4703731.Pl02uSWy7k@ralph.baldwin.cx> <1494879113.59865.129.camel@freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 20:20:08 -0000 On Mon, 2017-05-15 at 14:11 -0600, Ian Lepore wrote: > On Mon, 2017-05-15 at 12:22 -0700, John Baldwin wrote: > > > > On Monday, May 15, 2017 11:43:21 AM Ian Lepore wrote: > > > > > > [...] > > > > Also, _you_ could just splat an empty /etc/newsyslog.conf file on > > your > > appliance and create a bunch of conf.d/foo files if that is easier > > for > > you to use on an appliance.  The files we ship in a release aren't > > really > > tailored for an appliance (I've yet to see an appliance that doesn't > > use > > a FooBSD with local patches).  OTOH, the existing setup is probably > > simpler to manage for an out-of-the-box install. > > > > I'm also suprised you don't manage the newsyslog.conf file yourself > > rather than trying to edit and merge in upstream changes?  That is, I > > can see a few approaches: > > > You seem to be picturing some sort of etcupdate kind of thing.  I'm > more talking about a GUI or other config-management tool within an > embedded product that has to edit or rewrite configuration on the fly > based on user choices. > > Of course, separate files does also simplify the update process, for > the most part.  If a new subsystem is added in a new freebsd release, I > have zero work to do to upgrade a system in the field if that new > subsystem just drops a new file into a .conf.d directory.  If it has > new entries in a monolithic file, then I do have to do some sort of > merge/edit operation. > And just to be clear here, I'm talking about running some kind of merge/edit on the live system being updated in the field, not as part of importing a newer freebsd snapshot into our VCS. -- Ian From owner-svn-src-all@freebsd.org Mon May 15 20:28:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89AD9D6E116; Mon, 15 May 2017 20:28:54 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6849CCE7; Mon, 15 May 2017 20:28:54 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 9260A3565; Mon, 15 May 2017 20:28:53 +0000 (UTC) Date: Mon, 15 May 2017 20:28:53 +0000 From: Alexey Dokuchaev To: Ian Lepore Cc: John Baldwin , src-committers , Warner Losh , "svn-src-all@freebsd.org" , Ngie Cooper , "svn-src-head@freebsd.org" , Ngie Cooper , "Rodney W. Grimes" Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Message-ID: <20170515202853.GA88899@FreeBSD.org> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> <1494870201.59865.103.camel@freebsd.org> <4703731.Pl02uSWy7k@ralph.baldwin.cx> <1494879113.59865.129.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1494879113.59865.129.camel@freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 20:28:54 -0000 On Mon, May 15, 2017 at 02:11:53PM -0600, Ian Lepore wrote: > ... > In general a lot of this feels like "I only needed 6 big config files > to control my whole system in 1988, and so I should only need those > same 6 files now." Yup; doesn't it feel good? (That's one of our selling points BTW.) > Sure, all us old-timers have the finger memory for editing rc.conf and > syslog.conf and so on, but how often do you crack open syslog.conf with > the plan of editing 12 different lines in it at once? Actually I don't want to open it [newsyslog.conf] at all, and on desktop, where odd things are noticed quickly, default rotation is good enough. I might want to edit it on server to e.g. keep at least one year worth of logs, and when I do, I'd rather edit one file instead of half-dozen. > Because the main objection to .conf.d directories seems to be that > there are more files to edit, and that just doesn't feel like a big > problem in actual daily use. Well, it kind of is. Keeping in mind "same 6 files" is a big helper; for the base you can be sure you won't forget anything accidentally. It is not that easy for ports for obvious reasons, but then again: we are talking about the base only here. ./danfe From owner-svn-src-all@freebsd.org Mon May 15 20:41:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89C00D6E562; Mon, 15 May 2017 20:41:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 429381624; Mon, 15 May 2017 20:41:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FKfTRm019133; Mon, 15 May 2017 20:41:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FKfTd8019132; Mon, 15 May 2017 20:41:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705152041.v4FKfTd8019132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 20:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318317 - head/contrib/netbsd-tests/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 20:41:30 -0000 Author: emaste Date: Mon May 15 20:41:29 2017 New Revision: 318317 URL: https://svnweb.freebsd.org/changeset/base/318317 Log: bsdgrep: add more tests for different binary flags The existing 'binary' test in netbsd-tests/ does a basic check of the default treatment for binary behavior, but not much more than that. Given some opportunity for breakage recently that did not trigger any failures, add some tests to cover the three different binary file behaviors (a, -I, -U) and their --binary-files= equivalent values. Submitted by: Kyle Evans Reviewed by: cem, ngie Differential Revision: https://reviews.freebsd.org/D10620 Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh ============================================================================== --- head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Mon May 15 20:18:14 2017 (r318316) +++ head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Mon May 15 20:41:29 2017 (r318317) @@ -539,6 +539,41 @@ badcontext_body() atf_check -s not-exit:0 -e ignore grep -C "B" "B" test1 } + +atf_test_case binary_flags +binary_flags_head() +{ + atf_set "descr" "Check output for binary flags (-a, -I, -U, --binary-files)" +} +binary_flags_body() +{ + printf "A\000B\000C" > test1 + printf "A\n\000B\n\000C" > test2 + binmatchtext="Binary file test1 matches\n" + + # Binaries not treated as text (default, -U) + atf_check -o inline:"${binmatchtext}" grep 'B' test1 + atf_check -o inline:"${binmatchtext}" grep 'B' -C 1 test1 + + atf_check -o inline:"${binmatchtext}" grep -U 'B' test1 + atf_check -o inline:"${binmatchtext}" grep -U 'B' -C 1 test1 + + # Binary, -a, no newlines + atf_check -o inline:"A\000B\000C\n" grep -a 'B' test1 + atf_check -o inline:"A\000B\000C\n" grep -a 'B' -C 1 test1 + + # Binary, -a, newlines + atf_check -o inline:"\000B\n" grep -a 'B' test2 + atf_check -o inline:"A\n\000B\n\000C\n" grep -a 'B' -C 1 test2 + + # Binary files ignored + atf_check -s exit:1 grep -I 'B' test2 + + # --binary-files equivalence + atf_check -o inline:"${binmatchtext}" grep --binary-files=binary 'B' test1 + atf_check -o inline:"A\000B\000C\n" grep --binary-files=text 'B' test1 + atf_check -s exit:1 grep --binary-files=without-match 'B' test2 +} # End FreeBSD atf_init_test_cases() @@ -573,6 +608,7 @@ atf_init_test_cases() atf_add_test_case egrep_sanity atf_add_test_case grep_sanity atf_add_test_case grep_nomatch_flags + atf_add_test_case binary_flags atf_add_test_case badcontext # End FreeBSD } From owner-svn-src-all@freebsd.org Mon May 15 20:49:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FF10D6E6A4 for ; Mon, 15 May 2017 20:49:34 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50A1319CA for ; Mon, 15 May 2017 20:49:34 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 1399cc5d-39b0-11e7-bfb5-0d159cd3c324 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 1399cc5d-39b0-11e7-bfb5-0d159cd3c324; Mon, 15 May 2017 20:50:07 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4FKnU9H002102; Mon, 15 May 2017 14:49:30 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1494881370.59865.140.camel@freebsd.org> Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk From: Ian Lepore To: Alexey Dokuchaev Cc: John Baldwin , src-committers , Warner Losh , "svn-src-all@freebsd.org" , Ngie Cooper , "svn-src-head@freebsd.org" , Ngie Cooper , "Rodney W. Grimes" Date: Mon, 15 May 2017 14:49:30 -0600 In-Reply-To: <20170515202853.GA88899@FreeBSD.org> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> <1494870201.59865.103.camel@freebsd.org> <4703731.Pl02uSWy7k@ralph.baldwin.cx> <1494879113.59865.129.camel@freebsd.org> <20170515202853.GA88899@FreeBSD.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 20:49:34 -0000 On Mon, 2017-05-15 at 20:28 +0000, Alexey Dokuchaev wrote: > On Mon, May 15, 2017 at 02:11:53PM -0600, Ian Lepore wrote: > > > > ... > > In general a lot of this feels like "I only needed 6 big config > > files > > to control my whole system in 1988, and so I should only need those > > same 6 files now." > Yup; doesn't it feel good?  (That's one of our selling points BTW.) > > > > > Sure, all us old-timers have the finger memory for editing rc.conf > > and > > syslog.conf and so on, but how often do you crack open syslog.conf > > with > > the plan of editing 12 different lines in it at once? > Actually I don't want to open it [newsyslog.conf] at all, and on > desktop, > where odd things are noticed quickly, default rotation is good > enough. > I might want to edit it on server to e.g. keep at least one year > worth of > logs, and when I do, I'd rather edit one file instead of half-dozen. > > > > > Because the main objection to .conf.d directories seems to be that > > there are more files to edit, and that just doesn't feel like a big > > problem in actual daily use. > Well, it kind of is.  Keeping in mind "same 6 files" is a big helper; > for the base you can be sure you won't forget anything accidentally. > It is not that easy for ports for obvious reasons, but then again: we > are talking about the base only here. > What you're talking about is how YOU view and use base.  That's fine, except that obviously it's only a tiny subset of how all freebsd users view and use base. Besides how I view things as someone who has to create and maintain complex embedded systems with freebsd, as a simple user of freebsd I would much prefer to edit syslog.conf.d/mail than search around in a big syslog.conf file for lines pertaining to mail logging. You acknowledge that the situation is different for ports, so does that mean your objections go away when base becomes packaged and faces the same installation and update issues that packaged ports do?  Because I was under the impression that's coming pretty soon. -- Ian > ./danfe > From owner-svn-src-all@freebsd.org Mon May 15 20:52:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F8CCD6E88C; Mon, 15 May 2017 20:52:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E7131DD3; Mon, 15 May 2017 20:52:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FKqiuw025651; Mon, 15 May 2017 20:52:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FKqiHV025648; Mon, 15 May 2017 20:52:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705152052.v4FKqiHV025648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 May 2017 20:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318318 - in head/sys: amd64/acpica amd64/amd64 x86/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 20:52:45 -0000 Author: kib Date: Mon May 15 20:52:43 2017 New Revision: 318318 URL: https://svnweb.freebsd.org/changeset/base/318318 Log: Ensure that resume path on amd64 only accesses page tables for normal operation after processor is configured to allow all required features. In particular, NX must be enabled in EFER, otherwise load of page table element with nx bit set causes reserved bit page fault. Since malloc uses direct mapping for small allocations, in particular for the suspension pcbs, and DMAP is nx after r316767, this commit tripped fault on resume path. Restore complete state of EFER while wakeup code is still executing with custom page table, before calling resumectx, instead of trying to guess which features might be needed before resumectx restored EFER on its own. Bisected and tested by: trasz Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/amd64/acpica/acpi_wakecode.S head/sys/amd64/amd64/cpu_switch.S head/sys/x86/acpica/acpi_wakeup.c Modified: head/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- head/sys/amd64/acpica/acpi_wakecode.S Mon May 15 20:41:29 2017 (r318317) +++ head/sys/amd64/acpica/acpi_wakecode.S Mon May 15 20:52:43 2017 (r318318) @@ -156,11 +156,12 @@ wakeup_32: /* * Enable EFER.LME so that we get long mode when all the prereqs are * in place. In this case, it turns on when CR0_PG is finally enabled. - * Pick up a few other EFER bits that we'll use need we're here. + * Also it picks up a few other EFER bits that we'll use need we're + * here, like SYSCALL and NX enable. */ movl $MSR_EFER, %ecx - rdmsr - orl $EFER_LME | EFER_SCE, %eax + movl wakeup_efer - wakeup_start(%ebx), %eax + movl wakeup_efer + 4 - wakeup_start(%ebx), %edx wrmsr /* @@ -276,6 +277,8 @@ wakeup_pcb: .quad 0 wakeup_ret: .quad 0 +wakeup_efer: + .quad 0 wakeup_gdt: .word 0 .quad 0 Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Mon May 15 20:41:29 2017 (r318317) +++ head/sys/amd64/amd64/cpu_switch.S Mon May 15 20:52:43 2017 (r318318) @@ -396,7 +396,7 @@ ENTRY(resumectx) movl 4 + PCB_KGSBASE(%rdi),%edx wrmsr - /* Restore EFER. */ + /* Restore EFER one more time. */ movl $MSR_EFER,%ecx movl PCB_EFER(%rdi),%eax wrmsr Modified: head/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- head/sys/x86/acpica/acpi_wakeup.c Mon May 15 20:41:29 2017 (r318317) +++ head/sys/x86/acpica/acpi_wakeup.c Mon May 15 20:52:43 2017 (r318318) @@ -223,7 +223,9 @@ acpi_sleep_machdep(struct acpi_softc *sc WAKECODE_FIXUP(resume_beep, uint8_t, (acpi_resume_beep != 0)); WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0)); -#ifndef __amd64__ +#ifdef __amd64__ + WAKECODE_FIXUP(wakeup_efer, uint64_t, rdmsr(MSR_EFER)); +#else WAKECODE_FIXUP(wakeup_cr4, register_t, pcb->pcb_cr4); #endif WAKECODE_FIXUP(wakeup_pcb, struct pcb *, pcb); From owner-svn-src-all@freebsd.org Mon May 15 21:09:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95275D6EE3C; Mon, 15 May 2017 21:09:23 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 717A28EC; Mon, 15 May 2017 21:09:23 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 8AAAA403D; Mon, 15 May 2017 21:09:22 +0000 (UTC) Date: Mon, 15 May 2017 21:09:22 +0000 From: Alexey Dokuchaev To: Ian Lepore Cc: John Baldwin , src-committers , Warner Losh , "svn-src-all@freebsd.org" , Ngie Cooper , "svn-src-head@freebsd.org" , Ngie Cooper , "Rodney W. Grimes" Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Message-ID: <20170515210922.GA26702@FreeBSD.org> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> <1494870201.59865.103.camel@freebsd.org> <4703731.Pl02uSWy7k@ralph.baldwin.cx> <1494879113.59865.129.camel@freebsd.org> <20170515202853.GA88899@FreeBSD.org> <1494881370.59865.140.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1494881370.59865.140.camel@freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 21:09:23 -0000 On Mon, May 15, 2017 at 02:49:30PM -0600, Ian Lepore wrote: > ... > You acknowledge that the situation is different for ports, so does that > mean your objections go away when base becomes packaged and faces the > same installation and update issues that packaged ports do? Because I > was under the impression that's coming pretty soon. The reason it is different for ports is because we cannot know up-front what software might user have installed and ergo what logs should be rotated by newsyslog(8). For the base, we know these pieces (albeit packaging the base could probably benefit from the same generic approach, if we ever start to support 3rd-party "base" packages). ./danfe From owner-svn-src-all@freebsd.org Mon May 15 21:14:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4312AD6C143; Mon, 15 May 2017 21:14:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02F48E2D; Mon, 15 May 2017 21:14:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id EDAD910A7DB; Mon, 15 May 2017 17:14:47 -0400 (EDT) From: John Baldwin To: Ian Lepore Cc: Warner Losh , Ngie Cooper , "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Date: Mon, 15 May 2017 14:14:29 -0700 Message-ID: <1767029.V8VxJpCATJ@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <1494879113.59865.129.camel@freebsd.org> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <4703731.Pl02uSWy7k@ralph.baldwin.cx> <1494879113.59865.129.camel@freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 15 May 2017 17:14:48 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 21:14:50 -0000 On Monday, May 15, 2017 02:11:53 PM Ian Lepore wrote: > On Mon, 2017-05-15 at 12:22 -0700, John Baldwin wrote: > > Also, _you_ could just splat an empty /etc/newsyslog.conf file on > > your > > appliance and create a bunch of conf.d/foo files if that is easier > > for > > you to use on an appliance. The files we ship in a release aren't > > really > > tailored for an appliance (I've yet to see an appliance that doesn't > > use > > a FooBSD with local patches). OTOH, the existing setup is probably > > simpler to manage for an out-of-the-box install. > > > > I'm also suprised you don't manage the newsyslog.conf file yourself > > rather than trying to edit and merge in upstream changes? That is, I > > can see a few approaches: > > > > You seem to be picturing some sort of etcupdate kind of thing. I'm > more talking about a GUI or other config-management tool within an > embedded product that has to edit or rewrite configuration on the fly > based on user choices. > > Of course, separate files does also simplify the update process, for > the most part. If a new subsystem is added in a new freebsd release, I > have zero work to do to upgrade a system in the field if that new > subsystem just drops a new file into a .conf.d directory. If it has > new entries in a monolithic file, then I do have to do some sort of > merge/edit operation. But given that the new system now supports both approaches, why wouldn't you always split it up in your product? > > 1) Keep your real newsyslog.conf / syslogd.conf files in your > > FooBSD's > > VCS and when newsyslog.conf changes upstream you merge that in the > > way you normally merge changes. > > > > 2) Move the "vendor" newsyslog.conf out entirely and install your own > > versions of these files either as a monolithic assembled by config > > management rules or a bunch of conf.d/foo files (here I would > > probably > > opt for separate files). > > > > However, your approach doesn't seem to describe either of these since > > this commit doesn't impact those work flows (if 1), you would have > > already > > made any local changes you need and if anything merging this commit > > gives > > you the kind of merge conflicts people will get on the next > > mergemaster / > > etcupdate for non-appliance boxes, or if 2) you ignore these files) > > > > This seems to be an argument for everyone doing for themselves the > operation of splitting the distributed monolithic file into finer > grained files, and re-performing that operation (or at least the > analysis part of it) on every update. s/everbody/appliance vendors/. Not everyone is your use case (nor mine). That said, I would think that the current approach is still the worst of both worlds for you. Now you have a single file you need to edit in some cases and in other cases you generate the single foo.conf file. I don't see why you wouldn't always want to split things up in your product and on the rare chance that the big file changes upstream you alter the default broken-out file in your FooBSD (especially given how rarely these files change). > In general a lot of this feels like "I only needed 6 big config files > to control my whole system in 1988, and so I should only need those > same 6 files now." Sure, all us old-timers have the finger memory for > editing rc.conf and syslog.conf and so on, but how often do you crack > open syslog.conf with the plan of editing 12 different lines in it at > once? Because the main objection to .conf.d directories seems to be > that there are more files to edit, and that just doesn't feel like a > big problem in actual daily use. To be clear, I _don't_ object to conf.d directories and I'm happy to have the tools support both types of configurations. I object to employing a half-way mix of both styles in a way that breaks POLA and causes merge headaches for existing users that are applying these changes as upgrades to existing systems. -- John Baldwin From owner-svn-src-all@freebsd.org Mon May 15 21:28:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81CEFD6CA67; Mon, 15 May 2017 21:28:12 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FE4B18C5; Mon, 15 May 2017 21:28:12 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 89B9F4697; Mon, 15 May 2017 21:28:11 +0000 (UTC) Date: Mon, 15 May 2017 21:28:11 +0000 From: Alexey Dokuchaev To: Ian Lepore Cc: John Baldwin , src-committers , Warner Losh , "svn-src-all@freebsd.org" , Ngie Cooper , "svn-src-head@freebsd.org" , Ngie Cooper , "Rodney W. Grimes" Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Message-ID: <20170515212811.GB26702@FreeBSD.org> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> <1494870201.59865.103.camel@freebsd.org> <4703731.Pl02uSWy7k@ralph.baldwin.cx> <1494879113.59865.129.camel@freebsd.org> <20170515202853.GA88899@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170515202853.GA88899@FreeBSD.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 21:28:12 -0000 On Mon, May 15, 2017 at 08:28:53PM +0000, Alexey Dokuchaev wrote: > On Mon, May 15, 2017 at 02:11:53PM -0600, Ian Lepore wrote: > > ... > > Sure, all us old-timers have the finger memory for editing rc.conf and > > syslog.conf and so on, but how often do you crack open syslog.conf with > > the plan of editing 12 different lines in it at once? > > Actually I don't want to open it [newsyslog.conf] at all, and on desktop, > where odd things are noticed quickly, default rotation is good enough. > I might want to edit it on server to e.g. keep at least one year worth of > logs, and when I do, I'd rather edit one file instead of half-dozen. Thinking of it, it occurred to me that some simple inheritance mechanism that would allow one to set (and centrally maintain) default "mode/count/ size/when/flags" in /etc/newsyslog.conf, without having to touch every individual /etc/newsyslog.conf.d/foo.conf (while allowing per-log and per- mode/count/size/when/flags override) could address most of the expressed concerns so far. I just hope it does not smell like sysd too much, because oh boy, please no. ./danfe From owner-svn-src-all@freebsd.org Mon May 15 21:44:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A023D6E18E; Mon, 15 May 2017 21:44:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5836B7DB; Mon, 15 May 2017 21:44:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FLiet1046126; Mon, 15 May 2017 21:44:40 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FLieu1046125; Mon, 15 May 2017 21:44:40 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705152144.v4FLieu1046125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 15 May 2017 21:44:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318319 - head/sys/cddl/dev/profile X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 21:44:41 -0000 Author: markj Date: Mon May 15 21:44:40 2017 New Revision: 318319 URL: https://svnweb.freebsd.org/changeset/base/318319 Log: Ensure that profile and tick probes provide a non-zero PC value. The idle thread may process callouts while reloading the timer in cpu_activeclock(). In this case, provide a representative value, &cpu_idle, instead of 0 for args[0] so that the active thread can be more easily identified from the probe. This addresses intermittent failures of the profile-n/tst.argtest.d test. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D10651 Modified: head/sys/cddl/dev/profile/profile.c Modified: head/sys/cddl/dev/profile/profile.c ============================================================================== --- head/sys/cddl/dev/profile/profile.c Mon May 15 20:52:43 2017 (r318318) +++ head/sys/cddl/dev/profile/profile.c Mon May 15 21:44:40 2017 (r318319) @@ -266,37 +266,43 @@ sbt_to_nsec(sbintime_t sbt) } static void -profile_fire(void *arg) +profile_probe(profile_probe_t *prof, hrtime_t late) { - profile_probe_percpu_t *pcpu = arg; - profile_probe_t *prof = pcpu->profc_probe; - hrtime_t late; + struct thread *td; struct trapframe *frame; uintfptr_t pc, upc; -#ifdef illumos - late = gethrtime() - pcpu->profc_expected; -#else - late = sbt_to_nsec(sbinuptime() - pcpu->profc_expected); -#endif - - pc = 0; - upc = 0; + td = curthread; + pc = upc = 0; /* - * td_intr_frame can be unset if this is a catch up event - * after waking up from idle sleep. - * This can only happen on a CPU idle thread. + * td_intr_frame can be unset if this is a catch-up event upon waking up + * from idle sleep. This can only happen on a CPU idle thread. Use a + * representative arg0 value in this case so that one of the probe + * arguments is non-zero. */ - frame = curthread->td_intr_frame; + frame = td->td_intr_frame; if (frame != NULL) { if (TRAPF_USERMODE(frame)) upc = TRAPF_PC(frame); else pc = TRAPF_PC(frame); - } + } else if (TD_IS_IDLETHREAD(td)) + pc = (uintfptr_t)&cpu_idle; + dtrace_probe(prof->prof_id, pc, upc, late, 0, 0); +} +static void +profile_fire(void *arg) +{ + profile_probe_percpu_t *pcpu = arg; + profile_probe_t *prof = pcpu->profc_probe; + hrtime_t late; + + late = sbt_to_nsec(sbinuptime() - pcpu->profc_expected); + + profile_probe(prof, late); pcpu->profc_expected += pcpu->profc_interval; callout_schedule_sbt_curcpu(&pcpu->profc_cyclic, pcpu->profc_expected, 0, C_DIRECT_EXEC | C_ABSOLUTE); @@ -306,26 +312,8 @@ static void profile_tick(void *arg) { profile_probe_t *prof = arg; - struct trapframe *frame; - uintfptr_t pc, upc; - - pc = 0; - upc = 0; - - /* - * td_intr_frame can be unset if this is a catch up event - * after waking up from idle sleep. - * This can only happen on a CPU idle thread. - */ - frame = curthread->td_intr_frame; - if (frame != NULL) { - if (TRAPF_USERMODE(frame)) - upc = TRAPF_PC(frame); - else - pc = TRAPF_PC(frame); - } - dtrace_probe(prof->prof_id, pc, upc, 0, 0, 0); + profile_probe(prof, 0); prof->prof_expected += prof->prof_interval; callout_schedule_sbt(&prof->prof_cyclic, prof->prof_expected, 0, C_DIRECT_EXEC | C_ABSOLUTE); From owner-svn-src-all@freebsd.org Mon May 15 21:50:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17694D6E416; Mon, 15 May 2017 21:50:36 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD139C16; Mon, 15 May 2017 21:50:35 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FLoZfb046567; Mon, 15 May 2017 21:50:35 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FLoYBJ046563; Mon, 15 May 2017 21:50:34 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201705152150.v4FLoYBJ046563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 15 May 2017 21:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318320 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 21:50:36 -0000 Author: tsoome Date: Mon May 15 21:50:34 2017 New Revision: 318320 URL: https://svnweb.freebsd.org/changeset/base/318320 Log: loader: add ip layer code into libstand Implement simple separate ip module and fragment re-assembly. The work is based on send and receive previously implemented in udp.c, moved to ip.c and added the ip fragment re-assembly. This change allows to specify larger tftp or nfs payload, such as: tftp.blksize=4096 or nfs.read_size=4096 Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D10631 Added: head/lib/libstand/ip.c (contents, props changed) Modified: head/lib/libstand/Makefile head/lib/libstand/net.h head/lib/libstand/udp.c Modified: head/lib/libstand/Makefile ============================================================================== --- head/lib/libstand/Makefile Mon May 15 21:44:40 2017 (r318319) +++ head/lib/libstand/Makefile Mon May 15 21:50:34 2017 (r318320) @@ -141,7 +141,7 @@ SRCS+= closeall.c dev.c ioctl.c nullfs.c fstat.c close.c lseek.c open.c read.c write.c readdir.c # network routines -SRCS+= arp.c ether.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c +SRCS+= arp.c ether.c ip.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c # network info services: SRCS+= bootp.c rarp.c bootparam.c Added: head/lib/libstand/ip.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstand/ip.c Mon May 15 21:50:34 2017 (r318320) @@ -0,0 +1,422 @@ +/* + * Copyright (c) 1992 Regents of the University of California. + * All rights reserved. + * + * This software was developed by the Computer Systems Engineering group + * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and + * contributed to Berkeley. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + */ + +/* + * The send and receive functions were originally implemented in udp.c and + * moved here. Also it is likely some more cleanup can be done, especially + * once we will implement the support for tcp. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "stand.h" +#include "net.h" + +typedef STAILQ_HEAD(ipqueue, ip_queue) ip_queue_t; +struct ip_queue { + void *ipq_pkt; + struct ip *ipq_hdr; + STAILQ_ENTRY(ip_queue) ipq_next; +}; + +/* + * Fragment re-assembly queue. + */ +struct ip_reasm { + struct in_addr ip_src; + struct in_addr ip_dst; + uint16_t ip_id; + uint8_t ip_proto; + uint8_t ip_ttl; + size_t ip_total_size; + ip_queue_t ip_queue; + void *ip_pkt; + struct ip *ip_hdr; + STAILQ_ENTRY(ip_reasm) ip_next; +}; + +STAILQ_HEAD(ire_list, ip_reasm) ire_list = STAILQ_HEAD_INITIALIZER(ire_list); + +/* Caller must leave room for ethernet and ip headers in front!! */ +ssize_t +sendip(struct iodesc *d, void *pkt, size_t len, uint8_t proto) +{ + ssize_t cc; + struct ip *ip; + u_char *ea; + +#ifdef NET_DEBUG + if (debug) { + printf("sendip: proto: %x d=%p called.\n", proto, (void *)d); + if (d) { + printf("saddr: %s:%d", + inet_ntoa(d->myip), ntohs(d->myport)); + printf(" daddr: %s:%d\n", + inet_ntoa(d->destip), ntohs(d->destport)); + } + } +#endif + + ip = (struct ip *)pkt - 1; + len += sizeof(*ip); + + bzero(ip, sizeof(*ip)); + + ip->ip_v = IPVERSION; /* half-char */ + ip->ip_hl = sizeof(*ip) >> 2; /* half-char */ + ip->ip_len = htons(len); + ip->ip_p = proto; /* char */ + ip->ip_ttl = IPDEFTTL; /* char */ + ip->ip_src = d->myip; + ip->ip_dst = d->destip; + ip->ip_sum = in_cksum(ip, sizeof(*ip)); /* short, but special */ + + if (ip->ip_dst.s_addr == INADDR_BROADCAST || ip->ip_src.s_addr == 0 || + netmask == 0 || SAMENET(ip->ip_src, ip->ip_dst, netmask)) + ea = arpwhohas(d, ip->ip_dst); + else + ea = arpwhohas(d, gateip); + + cc = sendether(d, ip, len, ea, ETHERTYPE_IP); + if (cc == -1) + return (-1); + if (cc != len) + panic("sendip: bad write (%zd != %zd)", cc, len); + return (cc - sizeof(*ip)); +} + +static void +ip_reasm_free(struct ip_reasm *ipr) +{ + struct ip_queue *ipq; + + while ((ipq = STAILQ_FIRST(&ipr->ip_queue)) != NULL) { + STAILQ_REMOVE_HEAD(&ipr->ip_queue, ipq_next); + free(ipq->ipq_pkt); + free(ipq); + } + free(ipr->ip_pkt); + free(ipr); +} + +static int +ip_reasm_add(struct ip_reasm *ipr, void *pkt, struct ip *ip) +{ + struct ip_queue *ipq, *prev, *p; + + if ((ipq = calloc(1, sizeof (*ipq))) == NULL) + return (1); + + ipq->ipq_pkt = pkt; + ipq->ipq_hdr = ip; + + prev = NULL; + STAILQ_FOREACH(p, &ipr->ip_queue, ipq_next) { + if ((ntohs(p->ipq_hdr->ip_off) & IP_OFFMASK) < + (ntohs(ip->ip_off) & IP_OFFMASK)) { + prev = p; + continue; + } + if (prev == NULL) + break; + + STAILQ_INSERT_AFTER(&ipr->ip_queue, prev, ipq, ipq_next); + return (0); + } + STAILQ_INSERT_HEAD(&ipr->ip_queue, ipq, ipq_next); + return (0); +} + +/* + * Receive a IP packet and validate it is for us. + */ +static ssize_t +readipv4(struct iodesc *d, void **pkt, void **payload, time_t tleft, + uint8_t proto) +{ + ssize_t n; + size_t hlen; + struct ether_header *eh; + struct ip *ip; + struct udphdr *uh; + uint16_t etype; /* host order */ + char *ptr; + struct ip_reasm *ipr; + struct ip_queue *ipq, *last; + +#ifdef NET_DEBUG + if (debug) + printf("readip: called\n"); +#endif + + ip = NULL; + ptr = NULL; + n = readether(d, (void **)&ptr, (void **)&ip, tleft, &etype); + if (n == -1 || n < sizeof(*ip) + sizeof(*uh)) { + free(ptr); + return (-1); + } + + /* Ethernet address checks now in readether() */ + + /* Need to respond to ARP requests. */ + if (etype == ETHERTYPE_ARP) { + struct arphdr *ah = (void *)ip; + if (ah->ar_op == htons(ARPOP_REQUEST)) { + /* Send ARP reply */ + arp_reply(d, ah); + } + free(ptr); + errno = EAGAIN; /* Call me again. */ + return (-1); + } + + if (etype != ETHERTYPE_IP) { +#ifdef NET_DEBUG + if (debug) + printf("readip: not IP. ether_type=%x\n", etype); +#endif + free(ptr); + return (-1); + } + + /* Check ip header */ + if (ip->ip_v != IPVERSION || + ip->ip_p != proto) { /* half char */ +#ifdef NET_DEBUG + if (debug) { + printf("readip: IP version or proto. ip_v=%d ip_p=%d\n", + ip->ip_v, ip->ip_p); + } +#endif + free(ptr); + return (-1); + } + + hlen = ip->ip_hl << 2; + if (hlen < sizeof(*ip) || + in_cksum(ip, hlen) != 0) { +#ifdef NET_DEBUG + if (debug) + printf("readip: short hdr or bad cksum.\n"); +#endif + free(ptr); + return (-1); + } + if (n < ntohs(ip->ip_len)) { +#ifdef NET_DEBUG + if (debug) + printf("readip: bad length %d < %d.\n", + (int)n, ntohs(ip->ip_len)); +#endif + free(ptr); + return (-1); + } + if (d->myip.s_addr && ip->ip_dst.s_addr != d->myip.s_addr) { +#ifdef NET_DEBUG + if (debug) { + printf("readip: bad saddr %s != ", inet_ntoa(d->myip)); + printf("%s\n", inet_ntoa(ip->ip_dst)); + } +#endif + free(ptr); + return (-1); + } + + /* Unfragmented packet. */ + if ((ntohs(ip->ip_off) & IP_MF) == 0 && + (ntohs(ip->ip_off) & IP_OFFMASK) == 0) { + uh = (struct udphdr *)((uintptr_t)ip + sizeof (*ip)); + /* If there were ip options, make them go away */ + if (hlen != sizeof(*ip)) { + bcopy(((u_char *)ip) + hlen, uh, uh->uh_ulen - hlen); + ip->ip_len = htons(sizeof(*ip)); + n -= hlen - sizeof(*ip); + } + + n = (n > (ntohs(ip->ip_len) - sizeof(*ip))) ? + ntohs(ip->ip_len) - sizeof(*ip) : n; + *pkt = ptr; + *payload = (void *)((uintptr_t)ip + sizeof(*ip)); + return (n); + } + + STAILQ_FOREACH(ipr, &ire_list, ip_next) { + if (ipr->ip_src.s_addr == ip->ip_src.s_addr && + ipr->ip_dst.s_addr == ip->ip_dst.s_addr && + ipr->ip_id == ip->ip_id && + ipr->ip_proto == ip->ip_p) + break; + } + + /* Allocate new reassembly entry */ + if (ipr == NULL) { + if ((ipr = calloc(1, sizeof (*ipr))) == NULL) { + free(ptr); + return (-1); + } + + ipr->ip_src = ip->ip_src; + ipr->ip_dst = ip->ip_dst; + ipr->ip_id = ip->ip_id; + ipr->ip_proto = ip->ip_p; + ipr->ip_ttl = MAXTTL; + STAILQ_INIT(&ipr->ip_queue); + STAILQ_INSERT_TAIL(&ire_list, ipr, ip_next); + } + + if (ip_reasm_add(ipr, ptr, ip) != 0) { + STAILQ_REMOVE(&ire_list, ipr, ip_reasm, ip_next); + free(ipr); + free(ptr); + return (-1); + } + + if ((ntohs(ip->ip_off) & IP_MF) == 0) { + ipr->ip_total_size = (8 * (ntohs(ip->ip_off) & IP_OFFMASK)); + ipr->ip_total_size += n + sizeof (*ip); + ipr->ip_total_size += sizeof (struct ether_header); + + ipr->ip_pkt = malloc(ipr->ip_total_size + 2); + if (ipr->ip_pkt == NULL) { + STAILQ_REMOVE(&ire_list, ipr, ip_reasm, ip_next); + ip_reasm_free(ipr); + return (-1); + } + } + + /* + * If we do not have re-assembly buffer ipr->ip_pkt, we are still + * missing fragments, so just restart the read. + */ + if (ipr->ip_pkt == NULL) { + errno = EAGAIN; + return (-1); + } + + /* + * Walk the packet list in reassembly queue, if we got all the + * fragments, build the packet. + */ + n = 0; + last = NULL; + STAILQ_FOREACH(ipq, &ipr->ip_queue, ipq_next) { + if ((ntohs(ipq->ipq_hdr->ip_off) & IP_OFFMASK) != n / 8) { + errno = EAGAIN; + return (-1); + } + + n += ntohs(ipq->ipq_hdr->ip_len) - (ipq->ipq_hdr->ip_hl << 2); + last = ipq; + } + if ((ntohs(last->ipq_hdr->ip_off) & IP_MF) != 0) { + errno = EAGAIN; + return (-1); + } + + ipq = STAILQ_FIRST(&ipr->ip_queue); + /* Fabricate ethernet header */ + eh = (struct ether_header *)((uintptr_t)ipr->ip_pkt + 2); + bcopy((void *)((uintptr_t)ipq->ipq_pkt + 2), eh, sizeof (*eh)); + + /* Fabricate IP header */ + ipr->ip_hdr = (struct ip *)((uintptr_t)eh + sizeof (*eh)); + bcopy(ipq->ipq_hdr, ipr->ip_hdr, sizeof (*ipr->ip_hdr)); + ipr->ip_hdr->ip_hl = sizeof (*ipr->ip_hdr) >> 2; + ipr->ip_hdr->ip_len = htons(n); + ipr->ip_hdr->ip_sum = 0; + ipr->ip_hdr->ip_sum = in_cksum(ipr->ip_hdr, sizeof (*ipr->ip_hdr)); + + n = 0; + ptr = (char *)((uintptr_t)ipr->ip_hdr + sizeof (*ipr->ip_hdr)); + STAILQ_FOREACH(ipq, &ipr->ip_queue, ipq_next) { + char *data; + size_t len; + + hlen = ipq->ipq_hdr->ip_hl << 2; + len = ntohs(ipq->ipq_hdr->ip_len) - hlen; + data = (char *)((uintptr_t)ipq->ipq_hdr + hlen); + + bcopy(data, ptr + n, len); + n += len; + } + + *pkt = ipr->ip_pkt; + ipr->ip_pkt = NULL; /* Avoid free from ip_reasm_free() */ + *payload = ptr; + + /* Clean up the reassembly list */ + while ((ipr = STAILQ_FIRST(&ire_list)) != NULL) { + STAILQ_REMOVE_HEAD(&ire_list, ip_next); + ip_reasm_free(ipr); + } + return (n); +} + +/* + * Receive a IP packet. + */ +ssize_t +readip(struct iodesc *d, void **pkt, void **payload, time_t tleft, + uint8_t proto) +{ + time_t t; + ssize_t ret = -1; + + t = getsecs(); + while ((getsecs() - t) < tleft) { + errno = 0; + ret = readipv4(d, pkt, payload, tleft, proto); + if (errno != EAGAIN) + break; + } + return (ret); +} Modified: head/lib/libstand/net.h ============================================================================== --- head/lib/libstand/net.h Mon May 15 21:44:40 2017 (r318319) +++ head/lib/libstand/net.h Mon May 15 21:50:34 2017 (r318320) @@ -108,6 +108,8 @@ ssize_t sendether(struct iodesc *d, void u_char *dea, int etype); ssize_t readether(struct iodesc *, void **, void **, time_t, uint16_t *); +ssize_t sendip(struct iodesc *, void *, size_t, uint8_t); +ssize_t readip(struct iodesc *, void **, void **, time_t, uint8_t); ssize_t sendudp(struct iodesc *, void *, size_t); ssize_t readudp(struct iodesc *, void **, void **, time_t); ssize_t sendrecv(struct iodesc *, Modified: head/lib/libstand/udp.c ============================================================================== --- head/lib/libstand/udp.c Mon May 15 21:44:40 2017 (r318319) +++ head/lib/libstand/udp.c Mon May 15 21:50:34 2017 (r318320) @@ -62,9 +62,8 @@ ssize_t sendudp(struct iodesc *d, void *pkt, size_t len) { ssize_t cc; - struct ip *ip; + struct udpiphdr *ui; struct udphdr *uh; - u_char *ea; #ifdef NET_DEBUG if (debug) { @@ -78,52 +77,31 @@ sendudp(struct iodesc *d, void *pkt, siz } #endif - uh = (struct udphdr *)pkt - 1; - ip = (struct ip *)uh - 1; - len += sizeof(*ip) + sizeof(*uh); - - bzero(ip, sizeof(*ip) + sizeof(*uh)); + ui = (struct udpiphdr *)pkt - 1; + bzero(ui, sizeof(*ui)); - ip->ip_v = IPVERSION; /* half-char */ - ip->ip_hl = sizeof(*ip) >> 2; /* half-char */ - ip->ip_len = htons(len); - ip->ip_p = IPPROTO_UDP; /* char */ - ip->ip_ttl = IPDEFTTL; /* char */ - ip->ip_src = d->myip; - ip->ip_dst = d->destip; - ip->ip_sum = in_cksum(ip, sizeof(*ip)); /* short, but special */ + uh = (struct udphdr *)pkt - 1; + len += sizeof(*uh); uh->uh_sport = d->myport; uh->uh_dport = d->destport; - uh->uh_ulen = htons(len - sizeof(*ip)); + uh->uh_ulen = htons(len); -#ifndef UDP_NO_CKSUM - { - struct udpiphdr *ui; - struct ip tip; + ui->ui_pr = IPPROTO_UDP; + ui->ui_len = uh->uh_ulen; + ui->ui_src = d->myip; + ui->ui_dst = d->destip; - /* Calculate checksum (must save and restore ip header) */ - tip = *ip; - ui = (struct udpiphdr *)ip; - bzero(&ui->ui_x1, sizeof(ui->ui_x1)); - ui->ui_len = uh->uh_ulen; - uh->uh_sum = in_cksum(ui, len); - *ip = tip; - } +#ifndef UDP_NO_CKSUM + uh->uh_sum = in_cksum(ui, len + sizeof (struct ip)); #endif - if (ip->ip_dst.s_addr == INADDR_BROADCAST || ip->ip_src.s_addr == 0 || - netmask == 0 || SAMENET(ip->ip_src, ip->ip_dst, netmask)) - ea = arpwhohas(d, ip->ip_dst); - else - ea = arpwhohas(d, gateip); - - cc = sendether(d, ip, len, ea, ETHERTYPE_IP); + cc = sendip(d, uh, len, IPPROTO_UDP); if (cc == -1) return (-1); if (cc != len) panic("sendudp: bad write (%zd != %zd)", cc, len); - return (cc - (sizeof(*ip) + sizeof(*uh))); + return (cc - sizeof(*uh)); } /* @@ -133,10 +111,7 @@ ssize_t readudp(struct iodesc *d, void **pkt, void **payload, time_t tleft) { ssize_t n; - size_t hlen; - struct ip *ip; struct udphdr *uh; - uint16_t etype; /* host order */ void *ptr; #ifdef NET_DEBUG @@ -144,84 +119,14 @@ readudp(struct iodesc *d, void **pkt, vo printf("readudp: called\n"); #endif - ip = NULL; + uh = NULL; ptr = NULL; - n = readether(d, &ptr, (void **)&ip, tleft, &etype); - if (n == -1 || n < sizeof(*ip) + sizeof(*uh)) { + n = readip(d, &ptr, (void **)&uh, tleft, IPPROTO_UDP); + if (n == -1 || n < sizeof(*uh) || n != ntohs(uh->uh_ulen)) { free(ptr); return (-1); } - /* Ethernet address checks now in readether() */ - - /* Need to respond to ARP requests. */ - if (etype == ETHERTYPE_ARP) { - struct arphdr *ah = (void *)ip; - if (ah->ar_op == htons(ARPOP_REQUEST)) { - /* Send ARP reply */ - arp_reply(d, ah); - } - free(ptr); - return (-1); - } - - if (etype != ETHERTYPE_IP) { -#ifdef NET_DEBUG - if (debug) - printf("readudp: not IP. ether_type=%x\n", etype); -#endif - free(ptr); - return (-1); - } - - /* Check ip header */ - if (ip->ip_v != IPVERSION || - ip->ip_p != IPPROTO_UDP) { /* half char */ -#ifdef NET_DEBUG - if (debug) - printf("readudp: IP version or not UDP. ip_v=%d ip_p=%d\n", ip->ip_v, ip->ip_p); -#endif - free(ptr); - return (-1); - } - - hlen = ip->ip_hl << 2; - if (hlen < sizeof(*ip) || - in_cksum(ip, hlen) != 0) { -#ifdef NET_DEBUG - if (debug) - printf("readudp: short hdr or bad cksum.\n"); -#endif - free(ptr); - return (-1); - } - if (n < ntohs(ip->ip_len)) { -#ifdef NET_DEBUG - if (debug) - printf("readudp: bad length %d < %d.\n", - (int)n, ntohs(ip->ip_len)); -#endif - free(ptr); - return (-1); - } - if (d->myip.s_addr && ip->ip_dst.s_addr != d->myip.s_addr) { -#ifdef NET_DEBUG - if (debug) { - printf("readudp: bad saddr %s != ", inet_ntoa(d->myip)); - printf("%s\n", inet_ntoa(ip->ip_dst)); - } -#endif - free(ptr); - return (-1); - } - - uh = (struct udphdr *)((uintptr_t)ip + sizeof (*ip)); - /* If there were ip options, make them go away */ - if (hlen != sizeof(*ip)) { - bcopy(((u_char *)ip) + hlen, uh, uh->uh_ulen - hlen); - ip->ip_len = htons(sizeof(*ip)); - n -= hlen - sizeof(*ip); - } if (uh->uh_dport != d->myport) { #ifdef NET_DEBUG if (debug) @@ -235,16 +140,13 @@ readudp(struct iodesc *d, void **pkt, vo #ifndef UDP_NO_CKSUM if (uh->uh_sum) { struct udpiphdr *ui; + struct ip *ip; struct ip tip; n = ntohs(uh->uh_ulen) + sizeof(*ip); - if (n > RECV_SIZE - ETHER_SIZE) { - printf("readudp: huge packet, udp len %d\n", (int)n); - free(ptr); - return (-1); - } /* Check checksum (must save and restore ip header) */ + ip = (struct ip *)uh - 1; tip = *ip; ui = (struct udpiphdr *)ip; bzero(&ui->ui_x1, sizeof(ui->ui_x1)); From owner-svn-src-all@freebsd.org Mon May 15 21:58:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7C05D6E680; Mon, 15 May 2017 21:58:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EA8E10BC; Mon, 15 May 2017 21:58:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FLwbGP050499; Mon, 15 May 2017 21:58:37 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FLwagA050493; Mon, 15 May 2017 21:58:36 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201705152158.v4FLwagA050493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 15 May 2017 21:58:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318321 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 21:58:38 -0000 Author: glebius Date: Mon May 15 21:58:36 2017 New Revision: 318321 URL: https://svnweb.freebsd.org/changeset/base/318321 Log: Reduce in_pcbinfo_init() by two params. No users supply any flags to this function (they used to say UMA_ZONE_NOFREE), so flag parameter goes away. The zone_fini parameter also goes away. Previously no protocols (except divert) supplied zone_fini function, so inpcb locks were leaked with slabs. This was okay while zones were allocated with UMA_ZONE_NOFREE flag, but now this is a leak. Fix that by suppling inpcb_fini() function as fini method for all inpcb zones. Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/ip_divert.c head/sys/netinet/raw_ip.c head/sys/netinet/tcp_subr.c head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Mon May 15 21:50:34 2017 (r318320) +++ head/sys/netinet/in_pcb.c Mon May 15 21:58:36 2017 (r318321) @@ -212,14 +212,25 @@ SYSCTL_INT(_net_inet_ip_portrange, OID_A */ /* + * Different protocols initialize their inpcbs differently - giving + * different name to the lock. But they all are disposed the same. + */ +static void +inpcb_fini(void *mem, int size) +{ + struct inpcb *inp = mem; + + INP_LOCK_DESTROY(inp); +} + +/* * Initialize an inpcbinfo -- we should be able to reduce the number of * arguments in time. */ void in_pcbinfo_init(struct inpcbinfo *pcbinfo, const char *name, struct inpcbhead *listhead, int hash_nelements, int porthash_nelements, - char *inpcbzone_name, uma_init inpcbzone_init, uma_fini inpcbzone_fini, - uint32_t inpcbzone_flags, u_int hashfields) + char *inpcbzone_name, uma_init inpcbzone_init, u_int hashfields) { INP_INFO_LOCK_INIT(pcbinfo, name); @@ -239,8 +250,7 @@ in_pcbinfo_init(struct inpcbinfo *pcbinf in_pcbgroup_init(pcbinfo, hashfields, hash_nelements); #endif pcbinfo->ipi_zone = uma_zcreate(inpcbzone_name, sizeof(struct inpcb), - NULL, NULL, inpcbzone_init, inpcbzone_fini, UMA_ALIGN_PTR, - inpcbzone_flags); + NULL, NULL, inpcbzone_init, inpcb_fini, UMA_ALIGN_PTR, 0); uma_zone_set_max(pcbinfo->ipi_zone, maxsockets); uma_zone_set_warning(pcbinfo->ipi_zone, "kern.ipc.maxsockets limit reached"); Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Mon May 15 21:50:34 2017 (r318320) +++ head/sys/netinet/in_pcb.h Mon May 15 21:58:36 2017 (r318321) @@ -690,7 +690,7 @@ VNET_DECLARE(int, ipport_tcpallocs); void in_pcbinfo_destroy(struct inpcbinfo *); void in_pcbinfo_init(struct inpcbinfo *, const char *, struct inpcbhead *, - int, int, char *, uma_init, uma_fini, uint32_t, u_int); + int, int, char *, uma_init, u_int); int in_pcbbind_check_bindmulti(const struct inpcb *ni, const struct inpcb *oi); Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Mon May 15 21:50:34 2017 (r318320) +++ head/sys/netinet/ip_divert.c Mon May 15 21:58:36 2017 (r318321) @@ -141,14 +141,6 @@ div_inpcb_init(void *mem, int size, int } static void -div_inpcb_fini(void *mem, int size) -{ - struct inpcb *inp = mem; - - INP_LOCK_DESTROY(inp); -} - -static void div_init(void) { @@ -158,7 +150,7 @@ div_init(void) * place for hashbase == NULL. */ in_pcbinfo_init(&V_divcbinfo, "div", &V_divcb, 1, 1, "divcb", - div_inpcb_init, div_inpcb_fini, 0, IPI_HASHFIELDS_NONE); + div_inpcb_init, IPI_HASHFIELDS_NONE); } static void Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Mon May 15 21:50:34 2017 (r318320) +++ head/sys/netinet/raw_ip.c Mon May 15 21:58:36 2017 (r318321) @@ -210,7 +210,7 @@ rip_init(void) { in_pcbinfo_init(&V_ripcbinfo, "rip", &V_ripcb, INP_PCBHASH_RAW_SIZE, - 1, "ripcb", rip_inpcb_init, NULL, 0, IPI_HASHFIELDS_NONE); + 1, "ripcb", rip_inpcb_init, IPI_HASHFIELDS_NONE); EVENTHANDLER_REGISTER(maxsockets_change, rip_zone_change, NULL, EVENTHANDLER_PRI_ANY); } Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Mon May 15 21:50:34 2017 (r318320) +++ head/sys/netinet/tcp_subr.c Mon May 15 21:58:36 2017 (r318321) @@ -647,7 +647,7 @@ tcp_init(void) hashsize); } in_pcbinfo_init(&V_tcbinfo, "tcp", &V_tcb, hashsize, hashsize, - "tcp_inpcb", tcp_inpcb_init, NULL, 0, IPI_HASHFIELDS_4TUPLE); + "tcp_inpcb", tcp_inpcb_init, IPI_HASHFIELDS_4TUPLE); /* * These have to be type stable for the benefit of the timers. Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Mon May 15 21:50:34 2017 (r318320) +++ head/sys/netinet/udp_usrreq.c Mon May 15 21:58:36 2017 (r318321) @@ -203,8 +203,7 @@ udp_init(void) * a 4-tuple, flip this to 4-tuple. */ in_pcbinfo_init(&V_udbinfo, "udp", &V_udb, UDBHASHSIZE, UDBHASHSIZE, - "udp_inpcb", udp_inpcb_init, NULL, 0, - IPI_HASHFIELDS_2TUPLE); + "udp_inpcb", udp_inpcb_init, IPI_HASHFIELDS_2TUPLE); V_udpcb_zone = uma_zcreate("udpcb", sizeof(struct udpcb), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); uma_zone_set_max(V_udpcb_zone, maxsockets); @@ -218,8 +217,8 @@ udplite_init(void) { in_pcbinfo_init(&V_ulitecbinfo, "udplite", &V_ulitecb, UDBHASHSIZE, - UDBHASHSIZE, "udplite_inpcb", udplite_inpcb_init, NULL, - 0, IPI_HASHFIELDS_2TUPLE); + UDBHASHSIZE, "udplite_inpcb", udplite_inpcb_init, + IPI_HASHFIELDS_2TUPLE); } /* From owner-svn-src-all@freebsd.org Mon May 15 22:25:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B52D7D6EF82 for ; Mon, 15 May 2017 22:25:43 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5131A35A for ; Mon, 15 May 2017 22:25:42 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 6b474f28-39bd-11e7-b96e-2378c10e3beb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 6b474f28-39bd-11e7-b96e-2378c10e3beb; Mon, 15 May 2017 22:25:38 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4FMPVxU002277; Mon, 15 May 2017 16:25:31 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1494887131.59865.172.camel@freebsd.org> Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk From: Ian Lepore To: Alexey Dokuchaev Cc: John Baldwin , src-committers , Warner Losh , "svn-src-all@freebsd.org" , Ngie Cooper , "svn-src-head@freebsd.org" , Ngie Cooper , "Rodney W. Grimes" Date: Mon, 15 May 2017 16:25:31 -0600 In-Reply-To: <20170515210922.GA26702@FreeBSD.org> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> <1494870201.59865.103.camel@freebsd.org> <4703731.Pl02uSWy7k@ralph.baldwin.cx> <1494879113.59865.129.camel@freebsd.org> <20170515202853.GA88899@FreeBSD.org> <1494881370.59865.140.camel@freebsd.org> <20170515210922.GA26702@FreeBSD.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 22:25:43 -0000 On Mon, 2017-05-15 at 21:09 +0000, Alexey Dokuchaev wrote: > On Mon, May 15, 2017 at 02:49:30PM -0600, Ian Lepore wrote: > > > > ... > > You acknowledge that the situation is different for ports, so does that > > mean your objections go away when base becomes packaged and faces the > > same installation and update issues that packaged ports do?  Because I > > was under the impression that's coming pretty soon. > The reason it is different for ports is because we cannot know up-front what > software might user have installed and ergo what logs should be rotated by > newsyslog(8).  For the base, we know these pieces (albeit packaging the base > could probably benefit from the same generic approach, if we ever start to > support 3rd-party "base" packages). > > ./danfe > The same is true of packaged base -- the user may have installed a subset of the base system.  No need to configure ftp log stuff if ftp didn't get installed.  Likewise for ntp, mail, news, everything that has its own syslog facility code. And really, while syslog config started this thread, most of what I've been saying is more widely related to my initial comment:  moving from monolithic to per-subsystem/object/whatever config files has been the freebsd trend for a while.  That's not just for syslog rotation, that's for rc config and jail config and pam (maybe where the trend started?) and devd and periodic jobs and so on. Most of these things support both a single file and individual files, so nobody is forced to change all at once, but it does seem natural that the existing base code evolve towards the newer mechanism.  When it makes sense to still have the original file and only split out parts of it to individual files, it might also make sense to drop a comment into the original file to let old-timers know they should go looking in the newer directory for additional entries. Or it might makes sense to say: no half measures for a given configuration scheme, if some items are to be split out to separate files, then everything should be split, so that before the next major release there is only a monolithic file, or a directory full of fine- grained config, but not a mix.  I'm not advocating for that necessarily, just thinking out loud really. -- Ian From owner-svn-src-all@freebsd.org Mon May 15 22:30:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5012AD6E0B5; Mon, 15 May 2017 22:30:23 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32010952; Mon, 15 May 2017 22:30:23 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 5A77959D3; Mon, 15 May 2017 22:30:22 +0000 (UTC) Date: Mon, 15 May 2017 22:30:22 +0000 From: Alexey Dokuchaev To: rgrimes@freebsd.org Cc: Nikolai Lifanov , Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515223022.GA91860@FreeBSD.org> References: <20170515192326.GB28684@FreeBSD.org> <201705152000.v4FK0meq054533@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705152000.v4FK0meq054533@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 22:30:23 -0000 On Mon, May 15, 2017 at 01:00:48PM -0700, Rodney W. Grimes wrote: > > On Mon, May 15, 2017 at 03:09:33PM -0400, Nikolai Lifanov wrote: > > > On 05/15/2017 14:52, Alexey Dokuchaev wrote: > > ... > > Because /bin/chmod is owned by root, not because /libexec/ld-elf.so.1 is > > limiting execution to root only, or is it (I might have missed uid check > > in that patch [1], but at a quick glance I didn't see it). > > > > On a living system, there are plenty of other ways to restore missing > > +x on /bin/chmod as long as you can call chmod(2), from simple Python > > script down to manually crafting small binary in hex. > > Simple tool to get out of this is use of install(8) to "install" your > broken chmod to another file with proper modes. And if you lost that > one you could use mtree(8) with a easily crafted input file. Right. Like I've said, there are plenty of ways. In the mean time... While we've been somewhat calmed by r313967, which had secured us from consequences of running binaries from filesystems mounted with -o noexec, few questions had remained unanswered so far: - Would doing chmod -x /libexec/ld-elf.so.1 break anything from now on? - Does it make sense to implement something like [1]? - Could original "MFC after: 2 weeks" be extended a bit to give more time to gather enough feedback? I don't see the need for the rush. ./danfe > > [1] Idea for security.bsd.ld_elf_exec_root_only sysctl(8)? From owner-svn-src-all@freebsd.org Mon May 15 22:41:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FBAFD6E6CC; Mon, 15 May 2017 22:41:03 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0343E1164; Mon, 15 May 2017 22:41:02 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FMf2uS068259; Mon, 15 May 2017 22:41:02 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FMf1dQ068257; Mon, 15 May 2017 22:41:01 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201705152241.v4FMf1dQ068257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 15 May 2017 22:41:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318322 - in stable/11: contrib/netbsd-tests/lib/libc/rpc lib/libc/rpc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 22:41:03 -0000 Author: brooks Date: Mon May 15 22:41:01 2017 New Revision: 318322 URL: https://svnweb.freebsd.org/changeset/base/318322 Log: MFC r317660, r317710 r317660: Support clnt_raw's use of FD_SETSIZE as a fake file descriptor. Accomplish this by allocating space for it in __svc_xports and allowing it to be registered. The failure to allocate space was causing an out-of-bounds read in svc_getreq_common(). The failure to register caused PR 211804. The bug was found with CHERI bounds checking. PR: 211804 Obtained from: CheriBSD Sponsored by: DARPA, AFRL Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D10528 r317710: Remove expected failure now that it was fixed in r317660. PR: 211804 Reviewed by: ngie Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10576 Modified: stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c stable/11/lib/libc/rpc/svc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Mon May 15 21:58:36 2017 (r318321) +++ stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Mon May 15 22:41:01 2017 (r318322) @@ -325,10 +325,6 @@ ATF_TC_HEAD(raw, tc) ATF_TC_BODY(raw, tc) { -#ifdef __FreeBSD__ - atf_tc_expect_fail("fails with: clnt_call: " - "RPC: Can't decode result -- PR # 211804"); -#endif rawtest(NULL); } Modified: stable/11/lib/libc/rpc/svc.c ============================================================================== --- stable/11/lib/libc/rpc/svc.c Mon May 15 21:58:36 2017 (r318321) +++ stable/11/lib/libc/rpc/svc.c Mon May 15 22:41:01 2017 (r318322) @@ -108,18 +108,19 @@ xprt_register(SVCXPRT *xprt) rwlock_wrlock(&svc_fd_lock); if (__svc_xports == NULL) { __svc_xports = (SVCXPRT **) - mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *)); + mem_alloc((FD_SETSIZE + 1) * sizeof(SVCXPRT *)); if (__svc_xports == NULL) { rwlock_unlock(&svc_fd_lock); return; } - memset(__svc_xports, '\0', FD_SETSIZE * sizeof(SVCXPRT *)); + memset(__svc_xports, '\0', (FD_SETSIZE + 1) * sizeof(SVCXPRT *)); } if (sock < FD_SETSIZE) { __svc_xports[sock] = xprt; FD_SET(sock, &svc_fdset); svc_maxfd = max(svc_maxfd, sock); - } + } else if (sock == FD_SETSIZE) + __svc_xports[sock] = xprt; rwlock_unlock(&svc_fd_lock); } @@ -157,7 +158,8 @@ __xprt_do_unregister(SVCXPRT *xprt, bool if (__svc_xports[svc_maxfd]) break; } - } + } else if ((sock == FD_SETSIZE) && (__svc_xports[sock] == xprt)) + __svc_xports[sock] = NULL; if (dolock) rwlock_unlock(&svc_fd_lock); } From owner-svn-src-all@freebsd.org Mon May 15 22:50:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C29B7D6EA3E; Mon, 15 May 2017 22:50:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D6BF1783; Mon, 15 May 2017 22:50:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FMotI8072850; Mon, 15 May 2017 22:50:55 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FMoshm072840; Mon, 15 May 2017 22:50:54 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201705152250.v4FMoshm072840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 15 May 2017 22:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318323 - in stable/10: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 22:50:56 -0000 Author: brooks Date: Mon May 15 22:50:54 2017 New Revision: 318323 URL: https://svnweb.freebsd.org/changeset/base/318323 Log: MFC r317845-r317846 r317845: Provide a freebsd32 implementation of sigqueue() The previous misuse of sys_sigqueue() was sending random register or stack garbage to 64-bit targets. The freebsd32 implementation preserves the sival_int member of value when signaling a 64-bit process. Document the mixed ABI implementation of union sigval and the incompability of sival_ptr with pointer integrity schemes. Reviewed by: kib, wblock Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10605 r317846: Regen post r317845. MFC with: r317845 Sponsored by: DARPA, AFRL Modified: stable/10/lib/libc/sys/sigqueue.2 stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/compat/freebsd32/freebsd32_proto.h stable/10/sys/compat/freebsd32/freebsd32_syscall.h stable/10/sys/compat/freebsd32/freebsd32_syscalls.c stable/10/sys/compat/freebsd32/freebsd32_sysent.c stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c stable/10/sys/compat/freebsd32/syscalls.master stable/10/sys/kern/kern_sig.c stable/10/sys/sys/syscallsubr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/sigqueue.2 ============================================================================== --- stable/10/lib/libc/sys/sigqueue.2 Mon May 15 22:41:01 2017 (r318322) +++ stable/10/lib/libc/sys/sigqueue.2 Mon May 15 22:50:54 2017 (r318323) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2012 +.Dd May 5, 2017 .Dt SIGQUEUE 2 .Os .Sh NAME @@ -129,7 +129,6 @@ does not exist. .Xr kill 2 , .Xr sigaction 2 , .Xr sigpending 2 , -.Xr sigqueue 2 , .Xr sigsuspend 2 , .Xr sigtimedwait 2 , .Xr sigwait 2 , @@ -147,3 +146,18 @@ Support for .Tn POSIX realtime signal queue first appeared in .Fx 7.0 . +.Sh CAVEATS +When using +.Nm +to send signals to a process which might have a different ABI +(for instance, one is 32-bit and the other 64-bit), +the +.Va sival_int +member of +.Fa value +can be delivered reliably, but the +.Va sival_ptr +may be truncated in endian dependent ways and must not be relied on. +Further, many pointer integrity schemes disallow sending pointers to other +processes, and this technique should not be used in programs intended to +be portable. Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Mon May 15 22:50:54 2017 (r318323) @@ -2581,6 +2581,32 @@ siginfo_to_siginfo32(const siginfo_t *sr dst->si_overrun = src->si_overrun; } +#ifndef _FREEBSD32_SYSPROTO_H_ +struct freebsd32_sigqueue_args { + pid_t pid; + int signum; + /* union sigval32 */ int value; +}; +#endif +int +freebsd32_sigqueue(struct thread *td, struct freebsd32_sigqueue_args *uap) +{ + union sigval sv; + + /* + * On 32-bit ABIs, sival_int and sival_ptr are the same. + * On 64-bit little-endian ABIs, the low bits are the same. + * In 64-bit big-endian ABIs, sival_int overlaps with + * sival_ptr's HIGH bits. We choose to support sival_int + * rather than sival_ptr in this case as it seems to be + * more common. + */ + bzero(&sv, sizeof(sv)); + sv.sival_int = uap->value; + + return (kern_sigqueue(td, uap->pid, uap->signum, &sv)); +} + int freebsd32_sigtimedwait(struct thread *td, struct freebsd32_sigtimedwait_args *uap) { Modified: stable/10/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_proto.h Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/freebsd32_proto.h Mon May 15 22:50:54 2017 (r318323) @@ -395,6 +395,11 @@ struct freebsd32_thr_new_args { char param_l_[PADL_(struct thr_param32 *)]; struct thr_param32 * param; char param_r_[PADR_(struct thr_param32 *)]; char param_size_l_[PADL_(int)]; int param_size; char param_size_r_[PADR_(int)]; }; +struct freebsd32_sigqueue_args { + char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)]; + char signum_l_[PADL_(int)]; int signum; char signum_r_[PADR_(int)]; + char value_l_[PADL_(int)]; int value; char value_r_[PADR_(int)]; +}; struct freebsd32_kmq_open_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -785,6 +790,7 @@ int freebsd32_ksem_timedwait(struct thre int freebsd32_thr_suspend(struct thread *, struct freebsd32_thr_suspend_args *); int freebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *); int freebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *); +int freebsd32_sigqueue(struct thread *, struct freebsd32_sigqueue_args *); int freebsd32_kmq_open(struct thread *, struct freebsd32_kmq_open_args *); int freebsd32_kmq_setattr(struct thread *, struct freebsd32_kmq_setattr_args *); int freebsd32_kmq_timedreceive(struct thread *, struct freebsd32_kmq_timedreceive_args *); @@ -1216,6 +1222,7 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_thr_suspend AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_umtx_op AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_thr_new AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_sigqueue AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kmq_open AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kmq_setattr AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kmq_timedreceive AUE_NULL Modified: stable/10/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscall.h Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/freebsd32_syscall.h Mon May 15 22:50:54 2017 (r318323) @@ -359,7 +359,7 @@ #define FREEBSD32_SYS_auditctl 453 #define FREEBSD32_SYS_freebsd32_umtx_op 454 #define FREEBSD32_SYS_freebsd32_thr_new 455 -#define FREEBSD32_SYS_sigqueue 456 +#define FREEBSD32_SYS_freebsd32_sigqueue 456 #define FREEBSD32_SYS_freebsd32_kmq_open 457 #define FREEBSD32_SYS_freebsd32_kmq_setattr 458 #define FREEBSD32_SYS_freebsd32_kmq_timedreceive 459 Modified: stable/10/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Mon May 15 22:50:54 2017 (r318323) @@ -465,7 +465,7 @@ const char *freebsd32_syscallnames[] = { "auditctl", /* 453 = auditctl */ "freebsd32_umtx_op", /* 454 = freebsd32_umtx_op */ "freebsd32_thr_new", /* 455 = freebsd32_thr_new */ - "sigqueue", /* 456 = sigqueue */ + "freebsd32_sigqueue", /* 456 = freebsd32_sigqueue */ "freebsd32_kmq_open", /* 457 = freebsd32_kmq_open */ "freebsd32_kmq_setattr", /* 458 = freebsd32_kmq_setattr */ "freebsd32_kmq_timedreceive", /* 459 = freebsd32_kmq_timedreceive */ Modified: stable/10/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_sysent.c Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/freebsd32_sysent.c Mon May 15 22:50:54 2017 (r318323) @@ -502,7 +502,7 @@ struct sysent freebsd32_sysent[] = { { AS(auditctl_args), (sy_call_t *)sys_auditctl, AUE_AUDITCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 453 = auditctl */ { AS(freebsd32_umtx_op_args), (sy_call_t *)freebsd32_umtx_op, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 454 = freebsd32_umtx_op */ { AS(freebsd32_thr_new_args), (sy_call_t *)freebsd32_thr_new, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 455 = freebsd32_thr_new */ - { AS(sigqueue_args), (sy_call_t *)sys_sigqueue, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 456 = sigqueue */ + { AS(freebsd32_sigqueue_args), (sy_call_t *)freebsd32_sigqueue, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 456 = freebsd32_sigqueue */ { AS(freebsd32_kmq_open_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 457 = freebsd32_kmq_open */ { AS(freebsd32_kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 458 = freebsd32_kmq_setattr */ { AS(freebsd32_kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 459 = freebsd32_kmq_timedreceive */ Modified: stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Mon May 15 22:50:54 2017 (r318323) @@ -2397,12 +2397,12 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } - /* sigqueue */ + /* freebsd32_sigqueue */ case 456: { - struct sigqueue_args *p = params; + struct freebsd32_sigqueue_args *p = params; iarg[0] = p->pid; /* pid_t */ iarg[1] = p->signum; /* int */ - uarg[2] = (intptr_t) p->value; /* void * */ + iarg[2] = p->value; /* int */ *n_args = 3; break; } @@ -7206,7 +7206,7 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* sigqueue */ + /* freebsd32_sigqueue */ case 456: switch(ndx) { case 0: @@ -7216,7 +7216,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 2: - p = "void *"; + p = "int"; break; default: break; @@ -10366,7 +10366,7 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* sigqueue */ + /* freebsd32_sigqueue */ case 456: if (ndx == 0 || ndx == 1) p = "int"; Modified: stable/10/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/10/sys/compat/freebsd32/syscalls.master Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/syscalls.master Mon May 15 22:50:54 2017 (r318323) @@ -816,8 +816,8 @@ 455 AUE_NULL STD { int freebsd32_thr_new( \ struct thr_param32 *param, \ int param_size); } -456 AUE_NULL NOPROTO { int sigqueue(pid_t pid, int signum, \ - void *value); } +456 AUE_NULL STD { int freebsd32_sigqueue(pid_t pid, \ + int signum, int value); } 457 AUE_NULL NOSTD { int freebsd32_kmq_open( \ const char *path, int flags, mode_t mode, \ const struct mq_attr32 *attr); } Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/kern/kern_sig.c Mon May 15 22:50:54 2017 (r318323) @@ -1846,33 +1846,43 @@ struct sigqueue_args { int sys_sigqueue(struct thread *td, struct sigqueue_args *uap) { + union sigval sv; + + sv.sival_ptr = uap->value; + + return (kern_sigqueue(td, uap->pid, uap->signum, &sv)); +} + +int +kern_sigqueue(struct thread *td, pid_t pid, int signum, union sigval *value) +{ ksiginfo_t ksi; struct proc *p; int error; - if ((u_int)uap->signum > _SIG_MAXSIG) + if ((u_int)signum > _SIG_MAXSIG) return (EINVAL); /* * Specification says sigqueue can only send signal to * single process. */ - if (uap->pid <= 0) + if (pid <= 0) return (EINVAL); - if ((p = pfind(uap->pid)) == NULL) { - if ((p = zpfind(uap->pid)) == NULL) + if ((p = pfind(pid)) == NULL) { + if ((p = zpfind(pid)) == NULL) return (ESRCH); } - error = p_cansignal(td, p, uap->signum); - if (error == 0 && uap->signum != 0) { + error = p_cansignal(td, p, signum); + if (error == 0 && signum != 0) { ksiginfo_init(&ksi); ksi.ksi_flags = KSI_SIGQ; - ksi.ksi_signo = uap->signum; + ksi.ksi_signo = signum; ksi.ksi_code = SI_QUEUE; ksi.ksi_pid = td->td_proc->p_pid; ksi.ksi_uid = td->td_ucred->cr_ruid; - ksi.ksi_value.sival_ptr = uap->value; + ksi.ksi_value = *value; error = pksignal(p, ksi.ksi_signo, &ksi); } PROC_UNLOCK(p); Modified: stable/10/sys/sys/syscallsubr.h ============================================================================== --- stable/10/sys/sys/syscallsubr.h Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/sys/syscallsubr.h Mon May 15 22:50:54 2017 (r318323) @@ -242,6 +242,8 @@ int kern_sigtimedwait(struct thread *td, struct ksiginfo *ksi, struct timespec *timeout); int kern_stat(struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp); +int kern_sigqueue(struct thread *td, pid_t pid, int signum, + union sigval *value); int kern_statat(struct thread *td, int flag, int fd, char *path, enum uio_seg pathseg, struct stat *sbp); int kern_statat_vnhook(struct thread *td, int flag, int fd, char *path, From owner-svn-src-all@freebsd.org Mon May 15 22:51:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 652C7D6EAAD; Mon, 15 May 2017 22:51:24 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 288071938; Mon, 15 May 2017 22:51:24 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FMpNMJ073647; Mon, 15 May 2017 22:51:23 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FMpNp9073645; Mon, 15 May 2017 22:51:23 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201705152251.v4FMpNp9073645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Mon, 15 May 2017 22:51:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318324 - stable/11/sys/compat/linux X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 22:51:24 -0000 Author: avatar Date: Mon May 15 22:51:22 2017 New Revision: 318324 URL: https://svnweb.freebsd.org/changeset/base/318324 Log: MFC 316658: Adding SIOCGIFNAME support in Linuxulator. This should silence the console warning associated with linux-opera: linux: pid 23492 (opera): ioctl fd=5, cmd=0x8910 ('\M^I',16) is not implemented linux: pid 23492 (opera): ioctl fd=28, cmd=0x8910 ('\M^I',16) is not implemented ... Reviewed by: kib, marcel, dchagin Tested with: linux-opera-12.16_3 Modified: stable/11/sys/compat/linux/linux_ioctl.c stable/11/sys/compat/linux/linux_ioctl.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/11/sys/compat/linux/linux_ioctl.c Mon May 15 22:50:54 2017 (r318323) +++ stable/11/sys/compat/linux/linux_ioctl.c Mon May 15 22:51:22 2017 (r318324) @@ -2173,6 +2173,49 @@ ifname_linux_to_bsd(struct thread *td, c } /* + * Implement the SIOCGIFNAME ioctl + */ + +static int +linux_ioctl_ifname(struct thread *td, struct l_ifreq *uifr) +{ + struct l_ifreq ifr; + struct ifnet *ifp; + int error, ethno, index; + + error = copyin(uifr, &ifr, sizeof(ifr)); + if (error != 0) + return (error); + + CURVNET_SET(TD_TO_VNET(curthread)); + IFNET_RLOCK(); + index = 1; /* ifr.ifr_ifindex starts from 1 */ + ethno = 0; + error = ENODEV; + TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + if (ifr.ifr_ifindex == index) { + if (IFP_IS_ETH(ifp)) + snprintf(ifr.ifr_name, LINUX_IFNAMSIZ, + "eth%d", ethno); + else + strlcpy(ifr.ifr_name, ifp->if_xname, + LINUX_IFNAMSIZ); + error = 0; + break; + } + if (IFP_IS_ETH(ifp)) + ethno++; + index++; + } + IFNET_RUNLOCK(); + if (error == 0) + error = copyout(&ifr, uifr, sizeof(ifr)); + CURVNET_RESTORE(); + + return (error); +} + +/* * Implement the SIOCGIFCONF ioctl */ @@ -2399,6 +2442,7 @@ linux_ioctl_socket(struct thread *td, st case LINUX_SIOCADDMULTI: case LINUX_SIOCATMARK: case LINUX_SIOCDELMULTI: + case LINUX_SIOCGIFNAME: case LINUX_SIOCGIFCONF: case LINUX_SIOCGPGRP: case LINUX_SIOCSPGRP: @@ -2484,6 +2528,10 @@ linux_ioctl_socket(struct thread *td, st /* LINUX_SIOCGSTAMP */ + case LINUX_SIOCGIFNAME: + error = linux_ioctl_ifname(td, (struct l_ifreq *)args->arg); + break; + case LINUX_SIOCGIFCONF: error = linux_ifconf(td, (struct ifconf *)args->arg); break; Modified: stable/11/sys/compat/linux/linux_ioctl.h ============================================================================== --- stable/11/sys/compat/linux/linux_ioctl.h Mon May 15 22:50:54 2017 (r318323) +++ stable/11/sys/compat/linux/linux_ioctl.h Mon May 15 22:51:22 2017 (r318324) @@ -226,6 +226,7 @@ #define LINUX_SIOCGPGRP 0x8904 #define LINUX_SIOCATMARK 0x8905 #define LINUX_SIOCGSTAMP 0x8906 +#define LINUX_SIOCGIFNAME 0x8910 #define LINUX_SIOCGIFCONF 0x8912 #define LINUX_SIOCGIFFLAGS 0x8913 #define LINUX_SIOCGIFADDR 0x8915 From owner-svn-src-all@freebsd.org Mon May 15 22:52:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8531ED6EB43; Mon, 15 May 2017 22:52:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F5B21B4A; Mon, 15 May 2017 22:52:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FMqQGv073747; Mon, 15 May 2017 22:52:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FMqPCd073742; Mon, 15 May 2017 22:52:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705152252.v4FMqPCd073742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 15 May 2017 22:52:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318325 - in head: etc/mtree usr.bin/procstat usr.bin/procstat/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 22:52:27 -0000 Author: ngie Date: Mon May 15 22:52:25 2017 New Revision: 318325 URL: https://svnweb.freebsd.org/changeset/base/318325 Log: Start writing up some basic feature tests for procstat These tests query a running process for information related to the -b, -c, -e, and -f flags; the -f testcase is largely stubbed out, pending additional work to determine a good, deterministic descriptor. Core file test support is coming soon--it requires a bit more effort due to the fact that: - coredumps can be disabled (kern.coredump=0). - corefiles can be put in different directories than the current directory, or be named something other than `.core` (`kern.corefile`). MFC after: 2 months Sponsored by: Dell EMC Isilon Added: head/usr.bin/procstat/tests/ head/usr.bin/procstat/tests/Makefile (contents, props changed) head/usr.bin/procstat/tests/procstat_test.sh (contents, props changed) head/usr.bin/procstat/tests/while1.c (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/usr.bin/procstat/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon May 15 22:51:22 2017 (r318324) +++ head/etc/mtree/BSD.tests.dist Mon May 15 22:52:25 2017 (r318325) @@ -650,6 +650,8 @@ .. printf .. + procstat + .. sdiff .. sed Modified: head/usr.bin/procstat/Makefile ============================================================================== --- head/usr.bin/procstat/Makefile Mon May 15 22:51:22 2017 (r318324) +++ head/usr.bin/procstat/Makefile Mon May 15 22:52:25 2017 (r318325) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG= procstat MAN= procstat.1 SRCS= procstat.c \ @@ -20,4 +22,8 @@ SRCS= procstat.c \ LIBADD+= procstat xo util sbuf +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/usr.bin/procstat/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/procstat/tests/Makefile Mon May 15 22:52:25 2017 (r318325) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +ATF_TESTS_SH+= procstat_test + +PROGS+= while1 + +BINDIR= ${TESTSDIR} + +.include Added: head/usr.bin/procstat/tests/procstat_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/procstat/tests/procstat_test.sh Mon May 15 22:52:25 2017 (r318325) @@ -0,0 +1,140 @@ +# +# Copyright (c) 2017 Ngie 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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$ +# + +MAX_TRIES=20 +PROG_PID= +PROG_PATH=$(atf_get_srcdir)/while1 + +SP='[[:space:]]' + +start_program() +{ + echo "Starting program in background" + PROG_COMM=while1 + PROG_PATH=$(atf_get_srcdir)/$PROG_COMM + + $PROG_PATH $* & + PROG_PID=$! + try=0 + while [ $try -lt $MAX_TRIES ] && ! kill -0 $PROG_PID; do + sleep 0.5 + : $(( try += 1 )) + done + if [ $try -ge $MAX_TRIES ]; then + atf_fail "Polled for program start $MAX_TRIES tries and failed" + fi +} + +atf_test_case binary_info +binary_info_head() +{ + atf_set "descr" "Checks -b support" +} +binary_info_body() +{ + start_program bogus-arg + + line_format="$SP*%s$SP+%s$SP+%s$SP+%s$SP*" + header_re=$(printf "$line_format" "PID" "COMM" "OSREL" "PATH") + line_re=$(printf "$line_format" $PROG_PID $PROG_COMM "[[:digit:]]+" "$PROG_PATH") + + atf_check -o save:procstat.out procstat -b $PROG_PID + + atf_check -o match:"$header_re" head -n 1 procstat.out + atf_check -o match:"$line_re" tail -n 1 procstat.out +} + +atf_test_case command_line_arguments +command_line_arguments_head() +{ + atf_set "descr" "Checks -c support" +} +command_line_arguments_body() +{ + arguments="my arguments" + + start_program $arguments + + line_format="$SP*%s$SP+%s$SP+%s$SP*" + header_re=$(printf "$line_format" "PID" "COMM" "ARGS") + line_re=$(printf "$line_format" $PROG_PID "$PROG_COMM" "$PROG_PATH $arguments") + + atf_check -o save:procstat.out procstat -c $PROG_PID + atf_check -o match:"$header_re" head -n 1 procstat.out + atf_check -o match:"$line_re" tail -n 1 procstat.out +} + +atf_test_case environment +environment_head() +{ + atf_set "descr" "Checks -e support" +} +environment_body() +{ + var="MY_VARIABLE=foo" + eval "export $var" + + start_program my arguments + + line_format="$SP*%s$SP+%s$SP+%s$SP*" + header_re=$(printf "$line_format" "PID" "COMM" "ENVIRONMENT") + line_re=$(printf "$line_format" $PROG_PID $PROG_COMM ".*$var.*") + + atf_check -o save:procstat.out procstat -e $PROG_PID + + atf_check -o match:"$header_re" head -n 1 procstat.out + atf_check -o match:"$line_re" tail -n 1 procstat.out +} + +atf_test_case file_descriptor +file_descriptor_head() +{ + atf_set "descr" "Checks -f support" +} +file_descriptor_body() +{ + start_program my arguments + + line_format="$SP*%s$SP+%s$SP+%s$SP+%s$SP+%s$SP+%s$SP+%s$SP+%s$SP+%s$SP%s$SP*" + header_re=$(printf "$line_format" "PID" "COMM" "FD" "T" "V" "FLAGS" "REF" "OFFSET" "PRO" "NAME") + # XXX: write a more sensible feature test + line_re=$(printf "$line_format" $PROG_PID $PROG_COMM ".+" ".+" ".+" ".+" ".+" ".+" ".+" ".+") + + atf_check -o save:procstat.out procstat -f $PROG_PID + + atf_check -o match:"$header_re" head -n 1 procstat.out + atf_check -o match:"$line_re" awk 'NR > 1' procstat.out +} + +atf_init_test_cases() +{ + atf_add_test_case binary_info + atf_add_test_case command_line_arguments + atf_add_test_case environment + atf_add_test_case file_descriptor +} Added: head/usr.bin/procstat/tests/while1.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/procstat/tests/while1.c Mon May 15 22:52:25 2017 (r318325) @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2017 Ngie 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 +__RCSID("$FreeBSD$"); + +#include +#include + +int +main(void) +{ + + for (;;) + usleep(100); + exit(1); +} From owner-svn-src-all@freebsd.org Mon May 15 23:12:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DCFED6EF36; Mon, 15 May 2017 23:12:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DED7765B; Mon, 15 May 2017 23:12:05 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FNC4DS084210; Mon, 15 May 2017 23:12:04 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FNC4EQ084209; Mon, 15 May 2017 23:12:04 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201705152312.v4FNC4EQ084209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 15 May 2017 23:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318326 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 23:12:06 -0000 Author: jkim Date: Mon May 15 23:12:04 2017 New Revision: 318326 URL: https://svnweb.freebsd.org/changeset/base/318326 Log: - Revert r317171. [1] - Fix overlapping corners and fix an off-by-one bug. MFC after: 3 days Requested by: emaste [1] Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Mon May 15 22:52:25 2017 (r318325) +++ head/sys/dev/vt/vt_core.c Mon May 15 23:12:04 2017 (r318326) @@ -1150,30 +1150,33 @@ vt_mark_mouse_position_as_dirty(struct v #endif static void -vt_set_border(struct vt_device *vd, term_color_t c) +vt_set_border(struct vt_device *vd, const term_rect_t *area, + const term_color_t c) { - term_rect_t *tarea = &vd->vd_curwindow->vw_draw_area; - int x, y; + vd_drawrect_t *drawrect = vd->vd_driver->vd_drawrect; - /* Top bar. */ - for (y = 0; y < tarea->tr_begin.tp_row; y++) - for (x = 0; x < vd->vd_width; x++) - vd->vd_driver->vd_setpixel(vd, x, y, c); - - for (y = tarea->tr_begin.tp_row; y < tarea->tr_end.tp_row; y++) { - /* Left bar. */ - for (x = 0; x < tarea->tr_begin.tp_col; x++) - vd->vd_driver->vd_setpixel(vd, x, y, c); - - /* Right bar. */ - for (x = tarea->tr_end.tp_col; x < vd->vd_width; x++) - vd->vd_driver->vd_setpixel(vd, x, y, c); - } - - /* Bottom bar. */ - for (y = tarea->tr_end.tp_row; y < vd->vd_height; y++) - for (x = 0; x < vd->vd_width; x++) - vd->vd_driver->vd_setpixel(vd, x, y, c); + if (drawrect == NULL) + return; + + /* Top bar */ + if (area->tr_begin.tp_row > 0) + drawrect(vd, 0, 0, vd->vd_width - 1, + area->tr_begin.tp_row - 1, 1, c); + + /* Left bar */ + if (area->tr_begin.tp_col > 0) + drawrect(vd, 0, area->tr_begin.tp_row, + area->tr_begin.tp_col - 1, area->tr_end.tp_row - 1, 1, c); + + /* Right bar */ + if (area->tr_end.tp_col < vd->vd_width) + drawrect(vd, area->tr_end.tp_col, area->tr_begin.tp_row, + vd->vd_width - 1, area->tr_end.tp_row - 1, 1, c); + + /* Bottom bar */ + if (area->tr_end.tp_row < vd->vd_height) + drawrect(vd, 0, area->tr_end.tp_row, vd->vd_width - 1, + vd->vd_height - 1, 1, c); } static int @@ -1241,7 +1244,7 @@ vt_flush(struct vt_device *vd) if (vd->vd_flags & VDF_INVALID) { vd->vd_flags &= ~VDF_INVALID; - vt_set_border(vd, TC_BLACK); + vt_set_border(vd, &vw->vw_draw_area, TC_BLACK); vt_termrect(vd, vf, &tarea); if (vt_draw_logo_cpus) vtterm_draw_cpu_logos(vd); From owner-svn-src-all@freebsd.org Mon May 15 23:13:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 749E9D6E00D; Mon, 15 May 2017 23:13:51 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36E13892; Mon, 15 May 2017 23:13:51 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FNDolB084304; Mon, 15 May 2017 23:13:50 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FNDoJU084302; Mon, 15 May 2017 23:13:50 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201705152313.v4FNDoJU084302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 15 May 2017 23:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318327 - in stable/10: contrib/netbsd-tests/lib/libc/rpc lib/libc/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 23:13:51 -0000 Author: brooks Date: Mon May 15 23:13:49 2017 New Revision: 318327 URL: https://svnweb.freebsd.org/changeset/base/318327 Log: MFC r317660, r317710 r317660: Support clnt_raw's use of FD_SETSIZE as a fake file descriptor. Accomplish this by allocating space for it in __svc_xports and allowing it to be registered. The failure to allocate space was causing an out-of-bounds read in svc_getreq_common(). The failure to register caused PR 211804. The bug was found with CHERI bounds checking. PR: 211804 Obtained from: CheriBSD Sponsored by: DARPA, AFRL Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D10528 r317710: Remove expected failure now that it was fixed in r317660. PR: 211804 Reviewed by: ngie Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10576 Modified: stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c stable/10/lib/libc/rpc/svc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Mon May 15 23:12:04 2017 (r318326) +++ stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Mon May 15 23:13:49 2017 (r318327) @@ -335,9 +335,6 @@ ATF_TC_BODY(raw, tc) #ifdef __FreeBSD_bug_216954__ atf_tc_expect_signal(SIGSEGV, "fails with SIGSEGV only on ^/stable/10 -- bug # 216954"); -#else - atf_tc_expect_fail("fails with: clnt_call: " - "RPC: Can't decode result -- PR # 211804"); #endif #endif rawtest(NULL); Modified: stable/10/lib/libc/rpc/svc.c ============================================================================== --- stable/10/lib/libc/rpc/svc.c Mon May 15 23:12:04 2017 (r318326) +++ stable/10/lib/libc/rpc/svc.c Mon May 15 23:13:49 2017 (r318327) @@ -108,18 +108,19 @@ xprt_register(SVCXPRT *xprt) rwlock_wrlock(&svc_fd_lock); if (__svc_xports == NULL) { __svc_xports = (SVCXPRT **) - mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *)); + mem_alloc((FD_SETSIZE + 1) * sizeof(SVCXPRT *)); if (__svc_xports == NULL) { rwlock_unlock(&svc_fd_lock); return; } - memset(__svc_xports, '\0', FD_SETSIZE * sizeof(SVCXPRT *)); + memset(__svc_xports, '\0', (FD_SETSIZE + 1) * sizeof(SVCXPRT *)); } if (sock < FD_SETSIZE) { __svc_xports[sock] = xprt; FD_SET(sock, &svc_fdset); svc_maxfd = max(svc_maxfd, sock); - } + } else if (sock == FD_SETSIZE) + __svc_xports[sock] = xprt; rwlock_unlock(&svc_fd_lock); } @@ -157,7 +158,8 @@ __xprt_do_unregister(SVCXPRT *xprt, bool if (__svc_xports[svc_maxfd]) break; } - } + } else if ((sock == FD_SETSIZE) && (__svc_xports[sock] == xprt)) + __svc_xports[sock] = NULL; if (dolock) rwlock_unlock(&svc_fd_lock); } From owner-svn-src-all@freebsd.org Mon May 15 23:49:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F1A9D6EC58; Mon, 15 May 2017 23:49:27 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEFD41966; Mon, 15 May 2017 23:49:26 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.15.2/8.15.2) with ESMTP id v4FNJTcE031993; Tue, 16 May 2017 02:19:29 +0300 (MSK) (envelope-from maxim.konovalov@gmail.com) Date: Tue, 16 May 2017 02:19:29 +0300 (MSK) From: Maxim Konovalov To: "Stephen J. Kiernan" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318314 - head/lib/libc/sys In-Reply-To: <201705151932.v4FJWQ16092469@repo.freebsd.org> Message-ID: References: <201705151932.v4FJWQ16092469@repo.freebsd.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 23:49:27 -0000 Hi Stephen, On Mon, 15 May 2017, 19:32-0000, Stephen J. Kiernan wrote: > Author: stevek > Date: Mon May 15 19:32:26 2017 > New Revision: 318314 > URL: https://svnweb.freebsd.org/changeset/base/318314 > > Log: > Add information to open(2) man page about the O_VERIFY flag. > > Reviewed by: bjk wblock > Approved by: sjg (mentor) > Obtained from: Juniper Networks, Inc. > > Modified: > head/lib/libc/sys/open.2 > It is also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219262 -- Maxim Konovalov From owner-svn-src-all@freebsd.org Tue May 16 00:21:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A61BD6C656; Tue, 16 May 2017 00:21:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E67D3AE7; Tue, 16 May 2017 00:21:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G0L3rc009543; Tue, 16 May 2017 00:21:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G0L3kO009541; Tue, 16 May 2017 00:21:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705160021.v4G0L3kO009541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 16 May 2017 00:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318328 - stable/11/sys/dev/uart X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 00:21:05 -0000 Author: mav Date: Tue May 16 00:21:03 2017 New Revision: 318328 URL: https://svnweb.freebsd.org/changeset/base/318328 Log: MFC r317659, r317752: Make some UART consoles to not spin wait for data to be sent. At least with Tx FIFO enabled it shows me ~10% reduction of verbose boot time with serial console at 115200 baud. Modified: stable/11/sys/dev/uart/uart_dev_lpc.c stable/11/sys/dev/uart/uart_dev_ns8250.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/uart/uart_dev_lpc.c ============================================================================== --- stable/11/sys/dev/uart/uart_dev_lpc.c Mon May 15 23:13:49 2017 (r318327) +++ stable/11/sys/dev/uart/uart_dev_lpc.c Tue May 16 00:21:03 2017 (r318328) @@ -345,9 +345,6 @@ lpc_ns8250_putc(struct uart_bas *bas, in DELAY(4); uart_setreg(bas, REG_DATA, c); uart_barrier(bas); - limit = 250000; - while ((uart_getreg(bas, REG_LSR) & LSR_TEMT) == 0 && --limit) - DELAY(4); } static int @@ -890,8 +887,13 @@ lpc_ns8250_bus_transmit(struct uart_soft bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - while ((uart_getreg(bas, REG_LSR) & LSR_THRE) == 0) - ; + if (sc->sc_txdatasz > 1) { + if ((uart_getreg(bas, REG_LSR) & LSR_TEMT) == 0) + lpc_ns8250_drain(bas, UART_DRAIN_TRANSMITTER); + } else { + while ((uart_getreg(bas, REG_LSR) & LSR_THRE) == 0) + DELAY(4); + } for (i = 0; i < sc->sc_txdatasz; i++) { uart_setreg(bas, REG_DATA, sc->sc_txbuf[i]); uart_barrier(bas); Modified: stable/11/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- stable/11/sys/dev/uart/uart_dev_ns8250.c Mon May 15 23:13:49 2017 (r318327) +++ stable/11/sys/dev/uart/uart_dev_ns8250.c Tue May 16 00:21:03 2017 (r318328) @@ -335,9 +335,6 @@ ns8250_putc(struct uart_bas *bas, int c) DELAY(4); uart_setreg(bas, REG_DATA, c); uart_barrier(bas); - limit = 250000; - while ((uart_getreg(bas, REG_LSR) & LSR_TEMT) == 0 && --limit) - DELAY(4); } static int @@ -968,8 +965,13 @@ ns8250_bus_transmit(struct uart_softc *s bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - while ((uart_getreg(bas, REG_LSR) & LSR_THRE) == 0) - ; + if (sc->sc_txdatasz > 1) { + if ((uart_getreg(bas, REG_LSR) & LSR_TEMT) == 0) + ns8250_drain(bas, UART_DRAIN_TRANSMITTER); + } else { + while ((uart_getreg(bas, REG_LSR) & LSR_THRE) == 0) + DELAY(4); + } for (i = 0; i < sc->sc_txdatasz; i++) { uart_setreg(bas, REG_DATA, sc->sc_txbuf[i]); uart_barrier(bas); From owner-svn-src-all@freebsd.org Tue May 16 00:25:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3806D6CBB8; Tue, 16 May 2017 00:25:10 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0104.outbound.protection.outlook.com [104.47.42.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4300B124C; Tue, 16 May 2017 00:25:09 +0000 (UTC) (envelope-from sjg@juniper.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=wFTvkcos6CxBGgqUMD/cVhR22QWJXz96XYFDHAbXpjo=; b=PuKJgf1gifuaIvJHRmwcfLqX2+Gg48Fk7Xpr9rG19E+ASX5lhPddAygGl2kX1rZ3+L04lexQpy63HSEXyHl2oGqM5VmpVNFskPHEXAx/bGU7a3VhY1XtOSL86HHCVoW/qwwQwu4Jue6m5dZ35ZFvtC81uZx0ogoMpF0YQyfb0ic= Received: from MWHPR05CA0002.namprd05.prod.outlook.com (10.168.242.140) by SN1PR05MB1983.namprd05.prod.outlook.com (10.162.132.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.7; Tue, 16 May 2017 00:25:08 +0000 Received: from DM3NAM05FT023.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::205) by MWHPR05CA0002.outlook.office365.com (2603:10b6:300:59::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.8 via Frontend Transport; Tue, 16 May 2017 00:25:08 +0000 Authentication-Results: spf=softfail (sender IP is 66.129.239.12) smtp.mailfrom=juniper.net; freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=fail action=none header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender) Received: from p-emfe01a-sac.jnpr.net (66.129.239.12) by DM3NAM05FT023.mail.protection.outlook.com (10.152.98.133) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P256) id 15.1.1075.12 via Frontend Transport; Tue, 16 May 2017 00:25:07 +0000 Received: from p-mailhub01.juniper.net (10.160.2.17) by p-emfe01a-sac.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3; Mon, 15 May 2017 17:24:57 -0700 Received: from kaos.jnpr.net (kaos.jnpr.net [172.21.30.60]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id v4G0OuFZ008584; Mon, 15 May 2017 17:24:56 -0700 (envelope-from sjg@juniper.net) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id CCA2E38551F; Mon, 15 May 2017 17:24:56 -0700 (PDT) To: Konstantin Belousov CC: Bryan Drewery , Alexey Dokuchaev , , , , Subject: Re: svn commit: r318313 - head/libexec/rtld-elf In-Reply-To: <20170515192944.GI1622@kib.kiev.ua> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <2493cfd2-1fab-d4cd-523c-0bd7413b1c86@FreeBSD.org> <20170515192944.GI1622@kib.kiev.ua> Comments: In-reply-to: Konstantin Belousov message dated "Mon, 15 May 2017 22:29:44 +0300." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 24.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <34494.1494894296.1@kaos.jnpr.net> Date: Mon, 15 May 2017 17:24:56 -0700 Message-ID: <34495.1494894296@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.129.239.12; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39400400002)(39850400002)(39410400002)(39450400003)(39840400002)(39860400002)(2980300002)(24454002)(189002)(199003)(9170700003)(76176999)(5660300001)(50986999)(4326008)(356003)(23726003)(39060400002)(189998001)(81166006)(2906002)(2810700001)(229853002)(1411001)(47776003)(53416004)(107886003)(8936002)(6916009)(2950100002)(105596002)(7696004)(8676002)(106466001)(50226002)(305945005)(110136004)(6246003)(86362001)(6266002)(55016002)(93886004)(38730400002)(478600001)(97756001)(50466002)(77096006)(53936002)(117636001)(54906002)(7126002)(9686003)(46406003)(76506005)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR05MB1983; H:p-emfe01a-sac.jnpr.net; FPR:; SPF:SoftFail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM05FT023; 1:Dy+l1IS46yjT37GwMT7i43K+Ja18gDeBigNH/Q266LKGvpc9WS+iKsIJfToQod9cQxgise+rDNKBRwmmAjlxR+obgC0zlhep8oEfNs0EIaR9H4nfYcm1pWFywngu/qTD1irUoqvOxcYHpe2JX/7IOzXd66SQ/rOzdVBb1ObnfDFOJ3r/8sb4obY42vbk2sAp3sdPTsrsFufpkmEgbmls4vX6TlTxt15kt7TdKw+BWzFV8iJHiWSEIj588oCzOAQpEF3prSnkkXd/T5qtdKow9IkkpXro9eDITHRtscgFF/Xnmeta67E6gZHRvztDlv2GHYdoBvhAxehWiY4MkyGzOY1VB9ExGq4W9jQj/hQxLdz3XX/jTAJY7BJksVqG+qDvWlBoPIXO4Deu4E6GnNgFJwSx/gHbLmNEeVVaQrajgu5L//vmaP+EAx3M64giNiIWINoijjNpO2nq3OsyL7EbGlTObEqcfv1JtLpIZqnTbypvv2AHoETlN7iyk+aACaOhO1DSgzYOoonmlrZjiOt60Ft2WRk3hw1OIiSedC1T6M/i3QfW91/kOXarUeX+mQ0j23K3fBzNjg11X4RVYxAO2AgJazx0NQE70B+bk4SZARk= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2d33e29c-3f42-482c-28a3-08d49bf201d0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:SN1PR05MB1983; X-Microsoft-Exchange-Diagnostics: 1; SN1PR05MB1983; 3:6RuifCOrxGycwQoetoi72ciIm15fyCmrQV7R+deZ0gHIyThz5SbKcrdMwNARUSjdmJaN2tXKH3bMES0KkrcPVFTKZugbJsMbFoCJj9JCU847OB7vS10ht0Pq0CJz0E/DtsPyPmkg/NNLwvAVhiF4a0SDnmkT00ugatMEMe/IesFr8T5Rf/XUQZgzaDym16dA7q8SjIucU7KB/Hvph5xpmGcfl3p9Qb8A8xl9DUK9pbcaYuc+ykYefY+KcvJzyv3cbedpoCTWgrjPBzKGiOAfH1rf7WPEVaUearzkBDqksE4k0Cc6Xa46beUAi79DrWu/blv1Fm8ReIWHS1jyHuQDqELd6cfTUE/Vbs1mJyRixmsdZuqLUBrvtHhHiKo+Z1hClG93Wyu9VAFSSjkUZ/bzZethMxvJcfWWXgkpk29wOktEdBa0PRuagJvrSoAkO7nSaD35z0vKs6RAW30C6HaGjjjRObAz13C87fZOsKDZ95ewCqOXA9A1Sh1StMk70Vd8 X-Microsoft-Exchange-Diagnostics: 1; SN1PR05MB1983; 25:63WA72C2QweEBpYMNBNq/NYx2Z2KIIb1ZeWDdjvehQ671meGUkJn6wJe417cF67zT7KHC5iSqOJbvthHYCNaRoxLA15pKZCk0C0pMq3GxN2VRh7VgSq0Vr6Jzg4DS65XopXdCChWPkFx+KMwX5MKhk9f9Wo175ROpFQ5UoIMoUVDmMUDNrrbb0AUSieqFAvvkvXpHiduHn02JYz3UBmUCyFasrD4CMFmI4NqZIO+mm06AVvOhiV0K7kR+qLcf4/yXBTU0qJxXj8Y8zZgJY86XqyEEfkBK0h+sUdHWqqnKPAHHx79JjXrR3D9Qvu9ibLsG13/xgoBK6L2IJOCDC8Wz8q2SXrUYSzJgtpdO0sd+cGmRjkrN9oUbh+KmWCiyTExhx9uK/yl2+rKo5BMlSU/Mtssct6F2Wnm1xWLVWcoar3A9itGlVDQ+lr66q84CjUgTYPTvSGZcSWdAya67XV8YK3g0+iRIr/vbhm+TCQAbqw=; 31:Nlbjyn+H9IcoVWyK1gjcS8QzqH5dohQ5eOVvdqTWcTgrdmzsPs/OY7GW0WMXvXqx5wWefZL21v0FuN8i5TBk97I3VvnbCACqHokR0F6woi7QxyLkXmXxuKrJq6/B88ZZsr+zurl+bud3rdIHHJLMb7sLXekDKrCOz7pfPEITNiAXNbXU1Ytf08pa4+9k+nDdnEFNCxK9PqiAJSyXQoSSHswzm8xh+gGRkupvZwAk5dAWB0CPaNIs8TFGBl2I7AveCHIwgwC9/B/neOIXGsrTXA== X-Microsoft-Exchange-Diagnostics: 1; SN1PR05MB1983; 20:ZsFIdiIAGwwywbOTEkdgk2hFCyonl2moSExPhQeqlbGLpbWenmOOA/2CRXMaIBnSRQwhK0yKDRrE1u2D+XH3UN13DM2bApvRE2oA0uBKfKqkLzpzTzjuG2VQgY2b5yGhPrnmPP7NaaQRCpT1iuXl+yRzj+3xVgubWicBQtRXZBvPbgbXhyc4IEF8a2lW+/q74bQcRR6TSP6eLtNX+sbwgLSJ10AdFlhyOZ7MXxcTLHqnUnii8g/Dh8YW5AuU4hWmmzaTWcfEmO7L4R5pCfcIeoqgyss9l3Skc0RyFjnvaicd7zRFTlGkm9W3Ugt4TF459xsnP9cFzXI8LO5x+uyJs+nC5KVXHK2TuO55Ypi4OWMwImjz9fmJG3QW/kMIHB1HfNqcRnBCpLtHJD+YSIXsydc/jxDgSobESwkXaDj9tIOJzrIBHWvRrpyJj7bYoVkhMk7dSxSgjGuFv6maLBcnR3YIXKX12DlnY5MXvqQsQ3P6gs7rZRmELu+KJGzawbMB X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13023025)(13018025)(13024025)(5005006)(8121501046)(13015025)(13017025)(3002001)(93006095)(93003095)(10201501046)(6055026)(6041248)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123558100)(6072148); SRVR:SN1PR05MB1983; BCL:0; PCL:0; RULEID:; SRVR:SN1PR05MB1983; X-Microsoft-Exchange-Diagnostics: 1; SN1PR05MB1983; 4:jCzdcAKu/TstMHC1FjZerwClLd1ZNuJmmnhAjSVB9wrLBMmWvObrhmlhOuPiZko/DQ0Vi9tO1hPJfSWLLugWsSWzIwDBKhD1seogd0C/ONvvjalDMu9AGawad/tt6j3uG2SZhekLfLPaoocjJXWshroBmjPou1oHUR1aWwKyaL+WKt2AQ6vXokmLSJpjxk74/yMHMdWujJ/BYJvaNFbcN2yFTvv5+Ibt9Q1+zFHm7Rxr8Kyk6Kgq2uynzuEclJwuOO4/J2G80b5oJKQ8VX98sAwzKIhLpHXSwqVcq47SVfTKKmCXOtg8VDoyUdQsTfp4are/0p6tF7U9PTd54FOzznD1doRmkdKaObOu+SqdZ8ca5x5ytyE6z967HNdxpGLZZcKM1HDBGA1vWqQKUsaBaTef8l14vzGabbrSdB0/4d0m00f903FAQdMwrPVm3jLJLMPUFsdB+Ek9kjxYHty7WKSA1ElsFPOkRDJuXxMp0V294P9BqDQx0EBAULTll2ACut5Svd0/22euoXkKzJ4jnMk7l8euxjO7pJ+I1FWDrX+udivbX58UXLLod11Jo+zxHGWebm1RVXTiNXTRL7g3sSFRaxUKLvq2MT4fHLNGDYmzrtz3WunTfV88s8Ilu7+lcJt5KWdRf2fRpgI64WPGf/GqvVx8bQFeGQebEo6i5/JZP63On75S3oNgBS4qecar7gqsqUtU4oAdHzs9eqF6sFpqdJ/JiY4vrz0s28i/ouwEm7AMvuudvc8QdU/6QMJXr+9VSaCUAdLaj8smHCB5BtIo+eFZocaurZFwFnxHotY/pvZsP8kRlLVFqacmysKIUPWbGBqTcnRT6sIpgkVk7fyXrj7I5sGLXC9DKFBJgeD+D+fSMkmWXXgiW4ApY3Fy+mFp1Ocin5732reXepbRhQ== X-Forefront-PRVS: 03094A4065 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR05MB1983; 23:yvC1/bVzZmy64S369p1aBZpY9nOSq1boqPxViKJN5?= =?us-ascii?Q?yh0DjH2qTihLKGLaeVEEyTdyhaBDtuSg55U7FYFqO95Qrf5p80z3c9DNVjPN?= =?us-ascii?Q?zeWgJPEXExbBpQBVVj2+Ja6K/ZuIjlw5c1XlUexmwyeQKFbPlGFqEtUc7Iu8?= =?us-ascii?Q?zFqGdvrI1YdnN0NY67L/9Pv5OyEXTO3f+MMns4XiXhZHdKzgkLV82NZMiDoY?= =?us-ascii?Q?R9+DW4WtPSe8cb57mTntJfqT497mtc5MTpyJFftDlDQ4KDunJU8mWlU55vSl?= =?us-ascii?Q?5GJbaOruysF8iQpciMmD1OuoJnyZVP9oo9BFFVP5gomxtcdcFM9wdsRgojGY?= =?us-ascii?Q?4asA5fuqz1osFxnKcnYHlwXSerMmiLBG+4obVon6DPsZZweRGQABvAjmP2wM?= =?us-ascii?Q?rjOiCDYw7Ivt1vubXvo5tfhlxwfBppiEVCjyK7o49J0VxcWuDdf8hMOPNMzU?= =?us-ascii?Q?f0SvBmPL5sx/LiKWrs9MbMEWcrN0LZ2Y/9EL8p4zeccpy48T32Ktc3PQdZej?= =?us-ascii?Q?iHchOA66+bFgbK+PdPKciqtwwotrSILEP4JLfDZcyIVteRe09Fqa8OtCH3Z/?= =?us-ascii?Q?CPDvWIosjC4ZG9sRk0e3z/M4zWccDoGv3BSuS5/No6WO6RHtu/FpY8/smWC/?= =?us-ascii?Q?spqxlYe6rk9M+La+sl+uA9a86ix4xTzhXzKuR1Zgoxm0dqsKSFjE48OjQlwP?= =?us-ascii?Q?BJ1mklmEwKQsZesk59xprdn9nTqeM0G/vaP1tRgQp1+onD8bg1gUEipK7ZzZ?= =?us-ascii?Q?S7pHhfBqPuqizSbJC9gRjYTPaHc+Ls08vey35ij8AEZHi1ffdqfLRW/EhBiv?= =?us-ascii?Q?XZIUHxDY00vVfbPHfY5LwdFCjc6CKKVYU4Te2dKoUrlBlA7SsEoRWve/rHqr?= =?us-ascii?Q?d0QDWj3IsoW5MmChojxTq3KrD2mhG9wUTI2sAojNGbtNqu8nlArqyzaEbigL?= =?us-ascii?Q?MVJiKpbGcw+qQtxC4DkwBdzUg04fNXMR5/+8X2rWoKlamESQXZpBN9DuXgAc?= =?us-ascii?Q?OM5NIuvRdbKbrKM3P4mzfiu9jwbCYC4QdsfMGJ9YDg5fshexDy3sNIexqzbZ?= =?us-ascii?Q?XlrzDvbFKyC/mJpjcnSGvc7kMiLJhmetZslOnR8sK5DbmArLi3wukFguqFih?= =?us-ascii?Q?nV6UwPgj347oUKfo4XHw2FqqCR67kyyWpN4ZExAlY+6fxO0iKSFk2pItXSCG?= =?us-ascii?Q?Lsi3cwTH8OD3jpyH0qiwcg3wbQvYihK47phCQFBMUdwsCPOPZOo2abrkgcGU?= =?us-ascii?Q?rHUXYsff9GWyHnyPbBYP7mWPHLh8vULB3AfnUO1l3uTtewUt+kkBlF+11nl3?= =?us-ascii?Q?Ln+IVJZIYSKqiQvRwnnX8SGJeDC6mVf0xkjZeOcctr0dsggUpOkkUYo4LvW0?= =?us-ascii?Q?AkwEQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR05MB1983; 6:UC9Ulboa7uG5vgqk2YVtDBssRh4S3tdhFhFiSd7T+9rl2U9AtBxkFm1GzzlgPnUrH+TmyHhYW+She0uYIOmWemLHwV3PMjz5xkFBZZi08j8m3zddehB4JiDQDEqgcoTmCsMAVBbam9BEasqUybwHf7JkJj6C7CeG3irTCk24Z/LdNM6NOJ5HOsiODzx1I9ahE/wK1bgspWr1x5Kzmsu9P9f96EtNbe149o6420DKFi0namEsD2RG0gYlcWWlZb+p+dZxayAWtDZWAbX2/E1G/GlvTiXRCAxaceEzNxMYouT+iD9KNbcbnVAImf03NU80AadfpvFaTge3iR9N9ss2VUWwgOT3avv5VzdpIPR/AEVXPg5eU1rQvKhWOfvN7Fbu5XA5I83gUeCsZtr/6Gn5GziynUV0JV2Z711B2AojnDTZw6toEymyPFN0LqDnt4rES3ZGtN8Vkggaxw3y/xIH2j3D7yd/w32YijjixykUsXkEtCviQpb/oVSSMLEHeneOdATo0JscEc1mRRiiQD4tVzpSBjVYlPI1JDcgGEtX9GE=; 5:71TBfmKeDHpjzyf85LThxbDNsXjsqPWDT3499aqQDmwTwTeK2T+ORTamqSdmtohLj0hcV1WNVgf87NuPr1sIEQxG6GnvdyyKrL+VoYqenqDs436YMoVP3pNEQBzsbS+n0PYjWYJ/0JZO8E43DD12zA==; 24:1NRiADSoVafDvWIGtBUKbycj0U7ZeUGfj+aEW39vqj9jBWva18XkglDOpr0iCwJ4xPsKQOl8GtrwiKu/XO0ykeRCp2CLsQnO9Pw4wpFvdmU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR05MB1983; 7:wG0uG0pRoFveZw0OCFq0zF5a68D2SHYahuNRTQ/mMM2710yPaTHqYYIrlkXBGuukMm0CcOg9NgMdRS/VLUuKhJfcibKwMdYrWev1+F0+QYFU5lxggRJXSQqiC10I4sw5LOEZzdElVom8ACCp/M8/nEeqlipM+NL16lXYCghckugE4zh9J6LM/U6YDxlgdgI4Tlnwqtwq7/Uuyi+fJRth55zaEGvwwRWoXH2frE+ZKzVpnuK4RMNUUfrxNacDj5AoRw9GUGKZ9mWra6SnW2EAaHfbTICvy4moyZWHopq9kuKx6Oq6G5R+WYDZ4eK6e7h1CIGxyRwCUhacRrKxbNdY4w== X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2017 00:25:07.3646 (UTC) X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[p-emfe01a-sac.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR05MB1983 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 00:25:10 -0000 Konstantin Belousov wrote: > > Consider a downstream vendor who has support for signed binary > > executions. If rtld allows a backdoor around exec(2) to run an unsigned > > binary, that could be a problem for them. It is on them to add support > > to exec(2) to validate the special case of execing rtld with an > > argument, or to just disable the feature in rtld from this commit. > > Note the undocumented O_VERIFY flag in open(2) from the patch. > This is very vendor-ish addition to request veriexec (?). Yep, we make rtld use O_VERIFY so that it will not load/link anything which is unsigned. From owner-svn-src-all@freebsd.org Tue May 16 00:30:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AF8BD6CC94; Tue, 16 May 2017 00:30:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED53913E6; Tue, 16 May 2017 00:30:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G0UfVM013085; Tue, 16 May 2017 00:30:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G0UfVX013083; Tue, 16 May 2017 00:30:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705160030.v4G0UfVX013083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 16 May 2017 00:30:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318329 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 00:30:42 -0000 Author: mav Date: Tue May 16 00:30:40 2017 New Revision: 318329 URL: https://svnweb.freebsd.org/changeset/base/318329 Log: MFC r317696, r317723, r317836: Introduce sleepable locks into if_lagg. Before this change if_lagg was using nonsleepable rmlocks to protect its internal state. This patch introduces another sx lock to protect code paths that require sleeping, while still uses old rmlock to protect hot nonsleepable data paths. This change allows to remove taskqueue decoupling used before to change interface addresses without holding the lock. Instead it uses sx lock to protect direct if_ioctl() calls. As another bonus, the new code synchronizes enabled capabilities of member interfaces, and allows to control them with ifconfig laggX, that was impossible before. This part should fix interoperation with if_bridge, that may need to disable some capabilities, such as TXCSUM or LRO, to allow bridging with noncapable interfaces. Modified: stable/11/sys/net/if_lagg.c stable/11/sys/net/if_lagg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_lagg.c ============================================================================== --- stable/11/sys/net/if_lagg.c Tue May 16 00:21:03 2017 (r318328) +++ stable/11/sys/net/if_lagg.c Tue May 16 00:30:40 2017 (r318329) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -98,10 +99,7 @@ static VNET_DEFINE(struct if_clone *, la #define V_lagg_cloner VNET(lagg_cloner) static const char laggname[] = "lagg"; -static void lagg_lladdr(struct lagg_softc *, uint8_t *); static void lagg_capabilities(struct lagg_softc *); -static void lagg_port_lladdr(struct lagg_port *, uint8_t *, lagg_llqtype); -static void lagg_port_setlladdr(void *, int); static int lagg_port_create(struct lagg_softc *, struct ifnet *); static int lagg_port_destroy(struct lagg_port *, int); static struct mbuf *lagg_input(struct ifnet *, struct mbuf *); @@ -118,8 +116,9 @@ static void lagg_port2req(struct lagg_po static void lagg_init(void *); static void lagg_stop(struct lagg_softc *); static int lagg_ioctl(struct ifnet *, u_long, caddr_t); -static int lagg_ether_setmulti(struct lagg_softc *); -static int lagg_ether_cmdmulti(struct lagg_port *, int); +static int lagg_setmulti(struct lagg_port *); +static int lagg_clrmulti(struct lagg_port *); +static int lagg_setcaps(struct lagg_port *, int cap); static int lagg_setflag(struct lagg_port *, int, int, int (*func)(struct ifnet *, int)); static int lagg_setflags(struct lagg_port *, int status); @@ -311,6 +310,7 @@ static void lagg_proto_attach(struct lagg_softc *sc, lagg_proto pr) { + LAGG_XLOCK_ASSERT(sc); KASSERT(sc->sc_proto == LAGG_PROTO_NONE, ("%s: sc %p has proto", __func__, sc)); @@ -327,8 +327,8 @@ lagg_proto_detach(struct lagg_softc *sc) { lagg_proto pr; + LAGG_XLOCK_ASSERT(sc); LAGG_WLOCK_ASSERT(sc); - pr = sc->sc_proto; sc->sc_proto = LAGG_PROTO_NONE; @@ -427,15 +427,14 @@ lagg_register_vlan(void *arg, struct ifn { struct lagg_softc *sc = ifp->if_softc; struct lagg_port *lp; - struct rm_priotracker tracker; if (ifp->if_softc != arg) /* Not our event */ return; - LAGG_RLOCK(sc, &tracker); + LAGG_SLOCK(sc); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) EVENTHANDLER_INVOKE(vlan_config, lp->lp_ifp, vtag); - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); } /* @@ -447,15 +446,14 @@ lagg_unregister_vlan(void *arg, struct i { struct lagg_softc *sc = ifp->if_softc; struct lagg_port *lp; - struct rm_priotracker tracker; if (ifp->if_softc != arg) /* Not our event */ return; - LAGG_RLOCK(sc, &tracker); + LAGG_SLOCK(sc); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) EVENTHANDLER_INVOKE(vlan_unconfig, lp->lp_ifp, vtag); - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); } static int @@ -471,7 +469,10 @@ lagg_clone_create(struct if_clone *ifc, free(sc, M_DEVBUF); return (ENOSPC); } + LAGG_LOCK_INIT(sc); + LAGG_SX_INIT(sc); + LAGG_XLOCK(sc); if (V_def_use_flowid) sc->sc_opts |= LAGG_OPT_USE_FLOWID; sc->flowid_shift = V_def_flowid_shift; @@ -481,9 +482,7 @@ lagg_clone_create(struct if_clone *ifc, lagg_proto_attach(sc, LAGG_PROTO_DEFAULT); - LAGG_LOCK_INIT(sc); SLIST_INIT(&sc->sc_ports); - TASK_INIT(&sc->sc_lladdr_task, 0, lagg_port_setlladdr, sc); /* Initialise pseudo media types */ ifmedia_init(&sc->sc_media, 0, lagg_media_change, @@ -516,6 +515,7 @@ lagg_clone_create(struct if_clone *ifc, LAGG_LIST_LOCK(); SLIST_INSERT_HEAD(&V_lagg_list, sc, sc_entries); LAGG_LIST_UNLOCK(); + LAGG_XUNLOCK(sc); return (0); } @@ -526,8 +526,8 @@ lagg_clone_destroy(struct ifnet *ifp) struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; struct lagg_port *lp; - LAGG_WLOCK(sc); - + LAGG_XLOCK(sc); + sc->sc_destroying = 1; lagg_stop(sc); ifp->if_flags &= ~IFF_UP; @@ -535,15 +535,15 @@ lagg_clone_destroy(struct ifnet *ifp) EVENTHANDLER_DEREGISTER(vlan_unconfig, sc->vlan_detach); /* Shutdown and remove lagg ports */ - while ((lp = SLIST_FIRST(&sc->sc_ports)) != NULL) { - lp->lp_detaching = LAGG_CLONE_DESTROY; + while ((lp = SLIST_FIRST(&sc->sc_ports)) != NULL) lagg_port_destroy(lp, 1); - } + /* Unhook the aggregation protocol */ + LAGG_WLOCK(sc); lagg_proto_detach(sc); LAGG_UNLOCK_ASSERT(sc); + LAGG_XUNLOCK(sc); - taskqueue_drain(taskqueue_swi, &sc->sc_lladdr_task); ifmedia_removeall(&sc->sc_media); ether_ifdetach(ifp); if_free(ifp); @@ -552,47 +552,11 @@ lagg_clone_destroy(struct ifnet *ifp) SLIST_REMOVE(&V_lagg_list, sc, lagg_softc, sc_entries); LAGG_LIST_UNLOCK(); + LAGG_SX_DESTROY(sc); LAGG_LOCK_DESTROY(sc); free(sc, M_DEVBUF); } -/* - * Set link-layer address on the lagg interface itself. - * - * Set noinline to be dtrace-friendly - */ -static __noinline void -lagg_lladdr(struct lagg_softc *sc, uint8_t *lladdr) -{ - struct ifnet *ifp = sc->sc_ifp; - struct lagg_port lp; - - if (memcmp(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN) == 0) - return; - - LAGG_WLOCK_ASSERT(sc); - /* - * Set the link layer address on the lagg interface. - * lagg_proto_lladdr() notifies the MAC change to - * the aggregation protocol. iflladdr_event handler which - * may trigger gratuitous ARPs for INET will be handled in - * a taskqueue. - */ - bcopy(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN); - lagg_proto_lladdr(sc); - - /* - * Send notification request for lagg interface - * itself. Note that new lladdr is already set. - */ - bzero(&lp, sizeof(lp)); - lp.lp_ifp = sc->sc_ifp; - lp.lp_softc = sc; - - /* Do not request lladdr change */ - lagg_port_lladdr(&lp, lladdr, LAGG_LLQTYPE_VIRT); -} - static void lagg_capabilities(struct lagg_softc *sc) { @@ -601,7 +565,7 @@ lagg_capabilities(struct lagg_softc *sc) u_long hwa = ~0UL; struct ifnet_hw_tsomax hw_tsomax; - LAGG_WLOCK_ASSERT(sc); + LAGG_XLOCK_ASSERT(sc); memset(&hw_tsomax, 0, sizeof(hw_tsomax)); @@ -629,97 +593,10 @@ lagg_capabilities(struct lagg_softc *sc) if_printf(sc->sc_ifp, "capabilities 0x%08x enabled 0x%08x\n", cap, ena); } -} - -/* - * Enqueue interface lladdr notification. - * If request is already queued, it is updated. - * If setting lladdr is also desired, @do_change has to be set to 1. - * - * Set noinline to be dtrace-friendly - */ -static __noinline void -lagg_port_lladdr(struct lagg_port *lp, uint8_t *lladdr, lagg_llqtype llq_type) -{ - struct lagg_softc *sc = lp->lp_softc; - struct ifnet *ifp = lp->lp_ifp; - struct lagg_llq *llq; - - LAGG_WLOCK_ASSERT(sc); - - /* - * Do not enqueue requests where lladdr is the same for - * "physical" interfaces (e.g. ports in lagg) - */ - if (llq_type == LAGG_LLQTYPE_PHYS && - memcmp(IF_LLADDR(ifp), lladdr, ETHER_ADDR_LEN) == 0) - return; - - /* Check to make sure its not already queued to be changed */ - SLIST_FOREACH(llq, &sc->sc_llq_head, llq_entries) { - if (llq->llq_ifp == ifp) { - /* Update lladdr, it may have changed */ - bcopy(lladdr, llq->llq_lladdr, ETHER_ADDR_LEN); - return; - } - } - - llq = malloc(sizeof(struct lagg_llq), M_DEVBUF, M_NOWAIT | M_ZERO); - if (llq == NULL) /* XXX what to do */ - return; - - if_ref(ifp); - llq->llq_ifp = ifp; - llq->llq_type = llq_type; - bcopy(lladdr, llq->llq_lladdr, ETHER_ADDR_LEN); - /* XXX: We should insert to tail */ - SLIST_INSERT_HEAD(&sc->sc_llq_head, llq, llq_entries); - - taskqueue_enqueue(taskqueue_swi, &sc->sc_lladdr_task); -} - -/* - * Set the interface MAC address from a taskqueue to avoid a LOR. - * - * Set noinline to be dtrace-friendly - */ -static __noinline void -lagg_port_setlladdr(void *arg, int pending) -{ - struct lagg_softc *sc = (struct lagg_softc *)arg; - struct lagg_llq *llq, *head; - struct ifnet *ifp; - - /* Grab a local reference of the queue and remove it from the softc */ - LAGG_WLOCK(sc); - head = SLIST_FIRST(&sc->sc_llq_head); - SLIST_FIRST(&sc->sc_llq_head) = NULL; - LAGG_WUNLOCK(sc); - - /* - * Traverse the queue and set the lladdr on each ifp. It is safe to do - * unlocked as we have the only reference to it. - */ - for (llq = head; llq != NULL; llq = head) { - ifp = llq->llq_ifp; - CURVNET_SET(ifp->if_vnet); - - /* - * Set the link layer address on the laggport interface. - * Note that if_setlladdr() or iflladdr_event handler - * may result in arp transmission / lltable updates. - */ - if (llq->llq_type == LAGG_LLQTYPE_PHYS) - if_setlladdr(ifp, llq->llq_lladdr, - ETHER_ADDR_LEN); - else - EVENTHANDLER_INVOKE(iflladdr_event, ifp); - CURVNET_RESTORE(); - head = SLIST_NEXT(llq, llq_entries); - if_rele(ifp); - free(llq, M_DEVBUF); - } + /* Apply unified capabilities back to the lagg ports. */ + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) + lagg_setcaps(lp, ena); } static int @@ -730,7 +607,7 @@ lagg_port_create(struct lagg_softc *sc, int error, i; uint64_t *pval; - LAGG_WLOCK_ASSERT(sc); + LAGG_XLOCK_ASSERT(sc); /* Limit the maximal number of lagg ports */ if (sc->sc_count >= LAGG_MAX_PORTS) @@ -758,9 +635,8 @@ lagg_port_create(struct lagg_softc *sc, return (EINVAL); } - if ((lp = malloc(sizeof(struct lagg_port), - M_DEVBUF, M_NOWAIT|M_ZERO)) == NULL) - return (ENOMEM); + lp = malloc(sizeof(struct lagg_port), M_DEVBUF, M_WAITOK|M_ZERO); + lp->lp_softc = sc; /* Check if port is a stacked lagg */ LAGG_LIST_LOCK(); @@ -783,6 +659,26 @@ lagg_port_create(struct lagg_softc *sc, } LAGG_LIST_UNLOCK(); + if_ref(ifp); + lp->lp_ifp = ifp; + + bcopy(IF_LLADDR(ifp), lp->lp_lladdr, ETHER_ADDR_LEN); + lp->lp_ifcapenable = ifp->if_capenable; + if (SLIST_EMPTY(&sc->sc_ports)) { + LAGG_WLOCK(sc); + bcopy(IF_LLADDR(ifp), IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); + lagg_proto_lladdr(sc); + LAGG_WUNLOCK(sc); + EVENTHANDLER_INVOKE(iflladdr_event, sc->sc_ifp); + } else { + if_setlladdr(ifp, IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); + } + lagg_setflags(lp, 1); + + LAGG_WLOCK(sc); + if (SLIST_EMPTY(&sc->sc_ports)) + sc->sc_primary = lp; + /* Change the interface type */ lp->lp_iftype = ifp->if_type; ifp->if_type = IFT_IEEE8023ADLAG; @@ -792,25 +688,10 @@ lagg_port_create(struct lagg_softc *sc, lp->lp_output = ifp->if_output; ifp->if_output = lagg_port_output; - if_ref(ifp); - lp->lp_ifp = ifp; - lp->lp_softc = sc; - - /* Save port link layer address */ - bcopy(IF_LLADDR(ifp), lp->lp_lladdr, ETHER_ADDR_LEN); - - if (SLIST_EMPTY(&sc->sc_ports)) { - sc->sc_primary = lp; - /* First port in lagg. Update/notify lagg lladdress */ - lagg_lladdr(sc, IF_LLADDR(ifp)); - } else { - - /* - * Update link layer address for this port and - * send notifications to other subsystems. - */ - lagg_port_lladdr(lp, IF_LLADDR(sc->sc_ifp), LAGG_LLQTYPE_PHYS); - } + /* Read port counters */ + pval = lp->port_counters.val; + for (i = 0; i < IFCOUNTERS; i++, pval++) + *pval = ifp->if_get_counter(ifp, i); /* * Insert into the list of ports. @@ -831,24 +712,21 @@ lagg_port_create(struct lagg_softc *sc, SLIST_INSERT_HEAD(&sc->sc_ports, lp, lp_entries); sc->sc_count++; - /* Update lagg capabilities */ - lagg_capabilities(sc); - lagg_linkstate(sc); - - /* Read port counters */ - pval = lp->port_counters.val; - for (i = 0; i < IFCOUNTERS; i++, pval++) - *pval = ifp->if_get_counter(ifp, i); - /* Add multicast addresses and interface flags to this port */ - lagg_ether_cmdmulti(lp, 1); - lagg_setflags(lp, 1); + lagg_setmulti(lp); if ((error = lagg_proto_addport(sc, lp)) != 0) { /* Remove the port, without calling pr_delport. */ lagg_port_destroy(lp, 0); + LAGG_UNLOCK_ASSERT(sc); return (error); } + LAGG_WUNLOCK(sc); + + /* Update lagg capabilities */ + lagg_capabilities(sc); + lagg_linkstate(sc); + return (0); } @@ -860,8 +738,7 @@ lagg_port_checkstacking(struct lagg_soft struct lagg_port *lp; int m = 0; - LAGG_WLOCK_ASSERT(sc); - + LAGG_SXLOCK_ASSERT(sc); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { if (lp->lp_flags & LAGG_PORT_STACK) { sc_ptr = (struct lagg_softc *)lp->lp_ifp->if_softc; @@ -878,25 +755,20 @@ lagg_port_destroy(struct lagg_port *lp, { struct lagg_softc *sc = lp->lp_softc; struct lagg_port *lp_ptr, *lp0; - struct lagg_llq *llq; struct ifnet *ifp = lp->lp_ifp; uint64_t *pval, vdiff; int i; - LAGG_WLOCK_ASSERT(sc); + LAGG_XLOCK_ASSERT(sc); - if (rundelport) + if (rundelport) { + LAGG_WLOCK(sc); lagg_proto_delport(sc, lp); + } else + LAGG_WLOCK_ASSERT(sc); - /* - * Remove multicast addresses and interface flags from this port and - * reset the MAC address, skip if the interface is being detached. - */ - if (lp->lp_detaching == 0) { - lagg_ether_cmdmulti(lp, 0); - lagg_setflags(lp, 0); - lagg_port_lladdr(lp, lp->lp_lladdr, LAGG_LLQTYPE_PHYS); - } + if (lp->lp_detaching == 0) + lagg_clrmulti(lp); /* Restore interface */ ifp->if_type = lp->lp_iftype; @@ -919,43 +791,37 @@ lagg_port_destroy(struct lagg_port *lp, if (lp == sc->sc_primary) { uint8_t lladdr[ETHER_ADDR_LEN]; - if ((lp0 = SLIST_FIRST(&sc->sc_ports)) == NULL) { + if ((lp0 = SLIST_FIRST(&sc->sc_ports)) == NULL) bzero(&lladdr, ETHER_ADDR_LEN); - } else { - bcopy(lp0->lp_lladdr, - lladdr, ETHER_ADDR_LEN); - } - if (lp->lp_detaching != LAGG_CLONE_DESTROY) - lagg_lladdr(sc, lladdr); - - /* Mark lp0 as new primary */ + else + bcopy(lp0->lp_lladdr, lladdr, ETHER_ADDR_LEN); sc->sc_primary = lp0; + if (sc->sc_destroying == 0) { + bcopy(lladdr, IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); + lagg_proto_lladdr(sc); + LAGG_WUNLOCK(sc); + EVENTHANDLER_INVOKE(iflladdr_event, sc->sc_ifp); + } else + LAGG_WUNLOCK(sc); /* - * Enqueue lladdr update/notification for each port - * (new primary needs update as well, to switch from - * old lladdr to its 'real' one). + * Update lladdr for each port (new primary needs update + * as well, to switch from old lladdr to its 'real' one) */ SLIST_FOREACH(lp_ptr, &sc->sc_ports, lp_entries) - lagg_port_lladdr(lp_ptr, lladdr, LAGG_LLQTYPE_PHYS); - } - - /* Remove any pending lladdr changes from the queue */ - if (lp->lp_detaching != 0) { - SLIST_FOREACH(llq, &sc->sc_llq_head, llq_entries) { - if (llq->llq_ifp == ifp) { - SLIST_REMOVE(&sc->sc_llq_head, llq, lagg_llq, - llq_entries); - if_rele(llq->llq_ifp); - free(llq, M_DEVBUF); - break; /* Only appears once */ - } - } - } + if_setlladdr(lp_ptr->lp_ifp, lladdr, ETHER_ADDR_LEN); + } else + LAGG_WUNLOCK(sc); if (lp->lp_ifflags) if_printf(ifp, "%s: lp_ifflags unclean\n", __func__); + if (lp->lp_detaching == 0) { + lagg_setflags(lp, 0); + lagg_setcaps(lp, lp->lp_ifcapenable); + if_setlladdr(ifp, lp->lp_lladdr, ETHER_ADDR_LEN); + } + if_rele(ifp); free(lp, M_DEVBUF); @@ -973,7 +839,6 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon struct lagg_softc *sc; struct lagg_port *lp = NULL; int error = 0; - struct rm_priotracker tracker; /* Should be checked by the caller */ if (ifp->if_type != IFT_IEEE8023ADLAG || @@ -988,15 +853,15 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon break; } - LAGG_RLOCK(sc, &tracker); + LAGG_SLOCK(sc); if ((lp = ifp->if_lagg) == NULL || lp->lp_softc != sc) { error = ENOENT; - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); break; } lagg_port2req(lp, rp); - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); break; case SIOCSIFCAP: @@ -1009,9 +874,9 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon break; /* Update lagg interface capabilities */ - LAGG_WLOCK(sc); + LAGG_XLOCK(sc); lagg_capabilities(sc); - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); break; case SIOCSIFMTU: @@ -1121,10 +986,10 @@ lagg_port_ifdetach(void *arg __unused, s sc = lp->lp_softc; - LAGG_WLOCK(sc); - lp->lp_detaching = LAGG_PORT_DETACH; + LAGG_XLOCK(sc); + lp->lp_detaching = 1; lagg_port_destroy(lp, 1); - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); } static void @@ -1174,10 +1039,11 @@ lagg_init(void *xsc) struct ifnet *ifp = sc->sc_ifp; struct lagg_port *lp; - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + LAGG_XLOCK(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + LAGG_XUNLOCK(sc); return; - - LAGG_WLOCK(sc); + } ifp->if_drv_flags |= IFF_DRV_RUNNING; @@ -1186,12 +1052,15 @@ lagg_init(void *xsc) * This might be if_setlladdr() notification * that lladdr has been changed. */ - SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) - lagg_port_lladdr(lp, IF_LLADDR(ifp), LAGG_LLQTYPE_PHYS); + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { + if (memcmp(IF_LLADDR(ifp), IF_LLADDR(lp->lp_ifp), + ETHER_ADDR_LEN) != 0) + if_setlladdr(lp->lp_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); + } lagg_proto_init(sc); - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); } static void @@ -1199,7 +1068,7 @@ lagg_stop(struct lagg_softc *sc) { struct ifnet *ifp = sc->sc_ifp; - LAGG_WLOCK_ASSERT(sc); + LAGG_XLOCK_ASSERT(sc); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; @@ -1223,22 +1092,14 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd struct thread *td = curthread; char *buf, *outbuf; int count, buflen, len, error = 0; - struct rm_priotracker tracker; bzero(&rpbuf, sizeof(rpbuf)); switch (cmd) { case SIOCGLAGG: - LAGG_RLOCK(sc, &tracker); - count = 0; - SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) - count++; - buflen = count * sizeof(struct lagg_reqport); - LAGG_RUNLOCK(sc, &tracker); - + LAGG_SLOCK(sc); + buflen = sc->sc_count * sizeof(struct lagg_reqport); outbuf = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); - - LAGG_RLOCK(sc, &tracker); ra->ra_proto = sc->sc_proto; lagg_proto_request(sc, &ra->ra_psc); count = 0; @@ -1254,7 +1115,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd buf += sizeof(rpbuf); len -= sizeof(rpbuf); } - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); ra->ra_ports = count; ra->ra_size = count * sizeof(rpbuf); error = copyout(outbuf, ra->ra_port, ra->ra_size); @@ -1269,12 +1130,15 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } + LAGG_XLOCK(sc); LAGG_WLOCK(sc); lagg_proto_detach(sc); LAGG_UNLOCK_ASSERT(sc); lagg_proto_attach(sc, ra->ra_proto); + LAGG_XUNLOCK(sc); break; case SIOCGLAGGOPTS: + LAGG_SLOCK(sc); ro->ro_opts = sc->sc_opts; if (sc->sc_proto == LAGG_PROTO_LACP) { struct lacp_softc *lsc; @@ -1298,6 +1162,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd ro->ro_bkt = sc->sc_bkt; ro->ro_flapping = sc->sc_flapping; ro->ro_flowid_shift = sc->flowid_shift; + LAGG_SUNLOCK(sc); break; case SIOCSLAGGOPTS: if (sc->sc_proto == LAGG_PROTO_ROUNDROBIN) { @@ -1339,13 +1204,13 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } - LAGG_WLOCK(sc); + LAGG_XLOCK(sc); if (valid == 0 || (lacp == 1 && sc->sc_proto != LAGG_PROTO_LACP)) { /* Invalid combination of options specified. */ error = EINVAL; - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); break; /* Return from SIOCSLAGGOPTS. */ } /* @@ -1400,18 +1265,18 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } } - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); break; case SIOCGLAGGFLAGS: rf->rf_flags = 0; - LAGG_RLOCK(sc, &tracker); + LAGG_SLOCK(sc); if (sc->sc_flags & MBUF_HASHFLAG_L2) rf->rf_flags |= LAGG_F_HASHL2; if (sc->sc_flags & MBUF_HASHFLAG_L3) rf->rf_flags |= LAGG_F_HASHL3; if (sc->sc_flags & MBUF_HASHFLAG_L4) rf->rf_flags |= LAGG_F_HASHL4; - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); break; case SIOCSLAGGHASH: error = priv_check(td, PRIV_NET_LAGG); @@ -1421,7 +1286,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd error = EINVAL; break; } - LAGG_WLOCK(sc); + LAGG_XLOCK(sc); sc->sc_flags = 0; if (rf->rf_flags & LAGG_F_HASHL2) sc->sc_flags |= MBUF_HASHFLAG_L2; @@ -1429,7 +1294,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd sc->sc_flags |= MBUF_HASHFLAG_L3; if (rf->rf_flags & LAGG_F_HASHL4) sc->sc_flags |= MBUF_HASHFLAG_L4; - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); break; case SIOCGLAGGPORT: if (rp->rp_portname[0] == '\0' || @@ -1438,17 +1303,17 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } - LAGG_RLOCK(sc, &tracker); + LAGG_SLOCK(sc); if ((lp = (struct lagg_port *)tpif->if_lagg) == NULL || lp->lp_softc != sc) { error = ENOENT; - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); if_rele(tpif); break; } lagg_port2req(lp, rp); - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); if_rele(tpif); break; case SIOCSLAGGPORT: @@ -1480,9 +1345,9 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd tpif->if_xname); } #endif - LAGG_WLOCK(sc); + LAGG_XLOCK(sc); error = lagg_port_create(sc, tpif); - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); if_rele(tpif); break; case SIOCSLAGGDELPORT: @@ -1495,26 +1360,25 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } - LAGG_WLOCK(sc); + LAGG_XLOCK(sc); if ((lp = (struct lagg_port *)tpif->if_lagg) == NULL || lp->lp_softc != sc) { error = ENOENT; - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); if_rele(tpif); break; } error = lagg_port_destroy(lp, 1); - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); if_rele(tpif); break; case SIOCSIFFLAGS: /* Set flags on ports too */ - LAGG_WLOCK(sc); + LAGG_XLOCK(sc); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { lagg_setflags(lp, 1); } - LAGG_WUNLOCK(sc); if (!(ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -1522,23 +1386,28 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd * If interface is marked down and it is running, * then stop and disable it. */ - LAGG_WLOCK(sc); lagg_stop(sc); - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); } else if ((ifp->if_flags & IFF_UP) && !(ifp->if_drv_flags & IFF_DRV_RUNNING)) { /* * If interface is marked up and it is stopped, then * start it. */ + LAGG_XUNLOCK(sc); (*ifp->if_init)(sc); - } + } else + LAGG_XUNLOCK(sc); break; case SIOCADDMULTI: case SIOCDELMULTI: LAGG_WLOCK(sc); - error = lagg_ether_setmulti(sc); + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { + lagg_clrmulti(lp); + lagg_setmulti(lp); + } LAGG_WUNLOCK(sc); + error = 0; break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: @@ -1546,8 +1415,18 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCSIFCAP: + LAGG_XLOCK(sc); + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { + if (lp->lp_ioctl != NULL) + (*lp->lp_ioctl)(lp->lp_ifp, cmd, data); + } + lagg_capabilities(sc); + LAGG_XUNLOCK(sc); + error = 0; + break; + case SIOCSIFMTU: - /* Do not allow the MTU or caps to be directly changed */ + /* Do not allow the MTU to be directly changed */ error = EINVAL; break; @@ -1559,67 +1438,69 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd } static int -lagg_ether_setmulti(struct lagg_softc *sc) +lagg_setmulti(struct lagg_port *lp) { - struct lagg_port *lp; + struct lagg_softc *sc = lp->lp_softc; + struct ifnet *ifp = lp->lp_ifp; + struct ifnet *scifp = sc->sc_ifp; + struct lagg_mc *mc; + struct ifmultiaddr *ifma; + int error; LAGG_WLOCK_ASSERT(sc); - - SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { - /* First, remove any existing filter entries. */ - lagg_ether_cmdmulti(lp, 0); - /* copy all addresses from the lagg interface to the port */ - lagg_ether_cmdmulti(lp, 1); + IF_ADDR_WLOCK(scifp); + TAILQ_FOREACH(ifma, &scifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + mc = malloc(sizeof(struct lagg_mc), M_DEVBUF, M_NOWAIT); + if (mc == NULL) { + IF_ADDR_WUNLOCK(scifp); + return (ENOMEM); + } + bcopy(ifma->ifma_addr, &mc->mc_addr, + ifma->ifma_addr->sa_len); + mc->mc_addr.sdl_index = ifp->if_index; + mc->mc_ifma = NULL; + SLIST_INSERT_HEAD(&lp->lp_mc_head, mc, mc_entries); + } + IF_ADDR_WUNLOCK(scifp); + SLIST_FOREACH (mc, &lp->lp_mc_head, mc_entries) { + error = if_addmulti(ifp, + (struct sockaddr *)&mc->mc_addr, &mc->mc_ifma); + if (error) + return (error); } return (0); } static int -lagg_ether_cmdmulti(struct lagg_port *lp, int set) +lagg_clrmulti(struct lagg_port *lp) { - struct lagg_softc *sc = lp->lp_softc; - struct ifnet *ifp = lp->lp_ifp; - struct ifnet *scifp = sc->sc_ifp; struct lagg_mc *mc; - struct ifmultiaddr *ifma; - int error; - LAGG_WLOCK_ASSERT(sc); - - if (set) { - IF_ADDR_WLOCK(scifp); - TAILQ_FOREACH(ifma, &scifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_LINK) - continue; - mc = malloc(sizeof(struct lagg_mc), M_DEVBUF, M_NOWAIT); - if (mc == NULL) { - IF_ADDR_WUNLOCK(scifp); - return (ENOMEM); - } - bcopy(ifma->ifma_addr, &mc->mc_addr, - ifma->ifma_addr->sa_len); - mc->mc_addr.sdl_index = ifp->if_index; - mc->mc_ifma = NULL; - SLIST_INSERT_HEAD(&lp->lp_mc_head, mc, mc_entries); - } - IF_ADDR_WUNLOCK(scifp); - SLIST_FOREACH (mc, &lp->lp_mc_head, mc_entries) { - error = if_addmulti(ifp, - (struct sockaddr *)&mc->mc_addr, &mc->mc_ifma); - if (error) - return (error); - } - } else { - while ((mc = SLIST_FIRST(&lp->lp_mc_head)) != NULL) { - SLIST_REMOVE(&lp->lp_mc_head, mc, lagg_mc, mc_entries); - if (mc->mc_ifma && lp->lp_detaching == 0) - if_delmulti_ifma(mc->mc_ifma); - free(mc, M_DEVBUF); - } + LAGG_WLOCK_ASSERT(lp->lp_softc); + while ((mc = SLIST_FIRST(&lp->lp_mc_head)) != NULL) { + SLIST_REMOVE(&lp->lp_mc_head, mc, lagg_mc, mc_entries); + if (mc->mc_ifma && lp->lp_detaching == 0) + if_delmulti_ifma(mc->mc_ifma); + free(mc, M_DEVBUF); } return (0); } +static int +lagg_setcaps(struct lagg_port *lp, int cap) +{ + struct ifreq ifr; + + if (lp->lp_ifp->if_capenable == cap) + return (0); + if (lp->lp_ioctl == NULL) + return (ENXIO); + ifr.ifr_reqcap = cap; + return ((*lp->lp_ioctl)(lp->lp_ifp, SIOCSIFCAP, (caddr_t)&ifr)); +} + /* Handle a ref counted flag that should be set on the lagg port as well */ static int lagg_setflag(struct lagg_port *lp, int flag, int status, @@ -1630,7 +1511,7 @@ lagg_setflag(struct lagg_port *lp, int f struct ifnet *ifp = lp->lp_ifp; int error; - LAGG_WLOCK_ASSERT(sc); + LAGG_XLOCK_ASSERT(sc); status = status ? (scifp->if_flags & flag) : 0; /* Now "status" contains the flag value or 0 */ @@ -1764,17 +1645,16 @@ lagg_media_status(struct ifnet *ifp, str { struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; struct lagg_port *lp; - struct rm_priotracker tracker; imr->ifm_status = IFM_AVALID; imr->ifm_active = IFM_ETHER | IFM_AUTO; - LAGG_RLOCK(sc, &tracker); + LAGG_SLOCK(sc); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { if (LAGG_PORTACTIVE(lp)) imr->ifm_status |= IFM_ACTIVE; } - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); } static void @@ -1784,6 +1664,8 @@ lagg_linkstate(struct lagg_softc *sc) int new_link = LINK_STATE_DOWN; uint64_t speed; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue May 16 00:33:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5E8DD6CF38; Tue, 16 May 2017 00:33:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0FE418EF; Tue, 16 May 2017 00:33:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G0XkBV016756; Tue, 16 May 2017 00:33:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G0Xk9D016755; Tue, 16 May 2017 00:33:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705160033.v4G0Xk9D016755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 16 May 2017 00:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318330 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 00:33:47 -0000 Author: mav Date: Tue May 16 00:33:46 2017 New Revision: 318330 URL: https://svnweb.freebsd.org/changeset/base/318330 Log: MFC r317547: Allow some control over enabled capabilities for if_vlan. It improves interoperability with if_bridge, which may need to disable some capabilities not supported by other members. IMHO there is still open question about LRO capability, which may need to be disabled on physical interface. Modified: stable/11/sys/net/if_vlan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_vlan.c ============================================================================== --- stable/11/sys/net/if_vlan.c Tue May 16 00:30:40 2017 (r318329) +++ stable/11/sys/net/if_vlan.c Tue May 16 00:33:46 2017 (r318330) @@ -112,6 +112,7 @@ struct ifvlan { #define PARENT(ifv) ((ifv)->ifv_trunk->parent) void *ifv_cookie; int ifv_pflags; /* special flags we have set on parent */ + int ifv_capenable; struct ifv_linkmib { int ifvm_encaplen; /* encapsulation length */ int ifvm_mtufudge; /* MTU fudged by this much */ @@ -1286,6 +1287,7 @@ exists: ifv->ifv_encaplen = ETHER_VLAN_ENCAP_LEN; ifv->ifv_mintu = ETHERMIN; ifv->ifv_pflags = 0; + ifv->ifv_capenable = -1; /* * If the parent supports the VLAN_MTU capability, @@ -1537,9 +1539,14 @@ vlan_capabilities(struct ifvlan *ifv) struct ifnet *p = PARENT(ifv); struct ifnet *ifp = ifv->ifv_ifp; struct ifnet_hw_tsomax hw_tsomax; + int cap = 0, ena = 0, mena; + u_long hwa = 0; TRUNK_LOCK_ASSERT(TRUNK(ifv)); + /* Mask parent interface enabled capabilities disabled by user. */ + mena = p->if_capenable & ifv->ifv_capenable; + /* * If the parent interface can do checksum offloading * on VLANs, then propagate its hardware-assisted @@ -1547,20 +1554,18 @@ vlan_capabilities(struct ifvlan *ifv) * offloading requires hardware VLAN tagging. */ if (p->if_capabilities & IFCAP_VLAN_HWCSUM) - ifp->if_capabilities = - p->if_capabilities & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); - + cap |= p->if_capabilities & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); if (p->if_capenable & IFCAP_VLAN_HWCSUM && p->if_capenable & IFCAP_VLAN_HWTAGGING) { - ifp->if_capenable = - p->if_capenable & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); - ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP | - CSUM_UDP | CSUM_SCTP | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | - CSUM_SCTP_IPV6); - } else { - ifp->if_capenable = 0; - ifp->if_hwassist = 0; + ena |= mena & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); + if (ena & IFCAP_TXCSUM) + hwa |= p->if_hwassist & (CSUM_IP | CSUM_TCP | + CSUM_UDP | CSUM_SCTP); + if (ena & IFCAP_TXCSUM_IPV6) + hwa |= p->if_hwassist & (CSUM_TCP_IPV6 | + CSUM_UDP_IPV6 | CSUM_SCTP_IPV6); } + /* * If the parent interface can do TSO on VLANs then * propagate the hardware-assisted flag. TSO on VLANs @@ -1570,13 +1575,11 @@ vlan_capabilities(struct ifvlan *ifv) if_hw_tsomax_common(p, &hw_tsomax); if_hw_tsomax_update(ifp, &hw_tsomax); if (p->if_capabilities & IFCAP_VLAN_HWTSO) - ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO; + cap |= p->if_capabilities & IFCAP_TSO; if (p->if_capenable & IFCAP_VLAN_HWTSO) { - ifp->if_capenable |= p->if_capenable & IFCAP_TSO; - ifp->if_hwassist |= p->if_hwassist & CSUM_TSO; - } else { - ifp->if_capenable &= ~(p->if_capenable & IFCAP_TSO); - ifp->if_hwassist &= ~(p->if_hwassist & CSUM_TSO); + ena |= mena & IFCAP_TSO; + if (ena & IFCAP_TSO) + hwa |= p->if_hwassist & CSUM_TSO; } /* @@ -1589,11 +1592,22 @@ vlan_capabilities(struct ifvlan *ifv) */ #define IFCAP_VLAN_TOE IFCAP_TOE if (p->if_capabilities & IFCAP_VLAN_TOE) - ifp->if_capabilities |= p->if_capabilities & IFCAP_TOE; + cap |= p->if_capabilities & IFCAP_TOE; if (p->if_capenable & IFCAP_VLAN_TOE) { TOEDEV(ifp) = TOEDEV(p); - ifp->if_capenable |= p->if_capenable & IFCAP_TOE; + ena |= mena & IFCAP_TOE; } + + /* + * If the parent interface supports dynamic link state, so does the + * VLAN interface. + */ + cap |= (p->if_capabilities & IFCAP_LINKSTATE); + ena |= (mena & IFCAP_LINKSTATE); + + ifp->if_capabilities = cap; + ifp->if_capenable = ena; + ifp->if_hwassist = hwa; } static void @@ -1797,6 +1811,18 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd vlan_tag_recalculate(ifv); break; + case SIOCSIFCAP: + VLAN_LOCK(); + ifv->ifv_capenable = ifr->ifr_reqcap; + trunk = TRUNK(ifv); + if (trunk != NULL) { + TRUNK_LOCK(trunk); + vlan_capabilities(ifv); + TRUNK_UNLOCK(trunk); + } + VLAN_UNLOCK(); + break; + default: error = EINVAL; break; From owner-svn-src-all@freebsd.org Tue May 16 00:34:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F2E6D6D011; Tue, 16 May 2017 00:34:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 510371A7F; Tue, 16 May 2017 00:34:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G0YrBq016851; Tue, 16 May 2017 00:34:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G0YreL016850; Tue, 16 May 2017 00:34:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705160034.v4G0YreL016850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 16 May 2017 00:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318331 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 00:34:54 -0000 Author: mav Date: Tue May 16 00:34:53 2017 New Revision: 318331 URL: https://svnweb.freebsd.org/changeset/base/318331 Log: MFC r317585: Propagate IFCAP_LRO from trunk to vlan interface. False positive here cost nothing, while false negative may lead to some confusions. Modified: stable/11/sys/net/if_vlan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_vlan.c ============================================================================== --- stable/11/sys/net/if_vlan.c Tue May 16 00:33:46 2017 (r318330) +++ stable/11/sys/net/if_vlan.c Tue May 16 00:34:53 2017 (r318331) @@ -1583,6 +1583,16 @@ vlan_capabilities(struct ifvlan *ifv) } /* + * If the parent interface can do LRO and checksum offloading on + * VLANs, then guess it may do LRO on VLANs. False positive here + * cost nothing, while false negative may lead to some confusions. + */ + if (p->if_capabilities & IFCAP_VLAN_HWCSUM) + cap |= p->if_capabilities & IFCAP_LRO; + if (p->if_capenable & IFCAP_VLAN_HWCSUM) + ena |= p->if_capenable & IFCAP_LRO; + + /* * If the parent interface can offload TCP connections over VLANs then * propagate its TOE capability to the VLAN interface. * From owner-svn-src-all@freebsd.org Tue May 16 02:23:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 556B8D6F796; Tue, 16 May 2017 02:23:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2678E1DFE; Tue, 16 May 2017 02:23:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G2Nslx060902; Tue, 16 May 2017 02:23:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G2Nsjb060901; Tue, 16 May 2017 02:23:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705160223.v4G2Nsjb060901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 16 May 2017 02:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318332 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 02:23:55 -0000 Author: bdrewery Date: Tue May 16 02:23:54 2017 New Revision: 318332 URL: https://svnweb.freebsd.org/changeset/base/318332 Log: MFC r318092: PROGS+META_MODE: Avoid rebuilding common sources when recursing. Modified: stable/11/share/mk/bsd.progs.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.progs.mk ============================================================================== --- stable/11/share/mk/bsd.progs.mk Tue May 16 00:34:53 2017 (r318331) +++ stable/11/share/mk/bsd.progs.mk Tue May 16 02:23:54 2017 (r318332) @@ -87,11 +87,7 @@ $v = # handle being called [bsd.]progs.mk .include -.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) -# tell progs.mk we might want to install things -PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install - -# Find common sources among the PROGS and depend on them before building +# Find common sources among the PROGS to depend on them before building # anything. This allows parallelization without them each fighting over # the same objects. _PROGS_COMMON_SRCS= @@ -110,6 +106,20 @@ _PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS .if !empty(_PROGS_COMMON_SRCS:N*.[dhly]) _PROGS_COMMON_OBJS+= ${_PROGS_COMMON_SRCS:N*.[dhly]:R:S/$/.o/g} .endif +.endif + +# When recursing, ensure common sources are not rebuilt in META_MODE. +.if defined(_RECURSING_PROGS) && !empty(_PROGS_COMMON_OBJS) && \ + !empty(.MAKE.MODE:Mmeta) +${_PROGS_COMMON_OBJS}: .NOMETA +.endif + +.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) +# tell progs.mk we might want to install things +PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install + +# Ensure common objects are built before recursing. +.if !empty(_PROGS_COMMON_OBJS) ${PROGS}: ${_PROGS_COMMON_OBJS} .endif From owner-svn-src-all@freebsd.org Tue May 16 02:48:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA4B9D6F84A; Tue, 16 May 2017 02:48:47 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB186F44; Tue, 16 May 2017 02:48:47 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G2mk1n068886; Tue, 16 May 2017 02:48:46 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G2mkKb068885; Tue, 16 May 2017 02:48:46 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705160248.v4G2mkKb068885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 16 May 2017 02:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318333 - head/contrib/ipfilter/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 02:48:48 -0000 Author: cy Date: Tue May 16 02:48:46 2017 New Revision: 318333 URL: https://svnweb.freebsd.org/changeset/base/318333 Log: Implement ippool command line IPv6 address parse support (for the -i option). PR: 218433 Modified: head/contrib/ipfilter/tools/ippool.c Modified: head/contrib/ipfilter/tools/ippool.c ============================================================================== --- head/contrib/ipfilter/tools/ippool.c Tue May 16 02:23:54 2017 (r318332) +++ head/contrib/ipfilter/tools/ippool.c Tue May 16 02:48:46 2017 (r318333) @@ -1030,45 +1030,80 @@ int setnodeaddr(int type, int role, void *ptr, char *arg) { struct in_addr mask; + sa_family_t family; char *s; - s = strchr(arg, '/'); - if (s == NULL) - mask.s_addr = 0xffffffff; - else if (strchr(s, '.') == NULL) { - if (ntomask(AF_INET, atoi(s + 1), &mask.s_addr) != 0) - return -1; + if (strchr(arg, ':') == NULL) { + family = AF_INET; + s = strchr(arg, '/'); + if (s == NULL) + mask.s_addr = 0xffffffff; + else if (strchr(s, '.') == NULL) { + if (ntomask(AF_INET, atoi(s + 1), &mask.s_addr) != 0) + return -1; + } else { + mask.s_addr = inet_addr(s + 1); + } + if (s != NULL) + *s = '\0'; } else { - mask.s_addr = inet_addr(s + 1); + family = AF_INET6; + + /* XXX for now we use mask for IPv6 prefix length */ + /* XXX mask should be a union with prefix */ + /* XXX Currently address handling is sloppy. */ + + if ((s = strchr(arg, '/')) == NULL) + mask.s_addr = 128; + else + mask.s_addr = atoi(s + 1); } - if (s != NULL) - *s = '\0'; if (type == IPLT_POOL) { ip_pool_node_t *node = ptr; + node->ipn_addr.adf_family = family; + #ifdef USE_INET6 - if (node->ipn_addr.adf_family == AF_INET) + if (node->ipn_addr.adf_family == AF_INET) { #endif node->ipn_addr.adf_len = offsetof(addrfamily_t, adf_addr) + sizeof(struct in_addr); + node->ipn_addr.adf_addr.in4.s_addr = inet_addr(arg); #ifdef USE_INET6 - else + } else { node->ipn_addr.adf_len = offsetof(addrfamily_t, adf_addr) + sizeof(struct in6_addr); + inet_pton(AF_INET6, arg, + &node->ipn_addr.adf_addr.in6.s6_addr); + } #endif - node->ipn_addr.adf_addr.in4.s_addr = inet_addr(arg); node->ipn_mask.adf_len = node->ipn_addr.adf_len; node->ipn_mask.adf_addr.in4.s_addr = mask.s_addr; } else if (type == IPLT_HASH) { iphtent_t *node = ptr; - node->ipe_addr.in4.s_addr = inet_addr(arg); - node->ipe_mask.in4.s_addr = mask.s_addr; - node->ipe_family = AF_INET; - node->ipe_unit = role; + node->ipe_family = family; + node->ipe_unit = role; + +#ifdef USE_INET6 + if (node->ipe_family == AF_INET) { +#endif + node->ipe_addr.in4.s_addr = inet_addr(arg); + node->ipe_mask.in4.s_addr = mask.s_addr; +#ifdef USE_INET6 + } else { + inet_pton(AF_INET6, arg, + &node->ipe_addr.in6.__u6_addr.__u6_addr32); + node->ipe_mask.in6.__u6_addr.__u6_addr32[0] = + mask.s_addr; + node->ipe_mask.in6.__u6_addr.__u6_addr32[1] = + node->ipe_mask.in6.__u6_addr.__u6_addr32[2] = + node->ipe_mask.in6.__u6_addr.__u6_addr32[3] = 0; + } +#endif } return 0; From owner-svn-src-all@freebsd.org Tue May 16 03:12:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2440D6FA0F; Tue, 16 May 2017 03:12:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3F51166; Tue, 16 May 2017 03:12:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G3CpYu081468; Tue, 16 May 2017 03:12:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G3CpWN081467; Tue, 16 May 2017 03:12:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705160312.v4G3CpWN081467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 16 May 2017 03:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318334 - head/targets/pseudo/clang X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 03:12:52 -0000 Author: bdrewery Date: Tue May 16 03:12:51 2017 New Revision: 318334 URL: https://svnweb.freebsd.org/changeset/base/318334 Log: Enable llvm-objdump by default per r310775 Modified: head/targets/pseudo/clang/Makefile.depend Modified: head/targets/pseudo/clang/Makefile.depend ============================================================================== --- head/targets/pseudo/clang/Makefile.depend Tue May 16 02:48:46 2017 (r318333) +++ head/targets/pseudo/clang/Makefile.depend Tue May 16 03:12:51 2017 (r318334) @@ -9,6 +9,7 @@ DIRDEPS = \ share/doc/llvm/clang \ usr.bin/clang/clang \ usr.bin/clang/clang-tblgen \ + usr.bin/clang/llvm-objdump \ usr.bin/clang/llvm-tblgen \ .if ${MK_LLDB} == "yes" @@ -38,7 +39,6 @@ DIRDEPS+= \ usr.bin/clang/llvm-mc \ usr.bin/clang/llvm-modextract \ usr.bin/clang/llvm-nm \ - usr.bin/clang/llvm-objdump \ usr.bin/clang/llvm-pdbdump \ usr.bin/clang/llvm-profdata \ usr.bin/clang/llvm-rtdyld \ From owner-svn-src-all@freebsd.org Tue May 16 03:31:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D5BED6F65E; Tue, 16 May 2017 03:31:51 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 142C3104A; Tue, 16 May 2017 03:31:51 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G3Vovm087430; Tue, 16 May 2017 03:31:50 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G3VnhK087426; Tue, 16 May 2017 03:31:49 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705160331.v4G3VnhK087426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 16 May 2017 03:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318335 - in head/sys/powerpc: include powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 03:31:51 -0000 Author: jhibbits Date: Tue May 16 03:31:49 2017 New Revision: 318335 URL: https://svnweb.freebsd.org/changeset/base/318335 Log: Correct pa argument type for pmap_kenter_attr() Physical addresses are vm_paddr_t, not vm_offset_t. This can make a difference when sizeof(vm_offset_t) != sizeof(vm_paddr_t). Modified: head/sys/powerpc/include/pmap.h head/sys/powerpc/powerpc/bus_machdep.c head/sys/powerpc/powerpc/pmap_dispatch.c Modified: head/sys/powerpc/include/pmap.h ============================================================================== --- head/sys/powerpc/include/pmap.h Tue May 16 03:12:51 2017 (r318334) +++ head/sys/powerpc/include/pmap.h Tue May 16 03:31:49 2017 (r318335) @@ -251,7 +251,7 @@ extern struct pmap kernel_pmap_store; void pmap_bootstrap(vm_offset_t, vm_offset_t); void pmap_kenter(vm_offset_t va, vm_paddr_t pa); -void pmap_kenter_attr(vm_offset_t va, vm_offset_t pa, vm_memattr_t); +void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, vm_memattr_t); void pmap_kremove(vm_offset_t); void *pmap_mapdev(vm_paddr_t, vm_size_t); void *pmap_mapdev_attr(vm_paddr_t, vm_size_t, vm_memattr_t); Modified: head/sys/powerpc/powerpc/bus_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/bus_machdep.c Tue May 16 03:12:51 2017 (r318334) +++ head/sys/powerpc/powerpc/bus_machdep.c Tue May 16 03:31:49 2017 (r318335) @@ -105,8 +105,9 @@ bs_gen_map(bus_addr_t addr, bus_size_t s void bs_remap_earlyboot(void) { + vm_paddr_t pa, spa; + vm_offset_t va; int i; - vm_offset_t pa, spa, va; vm_memattr_t ma; for (i = 0; i < earlyboot_map_idx; i++) { Modified: head/sys/powerpc/powerpc/pmap_dispatch.c ============================================================================== --- head/sys/powerpc/powerpc/pmap_dispatch.c Tue May 16 03:12:51 2017 (r318334) +++ head/sys/powerpc/powerpc/pmap_dispatch.c Tue May 16 03:31:49 2017 (r318335) @@ -495,7 +495,7 @@ pmap_kenter(vm_offset_t va, vm_paddr_t p } void -pmap_kenter_attr(vm_offset_t va, vm_offset_t pa, vm_memattr_t ma) +pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, vm_memattr_t ma) { CTR4(KTR_PMAP, "%s(%#x, %#x, %#x)", __func__, va, pa, ma); From owner-svn-src-all@freebsd.org Tue May 16 04:47:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88665D6FFA5; Tue, 16 May 2017 04:47:52 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 490791F28; Tue, 16 May 2017 04:47:52 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G4lpgB018175; Tue, 16 May 2017 04:47:51 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G4lpJd018173; Tue, 16 May 2017 04:47:51 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201705160447.v4G4lpJd018173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 16 May 2017 04:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318336 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 04:47:52 -0000 Author: loos Date: Tue May 16 04:47:50 2017 New Revision: 318336 URL: https://svnweb.freebsd.org/changeset/base/318336 Log: Add the SDHCI Address Decoder registers and routines for ARMADA 38X. Tested on: ClearFog Pro Reviewed by: Marcin Wojtas Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D10601 Modified: head/sys/arm/mv/mv_common.c head/sys/arm/mv/mvwin.h Modified: head/sys/arm/mv/mv_common.c ============================================================================== --- head/sys/arm/mv/mv_common.c Tue May 16 03:31:49 2017 (r318335) +++ head/sys/arm/mv/mv_common.c Tue May 16 04:47:50 2017 (r318336) @@ -82,6 +82,7 @@ static int decode_win_usb3_valid(void); static int decode_win_eth_valid(void); static int decode_win_pcie_valid(void); static int decode_win_sata_valid(void); +static int decode_win_sdhci_valid(void); static int decode_win_idma_valid(void); static int decode_win_xor_valid(void); @@ -95,6 +96,7 @@ static void decode_win_usb3_setup(u_long static void decode_win_eth_setup(u_long); static void decode_win_sata_setup(u_long); static void decode_win_ahci_setup(u_long); +static void decode_win_sdhci_setup(u_long); static void decode_win_idma_setup(u_long); static void decode_win_xor_setup(u_long); @@ -105,6 +107,7 @@ static void decode_win_eth_dump(u_long b static void decode_win_idma_dump(u_long base); static void decode_win_xor_dump(u_long base); static void decode_win_ahci_dump(u_long base); +static void decode_win_sdhci_dump(u_long); static int fdt_get_ranges(const char *, void *, int, int *, int *); #ifdef SOC_MV_ARMADA38X @@ -138,6 +141,7 @@ static struct soc_node_spec soc_nodes[] { "mrvl,usb-ehci", &decode_win_usb_setup, &decode_win_usb_dump }, { "marvell,armada-380-xhci", &decode_win_usb3_setup, &decode_win_usb3_dump }, { "marvell,armada-380-ahci", &decode_win_ahci_setup, &decode_win_ahci_dump }, + { "marvell,armada-380-sdhci", &decode_win_sdhci_setup, &decode_win_sdhci_dump }, { "mrvl,sata", &decode_win_sata_setup, NULL }, { "mrvl,xor", &decode_win_xor_setup, &decode_win_xor_dump }, { "mrvl,idma", &decode_win_idma_setup, &decode_win_idma_dump }, @@ -568,7 +572,8 @@ soc_decode_win(void) if (!decode_win_cpu_valid() || !decode_win_usb_valid() || !decode_win_eth_valid() || !decode_win_idma_valid() || !decode_win_pcie_valid() || !decode_win_sata_valid() || - !decode_win_xor_valid() || !decode_win_usb3_valid()) + !decode_win_xor_valid() || !decode_win_usb3_valid() || + !decode_win_sdhci_valid()) return (EINVAL); decode_win_cpu_setup(); @@ -659,6 +664,11 @@ WIN_REG_BASE_IDX_RD(win_sata, sz, MV_WIN WIN_REG_BASE_IDX_WR(win_sata, sz, MV_WIN_SATA_SIZE); #endif +WIN_REG_BASE_IDX_RD(win_sdhci, cr, MV_WIN_SDHCI_CTRL); +WIN_REG_BASE_IDX_RD(win_sdhci, br, MV_WIN_SDHCI_BASE); +WIN_REG_BASE_IDX_WR(win_sdhci, cr, MV_WIN_SDHCI_CTRL); +WIN_REG_BASE_IDX_WR(win_sdhci, br, MV_WIN_SDHCI_BASE); + #ifndef SOC_MV_DOVE WIN_REG_IDX_RD(ddr, br, MV_WIN_DDR_BASE, MV_DDR_CADR_BASE) WIN_REG_IDX_RD(ddr, sz, MV_WIN_DDR_SIZE, MV_DDR_CADR_BASE) @@ -2073,6 +2083,60 @@ decode_win_sata_valid(void) return (decode_win_can_cover_ddr(MV_WIN_SATA_MAX)); } +static void +decode_win_sdhci_setup(u_long base) +{ + uint32_t cr, br; + int i, j; + + for (i = 0; i < MV_WIN_SDHCI_MAX; i++) { + win_sdhci_cr_write(base, i, 0); + win_sdhci_br_write(base, i, 0); + } + + for (i = 0; i < MV_WIN_DDR_MAX; i++) + if (ddr_is_active(i)) { + br = ddr_base(i); + cr = (((ddr_size(i) - 1) & + (IO_WIN_SIZE_MASK << IO_WIN_SIZE_SHIFT)) | + (ddr_attr(i) << IO_WIN_ATTR_SHIFT) | + (ddr_target(i) << IO_WIN_TGT_SHIFT) | + IO_WIN_ENA_MASK); + + /* Use the first available SDHCI window */ + for (j = 0; j < MV_WIN_SDHCI_MAX; j++) { + if (win_sdhci_cr_read(base, j) & IO_WIN_ENA_MASK) + continue; + + win_sdhci_cr_write(base, j, cr); + win_sdhci_br_write(base, j, br); + break; + } + } +} + +static void +decode_win_sdhci_dump(u_long base) +{ + int i; + + for (i = 0; i < MV_WIN_SDHCI_MAX; i++) + printf("SDHCI window#%d: c 0x%08x, b 0x%08x\n", i, + win_sdhci_cr_read(base, i), win_sdhci_br_read(base, i)); +} + +static int +decode_win_sdhci_valid(void) +{ + +#ifdef SOC_MV_ARMADA38X + return (decode_win_can_cover_ddr(MV_WIN_SDHCI_MAX)); +#endif + + /* Satisfy platforms not equipped with this controller. */ + return (1); +} + /************************************************************************** * FDT parsing routines. **************************************************************************/ Modified: head/sys/arm/mv/mvwin.h ============================================================================== --- head/sys/arm/mv/mvwin.h Tue May 16 03:31:49 2017 (r318335) +++ head/sys/arm/mv/mvwin.h Tue May 16 04:47:50 2017 (r318336) @@ -296,6 +296,10 @@ #define MV_WIN_SATA_MAX 4 #endif +#define MV_WIN_SDHCI_CTRL(n) (0x8 * (n) + 0x4080) +#define MV_WIN_SDHCI_BASE(n) (0x8 * (n) + 0x4084) +#define MV_WIN_SDHCI_MAX 8 + #if defined(SOC_MV_ARMADA38X) #define MV_BOOTROM_MEM_ADDR 0xFFF00000 #define MV_BOOTROM_WIN_SIZE 0xF From owner-svn-src-all@freebsd.org Tue May 16 05:10:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 713DFD6ECE4; Tue, 16 May 2017 05:10:17 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 334C81246; Tue, 16 May 2017 05:10:17 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G5AGHk026026; Tue, 16 May 2017 05:10:16 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G5AGVG026023; Tue, 16 May 2017 05:10:16 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201705160510.v4G5AGVG026023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 16 May 2017 05:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318337 - in head/sys: arm/conf arm/mv/armada38x dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 05:10:17 -0000 Author: loos Date: Tue May 16 05:10:15 2017 New Revision: 318337 URL: https://svnweb.freebsd.org/changeset/base/318337 Log: Add the Marvell SDHCI controller to the list of supported devices in sdhci_fdt. Enable the SDHCI controller, bus and devices on ARMADA38X kernel. Tested on: ClearFog Pro Reviewed by: Marcin Wojtas Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D10606 Modified: head/sys/arm/conf/ARMADA38X head/sys/arm/mv/armada38x/files.armada38x head/sys/dev/sdhci/sdhci_fdt.c Modified: head/sys/arm/conf/ARMADA38X ============================================================================== --- head/sys/arm/conf/ARMADA38X Tue May 16 04:47:50 2017 (r318336) +++ head/sys/arm/conf/ARMADA38X Tue May 16 05:10:15 2017 (r318337) @@ -63,6 +63,11 @@ device scbus device pass device da +# MMC/SD/SDIO Card slot support +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards +device sdhci # mmc/sd host controller + # SATA device ahci Modified: head/sys/arm/mv/armada38x/files.armada38x ============================================================================== --- head/sys/arm/mv/armada38x/files.armada38x Tue May 16 04:47:50 2017 (r318336) +++ head/sys/arm/mv/armada38x/files.armada38x Tue May 16 05:10:15 2017 (r318337) @@ -8,3 +8,4 @@ arm/mv/armada38x/armada38x_mp.c optional arm/mv/armada38x/pmsu.c standard arm/mv/armada38x/rtc.c standard arm/mv/armada38x/armada38x_pl310.c optional pl310 +dev/sdhci/sdhci_fdt.c optional sdhci Modified: head/sys/dev/sdhci/sdhci_fdt.c ============================================================================== --- head/sys/dev/sdhci/sdhci_fdt.c Tue May 16 04:47:50 2017 (r318336) +++ head/sys/dev/sdhci/sdhci_fdt.c Tue May 16 05:10:15 2017 (r318337) @@ -57,7 +57,17 @@ __FBSDID("$FreeBSD$"); #include "mmcbr_if.h" #include "sdhci_if.h" -#define MAX_SLOTS 6 +#define MAX_SLOTS 6 +#define SDHCI_FDT_ARMADA38X 1 +#define SDHCI_FDT_GENERIC 2 +#define SDHCI_FDT_XLNX_ZY7 3 + +static struct ofw_compat_data compat_data[] = { + { "marvell,armada-380-sdhci", SDHCI_FDT_ARMADA38X }, + { "sdhci_generic", SDHCI_FDT_GENERIC }, + { "xlnx,zy7_sdhci", SDHCI_FDT_XLNX_ZY7 }, + { NULL, 0 } +}; struct sdhci_fdt_softc { device_t dev; /* Controller device */ @@ -181,13 +191,21 @@ sdhci_fdt_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_is_compatible(dev, "sdhci_generic")) { + switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) { + case SDHCI_FDT_ARMADA38X: + sc->quirks = SDHCI_QUIRK_BROKEN_AUTO_STOP; + device_set_desc(dev, "ARMADA38X SDHCI controller"); + break; + case SDHCI_FDT_GENERIC: device_set_desc(dev, "generic fdt SDHCI controller"); - } else if (ofw_bus_is_compatible(dev, "xlnx,zy7_sdhci")) { + break; + case SDHCI_FDT_XLNX_ZY7: sc->quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK; device_set_desc(dev, "Zynq-7000 generic fdt SDHCI controller"); - } else + break; + default: return (ENXIO); + } node = ofw_bus_get_node(dev); From owner-svn-src-all@freebsd.org Tue May 16 07:22:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C238AD6F836; Tue, 16 May 2017 07:22:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 910CC15C8; Tue, 16 May 2017 07:22:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G7Mfp3081766; Tue, 16 May 2017 07:22:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G7MfTf081765; Tue, 16 May 2017 07:22:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705160722.v4G7MfTf081765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 16 May 2017 07:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r318338 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 07:22:42 -0000 Author: hselasky Date: Tue May 16 07:22:41 2017 New Revision: 318338 URL: https://svnweb.freebsd.org/changeset/base/318338 Log: MFC r317584: Correct manual page link to usbdi(9). Modified: stable/9/share/man/man4/usb.4 Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/usb.4 ============================================================================== --- stable/9/share/man/man4/usb.4 Tue May 16 05:10:15 2017 (r318337) +++ stable/9/share/man/man4/usb.4 Tue May 16 07:22:41 2017 (r318338) @@ -144,7 +144,7 @@ specifications can be found at: .D1 Pa http://www.usb.org/developers/docs/ .Pp .Xr libusb 3 , -.Xr usbdi 4 , +.Xr usbdi 9 , .Xr aue 4 , .Xr axe 4 , .Xr axge 4 , From owner-svn-src-all@freebsd.org Tue May 16 07:24:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F26DCD6F8C6; Tue, 16 May 2017 07:24:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3B431710; Tue, 16 May 2017 07:24:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G7O9aF081873; Tue, 16 May 2017 07:24:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G7O9Ak081872; Tue, 16 May 2017 07:24:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705160724.v4G7O9Ak081872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 16 May 2017 07:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r318339 - stable/8/share/man/man4 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 07:24:11 -0000 Author: hselasky Date: Tue May 16 07:24:09 2017 New Revision: 318339 URL: https://svnweb.freebsd.org/changeset/base/318339 Log: MFC r317584: Correct manual page link to usbdi(9). Modified: stable/8/share/man/man4/usb.4 Directory Properties: stable/8/share/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/usb.4 ============================================================================== --- stable/8/share/man/man4/usb.4 Tue May 16 07:22:41 2017 (r318338) +++ stable/8/share/man/man4/usb.4 Tue May 16 07:24:09 2017 (r318339) @@ -170,7 +170,7 @@ specifications can be found at: .D1 Pa http://www.usb.org/developers/docs/ .Pp .Xr libusb 3 , -.Xr usbdi 4 , +.Xr usbdi 9 , .Xr aue 4 , .Xr axe 4 , .Xr cue 4 , From owner-svn-src-all@freebsd.org Tue May 16 09:39:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A72ED6E095; Tue, 16 May 2017 09:39:22 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CB49F6; Tue, 16 May 2017 09:39:22 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G9dLL0035335; Tue, 16 May 2017 09:39:21 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G9dKIY035331; Tue, 16 May 2017 09:39:20 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705160939.v4G9dKIY035331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 16 May 2017 09:39:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318347 - in stable/11/sys: dev/xen/evtchn x86/xen xen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 09:39:22 -0000 Author: royger Date: Tue May 16 09:39:20 2017 New Revision: 318347 URL: https://svnweb.freebsd.org/changeset/base/318347 Log: MCF r310418: xen: fix IPI setup with EARLY_AP_STARTUP Sponsored by: Citrix Systems R&D Modified: stable/11/sys/dev/xen/evtchn/evtchn_dev.c stable/11/sys/x86/xen/xen_apic.c stable/11/sys/x86/xen/xen_intr.c stable/11/sys/xen/xen_intr.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/xen/evtchn/evtchn_dev.c ============================================================================== --- stable/11/sys/dev/xen/evtchn/evtchn_dev.c Tue May 16 09:24:18 2017 (r318346) +++ stable/11/sys/dev/xen/evtchn/evtchn_dev.c Tue May 16 09:39:20 2017 (r318347) @@ -373,9 +373,9 @@ evtchn_bind_user_port(struct per_user_da mtx_lock(&u->bind_mutex); RB_INSERT(evtchn_tree, &u->evtchns, evtchn); mtx_unlock(&u->bind_mutex); - error = xen_intr_add_handler(evtchn_dev, evtchn_filter, - evtchn_interrupt, evtchn, INTR_TYPE_MISC | INTR_MPSAFE, - evtchn->handle); + error = xen_intr_add_handler(device_get_nameunit(evtchn_dev), + evtchn_filter, evtchn_interrupt, evtchn, + INTR_TYPE_MISC | INTR_MPSAFE, evtchn->handle); if (error != 0) { xen_intr_unbind(&evtchn->handle); mtx_lock(&u->bind_mutex); Modified: stable/11/sys/x86/xen/xen_apic.c ============================================================================== --- stable/11/sys/x86/xen/xen_apic.c Tue May 16 09:24:18 2017 (r318346) +++ stable/11/sys/x86/xen/xen_apic.c Tue May 16 09:39:20 2017 (r318347) @@ -500,12 +500,9 @@ xen_cpu_ipi_init(int cpu) { xen_intr_handle_t *ipi_handle; const struct xen_ipi_handler *ipi; - device_t dev; int idx, rc; ipi_handle = DPCPU_ID_GET(cpu, ipi_handle); - dev = pcpu_find(cpu)->pc_device; - KASSERT((dev != NULL), ("NULL pcpu device_t")); for (ipi = xen_ipis, idx = 0; idx < nitems(xen_ipis); ipi++, idx++) { @@ -514,7 +511,7 @@ xen_cpu_ipi_init(int cpu) continue; } - rc = xen_intr_alloc_and_bind_ipi(dev, cpu, ipi->filter, + rc = xen_intr_alloc_and_bind_ipi(cpu, ipi->filter, INTR_TYPE_TTY, &ipi_handle[idx]); if (rc != 0) panic("Unable to allocate a XEN IPI port"); Modified: stable/11/sys/x86/xen/xen_intr.c ============================================================================== --- stable/11/sys/x86/xen/xen_intr.c Tue May 16 09:24:18 2017 (r318346) +++ stable/11/sys/x86/xen/xen_intr.c Tue May 16 09:39:20 2017 (r318347) @@ -392,7 +392,7 @@ xen_intr_release_isrc(struct xenisrc *is */ static int xen_intr_bind_isrc(struct xenisrc **isrcp, evtchn_port_t local_port, - enum evtchn_type type, device_t intr_owner, driver_filter_t filter, + enum evtchn_type type, const char *intr_owner, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, xen_intr_handle_t *port_handlep) { @@ -401,8 +401,8 @@ xen_intr_bind_isrc(struct xenisrc **isrc *isrcp = NULL; if (port_handlep == NULL) { - device_printf(intr_owner, - "xen_intr_bind_isrc: Bad event handle\n"); + printf("%s: xen_intr_bind_isrc: Bad event handle\n", + intr_owner); return (EINVAL); } @@ -1174,8 +1174,9 @@ xen_intr_bind_local_port(device_t dev, e struct xenisrc *isrc; int error; - error = xen_intr_bind_isrc(&isrc, local_port, EVTCHN_TYPE_PORT, dev, - filter, handler, arg, flags, port_handlep); + error = xen_intr_bind_isrc(&isrc, local_port, EVTCHN_TYPE_PORT, + device_get_nameunit(dev), filter, handler, arg, flags, + port_handlep); if (error != 0) return (error); @@ -1209,8 +1210,8 @@ xen_intr_alloc_and_bind_local_port(devic } error = xen_intr_bind_isrc(&isrc, alloc_unbound.port, EVTCHN_TYPE_PORT, - dev, filter, handler, arg, flags, - port_handlep); + device_get_nameunit(dev), filter, handler, arg, flags, + port_handlep); if (error != 0) { evtchn_close_t close = { .port = alloc_unbound.port }; if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close)) @@ -1244,8 +1245,8 @@ xen_intr_bind_remote_port(device_t dev, } error = xen_intr_bind_isrc(&isrc, bind_interdomain.local_port, - EVTCHN_TYPE_PORT, dev, filter, handler, - arg, flags, port_handlep); + EVTCHN_TYPE_PORT, device_get_nameunit(dev), filter, handler, arg, + flags, port_handlep); if (error) { evtchn_close_t close = { .port = bind_interdomain.local_port }; if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close)) @@ -1284,8 +1285,9 @@ xen_intr_bind_virq(device_t dev, u_int v return (-error); } - error = xen_intr_bind_isrc(&isrc, bind_virq.port, EVTCHN_TYPE_VIRQ, dev, - filter, handler, arg, flags, port_handlep); + error = xen_intr_bind_isrc(&isrc, bind_virq.port, EVTCHN_TYPE_VIRQ, + device_get_nameunit(dev), filter, handler, arg, flags, + port_handlep); #ifdef SMP if (error == 0) @@ -1324,14 +1326,15 @@ xen_intr_bind_virq(device_t dev, u_int v } int -xen_intr_alloc_and_bind_ipi(device_t dev, u_int cpu, - driver_filter_t filter, enum intr_type flags, - xen_intr_handle_t *port_handlep) +xen_intr_alloc_and_bind_ipi(u_int cpu, driver_filter_t filter, + enum intr_type flags, xen_intr_handle_t *port_handlep) { #ifdef SMP int vcpu_id = pcpu_find(cpu)->pc_vcpu_id; struct xenisrc *isrc; struct evtchn_bind_ipi bind_ipi = { .vcpu = vcpu_id }; + /* Same size as the one used by intr_handler->ih_name. */ + char name[MAXCOMLEN + 1]; int error; /* Ensure the target CPU is ready to handle evtchn interrupts. */ @@ -1347,12 +1350,10 @@ xen_intr_alloc_and_bind_ipi(device_t dev return (-error); } - error = xen_intr_bind_isrc(&isrc, bind_ipi.port, EVTCHN_TYPE_IPI, - dev, filter, NULL, NULL, flags, - port_handlep); - if (error == 0) - error = intr_event_bind(isrc->xi_intsrc.is_event, cpu); + snprintf(name, sizeof(name), "cpu%u", cpu); + error = xen_intr_bind_isrc(&isrc, bind_ipi.port, EVTCHN_TYPE_IPI, + name, filter, NULL, NULL, flags, port_handlep); if (error != 0) { evtchn_close_t close = { .port = bind_ipi.port }; @@ -1541,7 +1542,7 @@ xen_intr_port(xen_intr_handle_t handle) } int -xen_intr_add_handler(device_t dev, driver_filter_t filter, +xen_intr_add_handler(const char *name, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, xen_intr_handle_t handle) { @@ -1552,12 +1553,12 @@ xen_intr_add_handler(device_t dev, drive if (isrc == NULL || isrc->xi_cookie != NULL) return (EINVAL); - error = intr_add_handler(device_get_nameunit(dev), isrc->xi_vector, - filter, handler, arg, flags|INTR_EXCL, &isrc->xi_cookie); + error = intr_add_handler(name, isrc->xi_vector,filter, handler, arg, + flags|INTR_EXCL, &isrc->xi_cookie); if (error != 0) { - device_printf(dev, - "xen_intr_add_handler: intr_add_handler failed: %d\n", - error); + printf( + "%s: xen_intr_add_handler: intr_add_handler failed: %d\n", + name, error); } return (error); Modified: stable/11/sys/xen/xen_intr.h ============================================================================== --- stable/11/sys/xen/xen_intr.h Tue May 16 09:24:18 2017 (r318346) +++ stable/11/sys/xen/xen_intr.h Tue May 16 09:39:20 2017 (r318347) @@ -143,7 +143,6 @@ int xen_intr_bind_virq(device_t dev, u_i * interupts and, if successful, associate the port with the specified * interrupt handler. * - * \param dev The device making this bind request. * \param cpu The cpu receiving the IPI. * \param filter The interrupt filter servicing this IPI. * \param irqflags Interrupt handler flags. See sys/bus.h. @@ -152,7 +151,7 @@ int xen_intr_bind_virq(device_t dev, u_i * * \returns 0 on success, otherwise an errno. */ -int xen_intr_alloc_and_bind_ipi(device_t dev, u_int cpu, +int xen_intr_alloc_and_bind_ipi(u_int cpu, driver_filter_t filter, enum intr_type irqflags, xen_intr_handle_t *handlep); @@ -259,7 +258,7 @@ int xen_release_msi(int vector); * * \returns 0 on success, otherwise an errno. */ -int xen_intr_add_handler(device_t dev, driver_filter_t filter, +int xen_intr_add_handler(const char *name, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, xen_intr_handle_t handle); From owner-svn-src-all@freebsd.org Tue May 16 13:27:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FBD5D6CEA7; Tue, 16 May 2017 13:27:46 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07C4FFDC; Tue, 16 May 2017 13:27:45 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GDRjbR029554; Tue, 16 May 2017 13:27:45 GMT (envelope-from jonathan@FreeBSD.org) Received: (from jonathan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GDRj63029553; Tue, 16 May 2017 13:27:45 GMT (envelope-from jonathan@FreeBSD.org) Message-Id: <201705161327.v4GDRj63029553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jonathan set sender to jonathan@FreeBSD.org using -f From: Jonathan Anderson Date: Tue, 16 May 2017 13:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318352 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 13:27:46 -0000 Author: jonathan Date: Tue May 16 13:27:44 2017 New Revision: 318352 URL: https://svnweb.freebsd.org/changeset/base/318352 Log: Rename rtld's parse_libdir to parse_integer. This is a more accurate name, as the integer doesn't have to be a library directory descriptor. It is also a prerequisite for more argument parsing coming in the near future (e.g., parsing explicit binary descriptors). Reviewed by: kib MFC after: 2 weeks Sponsored by: NSERC Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Tue May 16 11:52:27 2017 (r318351) +++ head/libexec/rtld-elf/rtld.c Tue May 16 13:27:44 2017 (r318352) @@ -115,7 +115,7 @@ static void objlist_push_head(Objlist *, static void objlist_push_tail(Objlist *, Obj_Entry *); static void objlist_put_after(Objlist *, Obj_Entry *, Obj_Entry *); static void objlist_remove(Objlist *, Obj_Entry *); -static int parse_libdir(const char *); +static int parse_integer(const char *); static void *path_enumerate(const char *, path_enum_proc, void *); static void release_object(Obj_Entry *); static int relocate_object_dag(Obj_Entry *root, bool bind_now, @@ -3033,9 +3033,12 @@ search_library_pathfds(const char *name, envcopy = xstrdup(path); for (fdstr = strtok_r(envcopy, ":", &last_token); fdstr != NULL; fdstr = strtok_r(NULL, ":", &last_token)) { - dirfd = parse_libdir(fdstr); - if (dirfd < 0) + dirfd = parse_integer(fdstr); + if (dirfd < 0) { + _rtld_error("failed to parse directory FD: '%s'", + fdstr); break; + } fd = __sys_openat(dirfd, name, O_RDONLY | O_CLOEXEC | O_VERIFY); if (fd >= 0) { *fdp = fd; @@ -5236,29 +5239,27 @@ symlook_init_from_req(SymLook *dst, cons * Parse a file descriptor number without pulling in more of libc (e.g. atoi). */ static int -parse_libdir(const char *str) +parse_integer(const char *str) { static const int RADIX = 10; /* XXXJA: possibly support hex? */ const char *orig; - int fd; + int n; char c; orig = str; - fd = 0; + n = 0; for (c = *str; c != '\0'; c = *++str) { if (c < '0' || c > '9') return (-1); - fd *= RADIX; - fd += c - '0'; + n *= RADIX; + n += c - '0'; } /* Make sure we actually parsed something. */ - if (str == orig) { - _rtld_error("failed to parse directory FD from '%s'", str); + if (str == orig) return (-1); - } - return (fd); + return (n); } /* From owner-svn-src-all@freebsd.org Tue May 16 14:21:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 188DFD6EAF9; Tue, 16 May 2017 14:21:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8E47B91; Tue, 16 May 2017 14:21:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GELbDj057964; Tue, 16 May 2017 14:21:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GELbL8057958; Tue, 16 May 2017 14:21:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705161421.v4GELbL8057958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 16 May 2017 14:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318353 - in head/sys: arm/arm arm64/arm64 mips/mips x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 14:21:39 -0000 Author: hselasky Date: Tue May 16 14:21:37 2017 New Revision: 318353 URL: https://svnweb.freebsd.org/changeset/base/318353 Log: Avoid use of contiguous memory allocations in busdma when possible. This patch improves the boundary checks in busdma to allow more cases using the regular page based kernel memory allocator. Especially in the case of having a non-zero boundary in the parent DMA tag. For example AMD64 based platforms set the PCI DMA tag boundary to PCI_DMA_BOUNDARY, 4GB, which before this patch caused contiguous memory allocations to be preferred when allocating more than PAGE_SIZE bytes. Even if the required alignment was less than PAGE_SIZE bytes. This patch also fixes the nsegments check for using kmem_alloc_attr() when the maximum segment size is less than PAGE_SIZE bytes. Updated some comments describing the code in question. Differential Revision: https://reviews.freebsd.org/D10645 Reviewed by: kib, jhb, gallatin, scottl MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/arm/arm/busdma_machdep-v4.c head/sys/arm/arm/busdma_machdep-v6.c head/sys/arm64/arm64/busdma_bounce.c head/sys/mips/mips/busdma_machdep.c head/sys/x86/x86/busdma_bounce.c Modified: head/sys/arm/arm/busdma_machdep-v4.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v4.c Tue May 16 13:27:44 2017 (r318352) +++ head/sys/arm/arm/busdma_machdep-v4.c Tue May 16 14:21:37 2017 (r318353) @@ -736,8 +736,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) { *vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Tue May 16 13:27:44 2017 (r318352) +++ head/sys/arm/arm/busdma_machdep-v6.c Tue May 16 14:21:37 2017 (r318353) @@ -779,7 +779,9 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi * (the allocator aligns buffers to their size boundaries). * - There's no need to handle lowaddr/highaddr exclusion zones. * else allocate non-contiguous pages if... - * - The page count that could get allocated doesn't exceed nsegments. + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. * - The alignment constraint isn't larger than a page boundary. * - There are no boundary-crossing constraints. * else allocate a block of contiguous pages because one or more of the @@ -788,8 +790,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !exclusion_bounce(dmat)) { *vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Tue May 16 13:27:44 2017 (r318352) +++ head/sys/arm64/arm64/busdma_bounce.c Tue May 16 14:21:37 2017 (r318353) @@ -461,22 +461,35 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm (*mapp)->flags = DMAMAP_FROM_DMAMEM; /* - * XXX: - * (dmat->alignment <= dmat->maxsize) is just a quick hack; the exact - * alignment guarantees of malloc need to be nailed down, and the - * code below should be rewritten to take that into account. + * Allocate the buffer from the malloc(9) allocator if... + * - It's small enough to fit into a single power of two sized bucket. + * - The alignment is less than or equal to the maximum size + * - The low address requirement is fulfilled. + * else allocate non-contiguous pages if... + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. + * - The alignment constraint isn't larger than a page boundary. + * - There are no boundary-crossing constraints. + * else allocate a block of contiguous pages because one or more of the + * constraints is something that only the contig allocator can fulfill. * - * In the meantime, we'll warn the user if malloc gets it wrong. + * NOTE: The (dmat->common.alignment <= dmat->maxsize) check + * below is just a quick hack. The exact alignment guarantees + * of malloc(9) need to be nailed down, and the code below + * should be rewritten to take that into account. + * + * In the meantime warn the user if malloc gets it wrong. */ if ((dmat->common.maxsize <= PAGE_SIZE) && (dmat->common.alignment <= dmat->common.maxsize) && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->common.maxsize, M_DEVBUF, mflags); - } else if (dmat->common.nsegments >= btoc(dmat->common.maxsize) && + } else if (dmat->common.nsegments >= + howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && dmat->common.alignment <= PAGE_SIZE && - (dmat->common.boundary == 0 || - dmat->common.boundary >= dmat->common.lowaddr)) { + (dmat->common.boundary % PAGE_SIZE) == 0) { /* Page-based multi-segment allocations allowed */ *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Tue May 16 13:27:44 2017 (r318352) +++ head/sys/mips/mips/busdma_machdep.c Tue May 16 14:21:37 2017 (r318353) @@ -690,7 +690,9 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi * (the allocator aligns buffers to their size boundaries). * - There's no need to handle lowaddr/highaddr exclusion zones. * else allocate non-contiguous pages if... - * - The page count that could get allocated doesn't exceed nsegments. + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. * - The alignment constraint isn't larger than a page boundary. * - There are no boundary-crossing constraints. * else allocate a block of contiguous pages because one or more of the @@ -699,8 +701,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) { vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Tue May 16 13:27:44 2017 (r318352) +++ head/sys/x86/x86/busdma_bounce.c Tue May 16 14:21:37 2017 (r318353) @@ -396,23 +396,36 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm else attr = VM_MEMATTR_DEFAULT; - /* - * XXX: - * (dmat->alignment <= dmat->maxsize) is just a quick hack; the exact - * alignment guarantees of malloc need to be nailed down, and the - * code below should be rewritten to take that into account. + /* + * Allocate the buffer from the malloc(9) allocator if... + * - It's small enough to fit into a single power of two sized bucket. + * - The alignment is less than or equal to the maximum size + * - The low address requirement is fulfilled. + * else allocate non-contiguous pages if... + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. + * - The alignment constraint isn't larger than a page boundary. + * - There are no boundary-crossing constraints. + * else allocate a block of contiguous pages because one or more of the + * constraints is something that only the contig allocator can fulfill. + * + * NOTE: The (dmat->common.alignment <= dmat->maxsize) check + * below is just a quick hack. The exact alignment guarantees + * of malloc(9) need to be nailed down, and the code below + * should be rewritten to take that into account. * - * In the meantime, we'll warn the user if malloc gets it wrong. + * In the meantime warn the user if malloc gets it wrong. */ if ((dmat->common.maxsize <= PAGE_SIZE) && (dmat->common.alignment <= dmat->common.maxsize) && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->common.maxsize, M_DEVBUF, mflags); - } else if (dmat->common.nsegments >= btoc(dmat->common.maxsize) && + } else if (dmat->common.nsegments >= + howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && dmat->common.alignment <= PAGE_SIZE && - (dmat->common.boundary == 0 || - dmat->common.boundary >= dmat->common.lowaddr)) { + (dmat->common.boundary % PAGE_SIZE) == 0) { /* Page-based multi-segment allocations allowed */ *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, From owner-svn-src-all@freebsd.org Tue May 16 16:20:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53FB3D70713; Tue, 16 May 2017 16:20:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23BB81FE2; Tue, 16 May 2017 16:20:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GGKNMq007161; Tue, 16 May 2017 16:20:23 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GGKNvs007160; Tue, 16 May 2017 16:20:23 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201705161620.v4GGKNvs007160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 16 May 2017 16:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318354 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 16:20:24 -0000 Author: cem Date: Tue May 16 16:20:22 2017 New Revision: 318354 URL: https://svnweb.freebsd.org/changeset/base/318354 Log: Correct page frame mask constant used in pmap_change_attr_locked This was introduced in r290156. It's present in 11.0, but not any 10.x release unless someone decided to MFC it. It affects ordinary pages right above the DMAP limit, which is effectively system memory rounded up to a 1 GB (3rd level superpage) boundary (or up to a minimum of 4 GB, on small systems). Reported by: vangyzen Reviewed by: kib, alc Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D4030 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue May 16 14:21:37 2017 (r318353) +++ head/sys/amd64/amd64/pmap.c Tue May 16 16:20:22 2017 (r318354) @@ -6691,7 +6691,7 @@ pmap_change_attr_locked(vm_offset_t va, changed = TRUE; } if (tmpva >= VM_MIN_KERNEL_ADDRESS && - (*pte & PG_PS_FRAME) < dmaplimit) { + (*pte & PG_FRAME) < dmaplimit) { if (pa_start == pa_end) { /* Start physical address run. */ pa_start = *pte & PG_FRAME; From owner-svn-src-all@freebsd.org Tue May 16 16:35:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6E55D70D94; Tue, 16 May 2017 16:35:42 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2809F44; Tue, 16 May 2017 16:35:42 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id h64so17253889pge.3; Tue, 16 May 2017 09:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=M5rDAUjt54kGgZ5ND17eI9dq2Uyn9WP0/KFat5TlO1Q=; b=g8K+nV3FZSm0tGv07pL2Ujz7ItiF36h/MT3+CEcqEnwA+q1pxNs2M6eWeusLzNOPZZ gdDn+joPuQK7LSRJj7s7CbVeGuyKYjkxxnIGGg5qtYd/lRNriP2Ha3ARR5Yd6mDVlada 7tfHrzkWoOV3Q53w+MvLhHntGuPW+HBkMzUkRTkOSRs5YaopBbVoVy5SbEAjPdXxteN7 pbTe82A2RTjVTvyUDHf+NZ/UbqyuTxQTtS0gOn2joM314saNUIZrfO9PvpfWWzHYwkTI FeSOirOU+0lwV4CakEx0D+sLLf7z1Es7k9Vry6GkdQ3ziLL3VSlgUWeR64a8MSmvEAax GnxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=M5rDAUjt54kGgZ5ND17eI9dq2Uyn9WP0/KFat5TlO1Q=; b=NNLseX+4WN6SIhiGn0/8O60jMyq4fuPMVGxA5TCU3QAlD5cR8DSYgt92qF6AfvUCLK QpCbkwd3ZIsSI7TE0F+xiKm7rnwDdlsSNeTZxAbsxU1808rdfkltakOKUgpOhRDW7fh3 iKCWmV4MwE3BDmjTYgLPz73grEXgbtWdXZEaxfEj7OWUry0773SeOz3fBa1Je23kPem+ u5XQsGK4FdqdX6gRyiZNpDo8H1+mxgBa4sQb+ypPcHzFfEAMQv82rOOVG6TJlBGkYUkp HKZAP9FYJ2C5rZhTiIerMeRxM3UIcQeXRPbbidhAF+c1ov+ukyllrEvOAFjpajIs6Ttb Dhcg== X-Gm-Message-State: AODbwcC3Pne/Wu45aQQ+ns/TFZRP6DrCePSJSukrUCNLSDD+vY5rn9jl 4rwABxaZIUQwpJX0a5w= X-Received: by 10.98.193.129 with SMTP id i123mr13398102pfg.203.1494952541953; Tue, 16 May 2017 09:35:41 -0700 (PDT) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id f193sm24718127pgc.54.2017.05.16.09.35.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 May 2017 09:35:41 -0700 (PDT) From: "Ngie Cooper (yaneurabeya)" Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_0EF24AAB-420A-4E62-84A9-0ECFAEBA3E8B"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318354 - head/sys/amd64/amd64 Date: Tue, 16 May 2017 09:35:40 -0700 In-Reply-To: <201705161620.v4GGKNvs007160@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Conrad Meyer References: <201705161620.v4GGKNvs007160@repo.freebsd.org> X-Mailer: Apple Mail (2.3273) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 16:35:43 -0000 --Apple-Mail=_0EF24AAB-420A-4E62-84A9-0ECFAEBA3E8B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 16, 2017, at 9:20 AM, Conrad Meyer wrote: >=20 > Author: cem > Date: Tue May 16 16:20:22 2017 > New Revision: 318354 > URL: https://svnweb.freebsd.org/changeset/base/318354 >=20 > Log: > Correct page frame mask constant used in pmap_change_attr_locked >=20 > This was introduced in r290156. It's present in 11.0, but not any = 10.x > release unless someone decided to MFC it. Hi Conrad, It wasn=E2=80=99t MFCed according to = https://svnweb.freebsd.org/base/stable/10/sys/amd64/amd64/pmap.c = , so = that=E2=80=99s ok. Could you please MFC this change since you understand it/made = it? Thank you, -Ngie --Apple-Mail=_0EF24AAB-420A-4E62-84A9-0ECFAEBA3E8B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJZGypdAAoJEPWDqSZpMIYVg0AP/RaN/J0uG3pCy+Oepu/IGXcS 1ukBZrKTgB1PKwqwGBl8PogcEFeFJGdeL5T7ElrQiyr9fohodZ1qTHa4w/7ONAKr FUd+88sNjSPyxB3cxG67UX6rhezwIqPvsM9/WJPxTWRdnY5GUhCDYNHDXNjKMkpa zR9+AsKzZ3YeBRkAZ5FS79ZOE5MVmnBfhP4YS8To41XAlWRH/R8zp4fP8eChrnh5 MnIUQgAjJWT7T3W4VNANfivz4dak0PPfVqGMAU45rmSL5rQTPpDf+5wKGIOag95A Fz9gCvOsgW7YcTqcL79f10gqujvMGcx0iUTFfKHoPujdab5ldnuNjQOJa83GNt7y TutXANM3HtQodzBx98Q71Yj7Of144h2mhrOlyAKOcr8QG3nABZVWhwr2cwCx6IVX 9Bx1KsCPgwNrOvanS0sMGM45CvKN+mG050wCvC4G1woyVJsEvkeOOs6XgXBc88OJ 73MoW56XszK9bQyeyy2m7TaTa5uLLGzMGdC61kFUiWxMvuQtgkgLuvUI8w0foaF2 iSTDtv+RZH/+zOj/wi7TAlIuh1CgY2vkhNvvrOCmDF38MFg5RXT0oBUhM4PD0uy5 1eUK1w94u6OetpUOn5QpVEhJAV/f+9wsfb3uc6VoG3Fixe8sVgjnp5XhTIWEz9yH PTK9QBQh8xpngSZtJ+kT =DiDb -----END PGP SIGNATURE----- --Apple-Mail=_0EF24AAB-420A-4E62-84A9-0ECFAEBA3E8B-- From owner-svn-src-all@freebsd.org Tue May 16 17:04:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F15BD6DB1B; Tue, 16 May 2017 17:04:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D49215E2; Tue, 16 May 2017 17:04:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GH4o15027480; Tue, 16 May 2017 17:04:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GH4ou7027476; Tue, 16 May 2017 17:04:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705161704.v4GH4ou7027476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 16 May 2017 17:04:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318355 - head/sbin/newfs_msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 17:04:52 -0000 Author: emaste Date: Tue May 16 17:04:50 2017 New Revision: 318355 URL: https://svnweb.freebsd.org/changeset/base/318355 Log: newfs_msdos: add -T (timestamp) option for reproducible builds This includes some whitespace and minor bug fixes relative to NetBSD, which will be submitted upstream at the conclusion of the makefs msdos update. NetBSD revs: mkfs_msdos.c 1.11 mkfs_msdos.h 1.4 newfs_msdos.8 1.22 newfs_msdos.c 1.44 Submitted by: Siva Mahadevan Reviewed by: emaste Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Modified: head/sbin/newfs_msdos/mkfs_msdos.c head/sbin/newfs_msdos/mkfs_msdos.h head/sbin/newfs_msdos/newfs_msdos.8 head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/mkfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/mkfs_msdos.c Tue May 16 16:20:22 2017 (r318354) +++ head/sbin/newfs_msdos/mkfs_msdos.c Tue May 16 17:04:50 2017 (r318355) @@ -566,9 +566,17 @@ mkfs_msdos(const char *fname, const char } print_bpb(&bpb); if (!o.no_create) { - gettimeofday(&tv, NULL); - now = tv.tv_sec; - tm = localtime(&now); + if (o.timestamp_set) { + tv.tv_sec = now = o.timestamp; + tv.tv_usec = 0; + tm = gmtime(&now); + } else { + gettimeofday(&tv, NULL); + now = tv.tv_sec; + tm = localtime(&now); + } + + if (!(img = malloc(bpb.bpbBytesPerSec))) { warn(NULL); goto done; Modified: head/sbin/newfs_msdos/mkfs_msdos.h ============================================================================== --- head/sbin/newfs_msdos/mkfs_msdos.h Tue May 16 16:20:22 2017 (r318354) +++ head/sbin/newfs_msdos/mkfs_msdos.h Tue May 16 17:04:50 2017 (r318355) @@ -42,6 +42,7 @@ AOPT('L', const char *, volume_label, -1 AOPT('N', bool, no_create, -2, "Don't create filesystem, print params only") \ AOPT('O', const char *, OEM_string, -1, "OEM string") \ AOPT('S', uint16_t, bytes_per_sector, 1, "Bytes per sector") \ +AOPT('T', time_t, timestamp, 0, "Timestamp") \ AOPT('a', uint32_t, sectors_per_fat, 1, "Sectors per FAT") \ AOPT('b', uint32_t, block_size, 1, "Block size") \ AOPT('c', uint8_t, sectors_per_cluster, 1, "Sectors per cluster") \ @@ -61,6 +62,7 @@ struct msdos_options { #define AOPT(_opt, _type, _name, _min, _desc) _type _name; ALLOPTS #undef AOPT + uint32_t timestamp_set:1; uint32_t volume_id_set:1; uint32_t media_descriptor_set:1; uint32_t hidden_sectors_set:1; Modified: head/sbin/newfs_msdos/newfs_msdos.8 ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.8 Tue May 16 16:20:22 2017 (r318354) +++ head/sbin/newfs_msdos/newfs_msdos.8 Tue May 16 17:04:50 2017 (r318355) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 9, 2015 +.Dd May 16, 2017 .Dt NEWFS_MSDOS 8 .Os .Sh NAME @@ -55,6 +55,7 @@ .Op Fl o Ar hidden .Op Fl r Ar reserved .Op Fl s Ar total +.Op Fl T Ar timestamp .Op Fl u Ar track-size .Ar special .Op Ar disktype @@ -159,6 +160,12 @@ Number of hidden sectors. Number of reserved sectors. .It Fl s Ar total File system size. +.It Fl T Ar timestamp +Specify a timestamp to be used for filesystem creation so that +it can be consistent for reproducible builds. +The timestamp can be a pathname (where the timestamps are derived from +that file) or an integer value interpreted +as the number of seconds since the Epoch. .It Fl u Ar track-size Number of sectors per track. .El Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Tue May 16 16:20:22 2017 (r318354) +++ head/sbin/newfs_msdos/newfs_msdos.c Tue May 16 17:04:50 2017 (r318355) @@ -31,7 +31,7 @@ static const char rcsid[] = #endif /* not lint */ #include - +#include #include #include #include @@ -51,13 +51,30 @@ static u_int argtou(const char *, u_int, static off_t argtooff(const char *, const char *); static void usage(void); +static time_t +get_tstamp(const char *b) +{ + struct stat st; + char *eb; + long long l; + + if (stat(b, &st) != -1) + return (time_t)st.st_mtime; + + errno = 0; + l = strtoll(b, &eb, 0); + if (b == eb || *eb || errno) + errx(EXIT_FAILURE, "Can't parse timestamp '%s'", b); + return (time_t)l; +} + /* * Construct a FAT12, FAT16, or FAT32 file system. */ int main(int argc, char *argv[]) { - static const char opts[] = "@:NB:C:F:I:L:O:S:a:b:c:e:f:h:i:k:m:n:o:r:s:u:"; + static const char opts[] = "@:NB:C:F:I:L:O:S:a:b:c:e:f:h:i:k:m:n:o:r:s:T:u:"; struct msdos_options o; const char *fname, *dtype; char buf[MAXPATHLEN]; @@ -142,6 +159,10 @@ main(int argc, char *argv[]) case 's': o.size = argto4(optarg, 1, "file system size"); break; + case 'T': + o.timestamp_set = 1; + o.timestamp = get_tstamp(optarg); + break; case 'u': o.sectors_per_track = argto2(optarg, 1, "sectors/track"); break; From owner-svn-src-all@freebsd.org Tue May 16 17:35:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3582D703C2; Tue, 16 May 2017 17:35:06 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 727C717CF; Tue, 16 May 2017 17:35:06 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GHZ5lf039527; Tue, 16 May 2017 17:35:05 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GHZ5fe039525; Tue, 16 May 2017 17:35:05 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201705161735.v4GHZ5fe039525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 16 May 2017 17:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318356 - in head: lib/libstand sys/boot/i386/pxeldr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 17:35:06 -0000 Author: tsoome Date: Tue May 16 17:35:05 2017 New Revision: 318356 URL: https://svnweb.freebsd.org/changeset/base/318356 Log: libstand: increase nfs max read size to 16k With ip fragment reassembly implemented, it makes sense to allow larger nfs reads. Note due to loader heap size limit, we do not want to set too large maximum read size. Also we do not change default read size. Reviewed by: bcr, allanjude Differential Revision: https://reviews.freebsd.org/D10754 Modified: head/lib/libstand/nfs.c head/sys/boot/i386/pxeldr/pxeboot.8 Modified: head/lib/libstand/nfs.c ============================================================================== --- head/lib/libstand/nfs.c Tue May 16 17:04:50 2017 (r318355) +++ head/lib/libstand/nfs.c Tue May 16 17:35:05 2017 (r318356) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #define NFS_DEBUGxx #define NFSREAD_MIN_SIZE 1024 -#define NFSREAD_MAX_SIZE 4096 +#define NFSREAD_MAX_SIZE 16384 /* NFSv3 definitions */ #define NFS_V3MAXFHSIZE 64 Modified: head/sys/boot/i386/pxeldr/pxeboot.8 ============================================================================== --- head/sys/boot/i386/pxeldr/pxeboot.8 Tue May 16 17:04:50 2017 (r318355) +++ head/sys/boot/i386/pxeldr/pxeboot.8 Tue May 16 17:35:05 2017 (r318356) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 1, 2000 +.Dd May 16, 2017 .Dt PXEBOOT 8 .Os .Sh NAME @@ -91,7 +91,7 @@ This may be changed by setting the .Va nfs.read_size variable in .Pa /boot/loader.conf . -Valid values range from 1024 to 4096 bytes. +Valid values range from 1024 to 16384 bytes. .Pp In all other respects, .Nm From owner-svn-src-all@freebsd.org Tue May 16 17:49:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D719D70643; Tue, 16 May 2017 17:49:18 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC4E01DE1; Tue, 16 May 2017 17:49:17 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GHnGEs043992; Tue, 16 May 2017 17:49:16 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GHnFvb043981; Tue, 16 May 2017 17:49:15 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201705161749.v4GHnFvb043981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Tue, 16 May 2017 17:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318357 - in stable/11/sys: amd64/conf conf dev/ixl modules/ixl modules/ixlv X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 17:49:18 -0000 Author: erj Date: Tue May 16 17:49:15 2017 New Revision: 318357 URL: https://svnweb.freebsd.org/changeset/base/318357 Log: MFC r313497: ixl(4): Update to 1.7.12-k. Refresh upstream driver before impending conversion to iflib. Major new features: - Support for Fortville-based 25G adapters - Support for I2C reads/writes (To prevent getting or sending corrupt data, you should set dev.ixl.0.debug.disable_fw_link_management=1 when using I2C [this will disable link!], then set it to 0 when done. The driver implements the SIOCGI2C ioctl, so ifconfig -v works for reading I2C data, but there are read_i2c and write_i2c sysctls under the .debug sysctl tree [the latter being useful for upper page support in QSFP+]). - Addition of an iWARP client interface (so the future iWARP driver for X722 devices can communicate with the base driver). - Add "options IXL_IW" to kernel config to enable this option. Sponsored by: Intel Corporation Added: stable/11/sys/dev/ixl/ixl_iw.c - copied unchanged from r313497, head/sys/dev/ixl/ixl_iw.c stable/11/sys/dev/ixl/ixl_iw.h - copied unchanged from r313497, head/sys/dev/ixl/ixl_iw.h stable/11/sys/dev/ixl/ixl_iw_int.h - copied unchanged from r313497, head/sys/dev/ixl/ixl_iw_int.h stable/11/sys/dev/ixl/ixl_pf_i2c.c - copied unchanged from r313497, head/sys/dev/ixl/ixl_pf_i2c.c Modified: stable/11/sys/amd64/conf/NOTES stable/11/sys/conf/files.amd64 stable/11/sys/conf/options.amd64 stable/11/sys/dev/ixl/i40e_adminq.c stable/11/sys/dev/ixl/i40e_adminq_cmd.h stable/11/sys/dev/ixl/i40e_common.c stable/11/sys/dev/ixl/i40e_devids.h stable/11/sys/dev/ixl/i40e_lan_hmc.c stable/11/sys/dev/ixl/i40e_nvm.c stable/11/sys/dev/ixl/i40e_osdep.c stable/11/sys/dev/ixl/i40e_osdep.h stable/11/sys/dev/ixl/i40e_prototype.h stable/11/sys/dev/ixl/i40e_type.h stable/11/sys/dev/ixl/i40e_virtchnl.h stable/11/sys/dev/ixl/if_ixl.c stable/11/sys/dev/ixl/if_ixlv.c stable/11/sys/dev/ixl/ixl.h stable/11/sys/dev/ixl/ixl_pf.h stable/11/sys/dev/ixl/ixl_pf_iov.c stable/11/sys/dev/ixl/ixl_pf_iov.h stable/11/sys/dev/ixl/ixl_pf_main.c stable/11/sys/dev/ixl/ixl_txrx.c stable/11/sys/dev/ixl/ixlv.h stable/11/sys/dev/ixl/ixlvc.c stable/11/sys/modules/ixl/Makefile stable/11/sys/modules/ixlv/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/conf/NOTES ============================================================================== --- stable/11/sys/amd64/conf/NOTES Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/amd64/conf/NOTES Tue May 16 17:49:15 2017 (r318357) @@ -341,6 +341,7 @@ device ipw # Intel 2100 wireless NICs. device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. device iwn # Intel 4965/1000/5000/6000 wireless NICs. device ixl # Intel XL710 40Gbe PCIE Ethernet +options IXL_IW # Enable iWARP Client Interface in ixl(4) device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device mlx4ib # Mellanox ConnectX HCA InfiniBand device mlxen # Mellanox ConnectX HCA Ethernet Modified: stable/11/sys/conf/files.amd64 ============================================================================== --- stable/11/sys/conf/files.amd64 Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/conf/files.amd64 Tue May 16 17:49:15 2017 (r318357) @@ -249,6 +249,10 @@ dev/ixl/ixl_pf_qmgr.c optional ixl pci compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/ixl_pf_iov.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_pf_i2c.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_iw.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/if_ixlv.c optional ixlv pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/ixlvc.c optional ixlv pci \ Modified: stable/11/sys/conf/options.amd64 ============================================================================== --- stable/11/sys/conf/options.amd64 Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/conf/options.amd64 Tue May 16 17:49:15 2017 (r318357) @@ -49,6 +49,9 @@ AGP_DEBUG opt_agp.h ATKBD_DFLT_KEYMAP opt_atkbd.h +# iWARP client interface support in ixl +IXL_IW opt_ixl.h + # ------------------------------- # EOF # ------------------------------- Modified: stable/11/sys/dev/ixl/i40e_adminq.c ============================================================================== --- stable/11/sys/dev/ixl/i40e_adminq.c Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_adminq.c Tue May 16 17:49:15 2017 (r318357) @@ -1020,11 +1020,11 @@ enum i40e_status_code i40e_clean_arq_ele desc = I40E_ADMINQ_DESC(hw->aq.arq, ntc); desc_idx = ntc; + hw->aq.arq_last_status = + (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval); flags = LE16_TO_CPU(desc->flags); if (flags & I40E_AQ_FLAG_ERR) { ret_code = I40E_ERR_ADMIN_QUEUE_ERROR; - hw->aq.arq_last_status = - (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval); i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQRX: Event received with error 0x%X.\n", Modified: stable/11/sys/dev/ixl/i40e_adminq_cmd.h ============================================================================== --- stable/11/sys/dev/ixl/i40e_adminq_cmd.h Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_adminq_cmd.h Tue May 16 17:49:15 2017 (r318357) @@ -154,6 +154,7 @@ enum i40e_admin_queue_opc { /* WoL commands */ i40e_aqc_opc_set_wol_filter = 0x0120, i40e_aqc_opc_get_wake_reason = 0x0121, + i40e_aqc_opc_clear_all_wol_filters = 0x025E, /* internal switch commands */ i40e_aqc_opc_get_switch_config = 0x0200, @@ -535,7 +536,8 @@ struct i40e_aqc_mac_address_read { #define I40E_AQC_PORT_ADDR_VALID 0x40 #define I40E_AQC_WOL_ADDR_VALID 0x80 #define I40E_AQC_MC_MAG_EN_VALID 0x100 -#define I40E_AQC_ADDR_VALID_MASK 0x1F0 +#define I40E_AQC_WOL_PRESERVE_STATUS 0x200 +#define I40E_AQC_ADDR_VALID_MASK 0x3F0 u8 reserved[6]; __le32 addr_high; __le32 addr_low; @@ -556,6 +558,7 @@ I40E_CHECK_STRUCT_LEN(24, i40e_aqc_mac_a struct i40e_aqc_mac_address_write { __le16 command_flags; #define I40E_AQC_MC_MAG_EN 0x0100 +#define I40E_AQC_WOL_PRESERVE_ON_PFR 0x0200 #define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x0000 #define I40E_AQC_WRITE_TYPE_LAA_WOL 0x4000 #define I40E_AQC_WRITE_TYPE_PORT 0x8000 @@ -594,6 +597,7 @@ struct i40e_aqc_set_wol_filter { __le16 cmd_flags; #define I40E_AQC_SET_WOL_FILTER 0x8000 #define I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL 0x4000 +#define I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR 0x2000 #define I40E_AQC_SET_WOL_FILTER_ACTION_CLEAR 0 #define I40E_AQC_SET_WOL_FILTER_ACTION_SET 1 __le16 valid_flags; @@ -1757,6 +1761,8 @@ struct i40e_aq_get_phy_abilities_resp { #define I40E_AQ_PHY_LINK_ENABLED 0x08 #define I40E_AQ_PHY_AN_ENABLED 0x10 #define I40E_AQ_PHY_FLAG_MODULE_QUAL 0x20 +#define I40E_AQ_PHY_FEC_ABILITY_KR 0x40 +#define I40E_AQ_PHY_FEC_ABILITY_RS 0x80 __le16 eee_capability; #define I40E_AQ_EEE_100BASE_TX 0x0002 #define I40E_AQ_EEE_1000BASE_T 0x0004 @@ -1768,11 +1774,20 @@ struct i40e_aq_get_phy_abilities_resp { u8 d3_lpan; #define I40E_AQ_SET_PHY_D3_LPAN_ENA 0x01 u8 phy_type_ext; -#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01 -#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02 +#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0x01 +#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0x02 #define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04 #define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08 - u8 mod_type_ext; + u8 fec_cfg_curr_mod_ext_info; +#define I40E_AQ_ENABLE_FEC_KR 0x01 +#define I40E_AQ_ENABLE_FEC_RS 0x02 +#define I40E_AQ_REQUEST_FEC_KR 0x04 +#define I40E_AQ_REQUEST_FEC_RS 0x08 +#define I40E_AQ_ENABLE_FEC_AUTO 0x10 +#define I40E_AQ_FEC +#define I40E_AQ_MODULE_TYPE_EXT_MASK 0xE0 +#define I40E_AQ_MODULE_TYPE_EXT_SHIFT 5 + u8 ext_comp_code; u8 phy_id[4]; u8 module_type[3]; @@ -1796,11 +1811,15 @@ struct i40e_aq_set_phy_config { /* same __le32 eeer; u8 low_power_ctrl; u8 phy_type_ext; -#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01 -#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02 -#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04 -#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08 - u8 reserved[2]; + u8 fec_config; +#define I40E_AQ_SET_FEC_ABILITY_KR BIT(0) +#define I40E_AQ_SET_FEC_ABILITY_RS BIT(1) +#define I40E_AQ_SET_FEC_REQUEST_KR BIT(2) +#define I40E_AQ_SET_FEC_REQUEST_RS BIT(3) +#define I40E_AQ_SET_FEC_AUTO BIT(4) +#define I40E_AQ_PHY_FEC_CONFIG_SHIFT 0x0 +#define I40E_AQ_PHY_FEC_CONFIG_MASK (0x1F << I40E_AQ_PHY_FEC_CONFIG_SHIFT) + u8 reserved; }; I40E_CHECK_CMD_LENGTH(i40e_aq_set_phy_config); @@ -1890,6 +1909,8 @@ struct i40e_aqc_get_link_status { u8 loopback; /* use defines from i40e_aqc_set_lb_mode */ __le16 max_frame_size; u8 config; +#define I40E_AQ_CONFIG_FEC_KR_ENA 0x01 +#define I40E_AQ_CONFIG_FEC_RS_ENA 0x02 #define I40E_AQ_CONFIG_CRC_ENA 0x04 #define I40E_AQ_CONFIG_PACING_MASK 0x78 u8 power_desc; Modified: stable/11/sys/dev/ixl/i40e_common.c ============================================================================== --- stable/11/sys/dev/ixl/i40e_common.c Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_common.c Tue May 16 17:49:15 2017 (r318357) @@ -78,7 +78,6 @@ enum i40e_status_code i40e_set_mac_type( hw->mac.type = I40E_MAC_X722; break; case I40E_DEV_ID_X722_VF: - case I40E_DEV_ID_X722_VF_HV: case I40E_DEV_ID_X722_A0_VF: hw->mac.type = I40E_MAC_X722_VF; break; @@ -1088,7 +1087,8 @@ enum i40e_status_code i40e_get_mac_addr( status = i40e_aq_mac_address_read(hw, &flags, &addrs, NULL); if (flags & I40E_AQC_LAN_ADDR_VALID) - memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac)); + i40e_memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac), + I40E_NONDMA_TO_NONDMA); return status; } @@ -1111,7 +1111,8 @@ enum i40e_status_code i40e_get_port_mac_ return status; if (flags & I40E_AQC_PORT_ADDR_VALID) - memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac)); + i40e_memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac), + I40E_NONDMA_TO_NONDMA); else status = I40E_ERR_INVALID_MAC_ADDR; @@ -1224,6 +1225,8 @@ static enum i40e_media_type i40e_get_med case I40E_PHY_TYPE_1000BASE_LX: case I40E_PHY_TYPE_40GBASE_SR4: case I40E_PHY_TYPE_40GBASE_LR4: + case I40E_PHY_TYPE_25GBASE_LR: + case I40E_PHY_TYPE_25GBASE_SR: media = I40E_MEDIA_TYPE_FIBER; break; case I40E_PHY_TYPE_100BASE_TX: @@ -1238,6 +1241,7 @@ static enum i40e_media_type i40e_get_med case I40E_PHY_TYPE_10GBASE_SFPP_CU: case I40E_PHY_TYPE_40GBASE_AOC: case I40E_PHY_TYPE_10GBASE_AOC: + case I40E_PHY_TYPE_25GBASE_CR: media = I40E_MEDIA_TYPE_DA; break; case I40E_PHY_TYPE_1000BASE_KX: @@ -1245,6 +1249,7 @@ static enum i40e_media_type i40e_get_med case I40E_PHY_TYPE_10GBASE_KR: case I40E_PHY_TYPE_40GBASE_KR4: case I40E_PHY_TYPE_20GBASE_KR2: + case I40E_PHY_TYPE_25GBASE_KR: media = I40E_MEDIA_TYPE_BACKPLANE; break; case I40E_PHY_TYPE_SGMII: @@ -1725,10 +1730,13 @@ enum i40e_status_code i40e_set_fc(struct config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK; /* Copy over all the old settings */ config.phy_type = abilities.phy_type; + config.phy_type_ext = abilities.phy_type_ext; config.link_speed = abilities.link_speed; config.eee_capability = abilities.eee_capability; config.eeer = abilities.eeer_val; config.low_power_ctrl = abilities.d3_lpan; + config.fec_config = abilities.fec_cfg_curr_mod_ext_info & + I40E_AQ_PHY_FEC_CONFIG_MASK; status = i40e_aq_set_phy_config(hw, &config, NULL); if (status) @@ -1888,6 +1896,8 @@ enum i40e_status_code i40e_aq_get_link_i hw_link_info->link_speed = (enum i40e_aq_link_speed)resp->link_speed; hw_link_info->link_info = resp->link_info; hw_link_info->an_info = resp->an_info; + hw_link_info->fec_info = resp->config & (I40E_AQ_CONFIG_FEC_KR_ENA | + I40E_AQ_CONFIG_FEC_RS_ENA); hw_link_info->ext_info = resp->ext_info; hw_link_info->loopback = resp->loopback; hw_link_info->max_frame_size = LE16_TO_CPU(resp->max_frame_size); @@ -1910,12 +1920,13 @@ enum i40e_status_code i40e_aq_get_link_i else hw_link_info->crc_enable = FALSE; - if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_ENABLE)) + if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_IS_ENABLED)) hw_link_info->lse_enable = TRUE; else hw_link_info->lse_enable = FALSE; - if ((hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 && + if ((hw->mac.type == I40E_MAC_XL710) && + (hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 && hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; @@ -2280,6 +2291,43 @@ enum i40e_status_code i40e_aq_set_vsi_mu } /** +* i40e_aq_set_vsi_full_promiscuous +* @hw: pointer to the hw struct +* @seid: VSI number +* @set: set promiscuous enable/disable +* @cmd_details: pointer to command details structure or NULL +**/ +enum i40e_status_code i40e_aq_set_vsi_full_promiscuous(struct i40e_hw *hw, + u16 seid, bool set, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = + (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw; + enum i40e_status_code status; + u16 flags = 0; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_set_vsi_promiscuous_modes); + + if (set) + flags = I40E_AQC_SET_VSI_PROMISC_UNICAST | + I40E_AQC_SET_VSI_PROMISC_MULTICAST | + I40E_AQC_SET_VSI_PROMISC_BROADCAST; + + cmd->promiscuous_flags = CPU_TO_LE16(flags); + + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST | + I40E_AQC_SET_VSI_PROMISC_MULTICAST | + I40E_AQC_SET_VSI_PROMISC_BROADCAST); + + cmd->seid = CPU_TO_LE16(seid); + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + +/** * i40e_aq_set_vsi_mc_promisc_on_vlan * @hw: pointer to the hw struct * @seid: vsi number @@ -2348,6 +2396,40 @@ enum i40e_status_code i40e_aq_set_vsi_uc } /** + * i40e_aq_set_vsi_bc_promisc_on_vlan + * @hw: pointer to the hw struct + * @seid: vsi number + * @enable: set broadcast promiscuous enable/disable for a given VLAN + * @vid: The VLAN tag filter - capture any broadcast packet with this VLAN tag + * @cmd_details: pointer to command details structure or NULL + **/ +enum i40e_status_code i40e_aq_set_vsi_bc_promisc_on_vlan(struct i40e_hw *hw, + u16 seid, bool enable, u16 vid, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = + (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw; + enum i40e_status_code status; + u16 flags = 0; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_set_vsi_promiscuous_modes); + + if (enable) + flags |= I40E_AQC_SET_VSI_PROMISC_BROADCAST; + + cmd->promiscuous_flags = CPU_TO_LE16(flags); + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_BROADCAST); + cmd->seid = CPU_TO_LE16(seid); + cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID); + + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + +/** * i40e_aq_set_vsi_broadcast * @hw: pointer to the hw struct * @seid: vsi number @@ -2680,14 +2762,17 @@ enum i40e_status_code i40e_update_link_i if (status) return status; - if (hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) { + /* extra checking needed to ensure link info to user is timely */ + if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && + ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || + !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) { status = i40e_aq_get_phy_capabilities(hw, FALSE, false, &abilities, NULL); if (status) return status; - memcpy(hw->phy.link_info.module_type, &abilities.module_type, - sizeof(hw->phy.link_info.module_type)); + i40e_memcpy(hw->phy.link_info.module_type, &abilities.module_type, + sizeof(hw->phy.link_info.module_type), I40E_NONDMA_TO_NONDMA); } return status; } @@ -3537,6 +3622,14 @@ static void i40e_parse_discover_capabili break; case I40E_AQ_CAP_ID_MNG_MODE: p->management_mode = number; + if (major_rev > 1) { + p->mng_protocols_over_mctp = logical_id; + i40e_debug(hw, I40E_DEBUG_INIT, + "HW Capability: Protocols over MCTP = %d\n", + p->mng_protocols_over_mctp); + } else { + p->mng_protocols_over_mctp = 0; + } i40e_debug(hw, I40E_DEBUG_INIT, "HW Capability: Management Mode = %d\n", p->management_mode); @@ -3765,7 +3858,6 @@ static void i40e_parse_discover_capabili else p->acpi_prog_method = I40E_ACPI_PROGRAMMING_METHOD_HW_FVL; p->proxy_support = (phys_id & I40E_PROXY_SUPPORT_MASK) ? 1 : 0; - p->proxy_support = p->proxy_support; i40e_debug(hw, I40E_DEBUG_INIT, "HW Capability: WOL proxy filters = %d\n", hw->num_wol_proxy_filters); @@ -3806,8 +3898,10 @@ static void i40e_parse_discover_capabili /* partition id is 1-based, and functions are evenly spread * across the ports as partitions */ - hw->partition_id = (hw->pf_id / hw->num_ports) + 1; - hw->num_partitions = num_functions / hw->num_ports; + if (hw->num_ports != 0) { + hw->partition_id = (hw->pf_id / hw->num_ports) + 1; + hw->num_partitions = num_functions / hw->num_ports; + } /* additional HW specific goodies that might * someday be HW version specific @@ -4292,11 +4386,15 @@ enum i40e_status_code i40e_aq_start_stop /** * i40e_aq_add_udp_tunnel * @hw: pointer to the hw struct - * @udp_port: the UDP port to add + * @udp_port: the UDP port to add in Host byte order * @header_len: length of the tunneling header length in DWords * @protocol_index: protocol index type * @filter_index: pointer to filter index * @cmd_details: pointer to command details structure or NULL + * + * Note: Firmware expects the udp_port value to be in Little Endian format, + * and this function will call CPU_TO_LE16 to convert from Host byte order to + * Little Endian order. **/ enum i40e_status_code i40e_aq_add_udp_tunnel(struct i40e_hw *hw, u16 udp_port, u8 protocol_index, @@ -5905,9 +6003,6 @@ enum i40e_status_code i40e_aq_configure_ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); - if (bwd_size > I40E_AQ_LARGE_BUF) - desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - desc.datalen = CPU_TO_LE16(bwd_size); status = i40e_asq_send_command(hw, &desc, bw_data, bwd_size, cmd_details); @@ -5916,7 +6011,92 @@ enum i40e_status_code i40e_aq_configure_ } /** - * i40e_read_phy_register + * i40e_read_phy_register_clause22 + * @hw: pointer to the HW structure + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Reads specified PHY register value + **/ +enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw, + u16 reg, u8 phy_addr, u16 *value) +{ + enum i40e_status_code status = I40E_ERR_TIMEOUT; + u8 port_num = (u8)hw->func_caps.mdio_port_num; + u32 command = 0; + u16 retry = 1000; + + command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) | + (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | + (I40E_MDIO_CLAUSE22_OPCODE_READ_MASK) | + (I40E_MDIO_CLAUSE22_STCODE_MASK) | + (I40E_GLGEN_MSCA_MDICMD_MASK); + wr32(hw, I40E_GLGEN_MSCA(port_num), command); + do { + command = rd32(hw, I40E_GLGEN_MSCA(port_num)); + if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) { + status = I40E_SUCCESS; + break; + } + i40e_usec_delay(10); + retry--; + } while (retry); + + if (status) { + i40e_debug(hw, I40E_DEBUG_PHY, + "PHY: Can't write command to external PHY.\n"); + } else { + command = rd32(hw, I40E_GLGEN_MSRWD(port_num)); + *value = (command & I40E_GLGEN_MSRWD_MDIRDDATA_MASK) >> + I40E_GLGEN_MSRWD_MDIRDDATA_SHIFT; + } + + return status; +} + +/** + * i40e_write_phy_register_clause22 + * @hw: pointer to the HW structure + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Writes specified PHY register value + **/ +enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw, + u16 reg, u8 phy_addr, u16 value) +{ + enum i40e_status_code status = I40E_ERR_TIMEOUT; + u8 port_num = (u8)hw->func_caps.mdio_port_num; + u32 command = 0; + u16 retry = 1000; + + command = value << I40E_GLGEN_MSRWD_MDIWRDATA_SHIFT; + wr32(hw, I40E_GLGEN_MSRWD(port_num), command); + + command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) | + (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | + (I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK) | + (I40E_MDIO_CLAUSE22_STCODE_MASK) | + (I40E_GLGEN_MSCA_MDICMD_MASK); + + wr32(hw, I40E_GLGEN_MSCA(port_num), command); + do { + command = rd32(hw, I40E_GLGEN_MSCA(port_num)); + if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) { + status = I40E_SUCCESS; + break; + } + i40e_usec_delay(10); + retry--; + } while (retry); + + return status; +} + +/** + * i40e_read_phy_register_clause45 * @hw: pointer to the HW structure * @page: registers page number * @reg: register address in the page @@ -5925,9 +6105,8 @@ enum i40e_status_code i40e_aq_configure_ * * Reads specified PHY register value **/ -enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw, - u8 page, u16 reg, u8 phy_addr, - u16 *value) +enum i40e_status_code i40e_read_phy_register_clause45(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 *value) { enum i40e_status_code status = I40E_ERR_TIMEOUT; u32 command = 0; @@ -5937,8 +6116,8 @@ enum i40e_status_code i40e_read_phy_regi command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) | (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_ADDRESS) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); wr32(hw, I40E_GLGEN_MSCA(port_num), command); @@ -5960,8 +6139,8 @@ enum i40e_status_code i40e_read_phy_regi command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_READ) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_READ_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); status = I40E_ERR_TIMEOUT; @@ -5991,7 +6170,7 @@ phy_read_end: } /** - * i40e_write_phy_register + * i40e_write_phy_register_clause45 * @hw: pointer to the HW structure * @page: registers page number * @reg: register address in the page @@ -6000,9 +6179,8 @@ phy_read_end: * * Writes value to specified PHY register **/ -enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw, - u8 page, u16 reg, u8 phy_addr, - u16 value) +enum i40e_status_code i40e_write_phy_register_clause45(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 value) { enum i40e_status_code status = I40E_ERR_TIMEOUT; u32 command = 0; @@ -6012,8 +6190,8 @@ enum i40e_status_code i40e_write_phy_reg command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) | (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_ADDRESS) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); wr32(hw, I40E_GLGEN_MSCA(port_num), command); @@ -6037,8 +6215,8 @@ enum i40e_status_code i40e_write_phy_reg command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_WRITE) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); status = I40E_ERR_TIMEOUT; @@ -6059,6 +6237,78 @@ phy_write_end: } /** + * i40e_write_phy_register + * @hw: pointer to the HW structure + * @page: registers page number + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Writes value to specified PHY register + **/ +enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 value) +{ + enum i40e_status_code status; + + switch (hw->device_id) { + case I40E_DEV_ID_1G_BASE_T_X722: + status = i40e_write_phy_register_clause22(hw, + reg, phy_addr, value); + break; + case I40E_DEV_ID_10G_BASE_T: + case I40E_DEV_ID_10G_BASE_T4: + case I40E_DEV_ID_10G_BASE_T_X722: + case I40E_DEV_ID_25G_B: + case I40E_DEV_ID_25G_SFP28: + status = i40e_write_phy_register_clause45(hw, + page, reg, phy_addr, value); + break; + default: + status = I40E_ERR_UNKNOWN_PHY; + break; + } + + return status; +} + +/** + * i40e_read_phy_register + * @hw: pointer to the HW structure + * @page: registers page number + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Reads specified PHY register value + **/ +enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 *value) +{ + enum i40e_status_code status; + + switch (hw->device_id) { + case I40E_DEV_ID_1G_BASE_T_X722: + status = i40e_read_phy_register_clause22(hw, reg, phy_addr, + value); + break; + case I40E_DEV_ID_10G_BASE_T: + case I40E_DEV_ID_10G_BASE_T4: + case I40E_DEV_ID_10G_BASE_T_X722: + case I40E_DEV_ID_25G_B: + case I40E_DEV_ID_25G_SFP28: + status = i40e_read_phy_register_clause45(hw, page, reg, + phy_addr, value); + break; + default: + status = I40E_ERR_UNKNOWN_PHY; + break; + } + + return status; +} + +/** * i40e_get_phy_address * @hw: pointer to the HW structure * @dev_num: PHY port num that address we want @@ -6100,14 +6350,16 @@ enum i40e_status_code i40e_blink_phy_lin for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++, led_addr++) { - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, &led_reg); + status = i40e_read_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, + &led_reg); if (status) goto phy_blinking_end; led_ctl = led_reg; if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) { led_reg = 0; - status = i40e_write_phy_register(hw, + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, led_addr, phy_addr, led_reg); @@ -6119,20 +6371,18 @@ enum i40e_status_code i40e_blink_phy_lin if (time > 0 && interval > 0) { for (i = 0; i < time * 1000; i += interval) { - status = i40e_read_phy_register(hw, - I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, - &led_reg); + status = i40e_read_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, &led_reg); if (status) goto restore_config; if (led_reg & I40E_PHY_LED_MANUAL_ON) led_reg = 0; else led_reg = I40E_PHY_LED_MANUAL_ON; - status = i40e_write_phy_register(hw, - I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, - led_reg); + status = i40e_write_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_reg); if (status) goto restore_config; i40e_msec_delay(interval); @@ -6140,8 +6390,9 @@ enum i40e_status_code i40e_blink_phy_lin } restore_config: - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr, - phy_addr, led_ctl); + status = i40e_write_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_ctl); phy_blinking_end: return status; @@ -6172,8 +6423,10 @@ enum i40e_status_code i40e_led_get_phy(s for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++, temp_addr++) { - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, - temp_addr, phy_addr, ®_val); + status = i40e_read_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + temp_addr, phy_addr, + ®_val); if (status) return status; *val = reg_val; @@ -6206,41 +6459,42 @@ enum i40e_status_code i40e_led_set_phy(s i = rd32(hw, I40E_PFGEN_PORTNUM); port_num = (u8)(i & I40E_PFGEN_PORTNUM_PORT_NUM_MASK); phy_addr = i40e_get_phy_address(hw, port_num); - - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr, - phy_addr, &led_reg); + status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, &led_reg); if (status) return status; led_ctl = led_reg; if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) { led_reg = 0; - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, led_reg); + status = i40e_write_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, + led_reg); if (status) return status; } - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, &led_reg); + status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, &led_reg); if (status) goto restore_config; if (on) led_reg = I40E_PHY_LED_MANUAL_ON; else led_reg = 0; - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, led_reg); + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_reg); if (status) goto restore_config; if (mode & I40E_PHY_LED_MODE_ORIG) { led_ctl = (mode & I40E_PHY_LED_MODE_MASK); - status = i40e_write_phy_register(hw, + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, led_addr, phy_addr, led_ctl); } return status; restore_config: - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr, - phy_addr, led_ctl); + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_ctl); return status; } @@ -6485,10 +6739,13 @@ enum i40e_status_code i40e_aq_set_arp_pr i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_proxy_config); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); desc.params.external.addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config)); desc.params.external.addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config)); + desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_arp_proxy_data)); status = i40e_asq_send_command(hw, &desc, proxy_config, sizeof(struct i40e_aqc_arp_proxy_data), @@ -6519,10 +6776,13 @@ enum i40e_status_code i40e_aq_set_ns_pro i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_ns_proxy_table_entry); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); desc.params.external.addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry)); desc.params.external.addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry)); + desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_ns_proxy_data)); status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry, sizeof(struct i40e_aqc_ns_proxy_data), @@ -6569,9 +6829,11 @@ enum i40e_status_code i40e_aq_set_clear_ if (set_filter) { if (!filter) return I40E_ERR_PARAM; + cmd_flags |= I40E_AQC_SET_WOL_FILTER; - buff_len = sizeof(*filter); + cmd_flags |= I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR; } + if (no_wol_tco) cmd_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL; cmd->cmd_flags = CPU_TO_LE16(cmd_flags); @@ -6582,6 +6844,12 @@ enum i40e_status_code i40e_aq_set_clear_ valid_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_ACTION_VALID; cmd->valid_flags = CPU_TO_LE16(valid_flags); + buff_len = sizeof(*filter); + desc.datalen = CPU_TO_LE16(buff_len); + + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); + cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)filter)); cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)filter)); @@ -6618,3 +6886,24 @@ enum i40e_status_code i40e_aq_get_wake_e return status; } +/** +* i40e_aq_clear_all_wol_filters +* @hw: pointer to the hw struct +* @cmd_details: pointer to command details structure or NULL +* +* Get information for the reason of a Wake Up event +**/ +enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_clear_all_wol_filters); + + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + Modified: stable/11/sys/dev/ixl/i40e_devids.h ============================================================================== --- stable/11/sys/dev/ixl/i40e_devids.h Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_devids.h Tue May 16 17:49:15 2017 (r318357) @@ -63,7 +63,6 @@ #define I40E_DEV_ID_10G_BASE_T_X722 0x37D2 #define I40E_DEV_ID_SFP_I_X722 0x37D3 #define I40E_DEV_ID_X722_VF 0x37CD -#define I40E_DEV_ID_X722_VF_HV 0x37D9 #define i40e_is_40G_device(d) ((d) == I40E_DEV_ID_QSFP_A || \ (d) == I40E_DEV_ID_QSFP_B || \ Modified: stable/11/sys/dev/ixl/i40e_lan_hmc.c ============================================================================== --- stable/11/sys/dev/ixl/i40e_lan_hmc.c Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_lan_hmc.c Tue May 16 17:49:15 2017 (r318357) @@ -1240,11 +1240,6 @@ enum i40e_status_code i40e_hmc_get_objec u64 obj_offset_in_fpm; u32 sd_idx, sd_lmt; - if (NULL == hmc_info) { - ret_code = I40E_ERR_BAD_PTR; - DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info ptr\n"); - goto exit; - } if (NULL == hmc_info->hmc_obj) { ret_code = I40E_ERR_BAD_PTR; DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info->hmc_obj ptr\n"); Modified: stable/11/sys/dev/ixl/i40e_nvm.c ============================================================================== --- stable/11/sys/dev/ixl/i40e_nvm.c Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_nvm.c Tue May 16 17:49:15 2017 (r318357) @@ -220,14 +220,14 @@ enum i40e_status_code i40e_read_nvm_word { enum i40e_status_code ret_code = I40E_SUCCESS; - if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) { - ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ); - if (!ret_code) { + ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ); + if (!ret_code) { + if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) { ret_code = i40e_read_nvm_word_aq(hw, offset, data); - i40e_release_nvm(hw); + } else { + ret_code = i40e_read_nvm_word_srctl(hw, offset, data); } - } else { - ret_code = i40e_read_nvm_word_srctl(hw, offset, data); + i40e_release_nvm(hw); } return ret_code; } @@ -886,9 +886,20 @@ enum i40e_status_code i40e_nvmupd_comman *((u16 *)&bytes[2]) = hw->nvm_wait_opcode; } + /* Clear error status on read */ + if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR) + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; + return I40E_SUCCESS; } + /* Clear status even it is not read and log */ + if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR) { + i40e_debug(hw, I40E_DEBUG_NVM, + "Clearing I40E_NVMUPD_STATE_ERROR state without reading\n"); + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; + } + switch (hw->nvmupd_state) { case I40E_NVMUPD_STATE_INIT: status = i40e_nvmupd_state_init(hw, cmd, bytes, perrno); @@ -1247,6 +1258,11 @@ void i40e_nvmupd_check_wait_event(struct } hw->nvm_wait_opcode = 0; + if (hw->aq.arq_last_status) { + hw->nvmupd_state = I40E_NVMUPD_STATE_ERROR; + return; + } + switch (hw->nvmupd_state) { case I40E_NVMUPD_STATE_INIT_WAIT: hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; @@ -1409,7 +1425,8 @@ static enum i40e_status_code i40e_nvmupd if (hw->nvm_buff.va) { buff = hw->nvm_buff.va; - memcpy(buff, &bytes[aq_desc_len], aq_data_len); + i40e_memcpy(buff, &bytes[aq_desc_len], aq_data_len, + I40E_NONDMA_TO_NONDMA); } } @@ -1482,7 +1499,7 @@ static enum i40e_status_code i40e_nvmupd __func__, cmd->offset, cmd->offset + len); buff = ((u8 *)&hw->nvm_wb_desc) + cmd->offset; - memcpy(bytes, buff, len); + i40e_memcpy(bytes, buff, len, I40E_NONDMA_TO_NONDMA); bytes += len; remainder -= len; @@ -1496,7 +1513,7 @@ static enum i40e_status_code i40e_nvmupd i40e_debug(hw, I40E_DEBUG_NVM, "%s: databuf bytes %d to %d\n", __func__, start_byte, start_byte + remainder); - memcpy(bytes, buff, remainder); + i40e_memcpy(bytes, buff, remainder, I40E_NONDMA_TO_NONDMA); } return I40E_SUCCESS; Modified: stable/11/sys/dev/ixl/i40e_osdep.c ============================================================================== --- stable/11/sys/dev/ixl/i40e_osdep.c Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_osdep.c Tue May 16 17:49:15 2017 (r318357) @@ -189,15 +189,71 @@ void i40e_debug_shared(struct i40e_hw *hw, enum i40e_debug_mask mask, char *fmt, ...) { va_list args; + device_t dev; if (!(mask & ((struct i40e_hw *)hw)->debug_mask)) return; + dev = ((struct i40e_osdep *)hw->back)->dev; + + /* Re-implement device_printf() */ + device_print_prettyname(dev); va_start(args, fmt); - device_printf(((struct i40e_osdep *)hw->back)->dev, fmt, args); + vprintf(fmt, args); va_end(args); } +const char * +ixl_vc_opcode_str(uint16_t op) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue May 16 17:51:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F02FD706BF; Tue, 16 May 2017 17:51:32 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 454F7159; Tue, 16 May 2017 17:51:32 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GHpVRk044805; Tue, 16 May 2017 17:51:31 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GHpVHp044803; Tue, 16 May 2017 17:51:31 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201705161751.v4GHpVHp044803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Tue, 16 May 2017 17:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318358 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 17:51:32 -0000 Author: erj Date: Tue May 16 17:51:30 2017 New Revision: 318358 URL: https://svnweb.freebsd.org/changeset/base/318358 Log: MFC r318147: Add several new media types to if_media.h These include several 25G types (for active direct attach cables and LR modules), and a missing type for 10G active direct attach. Sponsored by: Intel Corporation Modified: stable/11/sys/net/ieee8023ad_lacp.c stable/11/sys/net/if_media.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/11/sys/net/ieee8023ad_lacp.c Tue May 16 17:49:15 2017 (r318357) +++ stable/11/sys/net/ieee8023ad_lacp.c Tue May 16 17:51:30 2017 (r318358) @@ -1090,6 +1090,7 @@ lacp_compose_key(struct lacp_port *lp) case IFM_10G_CR1: case IFM_10G_ER: case IFM_10G_SFI: + case IFM_10G_AOC: key = IFM_10G_LR; break; case IFM_20G_KR2: @@ -1114,6 +1115,9 @@ lacp_compose_key(struct lacp_port *lp) case IFM_25G_CR: case IFM_25G_KR: case IFM_25G_SR: + case IFM_25G_LR: + case IFM_25G_ACC: + case IFM_25G_AOC: key = IFM_25G_PCIE; break; case IFM_40G_CR4: Modified: stable/11/sys/net/if_media.h ============================================================================== --- stable/11/sys/net/if_media.h Tue May 16 17:49:15 2017 (r318357) +++ stable/11/sys/net/if_media.h Tue May 16 17:51:30 2017 (r318358) @@ -196,6 +196,10 @@ uint64_t ifmedia_baudrate(int); #define IFM_25G_SR IFM_X(55) /* 25GBase-SR */ #define IFM_50G_CR2 IFM_X(56) /* 50GBase-CR2 */ #define IFM_50G_KR2 IFM_X(57) /* 50GBase-KR2 */ +#define IFM_25G_LR IFM_X(58) /* 25GBase-LR */ +#define IFM_10G_AOC IFM_X(59) /* 10G active optical cable */ +#define IFM_25G_ACC IFM_X(60) /* 25G active copper cable */ +#define IFM_25G_AOC IFM_X(61) /* 25G active optical cable */ /* * Please update ieee8023ad_lacp.c:lacp_compose_key() @@ -447,6 +451,10 @@ struct ifmedia_description { { IFM_25G_SR, "25GBase-SR" }, \ { IFM_50G_CR2, "50GBase-CR2" }, \ { IFM_50G_KR2, "50GBase-KR2" }, \ + { IFM_25G_LR, "25GBase-LR" }, \ + { IFM_10G_AOC, "10GBase-AOC" }, \ + { IFM_25G_ACC, "25GBase-ACC" }, \ + { IFM_25G_AOC, "25GBase-AOC" }, \ { 0, NULL }, \ } @@ -775,6 +783,10 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_25G_SR, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_50G_CR2, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_50G_KR2, IF_Gbps(50ULL) }, \ + { IFM_ETHER | IFM_25G_LR, IF_Gbps(25ULL) }, \ + { IFM_ETHER | IFM_10G_AOC, IF_Gbps(10ULL) }, \ + { IFM_ETHER | IFM_25G_ACC, IF_Gbps(25ULL) }, \ + { IFM_ETHER | IFM_25G_AOC, IF_Gbps(25ULL) }, \ \ { IFM_TOKEN | IFM_TOK_STP4, IF_Mbps(4) }, \ { IFM_TOKEN | IFM_TOK_STP16, IF_Mbps(16) }, \ From owner-svn-src-all@freebsd.org Tue May 16 18:05:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4CD5D70C9B; Tue, 16 May 2017 18:05:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B51B1C14; Tue, 16 May 2017 18:05:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GI5YLQ051853; Tue, 16 May 2017 18:05:34 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GI5Yv1051852; Tue, 16 May 2017 18:05:34 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201705161805.v4GI5Yv1051852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 16 May 2017 18:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318359 - head/sys/dev/bnxt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 18:05:36 -0000 Author: sbruno Date: Tue May 16 18:05:34 2017 New Revision: 318359 URL: https://svnweb.freebsd.org/changeset/base/318359 Log: Add version tag to the driver. Start at version 1.0.0.0 Submitted by: bhargava.marreddy@broadcom.com Reviewed by: venkatkumar.duvvuru@broadcom.com Differential Revision: https://reviews.freebsd.org/D10616 Modified: head/sys/dev/bnxt/if_bnxt.c Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Tue May 16 17:51:30 2017 (r318358) +++ head/sys/dev/bnxt/if_bnxt.c Tue May 16 18:05:34 2017 (r318359) @@ -287,7 +287,8 @@ static driver_t bnxt_iflib_driver = { * iflib shared context */ -char bnxt_driver_version[] = "FreeBSD base"; +#define BNXT_DRIVER_VERSION "1.0.0.0" +char bnxt_driver_version[] = BNXT_DRIVER_VERSION; extern struct if_txrx bnxt_txrx; static struct if_shared_ctx bnxt_sctx_init = { .isc_magic = IFLIB_MAGIC, From owner-svn-src-all@freebsd.org Tue May 16 18:29:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2B2AD7064C; Tue, 16 May 2017 18:29:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EF361E48; Tue, 16 May 2017 18:29:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 02DDB10A7B9; Tue, 16 May 2017 14:29:06 -0400 (EDT) From: John Baldwin To: Michael Tuexen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317732 - head/usr.bin/truss Date: Tue, 16 May 2017 11:28:59 -0700 Message-ID: <1678847.Pdl09MfElI@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201705030923.v439NEWv072629@repo.freebsd.org> References: <201705030923.v439NEWv072629@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 16 May 2017 14:29:06 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 18:29:16 -0000 On Wednesday, May 03, 2017 09:23:14 AM Michael Tuexen wrote: > Author: tuexen > Date: Wed May 3 09:23:13 2017 > New Revision: 317732 > URL: https://svnweb.freebsd.org/changeset/base/317732 > > Log: > Decode the third argument of socket(). This is not quite right for sockets that aren't PF_INET. Probably this warrants a const char *sysdecode_socket_protocol(int domain, int protocol) that honors the domain in deciding what protocol value to output. For now this could just handle PF_INET: const char * sysdecode_socket_protocol(int domain, int protocol) { switch (domain) { case PF_INET: return (lookup_value(sockipproto, protocol)); default: return (NULL)); } Then use this in truss. The socket option stuff currently hardcodes IP protocols and levels only because we don't have a good way of obtaining the domain of an existing socket in a target process. For socket()'s protocol argument though we readily have the domain available. At some point in the future we might address the socket option issue by caching the domain argument when sockets are created in a table, and for truss when attaching to an existing process using the kinfo_file interface to learn about existing sockets, but that's not entirely trivial. -- John Baldwin From owner-svn-src-all@freebsd.org Tue May 16 18:39:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94065D7098C; Tue, 16 May 2017 18:39:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63634982; Tue, 16 May 2017 18:39:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GIdNY1067346; Tue, 16 May 2017 18:39:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GIdNr0067345; Tue, 16 May 2017 18:39:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705161839.v4GIdNr0067345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 16 May 2017 18:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318360 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 18:39:24 -0000 Author: jhb Date: Tue May 16 18:39:23 2017 New Revision: 318360 URL: https://svnweb.freebsd.org/changeset/base/318360 Log: Fix p_endcopy. For p_endcopy to work correctly, it must be the name of the next element in struct proc after the end of the copy region, not the name of the last element in the copy region. Currently, the last element (p_elf_flags) is not being copied. In addition, the p_xexit and p_xsig fields should not be copied on fork, so move them out of the copy region. Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D10677 Modified: head/sys/sys/proc.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue May 16 18:05:34 2017 (r318359) +++ head/sys/sys/proc.h Tue May 16 18:39:23 2017 (r318360) @@ -624,13 +624,13 @@ struct proc { pid_t p_reapsubtree; /* (e) Pid of the direct child of the reaper which spawned our subtree. */ - u_int p_xexit; /* (c) Exit code. */ - u_int p_xsig; /* (c) Stop/kill sig. */ uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ - /* End area that is copied on creation. */ -#define p_endcopy p_elf_flags +#define p_endcopy p_xexit + + u_int p_xexit; /* (c) Exit code. */ + u_int p_xsig; /* (c) Stop/kill sig. */ struct pgrp *p_pgrp; /* (c + e) Pointer to process group. */ struct knlist *p_klist; /* (c) Knotes attached to this proc. */ int p_numthreads; /* (c) Number of threads. */ From owner-svn-src-all@freebsd.org Tue May 16 18:41:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4FB0D70B61; Tue, 16 May 2017 18:41:49 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 081E31306; Tue, 16 May 2017 18:41:48 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GIfbNV069577; Tue, 16 May 2017 18:41:37 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GIfblf069573; Tue, 16 May 2017 18:41:37 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201705161841.v4GIfblf069573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Tue, 16 May 2017 18:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318361 - in vendor/Juniper/libxo/dist: . doc libxo tests/core tests/core/saved tests/gettext tests/gettext/po/pig_latin tests/gettext/saved xo X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 18:41:49 -0000 Author: phil Date: Tue May 16 18:41:36 2017 New Revision: 318361 URL: https://svnweb.freebsd.org/changeset/base/318361 Log: Import libxo 0.7.2 Added: vendor/Juniper/libxo/dist/libxo/xo_options.7 (contents, props changed) Modified: vendor/Juniper/libxo/dist/configure.ac vendor/Juniper/libxo/dist/doc/Makefile.am vendor/Juniper/libxo/dist/doc/libxo-manual.html vendor/Juniper/libxo/dist/doc/libxo.txt vendor/Juniper/libxo/dist/libxo/Makefile.am vendor/Juniper/libxo/dist/libxo/libxo.c vendor/Juniper/libxo/dist/libxo/xo.h vendor/Juniper/libxo/dist/libxo/xo_buf.h vendor/Juniper/libxo/dist/libxo/xo_encoder.c vendor/Juniper/libxo/dist/libxo/xo_format.5 vendor/Juniper/libxo/dist/libxo/xo_syslog.c vendor/Juniper/libxo/dist/tests/core/saved/test_01.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_01.J.out vendor/Juniper/libxo/dist/tests/core/saved/test_01.JP.out vendor/Juniper/libxo/dist/tests/core/saved/test_01.X.out vendor/Juniper/libxo/dist/tests/core/saved/test_01.XP.out vendor/Juniper/libxo/dist/tests/core/saved/test_10.X.out vendor/Juniper/libxo/dist/tests/core/saved/test_10.XP.out vendor/Juniper/libxo/dist/tests/core/saved/test_11.X.out vendor/Juniper/libxo/dist/tests/core/saved/test_11.XP.out vendor/Juniper/libxo/dist/tests/core/test_01.c vendor/Juniper/libxo/dist/tests/gettext/po/pig_latin/strerror.po vendor/Juniper/libxo/dist/tests/gettext/saved/gt_01.J.out vendor/Juniper/libxo/dist/tests/gettext/saved/gt_01.JP.out vendor/Juniper/libxo/dist/tests/gettext/strerror.pot vendor/Juniper/libxo/dist/xo/xo.c Modified: vendor/Juniper/libxo/dist/configure.ac ============================================================================== --- vendor/Juniper/libxo/dist/configure.ac Tue May 16 18:39:23 2017 (r318360) +++ vendor/Juniper/libxo/dist/configure.ac Tue May 16 18:41:36 2017 (r318361) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.6.3], [phil@juniper.net]) +AC_INIT([libxo], [0.7.2], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. @@ -20,7 +20,6 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_PROG_CC -AM_PROG_AR AC_PROG_INSTALL AC_CONFIG_MACRO_DIR([m4]) AC_PROG_LN_S @@ -135,6 +134,21 @@ if test "$GETTEXT_ENABLE" != "no"; then AC_MSG_RESULT([$HAVE_GETTEXT]) fi + + if test "$HAVE_GETTEXT" != "yes"; then + GETTEXT_PREFIX=/usr/local + AC_MSG_CHECKING([gettext in ${GETTEXT_PREFIX}]) + + _save_cflags="$CFLAGS" + CFLAGS="$CFLAGS -I${GETTEXT_PREFIX}/include -L${GETTEXT_PREFIX}/lib -Werror -lintl" + AC_LINK_IFELSE([AC_LANG_SOURCE([[#include ] + [int main() {char *cp = dgettext(NULL, "xx"); return 0; }]])], + [HAVE_GETTEXT=yes], + [HAVE_GETTEXT=no]) + CFLAGS="$_save_cflags" + + AC_MSG_RESULT([$HAVE_GETTEXT]) + fi fi if test "$HAVE_GETTEXT" = "yes"; then @@ -278,6 +292,13 @@ AC_ARG_ENABLE([debug], AC_MSG_RESULT([$LIBXO_DEBUG]) AM_CONDITIONAL([LIBXO_DEBUG], [test "$LIBXO_DEBUG" != "no"]) +AC_MSG_CHECKING([whether to use int return codes]) +AC_ARG_ENABLE([int-return-codes], + [ --enable-int-return-codes Use int return codes (instead of ssize_t)], + [USE_INT_RETURN_CODES=yes; AC_DEFINE([USE_INT_RETURN_CODES], [1], [Use int return codes])], + [USE_INT_RETURN_CODES=no]) +AC_MSG_RESULT([$USE_INT_RETURN_CODES]) + AC_MSG_CHECKING([whether to build with text-only rendering]) AC_ARG_ENABLE([text-only], [ --enable-text-only Turn on text-only rendering], Modified: vendor/Juniper/libxo/dist/doc/Makefile.am ============================================================================== --- vendor/Juniper/libxo/dist/doc/Makefile.am Tue May 16 18:39:23 2017 (r318360) +++ vendor/Juniper/libxo/dist/doc/Makefile.am Tue May 16 18:41:36 2017 (r318361) @@ -61,9 +61,9 @@ xolint.txt: ${top_srcdir}/xolint/xolint. CLEANFILES = \ xolint.txt \ ${INPUT}.xml \ -${INPUT}.txt \ ${INPUT}.fxml \ -${INPUT}.html +${OUTPUT}.txt \ +${OUTPUT}.html else doc docs: @${ECHO} "The 'oxtradoc' tool is not installed; see libslax.org" Modified: vendor/Juniper/libxo/dist/doc/libxo-manual.html ============================================================================== --- vendor/Juniper/libxo/dist/doc/libxo-manual.html Tue May 16 18:39:23 2017 (r318360) +++ vendor/Juniper/libxo/dist/doc/libxo-manual.html Tue May 16 18:41:36 2017 (r318361) @@ -515,7 +515,7 @@ li.indline1 { } @top-right { - content: "May 2016"; + content: "May 2017"; } @top-center { @@ -22009,7 +22009,7 @@ jQuery(function ($) { -May 28, 2016 +May 15, 2017

libxo: The Easy Way to Generate text, XML, JSON, and HTML output
libxo-manual

@@ -22271,36 +22271,40 @@ jQuery(function ($) {
  • 3.1.4   
    -xo_set_style @@ -23879,7 +23883,7 @@ jQuery(function ($) {

    For strings, the 'h' and 'l' modifiers affect the interpretation of the bytes pointed to argument. The default '%s' string is a 'char *' pointer to a string encoded as UTF-8. Since UTF-8 is compatible with ASCII data, a normal 7-bit ASCII string can be used. '%ls' expects a 'wchar_t *' pointer to a wide-character string, encoded as a 32-bit Unicode values. '%hs' expects a 'char *' pointer to a multi-byte string encoded with the current locale, as given by the LC_CTYPE, LANG, or LC_ALL environment varibles. The first of this list of variables is used and if none of the variables are set, the locale defaults to "UTF‑8".

    libxo will convert these arguments as needed to either UTF-8 (for XML, JSON, and HTML styles) or locale-based strings for display in text style.

    -   xo_emit("Alll strings are utf-8 content {:tag/%ls}",
    +   xo_emit("All strings are utf-8 content {:tag/%ls}",
                L"except for wide strings");
     	    

    "%S" is equivalent to "%ls".

    @@ -24316,6 +24320,14 @@ jQuery(function ($) { + + + + + + + + @@ -24377,7 +24389,7 @@ jQuery(function ($) { - + @@ -24402,6 +24414,19 @@ jQuery(function ($) {
    Enable "Do The Right Thing" mode
    flushFlush after every libxo function call
    flush-lineFlush after every line (line-buffered)
    html Emit HTML output
    underscoresReplace XML-friendly "-"s with JSON friendly "_"s eReplace XML-friendly "-"s with JSON friendly "_"s
    units

    The brief options are detailed in Section 3.4.6.

    +

    Most of these option are simple and direct, but some require additional details:

    +

    +
      +
    • "flush‑line" performs line buffering, even when the output is not directed to a TTY device.
    • +
    • "info" generates additional data for HTML, encoded in attributes using names that state with "data‑".
    • +
    • "keys" adds a "key" attribute for XML output to indicate that a leaf is an identifier for the list member.
    • +
    • "no‑humanize"avoids "humanizing" numeric output (see humanize_number(3) for details).
    • +
    • "no‑locale" instructs libxo to avoid translating output to the current locale.
    • +
    • "no‑retain" disables the ability of libxo to internally retain "compiled" information about formatting strings.
    • +
    • "underscores" can be used with JSON output to change XML-friendly names with dashes into JSON-friendly name with underscores.
    • +
    • "warn" allows libxo to emit warnings on stderr when application code make incorrect calls.
    • +
    • "warn‑xml" causes those warnings to be placed in XML inside the output.
    • +

    @@ -24443,8 +24468,9 @@ jQuery(function ($) {
  • Section 3.1.2
  • Section 3.1.3
  • Section 3.1.4
  • -
  • Section 3.1.5
  • -
  • Section 3.1.6
  • +
  • Section 3.1.5
  • +
  • Section 3.1.6
  • +
  • Section 3.1.7
  • @@ -24460,7 +24486,7 @@ jQuery(function ($) { xo_handle_t *xop = xo_create(XO_STYLE_JSON, XOF_WARN); .... xo_emit_h(xop, "testing\n"); -

    See also Section 3.1.4.1 and Section 3.1.5.1.

    +

    See also Section 3.1.5.1 and Section 3.1.6.1.

    @@ -24499,18 +24525,31 @@ jQuery(function ($) {

    To use the default handle, pass a NULL handle:

         xo_set_style(NULL, XO_STYLE_XML);
    -	    

    Section Contents:

    +

    +
    +

    +
    +3.1.5 
    +xo_get_style +

    +

    To find the current style, use the xo_get_style() function:

    +
    +    xo_style_t xo_get_style(xo_handle_t *xop);
    +	    

    To use the default handle, pass a NULL handle:

    +
    +    style = xo_get_style(NULL);
    +	    

    Section Contents:

    -

    +

    +3.1.5.1 

    Output Styles (XO_STYLE_*) -

    The libxo functions accept a set of output styles:

    +

    The libxo functions accept a set of output styles:

    @@ -24537,45 +24576,45 @@ jQuery(function ($) {
    Flag
    -

    +

    +3.1.5.2 

    xo_set_style_name -

    The xo_set_style_name() can be used to set the style based on a name encoded as a string:

    -
    +

    The xo_set_style_name() can be used to set the style based on a name encoded as a string:

    +
         int xo_set_style_name (xo_handle_t *xop, const char *style);
    -	    

    The name can be any of the styles: "text", "xml", "json", or "html".

    -
    +	    

    The name can be any of the styles: "text", "xml", "json", or "html".

    +
         EXAMPLE:
             xo_set_style_name(NULL, "html");
     	    
    -

    +

    -3.1.5 
    +3.1.6 

    xo_set_flags -

    To set the flags, use the xo_set_flags() function:

    -
    +

    To set the flags, use the xo_set_flags() function:

    +
         void xo_set_flags(xo_handle_t *xop, unsigned flags);
    -	    

    To use the default handle, pass a NULL handle:

    -
    +	    

    To use the default handle, pass a NULL handle:

    +
         xo_set_style(NULL, XO_STYLE_XML);
    -	    

    Section Contents:

    +

    Section Contents:

    -

    +

    +3.1.6.1 

    Flags (XOF_*) -

    The set of valid flags include:

    +

    The set of valid flags include:

    @@ -24648,12 +24687,12 @@ jQuery(function ($) {
    Flag
    -

    The XOF_CLOSE_FP flag will trigger the call of the close_func (provided via xo_set_writer()) when the handle is destroyed.

    -

    The XOF_COLOR flag enables color and effects in output regardless of output device, while the XOF_COLOR_ALLOWED flag allows color and effects only if the output device is a terminal.

    -

    The XOF_PRETTY flag requests 'pretty printing', which will trigger the addition of indentation and newlines to enhance the readability of XML, JSON, and HTML output. Text output is not affected.

    -

    The XOF_WARN flag requests that warnings will trigger diagnostic output (on standard error) when the library notices errors during operations, or with arguments to functions. Without warnings enabled, such conditions are ignored.

    -

    Warnings allow developers to debug their interaction with libxo. The function "xo_failure" can used as a breakpoint for a debugger, regardless of whether warnings are enabled.

    -

    If the style is XO_STYLE_HTML, the following additional flags can be used:

    +

    The XOF_CLOSE_FP flag will trigger the call of the close_func (provided via xo_set_writer()) when the handle is destroyed.

    +

    The XOF_COLOR flag enables color and effects in output regardless of output device, while the XOF_COLOR_ALLOWED flag allows color and effects only if the output device is a terminal.

    +

    The XOF_PRETTY flag requests 'pretty printing', which will trigger the addition of indentation and newlines to enhance the readability of XML, JSON, and HTML output. Text output is not affected.

    +

    The XOF_WARN flag requests that warnings will trigger diagnostic output (on standard error) when the library notices errors during operations, or with arguments to functions. Without warnings enabled, such conditions are ignored.

    +

    Warnings allow developers to debug their interaction with libxo. The function "xo_failure" can used as a breakpoint for a debugger, regardless of whether warnings are enabled.

    +

    If the style is XO_STYLE_HTML, the following additional flags can be used:

    @@ -24670,9 +24709,9 @@ jQuery(function ($) {
    Flag
    -

    The XOF_XPATH flag enables the emission of XPath expressions detailing the hierarchy of XML elements used to encode the data field, if the XPATH style of output were requested.

    -

    The XOF_INFO flag encodes additional informational fields for HTML output. See Section 3.4.4 for details.

    -

    If the style is XO_STYLE_XML, the following additional flags can be used:

    +

    The XOF_XPATH flag enables the emission of XPath expressions detailing the hierarchy of XML elements used to encode the data field, if the XPATH style of output were requested.

    +

    The XOF_INFO flag encodes additional informational fields for HTML output. See Section 3.4.4 for details.

    +

    If the style is XO_STYLE_XML, the following additional flags can be used:

    @@ -24683,43 +24722,43 @@ jQuery(function ($) {
    FlagFlag 'key' fields for xml
    -

    The XOF_KEYS flag adds 'key' attribute to the XML encoding for field definitions that use the 'k' modifier. The key attribute has the value "key":

    -
    +

    The XOF_KEYS flag adds 'key' attribute to the XML encoding for field definitions that use the 'k' modifier. The key attribute has the value "key":

    +
         xo_emit("{k:name}", item);
     
       XML:
           <name key="key">truck</name>
     	    
    -

    +

    +3.1.6.2 

    xo_clear_flags -

    The xo_clear_flags() function turns off the given flags in a specific handle.

    -
    +

    The xo_clear_flags() function turns off the given flags in a specific handle.

    +
         void xo_clear_flags (xo_handle_t *xop, xo_xof_flags_t flags);
     	    
    -

    +

    +3.1.6.3 

    xo_set_options -

    The xo_set_options() function accepts a comma-separated list of styles and flags and enables them for a specific handle.

    -
    +

    The xo_set_options() function accepts a comma-separated list of styles and flags and enables them for a specific handle.

    +
         int xo_set_options (xo_handle_t *xop, const char *input);
    -	    

    The options are identical to those listed in Section 2.4.

    +

    The options are identical to those listed in Section 2.4.

    -

    +

    -3.1.6 
    +3.1.7 

    xo_destroy -

    The xo_destroy function releases a handle and any resources it is using. Calling xo_destroy with a NULL handle will release any resources associated with the default handle.

    -
    +

    The xo_destroy function releases a handle and any resources it is using. Calling xo_destroy with a NULL handle will release any resources associated with the default handle.

    +
         void xo_destroy(xo_handle_t *xop);
     	    
    @@ -24730,7 +24769,7 @@ jQuery(function ($) { Emitting Content (xo_emit)

    The following functions are used to emit output:

    -
    +
         int xo_emit (const char *fmt, ...);
         int xo_emit_h (xo_handle_t *xop, const char *fmt, ...);
         int xo_emit_hv (xo_handle_t *xop, const char *fmt, va_list vap);
    @@ -24750,7 +24789,7 @@ jQuery(function ($) {
     Single Field Emitting Functions (xo_emit_field)
     
     

    The following functions can also make output, but only make a single field at a time:

    -
    +
         int xo_emit_field_hv (xo_handle_t *xop, const char *rolmod,
                       const char *contents, const char *fmt, 
                       const char *efmt, va_list vap);
    @@ -24762,7 +24801,7 @@ jQuery(function ($) {
         int xo_emit_field (const char *rolmod, const char *contents,
                      const char *fmt, const char *efmt, ...);
     	    

    These functions are intended to avoid the scenario where one would otherwise need to compose a format descriptors using snprintf(). The individual parts of the format descriptor are passed in distinctly.

    -
    +
         xo_emit("T", "Host name is ", NULL, NULL);
         xo_emit("V", "host-name", NULL, NULL, host-name);
     	    
    @@ -24773,14 +24812,14 @@ jQuery(function ($) { Attributes (xo_attr)

    The xo_attr() function emits attributes for the XML output style.

    -
    +
         int xo_attr (const char *name, const char *fmt, ...);
         int xo_attr_h (xo_handle_t *xop, const char *name, 
                        const char *fmt, ...);
         int xo_attr_hv (xo_handle_t *xop, const char *name, 
                        const char *fmt, va_list vap);
     	    

    The name parameter give the name of the attribute to be encoded. The fmt parameter gives a printf-style format string used to format the value of the attribute using any remaining arguments, or the vap parameter passed to xo_attr_hv().

    -
    +
         EXAMPLE:
           xo_attr("seconds", "%ld", (unsigned long) login_time);
           struct tm *tmp = localtime(login_time);
    @@ -24798,7 +24837,7 @@ jQuery(function ($) {
     Flushing Output (xo_flush)
     
     

    libxo buffers data, both for performance and consistency, but also to allow some advanced features to work properly. At various times, the caller may wish to flush any data buffered within the library. The xo_flush() call is used for this:

    -
    +
         void xo_flush (void);
         void xo_flush_h (xo_handle_t *xop);
     	    

    Calling xo_flush also triggers the flush function associated with the handle. For the default handle, this is equivalent to "fflush(stdio);".

    @@ -24810,7 +24849,7 @@ jQuery(function ($) { Finishing Output (xo_finish)

    When the program is ready to exit or close a handle, a call to xo_finish() is required. This flushes any buffered data, closes open libxo constructs, and completes any pending operations.

    -
    +
         int xo_finish (void);
         int xo_finish_h (xo_handle_t *xop);
         void xo_finish_atexit (void);
    @@ -24826,7 +24865,7 @@ jQuery(function ($) {
     
     

    libxo represents to types of hierarchy: containers and lists. A container appears once under a given parent where a list contains instances that can appear multiple times. A container is used to hold related fields and to give the data organization and scope.

    To create a container, use the xo_open_container and xo_close_container functions:

    -
    +
         int xo_open_container (const char *name);
         int xo_open_container_h (xo_handle_t *xop, const char *name);
         int xo_open_container_hd (xo_handle_t *xop, const char *name);
    @@ -24840,7 +24879,7 @@ jQuery(function ($) {
     

    The close functions with the "_d" suffix are used in "Do The Right Thing" mode, where the name of the open containers, lists, and instances are maintained internally by libxo to allow the caller to avoid keeping track of the open container name.

    Use the XOF_WARN flag to generate a warning if the name given on the close does not match the current open container.

    For TEXT and HTML output, containers are not rendered into output text, though for HTML they are used when the XOF_XPATH flag is set.

    -
    +
         EXAMPLE:
            xo_open_container("system");
            xo_emit("The host name is {:host-name}\n", hn);
    @@ -24857,7 +24896,7 @@ jQuery(function ($) {
     
     

    Lists are sequences of instances of homogeneous data objects. Two distinct levels of calls are needed to represent them in our output styles. Calls must be made to open and close a list, and for each instance of data in that list, calls must be make to open and close that instance.

    The name given to all calls must be identical, and it is strongly suggested that the name be singular, not plural, as a matter of style and usage expectations.

    -
    +
         EXAMPLE:
             xo_open_list("user");
             for (i = 0; i < num_users; i++) {
    @@ -24926,7 +24965,7 @@ jQuery(function ($) {
     Parsing Command-line Arguments (xo_parse_args)
     
     

    The xo_parse_args() function is used to process a program's arguments. libxo-specific options are processed and removed from the argument list so the calling application does not need to process them. If successful, a new value for argc is returned. On failure, a message it emitted and -1 is returned.

    -
    +
         argc = xo_parse_args(argc, argv);
         if (argc < 0)
             exit(EXIT_FAILURE);
    @@ -24939,7 +24978,7 @@ jQuery(function ($) {
     xo_set_program
     
     

    The xo_set_program function sets name of the program as reported by functions like xo_failure, xo_warn, xo_err, etc. The program name is initialized by xo_parse_args, but subsequent calls to xo_set_program can override this value.

    -
    +
         xo_set_program(argv[0]);
     	    

    Note that the value is not copied, so the memory passed to xo_set_program (and xo_parse_args) must be maintained by the caller.

    @@ -24950,7 +24989,7 @@ jQuery(function ($) { xo_set_version

    The xo_set_version function records a version number to be emitted as part of the data for encoding styles (XML and JSON). This version number is suitable for tracking changes in the content, allowing a user of the data to discern which version of the data model is in use.

    -
    +
          void xo_set_version (const char *version);
          void xo_set_version_h (xo_handle_t *xop, const char *version);
     	    
    @@ -24963,7 +25002,7 @@ jQuery(function ($) {

    HTML data can include additional information in attributes that begin with "data‑". To enable this, three things must occur:

    First the application must build an array of xo_info_t structures, one per tag. The array must be sorted by name, since libxo uses a binary search to find the entry that matches names from format instructions.

    Second, the application must inform libxo about this information using the xo_set_info() call:

    -
    +
         typedef struct xo_info_s {
             const char *xi_name;    /* Name of the element */
             const char *xi_type;    /* Type of field */
    @@ -24973,7 +25012,7 @@ jQuery(function ($) {
         void xo_set_info (xo_handle_t *xop, xo_info_t *infop, int count);
     	    

    Like other libxo calls, passing NULL for the handle tells libxo to use the default handle.

    If the count is -1, libxo will count the elements of infop, but there must be an empty element at the end. More typically, the number is known to the application:

    -
    +
         xo_info_t info[] = {
             { "in-stock", "number", "Number of items in stock" },
             { "name", "string", "Name of the item" },
    @@ -24986,7 +25025,7 @@ jQuery(function ($) {
         xo_set_info(NULL, info, info_count);
     	    

    Third, the emission of info must be triggered with the XOF_INFO flag using either the xo_set_flags() function or the "‑‑libxo=info" command line argument.

    The type and help values, if present, are emitted as the "data‑type" and "data‑help" attributes:

    -
    +
       <div class="data" data-tag="sku" data-type="string" 
            data-help="Stock Keeping Unit">GRO-000-533</div>
     	    
    @@ -24997,7 +25036,7 @@ jQuery(function ($) { Memory Allocation

    The xo_set_allocator function allows libxo to be used in environments where the standard realloc() and free() functions are not available.

    -
    +
         void xo_set_allocator (xo_realloc_func_t realloc_func,
                                xo_free_func_t free_func);
     	    

    realloc_func should expect the same arguments as realloc(3) and return a pointer to memory following the same convention. free_func will receive the same argument as free(3) and should release it, as appropriate for the environment.

    @@ -25079,10 +25118,10 @@ jQuery(function ($) {

    For example, warnings can be enabled by:

    -
    +
         % env LIBXO_OPTIONS=W my-app
     	    

    Complete HTML output can be generated with:

    -
    +
         % env LIBXO_OPTIONS=HXI my-app
     	    

    Since environment variables are inherited, child processes will have the same options, which may be undesirable, making the use of the "‑‑libxo" option is preferable in most situations.

    @@ -25093,7 +25132,7 @@ jQuery(function ($) { Errors, Warnings, and Messages

    Many programs make use of the standard library functions err() and warn() to generate errors and warnings for the user. libxo wants to pass that information via the current output style, and provides compatible functions to allow this:

    -
    +
         void xo_warn (const char *fmt, ...);
         void xo_warnx (const char *fmt, ...);
         void xo_warn_c (int code, const char *fmt, ...);
    @@ -25109,7 +25148,7 @@ jQuery(function ($) {
         void xo_message_hcv (xo_handle_t *xop, int code, 
                              const char *fmt, va_list vap);
     	    

    These functions display the program name, a colon, a formatted message based on the arguments, and then optionally a colon and an error message associated with either "errno" or the "code" parameter.

    -
    +
         EXAMPLE:
             if (open(filename, O_RDONLY) < 0)
                 xo_err(1, "cannot open file '%s'", filename);
    @@ -25121,7 +25160,7 @@ jQuery(function ($) {
     xo_error
     
     

    The xo_error function can be used for generic errors that should be reported over the handle, rather than to stderr. The xo_error function behaves like xo_err for TEXT and HTML output styles, but puts the error into XML or JSON elements:

    -
    +
         EXAMPLE::
             xo_error("Does not %s", "compute");
         XML::
    @@ -25136,7 +25175,7 @@ jQuery(function ($) {
     xo_no_setlocale
     
     

    libxo automatically initializes the locale based on setting of the environment variables LC_CTYPE, LANG, and LC_ALL. The first of this list of variables is used and if none of the variables, the locale defaults to "UTF‑8". The caller may wish to avoid this behavior, and can do so by calling the xo_no_setlocale() function.

    -
    +
         void xo_no_setlocale (void);
     	    
    @@ -25152,7 +25191,7 @@ jQuery(function ($) {

    https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers

    Use the Section 3.5.3.5() function to set the Enterprise ID, as needed.

    The message name should follow the conventions in Section 8.1.3, as should the fields within the message.

    -
    +
         /* Both of these calls are optional */
         xo_set_syslog_enterprise_id(32473);
         xo_open_log("my-program", 0, LOG_DAEMON);
    @@ -25180,7 +25219,7 @@ jQuery(function ($) {
     Priority, Facility, and Flags
     
     

    The xo_syslog, xo_vsyslog, and xo_open_log functions accept a set of flags which provide the priority of the message, the source facility, and some additional features. These values are OR'd together to create a single integer argument:

    -
    +
         xo_syslog(LOG_ERR | LOG_AUTH, "login-failed",
                  "Login failed; user '{:user}' from host '{:address}'",
                  user, addr);
    @@ -25325,7 +25364,7 @@ jQuery(function ($) {
     
     

    Use the xo_syslog function to generate syslog messages by calling it with a log priority and facility, a message name, a format string, and a set of arguments. The priority/facility argument are discussed above, as is the message name.

    The format string follows the same conventions as xo_emit's format string, with each field being rendered as an SD-PARAM pair.

    -
    +
         xo_syslog(LOG_ERR, "poofd-missing-file",
                   "'{:filename}' not found: {:error/%m}", filename);
     
    @@ -25354,7 +25393,7 @@ jQuery(function ($) {
     xo_vsyslog
     
     

    xo_vsyslog is identical in function to xo_syslog, but takes the set of arguments using a va_list.

    -
    +
         void my_log (const char *name, const char *fmt, ...)
         {
             va_list vap;
    @@ -25370,7 +25409,7 @@ jQuery(function ($) {
     xo_open_log
     
     

    xo_open_log functions similar to openlog(3), allowing customization of the program name, the log facility number, and the additional option flags described in Section 3.5.1.

    -
    +
         void
         xo_open_log (const char *ident, int logopt, int facility);
     	    
    @@ -25381,7 +25420,7 @@ jQuery(function ($) { xo_close_log

    xo_close_log functions similar to closelog(3), closing the log file and releasing any associated resources.

    -
    +
         void
         xo_close_log (void);
     	    
    @@ -25392,7 +25431,7 @@ jQuery(function ($) { xo_set_logmask

    xo_set_logmask function similar to setlogmask(3), restricting the set of generated log event to those whose associated bit is set in maskpri. Use LOG_MASK(pri) to find the appropriate bit, or LOG_UPTO(toppri) to create a mask for all priorities up to and including toppri.

    -
    +
         int
         xo_set_logmask (int maskpri);
     
    @@ -25407,7 +25446,7 @@ jQuery(function ($) {
     
     

    Use the xo_set_syslog_enterprise_id to supply a platform- or application-specific enterprise id. This value is used in any future syslog messages.

    Ideally, the operating system should supply a default value via the "kern.syslog.enterprise_id" sysctl value. Lacking that, the application should provide a suitable value.

    -
    +
         void
         xo_set_syslog_enterprise_id (unsigned short eid);
     	    

    Enterprise IDs are administered by IANA, the Internet Assigned Number Authority. The complete list is EIDs on their web site:

    @@ -25449,7 +25488,7 @@ jQuery(function ($) { Loading Encoders

    Encoders can be registered statically or discovered dynamically. Applications can choose to call the xo_encoder_register() function to explicitly register encoders, but more typically they are built as shared libraries, placed in the libxo/extensions directory, and loaded based on name. libxo looks for a file with the name of the encoder and an extension of ".enc". This can be a file or a symlink to the shared library file that supports the encoder.

    -
    +
         % ls -1 lib/libxo/extensions/*.enc
         lib/libxo/extensions/cbor.enc
         lib/libxo/extensions/test.enc
    @@ -25461,7 +25500,7 @@ jQuery(function ($) {
     Encoder Initialization
     
     

    Each encoder must export a symbol used to access the library, which must have the following signature:

    -
    +
         int xo_encoder_library_init (XO_ENCODER_INIT_ARGS);
     	    

    XO_ENCODER_INIT_ARGS is a macro defined in xo_encoder.h that defines an argument called "arg", a pointer of the type xo_encoder_init_args_t. This structure contains two fields:

    @@ -25566,7 +25605,7 @@ jQuery(function ($) {

    The "xo" utility allows command line access to the functionality of the libxo library. Using "xo", shell scripts can emit XML, JSON, and HTML using the same commands that emit text output.

    The style of output can be selected using a specific option: "‑X" for XML, "‑J" for JSON, "‑H" for HTML, or "‑T" for TEXT, which is the default. The "--style <style>" option can also be used. The LIBXO_OPTIONS environment variable can also be used to set the style, as well as other flags.

    The "xo" utility accepts a format string suitable for xo_emit() and a set of zero or more arguments used to supply data for that string.

    -
    +
         xo "The {k:name} weighs {:weight/%d} pounds.\n" fish 6
     
       TEXT:
    @@ -25586,7 +25625,7 @@ jQuery(function ($) {
           <div class="text"> pounds.</div>
         </div>
     	    

    The "--wrap <path>" option can be used to wrap emitted content in a specific hierarchy. The path is a set of hierarchical names separated by the '/' character.

    -
    +
         xo --wrap top/a/b/c '{:tag}' value
     
       XML:
    @@ -25610,7 +25649,7 @@ jQuery(function ($) {
           }
         }
     	    

    The "--open <path>" and "--close <path>" can be used to emit hierarchical information without the matching close and open tag. This allows a shell script to emit open tags, data, and then close tags. The "‑‑depth" option may be used to set the depth for indentation. The "‑‑leading‑xpath" may be used to prepend data to the XPath values used for HTML output style.

    -
    +
         #!/bin/sh
         xo --open top/data
         xo --depth 2 '{tag}' value
    @@ -25639,7 +25678,7 @@ jQuery(function ($) {
     Command Line Options
     
     

    Usage: xo [options] format [fields]

    -
    +
       --close <path>        Close tags for the given path
       --depth <num>         Set the depth for pretty printing
       --help                Display this help text
    @@ -25663,7 +25702,7 @@ jQuery(function ($) {
     4.2 
     Example
     
    -
    +
       % xo 'The {:product} is {:status}\n' stereo "in route"
       The stereo is in route
       % ./xo/xo -p -X 'The {:product} is {:status}\n' stereo "in route"
    @@ -25721,7 +25760,7 @@ jQuery(function ($) {
     
     
     

    The output message will contain the source filename and line number, the class of the message, the message, and, if -p is given, the line that contains the error:

    -
    +
         % xolint.pl -t xolint.c
         xolint.c: 16: error: anchor format should be "%d"
         16         xo_emit("{[:/%s}");
    @@ -25789,7 +25828,7 @@ jQuery(function ($) {
     
     
     
    -
    +
         EXAMPLE:
             % xopo -s "There are {:count/%u} {:event/%.6s} events\n"
             There are {:count} {:event} events\n
    @@ -25848,7 +25887,7 @@ jQuery(function ($) {
     Did the complex semantics of format strings evolve over time?
     
     

    The history is both long and short: libxo's functionality is based on what JUNOS does in a data modeling language called ODL (output definition language). In JUNOS, all subcomponents generate XML, which is feed to the CLI, where data from the ODL files tell is how to render that XML into text. ODL might had a set of tags like:

    -
    +
          tag docsis-state {
              help "State of the DOCSIS interface";
              type string;
    @@ -25927,7 +25966,7 @@ jQuery(function ($) {
     
    Reuse existing field names
    Nothing's worse than writing expressions like:
    -
    +
         if ($src1/process[pid == $pid]/name == 
             $src2/proc-table/proc-list
                        /proc-entry[process-id == $pid]/proc-name) {
    @@ -25988,10 +26027,10 @@ jQuery(function ($) {
     'A percent sign appearing in text is a literal'
     
     

    The message "A percent sign appearing in text is a literal" can be caused by code like:

    -
    +
         xo_emit("cost: %d", cost);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{L:cost}: {:cost/%d}", cost);
     	    

    This can be a bit surprising and could be a field that was not properly converted to a libxo-style format string.

    @@ -26002,10 +26041,10 @@ jQuery(function ($) { 'Unknown long name for role/modifier'

    The message "Unknown long name for role/modifier" can be caused by code like:

    -
    +
         xo_emit("{,humanization:value}", value);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{,humanize:value}", value);
     	    

    The hn-* modifiers (hn-decimal, hn-space, hn-1000) are only valid for fields with the {h:} modifier.

    @@ -26017,10 +26056,10 @@ jQuery(function ($) {

    The message "Last character before field definition is a field type" can be caused by code like:

    A common typo:

    -
    +
         xo_emit("{T:Min} T{:Max}");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{T:Min} {T:Max}");
     	    

    Twiddling the "{" and the field role is a common typo.

    @@ -26031,10 +26070,10 @@ jQuery(function ($) { 'Encoding format uses different number of arguments'

    The message "Encoding format uses different number of arguments" can be caused by code like:

    -
    +
         xo_emit("{:name/%6.6s %%04d/%s}", name, number);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{:name/%6.6s %04d/%s-%d}", name, number);
     	    

    Both format should consume the same number of arguments off the stack

    @@ -26045,10 +26084,10 @@ jQuery(function ($) { 'Only one field role can be used'

    The message "Only one field role can be used" can be caused by code like:

    -
    +
         xo_emit("{LT:Max}");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{T:Max}");
     	    
    @@ -26058,10 +26097,10 @@ jQuery(function ($) { 'Potential missing slash after C, D, N, L, or T with format'

    The message "Potential missing slash after C, D, N, L, or T with format" can be caused by code like:

    -
    +
         xo_emit("{T:%6.6s}\n", "Max");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{T:/%6.6s}\n", "Max");
     	    

    The "%6.6s" will be a literal, not a field format. While it's possibly valid, it's likely a missing "/".

    @@ -26072,7 +26111,7 @@ jQuery(function ($) { 'An encoding format cannot be given (roles: DNLT)'

    The message "An encoding format cannot be given (roles: DNLT)" can be caused by code like:

    -
    +
         xo_emit("{T:Max//%s}", "Max");
     	    

    Fields with the C, D, N, L, and T roles are not emitted in the 'encoding' style (JSON, XML), so an encoding format would make no sense.

    @@ -26083,7 +26122,7 @@ jQuery(function ($) { 'Format cannot be given when content is present (roles: CDLN)'

    The message "Format cannot be given when content is present (roles: CDLN)" can be caused by code like:

    -
    +
         xo_emit("{N:Max/%6.6s}", "Max");
     	    

    Fields with the C, D, L, or N roles can't have both static literal content ("{L:Label}") and a format ("{L:/%s}"). This error will also occur when the content has a backslash in it, like "{N:Type of I/O}"; backslashes should be escaped, like "{N:Type of I\\/O}". Note the double backslash, one for handling 'C' strings, and one for libxo.

    @@ -26094,10 +26133,10 @@ jQuery(function ($) { 'Field has color without fg- or bg- (role: C)'

    The message "Field has color without fg- or bg- (role: C)" can be caused by code like:

    -
    +
         xo_emit("{C:green}{:foo}{C:}", x);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{C:fg-green}{:foo}{C:}", x);
     	    

    Colors must be prefixed by either "fg‑" or "bg‑".

    @@ -26108,10 +26147,10 @@ jQuery(function ($) { 'Field has invalid color or effect (role: C)'

    The message "Field has invalid color or effect (role: C)" can be caused by code like:

    -
    +
         xo_emit("{C:fg-purple,bold}{:foo}{C:gween}", x);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{C:fg-red,bold}{:foo}{C:fg-green}", x);
     	    

    The list of colors and effects are limited. The set of colors includes default, black, red, green, yellow, blue, magenta, cyan, and white, which must be prefixed by either "fg‑" or "bg‑". Effects are limited to bold, no-bold, underline, no-underline, inverse, no-inverse, normal, and reset. Values must be separated by commas.

    @@ -26122,10 +26161,10 @@ jQuery(function ($) { 'Field has humanize modifier but no format string'

    The message "Field has humanize modifier but no format string" can be caused by code like:

    -
    +
         xo_emit("{h:value}", value);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{h:value/%d}", value);
     	    

    Humanization is only value for numbers, which are not likely to use the default format ("%s").

    @@ -26136,10 +26175,10 @@ jQuery(function ($) { 'Field has hn-* modifier but not 'h' modifier'

    The message "Field has hn-* modifier but not 'h' modifier" can be caused by code like:

    -
    +
         xo_emit("{,hn-1000:value}", value);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{h,hn-1000:value}", value);
     	    

    The hn-* modifiers (hn-decimal, hn-space, hn-1000) are only valid for fields with the {h:} modifier.

    @@ -26150,10 +26189,10 @@ jQuery(function ($) { 'Value field must have a name (as content)")'

    The message "Value field must have a name (as content)")" can be caused by code like:

    -
    +
         xo_emit("{:/%s}", "value");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{:tag-name/%s}", "value");
     	    

    The field name is used for XML and JSON encodings. These tags names are static and must appear directly in the field descriptor.

    @@ -26164,10 +26203,10 @@ jQuery(function ($) { 'Use hyphens, not underscores, for value field name'

    The message "Use hyphens, not underscores, for value field name" can be caused by code like:

    -
    +
         xo_emit("{:no_under_scores}", "bad");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{:no-under-scores}", "bad");
     	    

    Use of hyphens is traditional in XML, and the XOF_UNDERSCORES flag can be used to generate underscores in JSON, if desired. But the raw field name should use hyphens.

    @@ -26178,10 +26217,10 @@ jQuery(function ($) { 'Value field name cannot start with digit'

    The message "Value field name cannot start with digit" can be caused by code like:

    -
    +
         xo_emit("{:10-gig/}");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{:ten-gig/}");
     	    

    XML element names cannot start with a digit.

    @@ -26192,10 +26231,10 @@ jQuery(function ($) { 'Value field name should be lower case'

    The message "Value field name should be lower case" can be caused by code like:

    -
    +
         xo_emit("{:WHY-ARE-YOU-SHOUTING}", "NO REASON");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{:why-are-you-shouting}", "no reason");
     	    

    Lower case is more civilized. Even TLAs should be lower case to avoid scenarios where the differences between "XPath" and "Xpath" drive your users crazy. Lower case rules the seas.

    @@ -26206,10 +26245,10 @@ jQuery(function ($) { 'Value field name should be longer than two characters'

    The message "Value field name should be longer than two characters" can be caused by code like:

    -
    +
         xo_emit("{:x}", "mumble");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{:something-meaningful}", "mumble");
     	    

    Field names should be descriptive, and it's hard to be descriptive in less than two characters. Consider your users and try to make something more useful. Note that this error often occurs when the field type is placed after the colon ("{:T/%20s}"), instead of before it ("{T:/20s}").

    @@ -26220,10 +26259,10 @@ jQuery(function ($) { 'Value field name contains invalid character'

    The message "Value field name contains invalid character" can be caused by code like:

    -
    +
         xo_emit("{:cost-in-$$/%u}", 15);
     	    

    This code should be replaced with code like:

    -
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Tue May 16 18:42:09 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11F9BD70BB3;
     Tue, 16 May 2017 18:42:09 +0000 (UTC)
     (envelope-from phil@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id BE5AD13AE;
     Tue, 16 May 2017 18:42:08 +0000 (UTC)
     (envelope-from phil@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GIg7gF070361;
     Tue, 16 May 2017 18:42:07 GMT (envelope-from phil@FreeBSD.org)
    Received: (from phil@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GIg7Tk070360;
     Tue, 16 May 2017 18:42:07 GMT (envelope-from phil@FreeBSD.org)
    Message-Id: <201705161842.v4GIg7Tk070360@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: phil set sender to
     phil@FreeBSD.org using -f
    From: Phil Shafer 
    Date: Tue, 16 May 2017 18:42:07 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318362 - vendor/Juniper/libxo/0.7.2
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 18:42:09 -0000
    
    Author: phil
    Date: Tue May 16 18:42:07 2017
    New Revision: 318362
    URL: https://svnweb.freebsd.org/changeset/base/318362
    
    Log:
      Tag libxo 0.7.2
    
    Added:
         - copied from r318361, vendor/Juniper/libxo/dist/
    Directory Properties:
      vendor/Juniper/libxo/0.7.2/   (props changed)
    
    From owner-svn-src-all@freebsd.org  Tue May 16 18:42:46 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 731A9D70C16;
     Tue, 16 May 2017 18:42:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 2A2A014C0;
     Tue, 16 May 2017 18:42:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GIgjxL071100;
     Tue, 16 May 2017 18:42:45 GMT (envelope-from jhb@FreeBSD.org)
    Received: (from jhb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GIgj6J071098;
     Tue, 16 May 2017 18:42:45 GMT (envelope-from jhb@FreeBSD.org)
    Message-Id: <201705161842.v4GIgj6J071098@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
     using -f
    From: John Baldwin 
    Date: Tue, 16 May 2017 18:42:45 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318363 - in head/contrib: atf/atf-c/detail
     netbsd-tests/lib/libc/sys
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 18:42:46 -0000
    
    Author: jhb
    Date: Tue May 16 18:42:44 2017
    New Revision: 318363
    URL: https://svnweb.freebsd.org/changeset/base/318363
    
    Log:
      Skip tests depending on coredumps if coredumps are disabled via kern.coredump.
      
      The kern.coredump sysctl can be set to 0 to disable coredumps.  Skip the
      'status_coredump' and 'wait6_coredumped' tests if this sysctl is set to 0
      rather than reporting a failure.
      
      Submitted by:	brooks
      Reviewed by:	ngie
      Obtained from:	CheriBSD
      Sponsored by:	DARPA / AFRL
      Differential Revision:	https://reviews.freebsd.org/D10665
    
    Modified:
      head/contrib/atf/atf-c/detail/process_test.c
      head/contrib/netbsd-tests/lib/libc/sys/t_wait.c
    
    Modified: head/contrib/atf/atf-c/detail/process_test.c
    ==============================================================================
    --- head/contrib/atf/atf-c/detail/process_test.c	Tue May 16 18:42:07 2017	(r318362)
    +++ head/contrib/atf/atf-c/detail/process_test.c	Tue May 16 18:42:44 2017	(r318363)
    @@ -26,6 +26,9 @@
     #include "atf-c/detail/process.h"
     
     #include 
    +#ifdef __FreeBSD__
    +#include 
    +#endif
     #include 
     #include 
     #include 
    @@ -667,6 +670,14 @@ ATF_TC_BODY(status_coredump, tc)
             atf_tc_skip("Cannot unlimit the core file size; check limits "
                         "manually");
     
    +#ifdef __FreeBSD__
    +	int coredump_enabled;
    +	size_t ce_len = sizeof(coredump_enabled);
    +	if (sysctlbyname("kern.coredump", &coredump_enabled, &ce_len, NULL,
    +	    0) == 0 && !coredump_enabled)
    +		atf_tc_skip("Coredumps disabled");
    +#endif
    +
         const int rawstatus = fork_and_wait_child(child_sigquit);
         atf_process_status_t s;
         RE(atf_process_status_init(&s, rawstatus));
    
    Modified: head/contrib/netbsd-tests/lib/libc/sys/t_wait.c
    ==============================================================================
    --- head/contrib/netbsd-tests/lib/libc/sys/t_wait.c	Tue May 16 18:42:07 2017	(r318362)
    +++ head/contrib/netbsd-tests/lib/libc/sys/t_wait.c	Tue May 16 18:42:44 2017	(r318363)
    @@ -31,6 +31,10 @@
     #include 
     __RCSID("$NetBSD: t_wait.c,v 1.8 2017/01/13 19:28:55 christos Exp $");
     
    +#ifdef __FreeBSD__
    +#include 
    +#include 
    +#endif
     #include 
     #include 
     
    @@ -147,6 +151,14 @@ ATF_TC_BODY(wait6_coredumped, tc)
     	pid_t pid;
     	static const struct rlimit rl = { RLIM_INFINITY, RLIM_INFINITY };
     
    +#ifdef __FreeBSD__
    +	int coredump_enabled;
    +	size_t ce_len = sizeof(coredump_enabled);
    +	if (sysctlbyname("kern.coredump", &coredump_enabled, &ce_len, NULL,
    +	    0) == 0 && !coredump_enabled)
    +		atf_tc_skip("Coredumps disabled");
    +#endif
    +
     	switch (pid = fork()) {
     	case 0:
     		ATF_REQUIRE(setrlimit(RLIMIT_CORE, &rl) == 0);
    
    From owner-svn-src-all@freebsd.org  Tue May 16 18:47:16 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6E76D70CBD;
     Tue, 16 May 2017 18:47:16 +0000 (UTC)
     (envelope-from phil@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 7997816FC;
     Tue, 16 May 2017 18:47:03 +0000 (UTC)
     (envelope-from phil@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GIkudr071279;
     Tue, 16 May 2017 18:46:56 GMT (envelope-from phil@FreeBSD.org)
    Received: (from phil@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GIkuTS071275;
     Tue, 16 May 2017 18:46:56 GMT (envelope-from phil@FreeBSD.org)
    Message-Id: <201705161846.v4GIkuTS071275@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: phil set sender to
     phil@FreeBSD.org using -f
    From: Phil Shafer 
    Date: Tue, 16 May 2017 18:46:56 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318364 - in head: contrib/libxo contrib/libxo/doc
     contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved
     contrib/libxo/tests/gettext/saved contrib/libxo/xo lib/lib...
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 18:47:16 -0000
    
    Author: phil
    Date: Tue May 16 18:46:56 2017
    New Revision: 318364
    URL: https://svnweb.freebsd.org/changeset/base/318364
    
    Log:
      Import libxo-0.7.2; add xo_options.7.
      
      Submitted by:	phil
      Reviewed by:	sjg
      Approved by:	sjg (mentor)
    
    Added:
      head/contrib/libxo/libxo/xo_options.7
         - copied unchanged from r318362, vendor/Juniper/libxo/dist/libxo/xo_options.7
    Modified:
      head/contrib/libxo/configure.ac
      head/contrib/libxo/doc/Makefile.am
      head/contrib/libxo/doc/libxo-manual.html
      head/contrib/libxo/doc/libxo.txt
      head/contrib/libxo/libxo/Makefile.am
      head/contrib/libxo/libxo/libxo.c
      head/contrib/libxo/libxo/xo.h
      head/contrib/libxo/libxo/xo_buf.h
      head/contrib/libxo/libxo/xo_encoder.c
      head/contrib/libxo/libxo/xo_format.5
      head/contrib/libxo/libxo/xo_syslog.c
      head/contrib/libxo/tests/core/saved/test_01.E.out
      head/contrib/libxo/tests/core/saved/test_01.J.out
      head/contrib/libxo/tests/core/saved/test_01.JP.out
      head/contrib/libxo/tests/core/saved/test_01.X.out
      head/contrib/libxo/tests/core/saved/test_01.XP.out
      head/contrib/libxo/tests/core/saved/test_10.X.out
      head/contrib/libxo/tests/core/saved/test_10.XP.out
      head/contrib/libxo/tests/core/saved/test_11.X.out
      head/contrib/libxo/tests/core/saved/test_11.XP.out
      head/contrib/libxo/tests/core/test_01.c
      head/contrib/libxo/tests/gettext/saved/gt_01.J.out
      head/contrib/libxo/tests/gettext/saved/gt_01.JP.out
      head/contrib/libxo/xo/xo.c
      head/lib/libxo/Makefile
      head/lib/libxo/add.man
      head/lib/libxo/xo_config.h
      head/usr.bin/xo/Makefile
    Directory Properties:
      head/contrib/libxo/   (props changed)
    
    Modified: head/contrib/libxo/configure.ac
    ==============================================================================
    --- head/contrib/libxo/configure.ac	Tue May 16 18:42:44 2017	(r318363)
    +++ head/contrib/libxo/configure.ac	Tue May 16 18:46:56 2017	(r318364)
    @@ -12,7 +12,7 @@
     #
     
     AC_PREREQ(2.2)
    -AC_INIT([libxo], [0.6.3], [phil@juniper.net])
    +AC_INIT([libxo], [0.7.2], [phil@juniper.net])
     AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability])
     
     # Support silent build rules.  Requires at least automake-1.11.
    @@ -20,7 +20,6 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign 
     m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
     
     AC_PROG_CC
    -AM_PROG_AR
     AC_PROG_INSTALL
     AC_CONFIG_MACRO_DIR([m4])
     AC_PROG_LN_S
    @@ -135,6 +134,21 @@ if test "$GETTEXT_ENABLE" != "no"; then
     
           AC_MSG_RESULT([$HAVE_GETTEXT])
       fi
    +
    +  if test "$HAVE_GETTEXT" != "yes"; then
    +      GETTEXT_PREFIX=/usr/local
    +      AC_MSG_CHECKING([gettext in ${GETTEXT_PREFIX}])
    +
    +      _save_cflags="$CFLAGS"
    +      CFLAGS="$CFLAGS -I${GETTEXT_PREFIX}/include -L${GETTEXT_PREFIX}/lib -Werror -lintl"
    +      AC_LINK_IFELSE([AC_LANG_SOURCE([[#include ]
    +                 [int main() {char *cp = dgettext(NULL, "xx"); return 0; }]])],
    +                 [HAVE_GETTEXT=yes],
    +                 [HAVE_GETTEXT=no])
    +      CFLAGS="$_save_cflags"
    +
    +      AC_MSG_RESULT([$HAVE_GETTEXT])
    +  fi
     fi
     
     if test "$HAVE_GETTEXT" = "yes"; then
    @@ -278,6 +292,13 @@ AC_ARG_ENABLE([debug],
     AC_MSG_RESULT([$LIBXO_DEBUG])
     AM_CONDITIONAL([LIBXO_DEBUG], [test "$LIBXO_DEBUG" != "no"])
     
    +AC_MSG_CHECKING([whether to use int return codes])
    +AC_ARG_ENABLE([int-return-codes],
    +    [  --enable-int-return-codes    Use int return codes (instead of ssize_t)],
    +    [USE_INT_RETURN_CODES=yes; AC_DEFINE([USE_INT_RETURN_CODES], [1], [Use int return codes])],
    +    [USE_INT_RETURN_CODES=no])
    +AC_MSG_RESULT([$USE_INT_RETURN_CODES])
    +
     AC_MSG_CHECKING([whether to build with text-only rendering])
     AC_ARG_ENABLE([text-only],
         [  --enable-text-only    Turn on text-only rendering],
    
    Modified: head/contrib/libxo/doc/Makefile.am
    ==============================================================================
    --- head/contrib/libxo/doc/Makefile.am	Tue May 16 18:42:44 2017	(r318363)
    +++ head/contrib/libxo/doc/Makefile.am	Tue May 16 18:46:56 2017	(r318364)
    @@ -61,9 +61,9 @@ xolint.txt: ${top_srcdir}/xolint/xolint.
     CLEANFILES = \
     xolint.txt \
     ${INPUT}.xml \
    -${INPUT}.txt \
     ${INPUT}.fxml \
    -${INPUT}.html
    +${OUTPUT}.txt \
    +${OUTPUT}.html
     else
     doc docs:
     	@${ECHO} "The 'oxtradoc' tool is not installed; see libslax.org"
    
    Modified: head/contrib/libxo/doc/libxo-manual.html
    ==============================================================================
    --- head/contrib/libxo/doc/libxo-manual.html	Tue May 16 18:42:44 2017	(r318363)
    +++ head/contrib/libxo/doc/libxo-manual.html	Tue May 16 18:46:56 2017	(r318364)
    @@ -515,7 +515,7 @@ li.indline1 {
      
       } 
       @top-right {
    -       content: "May 2016";
    +       content: "May 2017";
      
       } 
       @top-center {
    @@ -22009,7 +22009,7 @@ jQuery(function ($) {
     
     
     
    -May 28, 2016
    +May 15, 2017
     
     
     

    libxo: The Easy Way to Generate text, XML, JSON, and HTML output
    libxo-manual

    @@ -22271,36 +22271,40 @@ jQuery(function ($) {
  • 3.1.4   
    -xo_set_style @@ -23879,7 +23883,7 @@ jQuery(function ($) {

    For strings, the 'h' and 'l' modifiers affect the interpretation of the bytes pointed to argument. The default '%s' string is a 'char *' pointer to a string encoded as UTF-8. Since UTF-8 is compatible with ASCII data, a normal 7-bit ASCII string can be used. '%ls' expects a 'wchar_t *' pointer to a wide-character string, encoded as a 32-bit Unicode values. '%hs' expects a 'char *' pointer to a multi-byte string encoded with the current locale, as given by the LC_CTYPE, LANG, or LC_ALL environment varibles. The first of this list of variables is used and if none of the variables are set, the locale defaults to "UTF‑8".

    libxo will convert these arguments as needed to either UTF-8 (for XML, JSON, and HTML styles) or locale-based strings for display in text style.

    -   xo_emit("Alll strings are utf-8 content {:tag/%ls}",
    +   xo_emit("All strings are utf-8 content {:tag/%ls}",
                L"except for wide strings");
     	    

    "%S" is equivalent to "%ls".

    @@ -24316,6 +24320,14 @@ jQuery(function ($) { + + + + + + + + @@ -24377,7 +24389,7 @@ jQuery(function ($) { - + @@ -24402,6 +24414,19 @@ jQuery(function ($) {
    Enable "Do The Right Thing" mode
    flushFlush after every libxo function call
    flush-lineFlush after every line (line-buffered)
    html Emit HTML output
    underscoresReplace XML-friendly "-"s with JSON friendly "_"s eReplace XML-friendly "-"s with JSON friendly "_"s
    units

    The brief options are detailed in Section 3.4.6.

    +

    Most of these option are simple and direct, but some require additional details:

    +

    +
      +
    • "flush‑line" performs line buffering, even when the output is not directed to a TTY device.
    • +
    • "info" generates additional data for HTML, encoded in attributes using names that state with "data‑".
    • +
    • "keys" adds a "key" attribute for XML output to indicate that a leaf is an identifier for the list member.
    • +
    • "no‑humanize"avoids "humanizing" numeric output (see humanize_number(3) for details).
    • +
    • "no‑locale" instructs libxo to avoid translating output to the current locale.
    • +
    • "no‑retain" disables the ability of libxo to internally retain "compiled" information about formatting strings.
    • +
    • "underscores" can be used with JSON output to change XML-friendly names with dashes into JSON-friendly name with underscores.
    • +
    • "warn" allows libxo to emit warnings on stderr when application code make incorrect calls.
    • +
    • "warn‑xml" causes those warnings to be placed in XML inside the output.
    • +

    @@ -24443,8 +24468,9 @@ jQuery(function ($) {
  • Section 3.1.2
  • Section 3.1.3
  • Section 3.1.4
  • -
  • Section 3.1.5
  • -
  • Section 3.1.6
  • +
  • Section 3.1.5
  • +
  • Section 3.1.6
  • +
  • Section 3.1.7
  • @@ -24460,7 +24486,7 @@ jQuery(function ($) { xo_handle_t *xop = xo_create(XO_STYLE_JSON, XOF_WARN); .... xo_emit_h(xop, "testing\n"); -

    See also Section 3.1.4.1 and Section 3.1.5.1.

    +

    See also Section 3.1.5.1 and Section 3.1.6.1.

    @@ -24499,18 +24525,31 @@ jQuery(function ($) {

    To use the default handle, pass a NULL handle:

         xo_set_style(NULL, XO_STYLE_XML);
    -	    

    Section Contents:

    +
    +
    +

    +
    +3.1.5 
    +xo_get_style +

    +

    To find the current style, use the xo_get_style() function:

    +
    +    xo_style_t xo_get_style(xo_handle_t *xop);
    +	    

    To use the default handle, pass a NULL handle:

    +
    +    style = xo_get_style(NULL);
    +	    

    Section Contents:

    -

    +

    +3.1.5.1 

    Output Styles (XO_STYLE_*) -

    The libxo functions accept a set of output styles:

    +

    The libxo functions accept a set of output styles:

    @@ -24537,45 +24576,45 @@ jQuery(function ($) {
    Flag
    -

    +

    +3.1.5.2 

    xo_set_style_name -

    The xo_set_style_name() can be used to set the style based on a name encoded as a string:

    -
    +

    The xo_set_style_name() can be used to set the style based on a name encoded as a string:

    +
         int xo_set_style_name (xo_handle_t *xop, const char *style);
    -	    

    The name can be any of the styles: "text", "xml", "json", or "html".

    -
    +	    

    The name can be any of the styles: "text", "xml", "json", or "html".

    +
         EXAMPLE:
             xo_set_style_name(NULL, "html");
     	    
    -

    +

    -3.1.5 
    +3.1.6 

    xo_set_flags -

    To set the flags, use the xo_set_flags() function:

    -
    +

    To set the flags, use the xo_set_flags() function:

    +
         void xo_set_flags(xo_handle_t *xop, unsigned flags);
    -	    

    To use the default handle, pass a NULL handle:

    -
    +	    

    To use the default handle, pass a NULL handle:

    +
         xo_set_style(NULL, XO_STYLE_XML);
    -	    

    Section Contents:

    +

    Section Contents:

    -

    +

    +3.1.6.1 

    Flags (XOF_*) -

    The set of valid flags include:

    +

    The set of valid flags include:

    @@ -24648,12 +24687,12 @@ jQuery(function ($) {
    Flag
    -

    The XOF_CLOSE_FP flag will trigger the call of the close_func (provided via xo_set_writer()) when the handle is destroyed.

    -

    The XOF_COLOR flag enables color and effects in output regardless of output device, while the XOF_COLOR_ALLOWED flag allows color and effects only if the output device is a terminal.

    -

    The XOF_PRETTY flag requests 'pretty printing', which will trigger the addition of indentation and newlines to enhance the readability of XML, JSON, and HTML output. Text output is not affected.

    -

    The XOF_WARN flag requests that warnings will trigger diagnostic output (on standard error) when the library notices errors during operations, or with arguments to functions. Without warnings enabled, such conditions are ignored.

    -

    Warnings allow developers to debug their interaction with libxo. The function "xo_failure" can used as a breakpoint for a debugger, regardless of whether warnings are enabled.

    -

    If the style is XO_STYLE_HTML, the following additional flags can be used:

    +

    The XOF_CLOSE_FP flag will trigger the call of the close_func (provided via xo_set_writer()) when the handle is destroyed.

    +

    The XOF_COLOR flag enables color and effects in output regardless of output device, while the XOF_COLOR_ALLOWED flag allows color and effects only if the output device is a terminal.

    +

    The XOF_PRETTY flag requests 'pretty printing', which will trigger the addition of indentation and newlines to enhance the readability of XML, JSON, and HTML output. Text output is not affected.

    +

    The XOF_WARN flag requests that warnings will trigger diagnostic output (on standard error) when the library notices errors during operations, or with arguments to functions. Without warnings enabled, such conditions are ignored.

    +

    Warnings allow developers to debug their interaction with libxo. The function "xo_failure" can used as a breakpoint for a debugger, regardless of whether warnings are enabled.

    +

    If the style is XO_STYLE_HTML, the following additional flags can be used:

    @@ -24670,9 +24709,9 @@ jQuery(function ($) {
    Flag
    -

    The XOF_XPATH flag enables the emission of XPath expressions detailing the hierarchy of XML elements used to encode the data field, if the XPATH style of output were requested.

    -

    The XOF_INFO flag encodes additional informational fields for HTML output. See Section 3.4.4 for details.

    -

    If the style is XO_STYLE_XML, the following additional flags can be used:

    +

    The XOF_XPATH flag enables the emission of XPath expressions detailing the hierarchy of XML elements used to encode the data field, if the XPATH style of output were requested.

    +

    The XOF_INFO flag encodes additional informational fields for HTML output. See Section 3.4.4 for details.

    +

    If the style is XO_STYLE_XML, the following additional flags can be used:

    @@ -24683,43 +24722,43 @@ jQuery(function ($) {
    FlagFlag 'key' fields for xml
    -

    The XOF_KEYS flag adds 'key' attribute to the XML encoding for field definitions that use the 'k' modifier. The key attribute has the value "key":

    -
    +

    The XOF_KEYS flag adds 'key' attribute to the XML encoding for field definitions that use the 'k' modifier. The key attribute has the value "key":

    +
         xo_emit("{k:name}", item);
     
       XML:
           <name key="key">truck</name>
     	    
    -

    +

    +3.1.6.2 

    xo_clear_flags -

    The xo_clear_flags() function turns off the given flags in a specific handle.

    -
    +

    The xo_clear_flags() function turns off the given flags in a specific handle.

    +
         void xo_clear_flags (xo_handle_t *xop, xo_xof_flags_t flags);
     	    
    -

    +

    +3.1.6.3 

    xo_set_options -

    The xo_set_options() function accepts a comma-separated list of styles and flags and enables them for a specific handle.

    -
    +

    The xo_set_options() function accepts a comma-separated list of styles and flags and enables them for a specific handle.

    +
         int xo_set_options (xo_handle_t *xop, const char *input);
    -	    

    The options are identical to those listed in Section 2.4.

    +

    The options are identical to those listed in Section 2.4.

    -

    +

    -3.1.6 
    +3.1.7 

    xo_destroy -

    The xo_destroy function releases a handle and any resources it is using. Calling xo_destroy with a NULL handle will release any resources associated with the default handle.

    -
    +

    The xo_destroy function releases a handle and any resources it is using. Calling xo_destroy with a NULL handle will release any resources associated with the default handle.

    +
         void xo_destroy(xo_handle_t *xop);
     	    
    @@ -24730,7 +24769,7 @@ jQuery(function ($) { Emitting Content (xo_emit)

    The following functions are used to emit output:

    -
    +
         int xo_emit (const char *fmt, ...);
         int xo_emit_h (xo_handle_t *xop, const char *fmt, ...);
         int xo_emit_hv (xo_handle_t *xop, const char *fmt, va_list vap);
    @@ -24750,7 +24789,7 @@ jQuery(function ($) {
     Single Field Emitting Functions (xo_emit_field)
     
     

    The following functions can also make output, but only make a single field at a time:

    -
    +
         int xo_emit_field_hv (xo_handle_t *xop, const char *rolmod,
                       const char *contents, const char *fmt, 
                       const char *efmt, va_list vap);
    @@ -24762,7 +24801,7 @@ jQuery(function ($) {
         int xo_emit_field (const char *rolmod, const char *contents,
                      const char *fmt, const char *efmt, ...);
     	    

    These functions are intended to avoid the scenario where one would otherwise need to compose a format descriptors using snprintf(). The individual parts of the format descriptor are passed in distinctly.

    -
    +
         xo_emit("T", "Host name is ", NULL, NULL);
         xo_emit("V", "host-name", NULL, NULL, host-name);
     	    
    @@ -24773,14 +24812,14 @@ jQuery(function ($) { Attributes (xo_attr)

    The xo_attr() function emits attributes for the XML output style.

    -
    +
         int xo_attr (const char *name, const char *fmt, ...);
         int xo_attr_h (xo_handle_t *xop, const char *name, 
                        const char *fmt, ...);
         int xo_attr_hv (xo_handle_t *xop, const char *name, 
                        const char *fmt, va_list vap);
     	    

    The name parameter give the name of the attribute to be encoded. The fmt parameter gives a printf-style format string used to format the value of the attribute using any remaining arguments, or the vap parameter passed to xo_attr_hv().

    -
    +
         EXAMPLE:
           xo_attr("seconds", "%ld", (unsigned long) login_time);
           struct tm *tmp = localtime(login_time);
    @@ -24798,7 +24837,7 @@ jQuery(function ($) {
     Flushing Output (xo_flush)
     
     

    libxo buffers data, both for performance and consistency, but also to allow some advanced features to work properly. At various times, the caller may wish to flush any data buffered within the library. The xo_flush() call is used for this:

    -
    +
         void xo_flush (void);
         void xo_flush_h (xo_handle_t *xop);
     	    

    Calling xo_flush also triggers the flush function associated with the handle. For the default handle, this is equivalent to "fflush(stdio);".

    @@ -24810,7 +24849,7 @@ jQuery(function ($) { Finishing Output (xo_finish)

    When the program is ready to exit or close a handle, a call to xo_finish() is required. This flushes any buffered data, closes open libxo constructs, and completes any pending operations.

    -
    +
         int xo_finish (void);
         int xo_finish_h (xo_handle_t *xop);
         void xo_finish_atexit (void);
    @@ -24826,7 +24865,7 @@ jQuery(function ($) {
     
     

    libxo represents to types of hierarchy: containers and lists. A container appears once under a given parent where a list contains instances that can appear multiple times. A container is used to hold related fields and to give the data organization and scope.

    To create a container, use the xo_open_container and xo_close_container functions:

    -
    +
         int xo_open_container (const char *name);
         int xo_open_container_h (xo_handle_t *xop, const char *name);
         int xo_open_container_hd (xo_handle_t *xop, const char *name);
    @@ -24840,7 +24879,7 @@ jQuery(function ($) {
     

    The close functions with the "_d" suffix are used in "Do The Right Thing" mode, where the name of the open containers, lists, and instances are maintained internally by libxo to allow the caller to avoid keeping track of the open container name.

    Use the XOF_WARN flag to generate a warning if the name given on the close does not match the current open container.

    For TEXT and HTML output, containers are not rendered into output text, though for HTML they are used when the XOF_XPATH flag is set.

    -
    +
         EXAMPLE:
            xo_open_container("system");
            xo_emit("The host name is {:host-name}\n", hn);
    @@ -24857,7 +24896,7 @@ jQuery(function ($) {
     
     

    Lists are sequences of instances of homogeneous data objects. Two distinct levels of calls are needed to represent them in our output styles. Calls must be made to open and close a list, and for each instance of data in that list, calls must be make to open and close that instance.

    The name given to all calls must be identical, and it is strongly suggested that the name be singular, not plural, as a matter of style and usage expectations.

    -
    +
         EXAMPLE:
             xo_open_list("user");
             for (i = 0; i < num_users; i++) {
    @@ -24926,7 +24965,7 @@ jQuery(function ($) {
     Parsing Command-line Arguments (xo_parse_args)
     
     

    The xo_parse_args() function is used to process a program's arguments. libxo-specific options are processed and removed from the argument list so the calling application does not need to process them. If successful, a new value for argc is returned. On failure, a message it emitted and -1 is returned.

    -
    +
         argc = xo_parse_args(argc, argv);
         if (argc < 0)
             exit(EXIT_FAILURE);
    @@ -24939,7 +24978,7 @@ jQuery(function ($) {
     xo_set_program
     
     

    The xo_set_program function sets name of the program as reported by functions like xo_failure, xo_warn, xo_err, etc. The program name is initialized by xo_parse_args, but subsequent calls to xo_set_program can override this value.

    -
    +
         xo_set_program(argv[0]);
     	    

    Note that the value is not copied, so the memory passed to xo_set_program (and xo_parse_args) must be maintained by the caller.

    @@ -24950,7 +24989,7 @@ jQuery(function ($) { xo_set_version

    The xo_set_version function records a version number to be emitted as part of the data for encoding styles (XML and JSON). This version number is suitable for tracking changes in the content, allowing a user of the data to discern which version of the data model is in use.

    -
    +
          void xo_set_version (const char *version);
          void xo_set_version_h (xo_handle_t *xop, const char *version);
     	    
    @@ -24963,7 +25002,7 @@ jQuery(function ($) {

    HTML data can include additional information in attributes that begin with "data‑". To enable this, three things must occur:

    First the application must build an array of xo_info_t structures, one per tag. The array must be sorted by name, since libxo uses a binary search to find the entry that matches names from format instructions.

    Second, the application must inform libxo about this information using the xo_set_info() call:

    -
    +
         typedef struct xo_info_s {
             const char *xi_name;    /* Name of the element */
             const char *xi_type;    /* Type of field */
    @@ -24973,7 +25012,7 @@ jQuery(function ($) {
         void xo_set_info (xo_handle_t *xop, xo_info_t *infop, int count);
     	    

    Like other libxo calls, passing NULL for the handle tells libxo to use the default handle.

    If the count is -1, libxo will count the elements of infop, but there must be an empty element at the end. More typically, the number is known to the application:

    -
    +
         xo_info_t info[] = {
             { "in-stock", "number", "Number of items in stock" },
             { "name", "string", "Name of the item" },
    @@ -24986,7 +25025,7 @@ jQuery(function ($) {
         xo_set_info(NULL, info, info_count);
     	    

    Third, the emission of info must be triggered with the XOF_INFO flag using either the xo_set_flags() function or the "‑‑libxo=info" command line argument.

    The type and help values, if present, are emitted as the "data‑type" and "data‑help" attributes:

    -
    +
       <div class="data" data-tag="sku" data-type="string" 
            data-help="Stock Keeping Unit">GRO-000-533</div>
     	    
    @@ -24997,7 +25036,7 @@ jQuery(function ($) { Memory Allocation

    The xo_set_allocator function allows libxo to be used in environments where the standard realloc() and free() functions are not available.

    -
    +
         void xo_set_allocator (xo_realloc_func_t realloc_func,
                                xo_free_func_t free_func);
     	    

    realloc_func should expect the same arguments as realloc(3) and return a pointer to memory following the same convention. free_func will receive the same argument as free(3) and should release it, as appropriate for the environment.

    @@ -25079,10 +25118,10 @@ jQuery(function ($) {

    For example, warnings can be enabled by:

    -
    +
         % env LIBXO_OPTIONS=W my-app
     	    

    Complete HTML output can be generated with:

    -
    +
         % env LIBXO_OPTIONS=HXI my-app
     	    

    Since environment variables are inherited, child processes will have the same options, which may be undesirable, making the use of the "‑‑libxo" option is preferable in most situations.

    @@ -25093,7 +25132,7 @@ jQuery(function ($) { Errors, Warnings, and Messages

    Many programs make use of the standard library functions err() and warn() to generate errors and warnings for the user. libxo wants to pass that information via the current output style, and provides compatible functions to allow this:

    -
    +
         void xo_warn (const char *fmt, ...);
         void xo_warnx (const char *fmt, ...);
         void xo_warn_c (int code, const char *fmt, ...);
    @@ -25109,7 +25148,7 @@ jQuery(function ($) {
         void xo_message_hcv (xo_handle_t *xop, int code, 
                              const char *fmt, va_list vap);
     	    

    These functions display the program name, a colon, a formatted message based on the arguments, and then optionally a colon and an error message associated with either "errno" or the "code" parameter.

    -
    +
         EXAMPLE:
             if (open(filename, O_RDONLY) < 0)
                 xo_err(1, "cannot open file '%s'", filename);
    @@ -25121,7 +25160,7 @@ jQuery(function ($) {
     xo_error
     
     

    The xo_error function can be used for generic errors that should be reported over the handle, rather than to stderr. The xo_error function behaves like xo_err for TEXT and HTML output styles, but puts the error into XML or JSON elements:

    -
    +
         EXAMPLE::
             xo_error("Does not %s", "compute");
         XML::
    @@ -25136,7 +25175,7 @@ jQuery(function ($) {
     xo_no_setlocale
     
     

    libxo automatically initializes the locale based on setting of the environment variables LC_CTYPE, LANG, and LC_ALL. The first of this list of variables is used and if none of the variables, the locale defaults to "UTF‑8". The caller may wish to avoid this behavior, and can do so by calling the xo_no_setlocale() function.

    -
    +
         void xo_no_setlocale (void);
     	    
    @@ -25152,7 +25191,7 @@ jQuery(function ($) {

    https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers

    Use the Section 3.5.3.5() function to set the Enterprise ID, as needed.

    The message name should follow the conventions in Section 8.1.3, as should the fields within the message.

    -
    +
         /* Both of these calls are optional */
         xo_set_syslog_enterprise_id(32473);
         xo_open_log("my-program", 0, LOG_DAEMON);
    @@ -25180,7 +25219,7 @@ jQuery(function ($) {
     Priority, Facility, and Flags
     
     

    The xo_syslog, xo_vsyslog, and xo_open_log functions accept a set of flags which provide the priority of the message, the source facility, and some additional features. These values are OR'd together to create a single integer argument:

    -
    +
         xo_syslog(LOG_ERR | LOG_AUTH, "login-failed",
                  "Login failed; user '{:user}' from host '{:address}'",
                  user, addr);
    @@ -25325,7 +25364,7 @@ jQuery(function ($) {
     
     

    Use the xo_syslog function to generate syslog messages by calling it with a log priority and facility, a message name, a format string, and a set of arguments. The priority/facility argument are discussed above, as is the message name.

    The format string follows the same conventions as xo_emit's format string, with each field being rendered as an SD-PARAM pair.

    -
    +
         xo_syslog(LOG_ERR, "poofd-missing-file",
                   "'{:filename}' not found: {:error/%m}", filename);
     
    @@ -25354,7 +25393,7 @@ jQuery(function ($) {
     xo_vsyslog
     
     

    xo_vsyslog is identical in function to xo_syslog, but takes the set of arguments using a va_list.

    -
    +
         void my_log (const char *name, const char *fmt, ...)
         {
             va_list vap;
    @@ -25370,7 +25409,7 @@ jQuery(function ($) {
     xo_open_log
     
     

    xo_open_log functions similar to openlog(3), allowing customization of the program name, the log facility number, and the additional option flags described in Section 3.5.1.

    -
    +
         void
         xo_open_log (const char *ident, int logopt, int facility);
     	    
    @@ -25381,7 +25420,7 @@ jQuery(function ($) { xo_close_log

    xo_close_log functions similar to closelog(3), closing the log file and releasing any associated resources.

    -
    +
         void
         xo_close_log (void);
     	    
    @@ -25392,7 +25431,7 @@ jQuery(function ($) { xo_set_logmask

    xo_set_logmask function similar to setlogmask(3), restricting the set of generated log event to those whose associated bit is set in maskpri. Use LOG_MASK(pri) to find the appropriate bit, or LOG_UPTO(toppri) to create a mask for all priorities up to and including toppri.

    -
    +
         int
         xo_set_logmask (int maskpri);
     
    @@ -25407,7 +25446,7 @@ jQuery(function ($) {
     
     

    Use the xo_set_syslog_enterprise_id to supply a platform- or application-specific enterprise id. This value is used in any future syslog messages.

    Ideally, the operating system should supply a default value via the "kern.syslog.enterprise_id" sysctl value. Lacking that, the application should provide a suitable value.

    -
    +
         void
         xo_set_syslog_enterprise_id (unsigned short eid);
     	    

    Enterprise IDs are administered by IANA, the Internet Assigned Number Authority. The complete list is EIDs on their web site:

    @@ -25449,7 +25488,7 @@ jQuery(function ($) { Loading Encoders

    Encoders can be registered statically or discovered dynamically. Applications can choose to call the xo_encoder_register() function to explicitly register encoders, but more typically they are built as shared libraries, placed in the libxo/extensions directory, and loaded based on name. libxo looks for a file with the name of the encoder and an extension of ".enc". This can be a file or a symlink to the shared library file that supports the encoder.

    -
    +
         % ls -1 lib/libxo/extensions/*.enc
         lib/libxo/extensions/cbor.enc
         lib/libxo/extensions/test.enc
    @@ -25461,7 +25500,7 @@ jQuery(function ($) {
     Encoder Initialization
     
     

    Each encoder must export a symbol used to access the library, which must have the following signature:

    -
    +
         int xo_encoder_library_init (XO_ENCODER_INIT_ARGS);
     	    

    XO_ENCODER_INIT_ARGS is a macro defined in xo_encoder.h that defines an argument called "arg", a pointer of the type xo_encoder_init_args_t. This structure contains two fields:

    @@ -25566,7 +25605,7 @@ jQuery(function ($) {

    The "xo" utility allows command line access to the functionality of the libxo library. Using "xo", shell scripts can emit XML, JSON, and HTML using the same commands that emit text output.

    The style of output can be selected using a specific option: "‑X" for XML, "‑J" for JSON, "‑H" for HTML, or "‑T" for TEXT, which is the default. The "--style <style>" option can also be used. The LIBXO_OPTIONS environment variable can also be used to set the style, as well as other flags.

    The "xo" utility accepts a format string suitable for xo_emit() and a set of zero or more arguments used to supply data for that string.

    -
    +
         xo "The {k:name} weighs {:weight/%d} pounds.\n" fish 6
     
       TEXT:
    @@ -25586,7 +25625,7 @@ jQuery(function ($) {
           <div class="text"> pounds.</div>
         </div>
     	    

    The "--wrap <path>" option can be used to wrap emitted content in a specific hierarchy. The path is a set of hierarchical names separated by the '/' character.

    -
    +
         xo --wrap top/a/b/c '{:tag}' value
     
       XML:
    @@ -25610,7 +25649,7 @@ jQuery(function ($) {
           }
         }
     	    

    The "--open <path>" and "--close <path>" can be used to emit hierarchical information without the matching close and open tag. This allows a shell script to emit open tags, data, and then close tags. The "‑‑depth" option may be used to set the depth for indentation. The "‑‑leading‑xpath" may be used to prepend data to the XPath values used for HTML output style.

    -
    +
         #!/bin/sh
         xo --open top/data
         xo --depth 2 '{tag}' value
    @@ -25639,7 +25678,7 @@ jQuery(function ($) {
     Command Line Options
     
     

    Usage: xo [options] format [fields]

    -
    +
       --close <path>        Close tags for the given path
       --depth <num>         Set the depth for pretty printing
       --help                Display this help text
    @@ -25663,7 +25702,7 @@ jQuery(function ($) {
     4.2 
     Example
     
    -
    +
       % xo 'The {:product} is {:status}\n' stereo "in route"
       The stereo is in route
       % ./xo/xo -p -X 'The {:product} is {:status}\n' stereo "in route"
    @@ -25721,7 +25760,7 @@ jQuery(function ($) {
     
     
     

    The output message will contain the source filename and line number, the class of the message, the message, and, if -p is given, the line that contains the error:

    -
    +
         % xolint.pl -t xolint.c
         xolint.c: 16: error: anchor format should be "%d"
         16         xo_emit("{[:/%s}");
    @@ -25789,7 +25828,7 @@ jQuery(function ($) {
     
     
     
    -
    +
         EXAMPLE:
             % xopo -s "There are {:count/%u} {:event/%.6s} events\n"
             There are {:count} {:event} events\n
    @@ -25848,7 +25887,7 @@ jQuery(function ($) {
     Did the complex semantics of format strings evolve over time?
     
     

    The history is both long and short: libxo's functionality is based on what JUNOS does in a data modeling language called ODL (output definition language). In JUNOS, all subcomponents generate XML, which is feed to the CLI, where data from the ODL files tell is how to render that XML into text. ODL might had a set of tags like:

    -
    +
          tag docsis-state {
              help "State of the DOCSIS interface";
              type string;
    @@ -25927,7 +25966,7 @@ jQuery(function ($) {
     
    Reuse existing field names
    Nothing's worse than writing expressions like:
    -
    +
         if ($src1/process[pid == $pid]/name == 
             $src2/proc-table/proc-list
                        /proc-entry[process-id == $pid]/proc-name) {
    @@ -25988,10 +26027,10 @@ jQuery(function ($) {
     'A percent sign appearing in text is a literal'
     
     

    The message "A percent sign appearing in text is a literal" can be caused by code like:

    -
    +
         xo_emit("cost: %d", cost);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{L:cost}: {:cost/%d}", cost);
     	    

    This can be a bit surprising and could be a field that was not properly converted to a libxo-style format string.

    @@ -26002,10 +26041,10 @@ jQuery(function ($) { 'Unknown long name for role/modifier'

    The message "Unknown long name for role/modifier" can be caused by code like:

    -
    +
         xo_emit("{,humanization:value}", value);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{,humanize:value}", value);
     	    

    The hn-* modifiers (hn-decimal, hn-space, hn-1000) are only valid for fields with the {h:} modifier.

    @@ -26017,10 +26056,10 @@ jQuery(function ($) {

    The message "Last character before field definition is a field type" can be caused by code like:

    A common typo:

    -
    +
         xo_emit("{T:Min} T{:Max}");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{T:Min} {T:Max}");
     	    

    Twiddling the "{" and the field role is a common typo.

    @@ -26031,10 +26070,10 @@ jQuery(function ($) { 'Encoding format uses different number of arguments'

    The message "Encoding format uses different number of arguments" can be caused by code like:

    -
    +
         xo_emit("{:name/%6.6s %%04d/%s}", name, number);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{:name/%6.6s %04d/%s-%d}", name, number);
     	    

    Both format should consume the same number of arguments off the stack

    @@ -26045,10 +26084,10 @@ jQuery(function ($) { 'Only one field role can be used'

    The message "Only one field role can be used" can be caused by code like:

    -
    +
         xo_emit("{LT:Max}");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{T:Max}");
     	    
    @@ -26058,10 +26097,10 @@ jQuery(function ($) { 'Potential missing slash after C, D, N, L, or T with format'

    The message "Potential missing slash after C, D, N, L, or T with format" can be caused by code like:

    -
    +
         xo_emit("{T:%6.6s}\n", "Max");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{T:/%6.6s}\n", "Max");
     	    

    The "%6.6s" will be a literal, not a field format. While it's possibly valid, it's likely a missing "/".

    @@ -26072,7 +26111,7 @@ jQuery(function ($) { 'An encoding format cannot be given (roles: DNLT)'

    The message "An encoding format cannot be given (roles: DNLT)" can be caused by code like:

    -
    +
         xo_emit("{T:Max//%s}", "Max");
     	    

    Fields with the C, D, N, L, and T roles are not emitted in the 'encoding' style (JSON, XML), so an encoding format would make no sense.

    @@ -26083,7 +26122,7 @@ jQuery(function ($) { 'Format cannot be given when content is present (roles: CDLN)'

    The message "Format cannot be given when content is present (roles: CDLN)" can be caused by code like:

    -
    +
         xo_emit("{N:Max/%6.6s}", "Max");
     	    

    Fields with the C, D, L, or N roles can't have both static literal content ("{L:Label}") and a format ("{L:/%s}"). This error will also occur when the content has a backslash in it, like "{N:Type of I/O}"; backslashes should be escaped, like "{N:Type of I\\/O}". Note the double backslash, one for handling 'C' strings, and one for libxo.

    @@ -26094,10 +26133,10 @@ jQuery(function ($) { 'Field has color without fg- or bg- (role: C)'

    The message "Field has color without fg- or bg- (role: C)" can be caused by code like:

    -
    +
         xo_emit("{C:green}{:foo}{C:}", x);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{C:fg-green}{:foo}{C:}", x);
     	    

    Colors must be prefixed by either "fg‑" or "bg‑".

    @@ -26108,10 +26147,10 @@ jQuery(function ($) { 'Field has invalid color or effect (role: C)'

    The message "Field has invalid color or effect (role: C)" can be caused by code like:

    -
    +
         xo_emit("{C:fg-purple,bold}{:foo}{C:gween}", x);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{C:fg-red,bold}{:foo}{C:fg-green}", x);
     	    

    The list of colors and effects are limited. The set of colors includes default, black, red, green, yellow, blue, magenta, cyan, and white, which must be prefixed by either "fg‑" or "bg‑". Effects are limited to bold, no-bold, underline, no-underline, inverse, no-inverse, normal, and reset. Values must be separated by commas.

    @@ -26122,10 +26161,10 @@ jQuery(function ($) { 'Field has humanize modifier but no format string'

    The message "Field has humanize modifier but no format string" can be caused by code like:

    -
    +
         xo_emit("{h:value}", value);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{h:value/%d}", value);
     	    

    Humanization is only value for numbers, which are not likely to use the default format ("%s").

    @@ -26136,10 +26175,10 @@ jQuery(function ($) { 'Field has hn-* modifier but not 'h' modifier'

    The message "Field has hn-* modifier but not 'h' modifier" can be caused by code like:

    -
    +
         xo_emit("{,hn-1000:value}", value);
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{h,hn-1000:value}", value);
     	    

    The hn-* modifiers (hn-decimal, hn-space, hn-1000) are only valid for fields with the {h:} modifier.

    @@ -26150,10 +26189,10 @@ jQuery(function ($) { 'Value field must have a name (as content)")'

    The message "Value field must have a name (as content)")" can be caused by code like:

    -
    +
         xo_emit("{:/%s}", "value");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{:tag-name/%s}", "value");
     	    

    The field name is used for XML and JSON encodings. These tags names are static and must appear directly in the field descriptor.

    @@ -26164,10 +26203,10 @@ jQuery(function ($) { 'Use hyphens, not underscores, for value field name'

    The message "Use hyphens, not underscores, for value field name" can be caused by code like:

    -
    +
         xo_emit("{:no_under_scores}", "bad");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{:no-under-scores}", "bad");
     	    

    Use of hyphens is traditional in XML, and the XOF_UNDERSCORES flag can be used to generate underscores in JSON, if desired. But the raw field name should use hyphens.

    @@ -26178,10 +26217,10 @@ jQuery(function ($) { 'Value field name cannot start with digit'

    The message "Value field name cannot start with digit" can be caused by code like:

    -
    +
         xo_emit("{:10-gig/}");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{:ten-gig/}");
     	    

    XML element names cannot start with a digit.

    @@ -26192,10 +26231,10 @@ jQuery(function ($) { 'Value field name should be lower case'

    The message "Value field name should be lower case" can be caused by code like:

    -
    +
         xo_emit("{:WHY-ARE-YOU-SHOUTING}", "NO REASON");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{:why-are-you-shouting}", "no reason");
     	    

    Lower case is more civilized. Even TLAs should be lower case to avoid scenarios where the differences between "XPath" and "Xpath" drive your users crazy. Lower case rules the seas.

    @@ -26206,10 +26245,10 @@ jQuery(function ($) { 'Value field name should be longer than two characters'

    The message "Value field name should be longer than two characters" can be caused by code like:

    -
    +
         xo_emit("{:x}", "mumble");
     	    

    This code should be replaced with code like:

    -
    +
         xo_emit("{:something-meaningful}", "mumble");
     	    

    Field names should be descriptive, and it's hard to be descriptive in less than two characters. Consider your users and try to make something more useful. Note that this error often occurs when the field type is placed after the colon ("{:T/%20s}"), instead of before it ("{T:/20s}").

    @@ -26220,10 +26259,10 @@ jQuery(function ($) { 'Value field name contains invalid character'

    The message "Value field name contains invalid character" can be caused by code like:

    -
    +
         xo_emit("{:cost-in-$$/%u}", 15);
     	    

    This code should be replaced with code like:

    -
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Tue May 16 18:54:27 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D154D7000C;
     Tue, 16 May 2017 18:54:27 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id B8B611383;
     Tue, 16 May 2017 18:54:26 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GIsPh2075532;
     Tue, 16 May 2017 18:54:25 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GIsPS1075530;
     Tue, 16 May 2017 18:54:25 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161854.v4GIsPS1075530@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 18:54:25 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
    Subject: svn commit: r318365 - in stable: 10/lib/msun/src 11/lib/msun/src
    X-SVN-Group: stable-10
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 18:54:27 -0000
    
    Author: dim
    Date: Tue May 16 18:54:25 2017
    New Revision: 318365
    URL: https://svnweb.freebsd.org/changeset/base/318365
    
    Log:
      MFC r318259:
      
      Silence a -Wunused warning about the junk variable being used to raise
      an inexact floating point exception.  The variable cannot be eliminated,
      unfortunately, otherwise the desired addition triggering the exception
      will be emitted neither by clang, nor by gcc.
      
      Reviewed by:	Steve Kargl, bde
    
    Modified:
      stable/10/lib/msun/src/catrig.c
      stable/10/lib/msun/src/catrigf.c
    Directory Properties:
      stable/10/   (props changed)
    
    Changes in other areas also in this revision:
    Modified:
      stable/11/lib/msun/src/catrig.c
      stable/11/lib/msun/src/catrigf.c
    Directory Properties:
      stable/11/   (props changed)
    
    Modified: stable/10/lib/msun/src/catrig.c
    ==============================================================================
    --- stable/10/lib/msun/src/catrig.c	Tue May 16 18:46:56 2017	(r318364)
    +++ stable/10/lib/msun/src/catrig.c	Tue May 16 18:54:25 2017	(r318365)
    @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
     #define isinf(x)	(fabs(x) == INFINITY)
     #undef isnan
     #define isnan(x)	((x) != (x))
    -#define	raise_inexact()	do { volatile float junk = 1 + tiny; } while(0)
    +#define	raise_inexact()	do { volatile float junk __unused = 1 + tiny; } while(0)
     #undef signbit
     #define signbit(x)	(__builtin_signbit(x))
     
    
    Modified: stable/10/lib/msun/src/catrigf.c
    ==============================================================================
    --- stable/10/lib/msun/src/catrigf.c	Tue May 16 18:46:56 2017	(r318364)
    +++ stable/10/lib/msun/src/catrigf.c	Tue May 16 18:54:25 2017	(r318365)
    @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
     #define isinf(x)	(fabsf(x) == INFINITY)
     #undef isnan
     #define isnan(x)	((x) != (x))
    -#define	raise_inexact()	do { volatile float junk = 1 + tiny; } while(0)
    +#define	raise_inexact()	do { volatile float junk __unused = 1 + tiny; } while(0)
     #undef signbit
     #define signbit(x)	(__builtin_signbitf(x))
     
    
    From owner-svn-src-all@freebsd.org  Tue May 16 18:54:26 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0ED8D70008;
     Tue, 16 May 2017 18:54:26 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 67656137A;
     Tue, 16 May 2017 18:54:26 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GIsPno075525;
     Tue, 16 May 2017 18:54:25 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GIsPdD075523;
     Tue, 16 May 2017 18:54:25 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161854.v4GIsPdD075523@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 18:54:25 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318365 - in stable: 10/lib/msun/src 11/lib/msun/src
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 18:54:26 -0000
    
    Author: dim
    Date: Tue May 16 18:54:25 2017
    New Revision: 318365
    URL: https://svnweb.freebsd.org/changeset/base/318365
    
    Log:
      MFC r318259:
      
      Silence a -Wunused warning about the junk variable being used to raise
      an inexact floating point exception.  The variable cannot be eliminated,
      unfortunately, otherwise the desired addition triggering the exception
      will be emitted neither by clang, nor by gcc.
      
      Reviewed by:	Steve Kargl, bde
    
    Modified:
      stable/11/lib/msun/src/catrig.c
      stable/11/lib/msun/src/catrigf.c
    Directory Properties:
      stable/11/   (props changed)
    
    Changes in other areas also in this revision:
    Modified:
      stable/10/lib/msun/src/catrig.c
      stable/10/lib/msun/src/catrigf.c
    Directory Properties:
      stable/10/   (props changed)
    
    Modified: stable/11/lib/msun/src/catrig.c
    ==============================================================================
    --- stable/11/lib/msun/src/catrig.c	Tue May 16 18:46:56 2017	(r318364)
    +++ stable/11/lib/msun/src/catrig.c	Tue May 16 18:54:25 2017	(r318365)
    @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
     #define isinf(x)	(fabs(x) == INFINITY)
     #undef isnan
     #define isnan(x)	((x) != (x))
    -#define	raise_inexact()	do { volatile float junk = 1 + tiny; } while(0)
    +#define	raise_inexact()	do { volatile float junk __unused = 1 + tiny; } while(0)
     #undef signbit
     #define signbit(x)	(__builtin_signbit(x))
     
    
    Modified: stable/11/lib/msun/src/catrigf.c
    ==============================================================================
    --- stable/11/lib/msun/src/catrigf.c	Tue May 16 18:46:56 2017	(r318364)
    +++ stable/11/lib/msun/src/catrigf.c	Tue May 16 18:54:25 2017	(r318365)
    @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
     #define isinf(x)	(fabsf(x) == INFINITY)
     #undef isnan
     #define isnan(x)	((x) != (x))
    -#define	raise_inexact()	do { volatile float junk = 1 + tiny; } while(0)
    +#define	raise_inexact()	do { volatile float junk __unused = 1 + tiny; } while(0)
     #undef signbit
     #define signbit(x)	(__builtin_signbitf(x))
     
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:03:27 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3503D70480;
     Tue, 16 May 2017 19:03:27 +0000 (UTC)
     (envelope-from emaste@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 768A1A4;
     Tue, 16 May 2017 19:03:27 +0000 (UTC)
     (envelope-from emaste@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJ3Qdf080041;
     Tue, 16 May 2017 19:03:26 GMT (envelope-from emaste@FreeBSD.org)
    Received: (from emaste@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJ3Qll080040;
     Tue, 16 May 2017 19:03:26 GMT (envelope-from emaste@FreeBSD.org)
    Message-Id: <201705161903.v4GJ3Qll080040@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: emaste set sender to
     emaste@FreeBSD.org using -f
    From: Ed Maste 
    Date: Tue, 16 May 2017 19:03:26 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318366 - head/sbin/newfs_msdos
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:03:27 -0000
    
    Author: emaste
    Date: Tue May 16 19:03:26 2017
    New Revision: 318366
    URL: https://svnweb.freebsd.org/changeset/base/318366
    
    Log:
      newfs_msdos: clarify description of -T (timestamp) option
      
      Submitted by:	Siva Mahadevan 
      Reported by:	Daniel Shahaf 
      Reviewed by:	emaste
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      head/sbin/newfs_msdos/newfs_msdos.8
    
    Modified: head/sbin/newfs_msdos/newfs_msdos.8
    ==============================================================================
    --- head/sbin/newfs_msdos/newfs_msdos.8	Tue May 16 18:54:25 2017	(r318365)
    +++ head/sbin/newfs_msdos/newfs_msdos.8	Tue May 16 19:03:26 2017	(r318366)
    @@ -38,10 +38,11 @@
     .Op Fl B Ar boot
     .Op Fl C Ar create-size
     .Op Fl F Ar FAT-type
    -.Op Fl I Ar VolumeId
    +.Op Fl I Ar VolumeID
     .Op Fl L Ar label
     .Op Fl O Ar OEM
     .Op Fl S Ar sector-size
    +.Op Fl T Ar timestamp
     .Op Fl a Ar FAT-size
     .Op Fl b Ar block-size
     .Op Fl c Ar cluster-size
    @@ -55,7 +56,6 @@
     .Op Fl o Ar hidden
     .Op Fl r Ar reserved
     .Op Fl s Ar total
    -.Op Fl T Ar timestamp
     .Op Fl u Ar track-size
     .Ar special
     .Op Ar disktype
    @@ -118,6 +118,14 @@ The default is
     Number of bytes per sector.
     Acceptable values are powers of 2
     in the range 512 through 32768, inclusive.
    +.It Fl T Ar timestamp
    +Create the filesystem as though the current time is
    +.Ar timestamp .
    +The default filesystem volume ID is derived from the time.
    +.Ar timestamp
    +can be a pathname (where the timestamp is derived from
    +that file) or an integer value interpreted
    +as the number of seconds since the Epoch.
     .It Fl a Ar FAT-size
     Number of sectors per FAT.
     .It Fl b Ar block-size
    @@ -160,17 +168,11 @@ Number of hidden sectors.
     Number of reserved sectors.
     .It Fl s Ar total
     File system size.
    -.It Fl T Ar timestamp
    -Specify a timestamp to be used for filesystem creation so that
    -it can be consistent for reproducible builds.
    -The timestamp can be a pathname (where the timestamps are derived from
    -that file) or an integer value interpreted
    -as the number of seconds since the Epoch.
     .It Fl u Ar track-size
     Number of sectors per track.
     .El
     .Sh NOTES
    -If some parameters (e.g. size, number of sectors, etc.) are not specified
    +If some parameters (e.g., size, number of sectors, etc.) are not specified
     through options or disktype, the program tries to generate them automatically.
     In particular, the size is determined as the device or file size minus the
     offset specified with the
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:35:26 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id B357AD70FB6;
     Tue, 16 May 2017 19:35:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 834EC160B;
     Tue, 16 May 2017 19:35:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJZPj3092556;
     Tue, 16 May 2017 19:35:25 GMT (envelope-from mjg@FreeBSD.org)
    Received: (from mjg@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJZPk0092555;
     Tue, 16 May 2017 19:35:25 GMT (envelope-from mjg@FreeBSD.org)
    Message-Id: <201705161935.v4GJZPk0092555@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org
     using -f
    From: Mateusz Guzik 
    Date: Tue, 16 May 2017 19:35:25 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318367 - stable/11/sys/kern
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:35:26 -0000
    
    Author: mjg
    Date: Tue May 16 19:35:25 2017
    New Revision: 318367
    URL: https://svnweb.freebsd.org/changeset/base/318367
    
    Log:
      MFC r317784:
      
      cache: stop holding the ncneg_hot lock across purging
      
      Only non-hot entries are purged so the lock is not needed in the first place.
      This saves one lock/unlock pair.
    
    Modified:
      stable/11/sys/kern/vfs_cache.c
    
    Modified: stable/11/sys/kern/vfs_cache.c
    ==============================================================================
    --- stable/11/sys/kern/vfs_cache.c	Tue May 16 19:03:26 2017	(r318366)
    +++ stable/11/sys/kern/vfs_cache.c	Tue May 16 19:35:25 2017	(r318367)
    @@ -735,13 +735,12 @@ cache_negative_remove(struct namecache *
     			list_locked = true;
     			mtx_lock(&neglist->nl_lock);
     		}
    -	} else {
    -		mtx_assert(&neglist->nl_lock, MA_OWNED);
    -		mtx_assert(&ncneg_hot.nl_lock, MA_OWNED);
     	}
     	if (ncp->nc_flag & NCF_HOTNEGATIVE) {
    +		mtx_assert(&ncneg_hot.nl_lock, MA_OWNED);
     		TAILQ_REMOVE(&ncneg_hot.nl_list, ncp, nc_dst);
     	} else {
    +		mtx_assert(&neglist->nl_lock, MA_OWNED);
     		TAILQ_REMOVE(&neglist->nl_list, ncp, nc_dst);
     	}
     	if (list_locked)
    @@ -816,7 +815,6 @@ cache_negative_zap_one(void)
     	mtx_unlock(&ncneg_hot.nl_lock);
     	mtx_lock(dvlp);
     	rw_wlock(blp);
    -	mtx_lock(&ncneg_hot.nl_lock);
     	mtx_lock(&neglist->nl_lock);
     	ncp2 = TAILQ_FIRST(&neglist->nl_list);
     	if (ncp != ncp2 || dvlp != VP2VNODELOCK(ncp2->nc_dvp) ||
    @@ -830,7 +828,6 @@ cache_negative_zap_one(void)
     	cache_zap_locked(ncp, true);
     out_unlock_all:
     	mtx_unlock(&neglist->nl_lock);
    -	mtx_unlock(&ncneg_hot.nl_lock);
     	rw_wunlock(blp);
     	mtx_unlock(dvlp);
     out:
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:46:57 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 111A3D70293;
     Tue, 16 May 2017 19:46:57 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 82D781BC6;
     Tue, 16 May 2017 19:46:56 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJktuv096818;
     Tue, 16 May 2017 19:46:55 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJkrP6096799;
     Tue, 16 May 2017 19:46:53 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161946.v4GJkrP6096799@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 19:46:53 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318368 - in vendor/llvm/dist: . cmake cmake/modules docs
     include/llvm include/llvm/ADT include/llvm/Analysis include/llvm/Bitcode
     include/llvm/CodeGen include/llvm/CodeGen/GlobalISel i...
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:46:57 -0000
    
    Author: dim
    Date: Tue May 16 19:46:52 2017
    New Revision: 318368
    URL: https://svnweb.freebsd.org/changeset/base/318368
    
    Log:
      Vendor import of llvm trunk r303197:
      https://llvm.org/svn/llvm-project/llvm/trunk@303197
    
    Added:
      vendor/llvm/dist/include/llvm/CodeGen/ExpandReductions.h   (contents, props changed)
      vendor/llvm/dist/include/llvm/DebugInfo/CodeView/RandomAccessTypeVisitor.h   (contents, props changed)
      vendor/llvm/dist/include/llvm/Support/Parallel.h   (contents, props changed)
      vendor/llvm/dist/include/llvm/ToolDrivers/
      vendor/llvm/dist/include/llvm/ToolDrivers/llvm-lib/
      vendor/llvm/dist/include/llvm/ToolDrivers/llvm-lib/LibDriver.h   (contents, props changed)
      vendor/llvm/dist/lib/CodeGen/ExpandReductions.cpp   (contents, props changed)
      vendor/llvm/dist/lib/CodeGen/LiveRangeShrink.cpp   (contents, props changed)
      vendor/llvm/dist/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp   (contents, props changed)
      vendor/llvm/dist/lib/DebugInfo/CodeView/RandomAccessTypeVisitor.cpp   (contents, props changed)
      vendor/llvm/dist/lib/Fuzzer/test/OverwriteInputTest.cpp   (contents, props changed)
      vendor/llvm/dist/lib/Fuzzer/test/afl-driver.test
      vendor/llvm/dist/lib/Fuzzer/test/overwrite-input.test
      vendor/llvm/dist/lib/Support/Parallel.cpp   (contents, props changed)
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp   (contents, props changed)
      vendor/llvm/dist/lib/ToolDrivers/
      vendor/llvm/dist/lib/ToolDrivers/CMakeLists.txt   (contents, props changed)
      vendor/llvm/dist/lib/ToolDrivers/LLVMBuild.txt   (contents, props changed)
      vendor/llvm/dist/lib/ToolDrivers/llvm-lib/
      vendor/llvm/dist/lib/ToolDrivers/llvm-lib/CMakeLists.txt   (contents, props changed)
      vendor/llvm/dist/lib/ToolDrivers/llvm-lib/LLVMBuild.txt   (contents, props changed)
      vendor/llvm/dist/lib/ToolDrivers/llvm-lib/LibDriver.cpp   (contents, props changed)
      vendor/llvm/dist/lib/ToolDrivers/llvm-lib/Options.td
      vendor/llvm/dist/test/Analysis/BasicAA/cs-cs-arm.ll
      vendor/llvm/dist/test/Analysis/BasicAA/intrinsics-arm.ll
      vendor/llvm/dist/test/Analysis/CostModel/AArch64/free-widening-casts.ll
      vendor/llvm/dist/test/Analysis/CostModel/AMDGPU/shufflevector.ll
      vendor/llvm/dist/test/Analysis/ScalarEvolution/different-loops-recs.ll
      vendor/llvm/dist/test/Assembler/globalvariable-attributes.ll
      vendor/llvm/dist/test/Bitcode/globalvariable-attributes.ll
      vendor/llvm/dist/test/Bitcode/thinlto-function-summary-callgraph-sample-profile-summary.ll
      vendor/llvm/dist/test/CodeGen/AArch64/macho-global-symbols.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/legalize-constant.mir
      vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/lit.local.cfg
      vendor/llvm/dist/test/CodeGen/AVR/select-mbb-placement-bug.ll
      vendor/llvm/dist/test/CodeGen/Generic/expand-experimental-reductions.ll
      vendor/llvm/dist/test/CodeGen/Lanai/masking_setccs.ll
      vendor/llvm/dist/test/CodeGen/MIR/ARM/PR32721_ifcvt_triangle_unanalyzable.mir
      vendor/llvm/dist/test/CodeGen/MIR/ARM/ifcvt_canFallThroughTo.mir
      vendor/llvm/dist/test/CodeGen/MSP430/hwmult16.ll
      vendor/llvm/dist/test/CodeGen/MSP430/hwmult32.ll
      vendor/llvm/dist/test/CodeGen/MSP430/hwmultf5.ll
      vendor/llvm/dist/test/CodeGen/MSP430/libcalls.ll
      vendor/llvm/dist/test/CodeGen/MSP430/promote-i8-mul.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/mtvsrdd.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/testComparesieqsc.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/testComparesieqsi.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/testComparesieqss.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/testComparesiequc.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/testComparesiequi.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/testComparesiequs.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/testCompareslleqsc.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/testCompareslleqsi.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/testCompareslleqss.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/testComparesllequc.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/testComparesllequi.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/testComparesllequs.ll
      vendor/llvm/dist/test/CodeGen/SPARC/inlineasm-v9.ll
      vendor/llvm/dist/test/CodeGen/SystemZ/list-ilp-crash.ll
      vendor/llvm/dist/test/CodeGen/SystemZ/lower-copy-undef-src.mir
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/add-scalar.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/br.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/cmp.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-cmp.mir
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-scalar-x32.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-scalar.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-vec.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-br.mir
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-cmp.mir
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-scalar-x32.mir
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-scalar.mir
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-v128.mir
      vendor/llvm/dist/test/CodeGen/X86/O0-pipeline.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512-scalar_mask.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512-vselect.ll
      vendor/llvm/dist/test/CodeGen/X86/leaFixup32.mir
      vendor/llvm/dist/test/CodeGen/X86/leaFixup64.mir
      vendor/llvm/dist/test/CodeGen/X86/lrshrink.ll
      vendor/llvm/dist/test/CodeGen/X86/replace_unsupported_masked_mem_intrin.ll
      vendor/llvm/dist/test/CodeGen/X86/vector-narrow-binop.ll
      vendor/llvm/dist/test/DebugInfo/COFF/no-cus.ll
      vendor/llvm/dist/test/DebugInfo/Inputs/typeunit-header.elf-x86-64   (contents, props changed)
      vendor/llvm/dist/test/DebugInfo/Inputs/typeunit-header.s   (contents, props changed)
      vendor/llvm/dist/test/DebugInfo/X86/dbg-declare-inalloca.ll
      vendor/llvm/dist/test/DebugInfo/typeunit-header.test
      vendor/llvm/dist/test/Instrumentation/MemorySanitizer/msan_x86intrinsics.ll
      vendor/llvm/dist/test/Instrumentation/MemorySanitizer/pr32842.ll
      vendor/llvm/dist/test/LTO/Resolution/X86/ifunc.ll
      vendor/llvm/dist/test/MC/AArch64/directive-cpu-err.s   (contents, props changed)
      vendor/llvm/dist/test/MC/AsmParser/altmacro_string_escape.s   (contents, props changed)
      vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-p9vector.txt   (contents, props changed)
      vendor/llvm/dist/test/Object/Inputs/COFF/empty-drectve.yaml
      vendor/llvm/dist/test/Object/X86/archive-symbol-table.s   (contents, props changed)
      vendor/llvm/dist/test/Object/coff-empty-drectve.test
      vendor/llvm/dist/test/Object/wasm-invalid-start.test
      vendor/llvm/dist/test/TableGen/RegisterEncoder.td
      vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineEntryUpdate.ll
      vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineHighCost.ll
      vendor/llvm/dist/test/Transforms/CodeGenPrepare/section-samplepgo.ll
      vendor/llvm/dist/test/Transforms/ConstProp/calls-math-finite.ll
      vendor/llvm/dist/test/Transforms/ConstProp/sse.ll
      vendor/llvm/dist/test/Transforms/Coroutines/coro-eh-aware-edge-split.ll
      vendor/llvm/dist/test/Transforms/GVN/PRE/nonintegral.ll
      vendor/llvm/dist/test/Transforms/InstCombine/AArch64/
      vendor/llvm/dist/test/Transforms/InstCombine/AArch64/2012-04-23-Neon-Intrinsics.ll
      vendor/llvm/dist/test/Transforms/InstCombine/AArch64/lit.local.cfg
      vendor/llvm/dist/test/Transforms/InstCombine/AMDGPU/
      vendor/llvm/dist/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll
      vendor/llvm/dist/test/Transforms/InstCombine/AMDGPU/lit.local.cfg
      vendor/llvm/dist/test/Transforms/InstCombine/ARM/2012-04-23-Neon-Intrinsics.ll
      vendor/llvm/dist/test/Transforms/InstCombine/ARM/constant-fold-hang.ll
      vendor/llvm/dist/test/Transforms/InstCombine/ARM/lit.local.cfg
      vendor/llvm/dist/test/Transforms/InstCombine/ARM/neon-intrinsics.ll
      vendor/llvm/dist/test/Transforms/InstCombine/PowerPC/
      vendor/llvm/dist/test/Transforms/InstCombine/PowerPC/aligned-altivec.ll
      vendor/llvm/dist/test/Transforms/InstCombine/PowerPC/aligned-qpx.ll
      vendor/llvm/dist/test/Transforms/InstCombine/PowerPC/lit.local.cfg
      vendor/llvm/dist/test/Transforms/InstCombine/PowerPC/vsx-unaligned.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/
      vendor/llvm/dist/test/Transforms/InstCombine/X86/X86FsubCmpCombine.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/blend_x86.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/lit.local.cfg
      vendor/llvm/dist/test/Transforms/InstCombine/X86/pr2645-1.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/shufflemask-undef.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-avx2.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-avx512.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-crc32-demanded.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-f16c.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-fma.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-insertps.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-masked-memops.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-movmsk.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-muldq.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-pack.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-pshufb.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-sse.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-sse2.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-sse41.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-sse4a.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-vec_demanded_elts.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-vector-shifts.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-vperm2.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-vpermil.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86/x86-xop.ll
      vendor/llvm/dist/test/Transforms/InstCombine/constant-fold-iteration.ll
      vendor/llvm/dist/test/Transforms/InstNamer/
      vendor/llvm/dist/test/Transforms/InstNamer/basic.ll
      vendor/llvm/dist/test/Transforms/InstSimplify/or.ll
      vendor/llvm/dist/test/Transforms/LoopIdiom/ARM/
      vendor/llvm/dist/test/Transforms/LoopIdiom/ARM/ctlz.ll
      vendor/llvm/dist/test/Transforms/LoopIdiom/X86/ctlz.ll
      vendor/llvm/dist/test/Transforms/LoopVectorize/X86/svml-calls-finite.ll
      vendor/llvm/dist/test/Transforms/LoopVectorize/pr32859.ll
      vendor/llvm/dist/test/Transforms/NewGVN/pr32934.ll
      vendor/llvm/dist/test/Transforms/NewGVN/pr32952.ll
      vendor/llvm/dist/test/Transforms/NewGVN/verify-memoryphi.ll
      vendor/llvm/dist/test/Transforms/SLPVectorizer/AArch64/64-bit-vector.ll
      vendor/llvm/dist/test/Transforms/SLPVectorizer/AArch64/remarks.ll
      vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/arith-add.ll
      vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/arith-mul.ll
      vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/arith-sub.ll
      vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/shift-ashr.ll
      vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/shift-lshr.ll
      vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/shift-shl.ll
      vendor/llvm/dist/test/tools/llvm-pdbdump/symbol-filters.test
      vendor/llvm/dist/test/tools/llvm-readobj/wasm-invalid.test
      vendor/llvm/dist/unittests/DebugInfo/CodeView/
      vendor/llvm/dist/unittests/DebugInfo/CodeView/CMakeLists.txt   (contents, props changed)
      vendor/llvm/dist/unittests/DebugInfo/CodeView/ErrorChecking.h   (contents, props changed)
      vendor/llvm/dist/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp   (contents, props changed)
      vendor/llvm/dist/unittests/Support/ParallelTest.cpp   (contents, props changed)
      vendor/llvm/dist/utils/vscode/
      vendor/llvm/dist/utils/vscode/README
      vendor/llvm/dist/utils/vscode/tablegen/
      vendor/llvm/dist/utils/vscode/tablegen/.vscode/
      vendor/llvm/dist/utils/vscode/tablegen/.vscode/launch.json
      vendor/llvm/dist/utils/vscode/tablegen/CHANGELOG.md
      vendor/llvm/dist/utils/vscode/tablegen/README.md
      vendor/llvm/dist/utils/vscode/tablegen/language-configuration.json
      vendor/llvm/dist/utils/vscode/tablegen/package.json
      vendor/llvm/dist/utils/vscode/tablegen/syntaxes/
      vendor/llvm/dist/utils/vscode/tablegen/syntaxes/TableGen.tmLanguage
      vendor/llvm/dist/utils/vscode/tablegen/vsc-extension-quickstart.md
    Deleted:
      vendor/llvm/dist/include/llvm/LibDriver/
      vendor/llvm/dist/lib/DebugInfo/CodeView/ModuleDebugUnknownFragment.cpp
      vendor/llvm/dist/lib/LibDriver/
      vendor/llvm/dist/test/CodeGen/MSP430/2009-11-05-8BitLibcalls.ll
      vendor/llvm/dist/test/CodeGen/X86/2012-11-30-handlemove-dbg.ll
      vendor/llvm/dist/test/CodeGen/X86/2012-11-30-misched-dbg.ll
      vendor/llvm/dist/test/CodeGen/X86/2012-11-30-regpres-dbg.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-x32.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-x32.mir
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop.mir
      vendor/llvm/dist/test/Transforms/InstCombine/2012-04-23-Neon-Intrinsics.ll
      vendor/llvm/dist/test/Transforms/InstCombine/X86FsubCmpCombine.ll
      vendor/llvm/dist/test/Transforms/InstCombine/aligned-altivec.ll
      vendor/llvm/dist/test/Transforms/InstCombine/aligned-qpx.ll
      vendor/llvm/dist/test/Transforms/InstCombine/amdgcn-intrinsics.ll
      vendor/llvm/dist/test/Transforms/InstCombine/bit-tracking.ll
      vendor/llvm/dist/test/Transforms/InstCombine/blend_x86.ll
      vendor/llvm/dist/test/Transforms/InstCombine/constant-fold-hang.ll
      vendor/llvm/dist/test/Transforms/InstCombine/neon-intrinsics.ll
      vendor/llvm/dist/test/Transforms/InstCombine/pr2645-1.ll
      vendor/llvm/dist/test/Transforms/InstCombine/shufflemask-undef.ll
      vendor/llvm/dist/test/Transforms/InstCombine/vsx-unaligned.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-avx2.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-avx512.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-crc32-demanded.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-f16c.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-fma.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-insertps.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-masked-memops.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-movmsk.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-muldq.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-pack.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-pshufb.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-sse.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-sse2.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-sse41.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-sse4a.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-vector-shifts.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-vperm2.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-vpermil.ll
      vendor/llvm/dist/test/Transforms/InstCombine/x86-xop.ll
      vendor/llvm/dist/test/Transforms/InstSimplify/apint-or.ll
      vendor/llvm/dist/test/Transforms/SpeculativeExecution/spec-other.ll
      vendor/llvm/dist/test/Transforms/SpeculativeExecution/spec-vector.ll
    Modified:
      vendor/llvm/dist/CREDITS.TXT
      vendor/llvm/dist/cmake/config-ix.cmake
      vendor/llvm/dist/cmake/modules/AddSphinxTarget.cmake
      vendor/llvm/dist/docs/CMakeLists.txt
      vendor/llvm/dist/docs/GettingStarted.rst
      vendor/llvm/dist/docs/LangRef.rst
      vendor/llvm/dist/docs/Lexicon.rst
      vendor/llvm/dist/docs/LibFuzzer.rst
      vendor/llvm/dist/docs/ReleaseNotes.rst
      vendor/llvm/dist/include/llvm/ADT/APInt.h
      vendor/llvm/dist/include/llvm/ADT/BitVector.h
      vendor/llvm/dist/include/llvm/ADT/STLExtras.h
      vendor/llvm/dist/include/llvm/ADT/StringExtras.h
      vendor/llvm/dist/include/llvm/Analysis/CallGraph.h
      vendor/llvm/dist/include/llvm/Analysis/ProfileSummaryInfo.h
      vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h
      vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.def
      vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h
      vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h
      vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h
      vendor/llvm/dist/include/llvm/Bitcode/BitcodeReader.h
      vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
      vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/Utils.h
      vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h
      vendor/llvm/dist/include/llvm/CodeGen/MachineCombinerPattern.h
      vendor/llvm/dist/include/llvm/CodeGen/Passes.h
      vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h
      vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h
      vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabase.h
      vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabaseVisitor.h
      vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDeserializer.h
      vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDumpVisitor.h
      vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeIndex.h
      vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h
      vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFRelocMap.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
      vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/RawTypes.h
      vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/TpiStream.h
      vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h
      vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
      vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
      vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
      vendor/llvm/dist/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
      vendor/llvm/dist/include/llvm/ExecutionEngine/RuntimeDyld.h
      vendor/llvm/dist/include/llvm/IR/Attributes.h
      vendor/llvm/dist/include/llvm/IR/CallingConv.h
      vendor/llvm/dist/include/llvm/IR/Constants.h
      vendor/llvm/dist/include/llvm/IR/DebugInfoMetadata.h
      vendor/llvm/dist/include/llvm/IR/DebugLoc.h
      vendor/llvm/dist/include/llvm/IR/DerivedTypes.h
      vendor/llvm/dist/include/llvm/IR/DiagnosticInfo.h
      vendor/llvm/dist/include/llvm/IR/Function.h
      vendor/llvm/dist/include/llvm/IR/GetElementPtrTypeIterator.h
      vendor/llvm/dist/include/llvm/IR/GlobalAlias.h
      vendor/llvm/dist/include/llvm/IR/GlobalIFunc.h
      vendor/llvm/dist/include/llvm/IR/GlobalObject.h
      vendor/llvm/dist/include/llvm/IR/GlobalValue.h
      vendor/llvm/dist/include/llvm/IR/GlobalVariable.h
      vendor/llvm/dist/include/llvm/IR/IRBuilder.h
      vendor/llvm/dist/include/llvm/IR/InstrTypes.h
      vendor/llvm/dist/include/llvm/IR/Instruction.h
      vendor/llvm/dist/include/llvm/IR/Instructions.h
      vendor/llvm/dist/include/llvm/IR/Intrinsics.td
      vendor/llvm/dist/include/llvm/IR/LLVMContext.h
      vendor/llvm/dist/include/llvm/IR/LegacyPassManager.h
      vendor/llvm/dist/include/llvm/IR/Module.h
      vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndex.h
      vendor/llvm/dist/include/llvm/IR/PassManager.h
      vendor/llvm/dist/include/llvm/IR/PassManagerInternal.h
      vendor/llvm/dist/include/llvm/IR/PatternMatch.h
      vendor/llvm/dist/include/llvm/IR/ProfileSummary.h
      vendor/llvm/dist/include/llvm/IR/Statepoint.h
      vendor/llvm/dist/include/llvm/IR/SymbolTableListTraits.h
      vendor/llvm/dist/include/llvm/IR/TrackingMDRef.h
      vendor/llvm/dist/include/llvm/IR/Type.h
      vendor/llvm/dist/include/llvm/IR/TypeFinder.h
      vendor/llvm/dist/include/llvm/IR/Use.h
      vendor/llvm/dist/include/llvm/IR/UseListOrder.h
      vendor/llvm/dist/include/llvm/IR/User.h
      vendor/llvm/dist/include/llvm/IR/Value.h
      vendor/llvm/dist/include/llvm/IR/ValueHandle.h
      vendor/llvm/dist/include/llvm/IR/ValueMap.h
      vendor/llvm/dist/include/llvm/IR/ValueSymbolTable.h
      vendor/llvm/dist/include/llvm/IR/Verifier.h
      vendor/llvm/dist/include/llvm/InitializePasses.h
      vendor/llvm/dist/include/llvm/LinkAllPasses.h
      vendor/llvm/dist/include/llvm/Object/Wasm.h
      vendor/llvm/dist/include/llvm/ObjectYAML/WasmYAML.h
      vendor/llvm/dist/include/llvm/ProfileData/SampleProfWriter.h
      vendor/llvm/dist/include/llvm/Support/BinaryStreamArray.h
      vendor/llvm/dist/include/llvm/Support/Compiler.h
      vendor/llvm/dist/include/llvm/Support/KnownBits.h
      vendor/llvm/dist/include/llvm/Support/Wasm.h
      vendor/llvm/dist/include/llvm/Target/Target.td
      vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h
      vendor/llvm/dist/include/llvm/Target/TargetLowering.h
      vendor/llvm/dist/include/llvm/Target/TargetSchedule.td
      vendor/llvm/dist/include/llvm/Target/TargetSelectionDAG.td
      vendor/llvm/dist/include/llvm/Transforms/Utils/Cloning.h
      vendor/llvm/dist/include/llvm/Transforms/Utils/LoopUtils.h
      vendor/llvm/dist/include/llvm/Transforms/Vectorize/SLPVectorizer.h
      vendor/llvm/dist/include/llvm/module.modulemap
      vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp
      vendor/llvm/dist/lib/Analysis/BranchProbabilityInfo.cpp
      vendor/llvm/dist/lib/Analysis/CallGraph.cpp
      vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp
      vendor/llvm/dist/lib/Analysis/DemandedBits.cpp
      vendor/llvm/dist/lib/Analysis/InlineCost.cpp
      vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp
      vendor/llvm/dist/lib/Analysis/ModuleSummaryAnalysis.cpp
      vendor/llvm/dist/lib/Analysis/OptimizationDiagnosticInfo.cpp
      vendor/llvm/dist/lib/Analysis/ProfileSummaryInfo.cpp
      vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp
      vendor/llvm/dist/lib/Analysis/TargetLibraryInfo.cpp
      vendor/llvm/dist/lib/Analysis/TargetTransformInfo.cpp
      vendor/llvm/dist/lib/Analysis/ValueTracking.cpp
      vendor/llvm/dist/lib/Analysis/VectorUtils.cpp
      vendor/llvm/dist/lib/AsmParser/LLParser.cpp
      vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp
      vendor/llvm/dist/lib/Bitcode/Reader/MetadataLoader.cpp
      vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp
      vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp
      vendor/llvm/dist/lib/CMakeLists.txt
      vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
      vendor/llvm/dist/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
      vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
      vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
      vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
      vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h
      vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfFile.h
      vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
      vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.h
      vendor/llvm/dist/lib/CodeGen/AsmPrinter/WinException.cpp
      vendor/llvm/dist/lib/CodeGen/AtomicExpandPass.cpp
      vendor/llvm/dist/lib/CodeGen/CMakeLists.txt
      vendor/llvm/dist/lib/CodeGen/CodeGen.cpp
      vendor/llvm/dist/lib/CodeGen/CodeGenPrepare.cpp
      vendor/llvm/dist/lib/CodeGen/ExpandPostRAPseudos.cpp
      vendor/llvm/dist/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
      vendor/llvm/dist/lib/CodeGen/GlobalISel/RegBankSelect.cpp
      vendor/llvm/dist/lib/CodeGen/GlobalISel/Utils.cpp
      vendor/llvm/dist/lib/CodeGen/IfConversion.cpp
      vendor/llvm/dist/lib/CodeGen/LiveVariables.cpp
      vendor/llvm/dist/lib/CodeGen/MachineBlockPlacement.cpp
      vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp
      vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp
      vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp
      vendor/llvm/dist/lib/CodeGen/RegisterScavenging.cpp
      vendor/llvm/dist/lib/CodeGen/SafeStack.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.h
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp
      vendor/llvm/dist/lib/CodeGen/ShrinkWrap.cpp
      vendor/llvm/dist/lib/CodeGen/SjLjEHPrepare.cpp
      vendor/llvm/dist/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
      vendor/llvm/dist/lib/CodeGen/TargetPassConfig.cpp
      vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp
      vendor/llvm/dist/lib/CodeGen/UnreachableBlockElim.cpp
      vendor/llvm/dist/lib/DebugInfo/CodeView/CMakeLists.txt
      vendor/llvm/dist/lib/DebugInfo/CodeView/CVTypeVisitor.cpp
      vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDatabase.cpp
      vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDatabaseVisitor.cpp
      vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
      vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp
      vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp
      vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp
      vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDie.cpp
      vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp
      vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFUnit.cpp
      vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFVerifier.cpp
      vendor/llvm/dist/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp
      vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
      vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp
      vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
      vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
      vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
      vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
      vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h
      vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h
      vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
      vendor/llvm/dist/lib/Fuzzer/FuzzerDriver.cpp
      vendor/llvm/dist/lib/Fuzzer/FuzzerFlags.def
      vendor/llvm/dist/lib/Fuzzer/FuzzerInternal.h
      vendor/llvm/dist/lib/Fuzzer/FuzzerLoop.cpp
      vendor/llvm/dist/lib/Fuzzer/FuzzerMutate.cpp
      vendor/llvm/dist/lib/Fuzzer/afl/afl_driver.cpp
      vendor/llvm/dist/lib/Fuzzer/test/AFLDriverTest.cpp
      vendor/llvm/dist/lib/Fuzzer/test/CMakeLists.txt
      vendor/llvm/dist/lib/IR/AsmWriter.cpp
      vendor/llvm/dist/lib/IR/AttributeImpl.h
      vendor/llvm/dist/lib/IR/Attributes.cpp
      vendor/llvm/dist/lib/IR/ConstantFold.cpp
      vendor/llvm/dist/lib/IR/ConstantRange.cpp
      vendor/llvm/dist/lib/IR/Constants.cpp
      vendor/llvm/dist/lib/IR/ConstantsContext.h
      vendor/llvm/dist/lib/IR/DebugInfoMetadata.cpp
      vendor/llvm/dist/lib/IR/DebugLoc.cpp
      vendor/llvm/dist/lib/IR/DiagnosticInfo.cpp
      vendor/llvm/dist/lib/IR/Function.cpp
      vendor/llvm/dist/lib/IR/Globals.cpp
      vendor/llvm/dist/lib/IR/IRBuilder.cpp
      vendor/llvm/dist/lib/IR/Instruction.cpp
      vendor/llvm/dist/lib/IR/Instructions.cpp
      vendor/llvm/dist/lib/IR/LegacyPassManager.cpp
      vendor/llvm/dist/lib/IR/Module.cpp
      vendor/llvm/dist/lib/IR/Type.cpp
      vendor/llvm/dist/lib/IR/Verifier.cpp
      vendor/llvm/dist/lib/LLVMBuild.txt
      vendor/llvm/dist/lib/LTO/LTO.cpp
      vendor/llvm/dist/lib/LTO/LTOCodeGenerator.cpp
      vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp
      vendor/llvm/dist/lib/Linker/IRMover.cpp
      vendor/llvm/dist/lib/MC/MCObjectStreamer.cpp
      vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp
      vendor/llvm/dist/lib/Object/COFFObjectFile.cpp
      vendor/llvm/dist/lib/Object/WasmObjectFile.cpp
      vendor/llvm/dist/lib/ObjectYAML/WasmYAML.cpp
      vendor/llvm/dist/lib/ProfileData/SampleProfWriter.cpp
      vendor/llvm/dist/lib/Support/APInt.cpp
      vendor/llvm/dist/lib/Support/CMakeLists.txt
      vendor/llvm/dist/lib/Support/Unix/Path.inc
      vendor/llvm/dist/lib/Support/Unix/Process.inc
      vendor/llvm/dist/lib/Target/AArch64/AArch64.td
      vendor/llvm/dist/lib/Target/AArch64/AArch64CallLowering.cpp
      vendor/llvm/dist/lib/Target/AArch64/AArch64FastISel.cpp
      vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp
      vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.cpp
      vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.td
      vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterBankInfo.cpp
      vendor/llvm/dist/lib/Target/AArch64/AArch64SchedFalkorDetails.td
      vendor/llvm/dist/lib/Target/AArch64/AArch64SchedFalkorWriteRes.td
      vendor/llvm/dist/lib/Target/AArch64/AArch64Subtarget.cpp
      vendor/llvm/dist/lib/Target/AArch64/AArch64Subtarget.h
      vendor/llvm/dist/lib/Target/AArch64/AArch64TargetObjectFile.cpp
      vendor/llvm/dist/lib/Target/AArch64/AArch64TargetObjectFile.h
      vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
      vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.h
      vendor/llvm/dist/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
      vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.h
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.h
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
      vendor/llvm/dist/lib/Target/AMDGPU/CMakeLists.txt
      vendor/llvm/dist/lib/Target/AMDGPU/FLATInstructions.td
      vendor/llvm/dist/lib/Target/AMDGPU/GCNRegPressure.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/GCNRegPressure.h
      vendor/llvm/dist/lib/Target/AMDGPU/GCNSchedStrategy.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/GCNSchedStrategy.h
      vendor/llvm/dist/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.h
      vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.h
      vendor/llvm/dist/lib/Target/AMDGPU/SIInstructions.td
      vendor/llvm/dist/lib/Target/AMDGPU/VOP2Instructions.td
      vendor/llvm/dist/lib/Target/AMDGPU/VOP3Instructions.td
      vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.h
      vendor/llvm/dist/lib/Target/ARM/ARMCallLowering.cpp
      vendor/llvm/dist/lib/Target/ARM/ARMFastISel.cpp
      vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp
      vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h
      vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td
      vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td
      vendor/llvm/dist/lib/Target/ARM/ARMInstructionSelector.cpp
      vendor/llvm/dist/lib/Target/ARM/ARMLegalizerInfo.cpp
      vendor/llvm/dist/lib/Target/ARM/ARMOptimizeBarriersPass.cpp
      vendor/llvm/dist/lib/Target/ARM/ARMRegisterBankInfo.cpp
      vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp
      vendor/llvm/dist/lib/Target/AVR/AVRFrameLowering.cpp
      vendor/llvm/dist/lib/Target/AVR/AVRISelLowering.cpp
      vendor/llvm/dist/lib/Target/AVR/AVRInstrInfo.td
      vendor/llvm/dist/lib/Target/AVR/AVRRegisterInfo.cpp
      vendor/llvm/dist/lib/Target/BPF/BPFISelLowering.cpp
      vendor/llvm/dist/lib/Target/BPF/BPFInstrInfo.td
      vendor/llvm/dist/lib/Target/Hexagon/HexagonISelLowering.cpp
      vendor/llvm/dist/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
      vendor/llvm/dist/lib/Target/Hexagon/HexagonPatterns.td
      vendor/llvm/dist/lib/Target/Hexagon/HexagonPseudo.td
      vendor/llvm/dist/lib/Target/Lanai/LanaiISelLowering.cpp
      vendor/llvm/dist/lib/Target/Lanai/LanaiISelLowering.h
      vendor/llvm/dist/lib/Target/Lanai/LanaiInstrInfo.td
      vendor/llvm/dist/lib/Target/MSP430/MSP430FrameLowering.cpp
      vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.cpp
      vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.h
      vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.td
      vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.cpp
      vendor/llvm/dist/lib/Target/Mips/MipsFastISel.cpp
      vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp
      vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.td
      vendor/llvm/dist/lib/Target/Mips/MipsOptimizePICCall.cpp
      vendor/llvm/dist/lib/Target/NVPTX/NVPTXISelLowering.cpp
      vendor/llvm/dist/lib/Target/NVPTX/NVPTXInstrInfo.td
      vendor/llvm/dist/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
      vendor/llvm/dist/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
      vendor/llvm/dist/lib/Target/PowerPC/PPCFastISel.cpp
      vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
      vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp
      vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h
      vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td
      vendor/llvm/dist/lib/Target/PowerPC/PPCInstrAltivec.td
      vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td
      vendor/llvm/dist/lib/Target/PowerPC/PPCInstrVSX.td
      vendor/llvm/dist/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
      vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.cpp
      vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.td
      vendor/llvm/dist/lib/Target/Sparc/SparcRegisterInfo.td
      vendor/llvm/dist/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
      vendor/llvm/dist/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp
      vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp
      vendor/llvm/dist/lib/Target/SystemZ/README.txt
      vendor/llvm/dist/lib/Target/SystemZ/SystemZFeatures.td
      vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp
      vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.h
      vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrFP.td
      vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrFormats.td
      vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.td
      vendor/llvm/dist/lib/Target/SystemZ/SystemZOperands.td
      vendor/llvm/dist/lib/Target/SystemZ/SystemZOperators.td
      vendor/llvm/dist/lib/Target/SystemZ/SystemZSchedule.td
      vendor/llvm/dist/lib/Target/SystemZ/SystemZScheduleZ13.td
      vendor/llvm/dist/lib/Target/SystemZ/SystemZScheduleZ196.td
      vendor/llvm/dist/lib/Target/SystemZ/SystemZScheduleZEC12.td
      vendor/llvm/dist/lib/Target/SystemZ/SystemZSubtarget.cpp
      vendor/llvm/dist/lib/Target/SystemZ/SystemZSubtarget.h
      vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyInstrCall.td
      vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
      vendor/llvm/dist/lib/Target/X86/X86.td
      vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp
      vendor/llvm/dist/lib/Target/X86/X86FixupLEAs.cpp
      vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp
      vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp
      vendor/llvm/dist/lib/Target/X86/X86InstrCompiler.td
      vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp
      vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h
      vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td
      vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td
      vendor/llvm/dist/lib/Target/X86/X86InstructionSelector.cpp
      vendor/llvm/dist/lib/Target/X86/X86IntrinsicsInfo.h
      vendor/llvm/dist/lib/Target/X86/X86LegalizerInfo.cpp
      vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp
      vendor/llvm/dist/lib/Target/X86/X86Subtarget.h
      vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp
      vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.cpp
      vendor/llvm/dist/lib/Target/X86/X86WinEHState.cpp
      vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp
      vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.td
      vendor/llvm/dist/lib/Transforms/Coroutines/CoroFrame.cpp
      vendor/llvm/dist/lib/Transforms/IPO/FunctionImport.cpp
      vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp
      vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp
      vendor/llvm/dist/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
      vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAddSub.cpp
      vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
      vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp
      vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp
      vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp
      vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineInternal.h
      vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
      vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
      vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
      vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp
      vendor/llvm/dist/lib/Transforms/Instrumentation/AddressSanitizer.cpp
      vendor/llvm/dist/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
      vendor/llvm/dist/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
      vendor/llvm/dist/lib/Transforms/Instrumentation/MemorySanitizer.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/SpeculativeExecution.cpp
      vendor/llvm/dist/lib/Transforms/Utils/BypassSlowDivision.cpp
      vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp
      vendor/llvm/dist/lib/Transforms/Utils/CloneModule.cpp
      vendor/llvm/dist/lib/Transforms/Utils/EscapeEnumerator.cpp
      vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp
      vendor/llvm/dist/lib/Transforms/Utils/InstructionNamer.cpp
      vendor/llvm/dist/lib/Transforms/Utils/Local.cpp
      vendor/llvm/dist/lib/Transforms/Utils/LoopUtils.cpp
      vendor/llvm/dist/lib/Transforms/Utils/ModuleUtils.cpp
      vendor/llvm/dist/lib/Transforms/Utils/SimplifyLibCalls.cpp
      vendor/llvm/dist/lib/Transforms/Utils/VNCoercion.cpp
      vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.cpp
      vendor/llvm/dist/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
      vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp
      vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp
      vendor/llvm/dist/lib/XRay/Trace.cpp
      vendor/llvm/dist/projects/CMakeLists.txt
      vendor/llvm/dist/test/Analysis/BasicAA/cs-cs.ll
      vendor/llvm/dist/test/Analysis/BasicAA/intrinsics.ll
      vendor/llvm/dist/test/Analysis/BranchProbabilityInfo/basic.ll
      vendor/llvm/dist/test/Analysis/CostModel/AMDGPU/extractelement.ll
      vendor/llvm/dist/test/Analysis/CostModel/AMDGPU/insertelement.ll
      vendor/llvm/dist/test/Analysis/CostModel/X86/div.ll
      vendor/llvm/dist/test/Analysis/CostModel/X86/vshift-ashr-cost.ll
      vendor/llvm/dist/test/Analysis/CostModel/X86/vshift-lshr-cost.ll
      vendor/llvm/dist/test/Analysis/CostModel/X86/vshift-shl-cost.ll
      vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/intrinsics.ll
      vendor/llvm/dist/test/Bitcode/ptest-old.ll
      vendor/llvm/dist/test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll
      vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir
      vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/call-translator.ll
      vendor/llvm/dist/test/CodeGen/AArch64/arm64-ccmp.ll
      vendor/llvm/dist/test/CodeGen/AArch64/arm64-fml-combines.ll
      vendor/llvm/dist/test/CodeGen/AArch64/arm64-hello.ll
      vendor/llvm/dist/test/CodeGen/AArch64/arm64-misched-multimmo.ll
      vendor/llvm/dist/test/CodeGen/AArch64/misched-fusion-aes.ll
      vendor/llvm/dist/test/CodeGen/AArch64/stackmap-frame-setup.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-flat.mir
      vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-flat.mir
      vendor/llvm/dist/test/CodeGen/AMDGPU/constant-fold-imm-immreg.mir
      vendor/llvm/dist/test/CodeGen/AMDGPU/constant-fold-mi-operands.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/ctpop.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/ctpop64.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/fneg-combines.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/fneg.f16.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/inserted-wait-states.mir
      vendor/llvm/dist/test/CodeGen/AMDGPU/limit-coalesce.mir
      vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.pkrtz.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.mbcnt.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/madak.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/promote-alloca-volatile.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/v_madak_f16.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/waitcnt.mir
      vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-instruction-select.mir
      vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-irtranslator.ll
      vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir
      vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-regbankselect.mir
      vendor/llvm/dist/test/CodeGen/ARM/divmod-eabi.ll
      vendor/llvm/dist/test/CodeGen/ARM/divmod.ll
      vendor/llvm/dist/test/CodeGen/Hexagon/regalloc-bad-undef.mir
      vendor/llvm/dist/test/CodeGen/Lanai/peephole-compare.mir
      vendor/llvm/dist/test/CodeGen/MIR/X86/frame-info-save-restore-points.mir
      vendor/llvm/dist/test/CodeGen/MSP430/jumptable.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/bug17709.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/ctlz.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/ctpop.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/cttz.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/f16-instructions.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/f16x2-instructions.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/fma.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/i8-param.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/param-load-store.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/sched1.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/sched2.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/simple-call.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/vec8.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/vector-call.ll
      vendor/llvm/dist/test/CodeGen/NVPTX/zeroext-32bit.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/setcc-logic.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/stackmap-frame-setup.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/tail-dup-layout.ll
      vendor/llvm/dist/test/CodeGen/SPARC/LeonItinerariesUT.ll
      vendor/llvm/dist/test/CodeGen/SPARC/inlineasm.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/v8_IT_5.ll
      vendor/llvm/dist/test/CodeGen/X86/2007-01-08-InstrSched.ll
      vendor/llvm/dist/test/CodeGen/X86/2010-01-18-DbgValue.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/binop.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/ext-x86-64.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/ext.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-ext-x86-64.mir
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-ext.mir
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-X86_64.mir
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-ext-x86-64.mir
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-ext.mir
      vendor/llvm/dist/test/CodeGen/X86/all-ones-vector.ll
      vendor/llvm/dist/test/CodeGen/X86/avg.ll
      vendor/llvm/dist/test/CodeGen/X86/avx-basic.ll
      vendor/llvm/dist/test/CodeGen/X86/avx-cvt-3.ll
      vendor/llvm/dist/test/CodeGen/X86/avx-intrinsics-fast-isel.ll
      vendor/llvm/dist/test/CodeGen/X86/avx-schedule.ll
      vendor/llvm/dist/test/CodeGen/X86/avx.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512-cmp-kor-sequence.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512-gather-scatter-intrin.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512-intrinsics-upgrade.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512-intrinsics.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512-mask-spills.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics-upgrade.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-intrinsics-upgrade.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512cdvl-intrinsics-upgrade.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512cdvl-intrinsics.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512dq-intrinsics-upgrade.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512dq-intrinsics.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512dqvl-intrinsics-upgrade.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512dqvl-intrinsics.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512er-intrinsics.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512ifma-intrinsics.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512ifmavl-intrinsics.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll
      vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics.ll
      vendor/llvm/dist/test/CodeGen/X86/bmi.ll
      vendor/llvm/dist/test/CodeGen/X86/bswap_tree2.ll
      vendor/llvm/dist/test/CodeGen/X86/cast-vsel.ll
      vendor/llvm/dist/test/CodeGen/X86/combine-abs.ll
      vendor/llvm/dist/test/CodeGen/X86/combine-shl.ll
      vendor/llvm/dist/test/CodeGen/X86/combine-srl.ll
      vendor/llvm/dist/test/CodeGen/X86/constructor.ll
      vendor/llvm/dist/test/CodeGen/X86/dbg-baseptr.ll
      vendor/llvm/dist/test/CodeGen/X86/elf-associated.ll
      vendor/llvm/dist/test/CodeGen/X86/fold-tied-op.ll
      vendor/llvm/dist/test/CodeGen/X86/fp128-i128.ll
      vendor/llvm/dist/test/CodeGen/X86/haddsub-2.ll
      vendor/llvm/dist/test/CodeGen/X86/known-signbits-vector.ll
      vendor/llvm/dist/test/CodeGen/X86/madd.ll
      vendor/llvm/dist/test/CodeGen/X86/masked_gather_scatter.ll
      vendor/llvm/dist/test/CodeGen/X86/merge-consecutive-loads-128.ll
      vendor/llvm/dist/test/CodeGen/X86/misched-matrix.ll
      vendor/llvm/dist/test/CodeGen/X86/not-and-simplify.ll
      vendor/llvm/dist/test/CodeGen/X86/oddshuffles.ll
      vendor/llvm/dist/test/CodeGen/X86/packss.ll
      vendor/llvm/dist/test/CodeGen/X86/pmul.ll
      vendor/llvm/dist/test/CodeGen/X86/pr28129.ll
      vendor/llvm/dist/test/CodeGen/X86/pr29112.ll
      vendor/llvm/dist/test/CodeGen/X86/pr30562.ll
      vendor/llvm/dist/test/CodeGen/X86/pr31088.ll
      vendor/llvm/dist/test/CodeGen/X86/pr32284.ll
      vendor/llvm/dist/test/CodeGen/X86/pr32907.ll
      vendor/llvm/dist/test/CodeGen/X86/rotate.ll
      vendor/llvm/dist/test/CodeGen/X86/sad.ll
      vendor/llvm/dist/test/CodeGen/X86/select.ll
      vendor/llvm/dist/test/CodeGen/X86/setcc-wide-types.ll
      vendor/llvm/dist/test/CodeGen/X86/shrink_vmul_sse.ll
      vendor/llvm/dist/test/CodeGen/X86/shuffle-of-splat-multiuses.ll
      vendor/llvm/dist/test/CodeGen/X86/sse-intrinsics-fast-isel.ll
      vendor/llvm/dist/test/CodeGen/X86/sse1.ll
      vendor/llvm/dist/test/CodeGen/X86/sse3-avx-addsub-2.ll
      vendor/llvm/dist/test/CodeGen/X86/sse41.ll
      vendor/llvm/dist/test/CodeGen/X86/stackmap-frame-setup.ll
      vendor/llvm/dist/test/CodeGen/X86/vec_int_to_fp.ll
      vendor/llvm/dist/test/CodeGen/X86/vec_set-2.ll
      vendor/llvm/dist/test/CodeGen/X86/vec_set-3.ll
      vendor/llvm/dist/test/CodeGen/X86/vec_set-4.ll
      vendor/llvm/dist/test/CodeGen/X86/vec_set-6.ll
      vendor/llvm/dist/test/CodeGen/X86/vec_set-7.ll
      vendor/llvm/dist/test/CodeGen/X86/vec_set-8.ll
      vendor/llvm/dist/test/CodeGen/X86/vec_set-A.ll
      vendor/llvm/dist/test/CodeGen/X86/vec_set-B.ll
      vendor/llvm/dist/test/CodeGen/X86/vec_set-C.ll
      vendor/llvm/dist/test/CodeGen/X86/vec_set.ll
      vendor/llvm/dist/test/CodeGen/X86/vector-bitreverse.ll
      vendor/llvm/dist/test/CodeGen/X86/vector-blend.ll
      vendor/llvm/dist/test/CodeGen/X86/vector-lzcnt-128.ll
      vendor/llvm/dist/test/CodeGen/X86/vector-lzcnt-256.ll
      vendor/llvm/dist/test/CodeGen/X86/vector-pcmp.ll
      vendor/llvm/dist/test/CodeGen/X86/vector-shift-ashr-256.ll
      vendor/llvm/dist/test/CodeGen/X86/vector-shift-lshr-256.ll
      vendor/llvm/dist/test/CodeGen/X86/vector-shift-shl-256.ll
      vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-512-v32.ll
      vendor/llvm/dist/test/CodeGen/X86/vector-sqrt.ll
      vendor/llvm/dist/test/CodeGen/X86/viabs.ll
      vendor/llvm/dist/test/CodeGen/X86/vselect-pcmp.ll
      vendor/llvm/dist/test/CodeGen/X86/x86-interleaved-access.ll
      vendor/llvm/dist/test/CodeGen/X86/x86-no_caller_saved_registers-preserve.ll
      vendor/llvm/dist/test/CodeGen/X86/x86-no_caller_saved_registers.ll
      vendor/llvm/dist/test/CodeGen/X86/x86-shrink-wrapping.ll
      vendor/llvm/dist/test/CodeGen/X86/xop-intrinsics-fast-isel.ll
      vendor/llvm/dist/test/DebugInfo/COFF/local-variables.ll
      vendor/llvm/dist/test/DebugInfo/PDB/DIA/pdbdump-symbol-format.test
      vendor/llvm/dist/test/DebugInfo/X86/split-dwarf-cross-unit-reference.ll
      vendor/llvm/dist/test/Feature/intrinsic-noduplicate.ll
      vendor/llvm/dist/test/Instrumentation/MemorySanitizer/msan_basic.ll
      vendor/llvm/dist/test/Instrumentation/MemorySanitizer/vector_arith.ll
      vendor/llvm/dist/test/Instrumentation/MemorySanitizer/vector_cmp.ll
      vendor/llvm/dist/test/Instrumentation/MemorySanitizer/vector_cvt.ll
      vendor/llvm/dist/test/Instrumentation/MemorySanitizer/vector_pack.ll
      vendor/llvm/dist/test/Instrumentation/MemorySanitizer/vector_shift.ll
      vendor/llvm/dist/test/MC/AArch64/label-arithmetic-diags-elf.s
      vendor/llvm/dist/test/MC/AMDGPU/flat.s
      vendor/llvm/dist/test/MC/AMDGPU/literal16.s
      vendor/llvm/dist/test/MC/AMDGPU/vop2.s
      vendor/llvm/dist/test/MC/AMDGPU/vop3-convert.s
      vendor/llvm/dist/test/MC/Disassembler/AMDGPU/flat_vi.txt
      vendor/llvm/dist/test/MC/Disassembler/AMDGPU/literal16_vi.txt
      vendor/llvm/dist/test/MC/Disassembler/AMDGPU/vop2_vi.txt
      vendor/llvm/dist/test/MC/Disassembler/AMDGPU/vop3_vi.txt
      vendor/llvm/dist/test/MC/Disassembler/SystemZ/insns-z13.txt
      vendor/llvm/dist/test/MC/Disassembler/SystemZ/insns.txt
      vendor/llvm/dist/test/MC/SystemZ/insn-bad-z13.s
      vendor/llvm/dist/test/MC/SystemZ/insn-bad-z196.s
      vendor/llvm/dist/test/MC/SystemZ/insn-bad-zEC12.s
      vendor/llvm/dist/test/MC/SystemZ/insn-bad.s
      vendor/llvm/dist/test/MC/SystemZ/insn-good-z13.s
      vendor/llvm/dist/test/MC/SystemZ/insn-good-z196.s
      vendor/llvm/dist/test/MC/SystemZ/insn-good-zEC12.s
      vendor/llvm/dist/test/MC/SystemZ/insn-good.s
      vendor/llvm/dist/test/Object/X86/nm-ir.ll
      vendor/llvm/dist/test/Object/invalid.test
      vendor/llvm/dist/test/ObjectYAML/wasm/export_section.yaml
      vendor/llvm/dist/test/ObjectYAML/wasm/function_section.yaml
      vendor/llvm/dist/test/ObjectYAML/wasm/import_section.yaml
      vendor/llvm/dist/test/ObjectYAML/wasm/start_section.yaml
      vendor/llvm/dist/test/TableGen/AsmVariant.td
      vendor/llvm/dist/test/Transforms/CodeExtractor/ExtractedFnEntryCount.ll
      vendor/llvm/dist/test/Transforms/CodeExtractor/MultipleExitBranchProb.ll
      vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineAnd.ll
      vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineOr.ll
      vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineOrAnd.ll
      vendor/llvm/dist/test/Transforms/CodeExtractor/SingleCondition.ll
      vendor/llvm/dist/test/Transforms/CodeExtractor/X86/InheritTargetAttributes.ll
      vendor/llvm/dist/test/Transforms/CodeGenPrepare/section.ll
      vendor/llvm/dist/test/Transforms/ConstProp/calls.ll
      vendor/llvm/dist/test/Transforms/GVN/PRE/2011-06-01-NonLocalMemdepMiscompile.ll
      vendor/llvm/dist/test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll
      vendor/llvm/dist/test/Transforms/InferFunctionAttrs/annotate.ll
      vendor/llvm/dist/test/Transforms/InferFunctionAttrs/no-proto.ll
      vendor/llvm/dist/test/Transforms/Inline/inline-cold.ll
      vendor/llvm/dist/test/Transforms/Inline/inline-constexpr-addrspacecast-argument.ll
      vendor/llvm/dist/test/Transforms/Inline/partial-inline-act.ll
      vendor/llvm/dist/test/Transforms/Inline/prof-update.ll
      vendor/llvm/dist/test/Transforms/InstCombine/add.ll
      vendor/llvm/dist/test/Transforms/InstCombine/and.ll
      vendor/llvm/dist/test/Transforms/InstCombine/cast.ll
      vendor/llvm/dist/test/Transforms/InstCombine/demorgan.ll
      vendor/llvm/dist/test/Transforms/InstCombine/icmp.ll
      vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll
      vendor/llvm/dist/test/Transforms/InstCombine/logical-select.ll
      vendor/llvm/dist/test/Transforms/InstCombine/not.ll
      vendor/llvm/dist/test/Transforms/InstCombine/or-xor.ll
      vendor/llvm/dist/test/Transforms/InstCombine/or.ll
      vendor/llvm/dist/test/Transforms/InstCombine/sext.ll
      vendor/llvm/dist/test/Transforms/InstCombine/trunc.ll
      vendor/llvm/dist/test/Transforms/InstCombine/vec_demanded_elts.ll
      vendor/llvm/dist/test/Transforms/InstCombine/xor2.ll
      vendor/llvm/dist/test/Transforms/InstSimplify/AndOrXor.ll
      vendor/llvm/dist/test/Transforms/InstSimplify/compare.ll
      vendor/llvm/dist/test/Transforms/LoopUnroll/not-rotated.ll
      vendor/llvm/dist/test/Transforms/LoopVectorize/induction.ll
      vendor/llvm/dist/test/Transforms/SLPVectorizer/AArch64/getelementptr.ll
      vendor/llvm/dist/test/Transforms/SLPVectorizer/AArch64/horizontal.ll
      vendor/llvm/dist/test/Transforms/SimpleLoopUnswitch/trivial-unswitch.ll
      vendor/llvm/dist/test/Transforms/Util/split-bit-piece.ll
      vendor/llvm/dist/test/Verifier/metadata-function-dbg.ll
      vendor/llvm/dist/test/tools/llvm-pdbdump/Inputs/FilterTest.cpp
      vendor/llvm/dist/test/tools/llvm-pdbdump/Inputs/FilterTest.pdb
      vendor/llvm/dist/test/tools/llvm-pdbdump/regex-filter.test
      vendor/llvm/dist/test/tools/llvm-profdata/sample-profile-basic.test
      vendor/llvm/dist/tools/bugpoint/ExtractFunction.cpp
      vendor/llvm/dist/tools/llc/llc.cpp
      vendor/llvm/dist/tools/lli/RemoteJITUtils.h
      vendor/llvm/dist/tools/llvm-ar/llvm-ar.cpp
      vendor/llvm/dist/tools/llvm-pdbdump/LLVMOutputStyle.cpp
      vendor/llvm/dist/tools/llvm-pdbdump/PrettyCompilandDumper.cpp
      vendor/llvm/dist/tools/llvm-pdbdump/PrettyFunctionDumper.cpp
      vendor/llvm/dist/tools/llvm-pdbdump/llvm-pdbdump.cpp
      vendor/llvm/dist/tools/llvm-pdbdump/llvm-pdbdump.h
      vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp
      vendor/llvm/dist/tools/llvm-readobj/llvm-readobj.cpp
      vendor/llvm/dist/tools/llvm-rtdyld/llvm-rtdyld.cpp
      vendor/llvm/dist/tools/obj2yaml/wasm2yaml.cpp
      vendor/llvm/dist/tools/opt/opt.cpp
      vendor/llvm/dist/tools/yaml2obj/yaml2wasm.cpp
      vendor/llvm/dist/unittests/Analysis/ProfileSummaryInfoTest.cpp
      vendor/llvm/dist/unittests/Analysis/TargetLibraryInfoTest.cpp
      vendor/llvm/dist/unittests/DebugInfo/CMakeLists.txt
      vendor/llvm/dist/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp
      vendor/llvm/dist/unittests/ExecutionEngine/Orc/OrcTestCommon.h
      vendor/llvm/dist/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
      vendor/llvm/dist/unittests/IR/ConstantRangeTest.cpp
      vendor/llvm/dist/unittests/IR/InstructionsTest.cpp
      vendor/llvm/dist/unittests/IR/TypeBuilderTest.cpp
      vendor/llvm/dist/unittests/Support/CMakeLists.txt
      vendor/llvm/dist/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
      vendor/llvm/dist/unittests/Support/Path.cpp
      vendor/llvm/dist/unittests/Transforms/Utils/Cloning.cpp
      vendor/llvm/dist/utils/TableGen/CodeGenInstruction.cpp
      vendor/llvm/dist/utils/TableGen/SubtargetEmitter.cpp
      vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.cpp
      vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.h
      vendor/llvm/dist/utils/git-svn/git-llvm
      vendor/llvm/dist/utils/release/build_llvm_package.bat
    
    Modified: vendor/llvm/dist/CREDITS.TXT
    ==============================================================================
    --- vendor/llvm/dist/CREDITS.TXT	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/CREDITS.TXT	Tue May 16 19:46:52 2017	(r318368)
    @@ -265,7 +265,7 @@ D: Release manager (1.7+)
     N: Sylvestre Ledru
     E: sylvestre@debian.org
     W: http://sylvestre.ledru.info/
    -W: http://llvm.org/apt/
    +W: http://apt.llvm.org/
     D: Debian and Ubuntu packaging
     D: Continuous integration with jenkins
     
    
    Modified: vendor/llvm/dist/cmake/config-ix.cmake
    ==============================================================================
    --- vendor/llvm/dist/cmake/config-ix.cmake	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/cmake/config-ix.cmake	Tue May 16 19:46:52 2017	(r318368)
    @@ -530,16 +530,6 @@ else()
       message(STATUS "Doxygen disabled.")
     endif()
     
    -if (LLVM_ENABLE_SPHINX)
    -  message(STATUS "Sphinx enabled.")
    -  find_package(Sphinx REQUIRED)
    -  if (LLVM_BUILD_DOCS)
    -    add_custom_target(sphinx ALL)
    -  endif()
    -else()
    -  message(STATUS "Sphinx disabled.")
    -endif()
    -
     set(LLVM_BINDINGS "")
     if(WIN32)
       message(STATUS "Go bindings disabled.")
    
    Modified: vendor/llvm/dist/cmake/modules/AddSphinxTarget.cmake
    ==============================================================================
    --- vendor/llvm/dist/cmake/modules/AddSphinxTarget.cmake	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/cmake/modules/AddSphinxTarget.cmake	Tue May 16 19:46:52 2017	(r318368)
    @@ -1,3 +1,16 @@
    +
    +# Create sphinx target
    +if (LLVM_ENABLE_SPHINX)
    +  message(STATUS "Sphinx enabled.")
    +  find_package(Sphinx REQUIRED)
    +  if (LLVM_BUILD_DOCS AND NOT TARGET sphinx)
    +    add_custom_target(sphinx ALL)
    +  endif()
    +else()
    +  message(STATUS "Sphinx disabled.")
    +endif()
    +
    +
     # Handy function for creating the different Sphinx targets.
     #
     # ``builder`` should be one of the supported builders used by
    
    Modified: vendor/llvm/dist/docs/CMakeLists.txt
    ==============================================================================
    --- vendor/llvm/dist/docs/CMakeLists.txt	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/docs/CMakeLists.txt	Tue May 16 19:46:52 2017	(r318368)
    @@ -103,8 +103,8 @@ endif()
     endif()
     
     if (LLVM_ENABLE_SPHINX)
    +  include(AddSphinxTarget)
       if (SPHINX_FOUND)
    -    include(AddSphinxTarget)
         if (${SPHINX_OUTPUT_HTML})
           add_sphinx_target(html llvm)
         endif()
    
    Modified: vendor/llvm/dist/docs/GettingStarted.rst
    ==============================================================================
    --- vendor/llvm/dist/docs/GettingStarted.rst	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/docs/GettingStarted.rst	Tue May 16 19:46:52 2017	(r318368)
    @@ -699,14 +699,14 @@ For developers to work with a git monore
     
     .. note::
     
    -   This set-up is using unofficial mirror hosted on GitHub, use with caution.
    +   This set-up is using an unofficial mirror hosted on GitHub, use with caution.
     
     To set up a clone of all the llvm projects using a unified repository:
     
     .. code-block:: console
     
       % export TOP_LEVEL_DIR=`pwd`
    -  % git clone https://github.com/llvm-project/llvm-project/
    +  % git clone https://github.com/llvm-project/llvm-project-20170507/ llvm-project
       % cd llvm-project
       % git config branch.master.rebase true
     
    
    Modified: vendor/llvm/dist/docs/LangRef.rst
    ==============================================================================
    --- vendor/llvm/dist/docs/LangRef.rst	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/docs/LangRef.rst	Tue May 16 19:46:52 2017	(r318368)
    @@ -641,8 +641,9 @@ assume that the globals are densely pack
     iterate over them as an array, alignment padding would break this
     iteration. The maximum alignment is ``1 << 29``.
     
    -Globals can also have a :ref:`DLL storage class ` and
    -an optional list of attached :ref:`metadata `,
    +Globals can also have a :ref:`DLL storage class `,
    +an optional :ref:`global attributes ` and
    +an optional list of attached :ref:`metadata `.
     
     Variables and aliases can have a
     :ref:`Thread Local Storage Model `.
    @@ -1624,6 +1625,14 @@ example:
         the ELF x86-64 abi, but it can be disabled for some compilation
         units.
     
    +.. _glattrs:
    +
    +Global Attributes
    +-----------------
    +
    +Attributes may be set to communicate additional information about a global variable.
    +Unlike :ref:`function attributes `, attributes on a global variable
    +are grouped into a single :ref:`attribute group `.
     
     .. _opbundles:
     
    @@ -3664,6 +3673,9 @@ Sparc:
     
     - ``I``: An immediate 13-bit signed integer.
     - ``r``: A 32-bit integer register.
    +- ``f``: Any floating-point register on SparcV8, or a floating point
    +  register in the "low" half of the registers on SparcV9.
    +- ``e``: Any floating point register. (Same as ``f`` on SparcV8.)
     
     SystemZ:
     
    @@ -11687,6 +11699,338 @@ Examples:
     
           %r2 = call float @llvm.fmuladd.f32(float %a, float %b, float %c) ; yields float:r2 = (a * b) + c
     
    +
    +Experimental Vector Reduction Intrinsics
    +----------------------------------------
    +
    +Horizontal reductions of vectors can be expressed using the following
    +intrinsics. Each one takes a vector operand as an input and applies its
    +respective operation across all elements of the vector, returning a single
    +scalar result of the same element type.
    +
    +
    +'``llvm.experimental.vector.reduce.add.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare i32 @llvm.experimental.vector.reduce.add.i32.v4i32(<4 x i32> %a)
    +      declare i64 @llvm.experimental.vector.reduce.add.i64.v2i64(<2 x i64> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.add.*``' intrinsics do an integer ``ADD``
    +reduction of a vector, returning the result as a scalar. The return type matches
    +the element-type of the vector input.
    +
    +Arguments:
    +""""""""""
    +The argument to this intrinsic must be a vector of integer values.
    +
    +'``llvm.experimental.vector.reduce.fadd.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare float @llvm.experimental.vector.reduce.fadd.f32.v4f32(float %acc, <4 x float> %a)
    +      declare double @llvm.experimental.vector.reduce.fadd.f64.v2f64(double %acc, <2 x double> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.fadd.*``' intrinsics do a floating point
    +``ADD`` reduction of a vector, returning the result as a scalar. The return type
    +matches the element-type of the vector input.
    +
    +If the intrinsic call has fast-math flags, then the reduction will not preserve
    +the associativity of an equivalent scalarized counterpart. If it does not have
    +fast-math flags, then the reduction will be *ordered*, implying that the
    +operation respects the associativity of a scalarized reduction.
    +
    +
    +Arguments:
    +""""""""""
    +The first argument to this intrinsic is a scalar accumulator value, which is
    +only used when there are no fast-math flags attached. This argument may be undef
    +when fast-math flags are used.
    +
    +The second argument must be a vector of floating point values.
    +
    +Examples:
    +"""""""""
    +
    +.. code-block:: llvm
    +
    +      %fast = call fast float @llvm.experimental.vector.reduce.fadd.f32.v4f32(float undef, <4 x float> %input) ; fast reduction
    +      %ord = call float @llvm.experimental.vector.reduce.fadd.f32.v4f32(float %acc, <4 x float> %input) ; ordered reduction
    +
    +
    +'``llvm.experimental.vector.reduce.mul.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare i32 @llvm.experimental.vector.reduce.mul.i32.v4i32(<4 x i32> %a)
    +      declare i64 @llvm.experimental.vector.reduce.mul.i64.v2i64(<2 x i64> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.mul.*``' intrinsics do an integer ``MUL``
    +reduction of a vector, returning the result as a scalar. The return type matches
    +the element-type of the vector input.
    +
    +Arguments:
    +""""""""""
    +The argument to this intrinsic must be a vector of integer values.
    +
    +'``llvm.experimental.vector.reduce.fmul.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare float @llvm.experimental.vector.reduce.fmul.f32.v4f32(float %acc, <4 x float> %a)
    +      declare double @llvm.experimental.vector.reduce.fmul.f64.v2f64(double %acc, <2 x double> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.fmul.*``' intrinsics do a floating point
    +``MUL`` reduction of a vector, returning the result as a scalar. The return type
    +matches the element-type of the vector input.
    +
    +If the intrinsic call has fast-math flags, then the reduction will not preserve
    +the associativity of an equivalent scalarized counterpart. If it does not have
    +fast-math flags, then the reduction will be *ordered*, implying that the
    +operation respects the associativity of a scalarized reduction.
    +
    +
    +Arguments:
    +""""""""""
    +The first argument to this intrinsic is a scalar accumulator value, which is
    +only used when there are no fast-math flags attached. This argument may be undef
    +when fast-math flags are used.
    +
    +The second argument must be a vector of floating point values.
    +
    +Examples:
    +"""""""""
    +
    +.. code-block:: llvm
    +
    +      %fast = call fast float @llvm.experimental.vector.reduce.fmul.f32.v4f32(float undef, <4 x float> %input) ; fast reduction
    +      %ord = call float @llvm.experimental.vector.reduce.fmul.f32.v4f32(float %acc, <4 x float> %input) ; ordered reduction
    +
    +'``llvm.experimental.vector.reduce.and.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare i32 @llvm.experimental.vector.reduce.and.i32.v4i32(<4 x i32> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.and.*``' intrinsics do a bitwise ``AND``
    +reduction of a vector, returning the result as a scalar. The return type matches
    +the element-type of the vector input.
    +
    +Arguments:
    +""""""""""
    +The argument to this intrinsic must be a vector of integer values.
    +
    +'``llvm.experimental.vector.reduce.or.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare i32 @llvm.experimental.vector.reduce.or.i32.v4i32(<4 x i32> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.or.*``' intrinsics do a bitwise ``OR`` reduction
    +of a vector, returning the result as a scalar. The return type matches the
    +element-type of the vector input.
    +
    +Arguments:
    +""""""""""
    +The argument to this intrinsic must be a vector of integer values.
    +
    +'``llvm.experimental.vector.reduce.xor.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare i32 @llvm.experimental.vector.reduce.xor.i32.v4i32(<4 x i32> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.xor.*``' intrinsics do a bitwise ``XOR``
    +reduction of a vector, returning the result as a scalar. The return type matches
    +the element-type of the vector input.
    +
    +Arguments:
    +""""""""""
    +The argument to this intrinsic must be a vector of integer values.
    +
    +'``llvm.experimental.vector.reduce.smax.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare i32 @llvm.experimental.vector.reduce.smax.i32.v4i32(<4 x i32> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.smax.*``' intrinsics do a signed integer
    +``MAX`` reduction of a vector, returning the result as a scalar. The return type
    +matches the element-type of the vector input.
    +
    +Arguments:
    +""""""""""
    +The argument to this intrinsic must be a vector of integer values.
    +
    +'``llvm.experimental.vector.reduce.smin.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare i32 @llvm.experimental.vector.reduce.smin.i32.v4i32(<4 x i32> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.smin.*``' intrinsics do a signed integer
    +``MIN`` reduction of a vector, returning the result as a scalar. The return type
    +matches the element-type of the vector input.
    +
    +Arguments:
    +""""""""""
    +The argument to this intrinsic must be a vector of integer values.
    +
    +'``llvm.experimental.vector.reduce.umax.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare i32 @llvm.experimental.vector.reduce.umax.i32.v4i32(<4 x i32> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.umax.*``' intrinsics do an unsigned
    +integer ``MAX`` reduction of a vector, returning the result as a scalar. The
    +return type matches the element-type of the vector input.
    +
    +Arguments:
    +""""""""""
    +The argument to this intrinsic must be a vector of integer values.
    +
    +'``llvm.experimental.vector.reduce.umin.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare i32 @llvm.experimental.vector.reduce.umin.i32.v4i32(<4 x i32> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.umin.*``' intrinsics do an unsigned
    +integer ``MIN`` reduction of a vector, returning the result as a scalar. The
    +return type matches the element-type of the vector input.
    +
    +Arguments:
    +""""""""""
    +The argument to this intrinsic must be a vector of integer values.
    +
    +'``llvm.experimental.vector.reduce.fmax.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare float @llvm.experimental.vector.reduce.fmax.f32.v4f32(<4 x float> %a)
    +      declare double @llvm.experimental.vector.reduce.fmax.f64.v2f64(<2 x double> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.fmax.*``' intrinsics do a floating point
    +``MAX`` reduction of a vector, returning the result as a scalar. The return type
    +matches the element-type of the vector input.
    +
    +If the intrinsic call has the ``nnan`` fast-math flag then the operation can
    +assume that NaNs are not present in the input vector.
    +
    +Arguments:
    +""""""""""
    +The argument to this intrinsic must be a vector of floating point values.
    +
    +'``llvm.experimental.vector.reduce.fmin.*``' Intrinsic
    +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +Syntax:
    +"""""""
    +
    +::
    +
    +      declare float @llvm.experimental.vector.reduce.fmin.f32.v4f32(<4 x float> %a)
    +      declare double @llvm.experimental.vector.reduce.fmin.f64.v2f64(<2 x double> %a)
    +
    +Overview:
    +"""""""""
    +
    +The '``llvm.experimental.vector.reduce.fmin.*``' intrinsics do a floating point
    +``MIN`` reduction of a vector, returning the result as a scalar. The return type
    +matches the element-type of the vector input.
    +
    +If the intrinsic call has the ``nnan`` fast-math flag then the operation can
    +assume that NaNs are not present in the input vector.
    +
    +Arguments:
    +""""""""""
    +The argument to this intrinsic must be a vector of floating point values.
    +
     Half Precision Floating Point Intrinsics
     ----------------------------------------
     
    
    Modified: vendor/llvm/dist/docs/Lexicon.rst
    ==============================================================================
    --- vendor/llvm/dist/docs/Lexicon.rst	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/docs/Lexicon.rst	Tue May 16 19:46:52 2017	(r318368)
    @@ -249,6 +249,14 @@ S
         Superword-Level Parallelism, same as :ref:`Basic-Block Vectorization
         `.
     
    +**Splat**
    +    Splat refers to a vector of identical scalar elements.
    +
    +    The term is based on the PowerPC Altivec instructions that provided
    +    this functionality in hardware. For example, "vsplth" and the corresponding
    +    software intrinsic "vec_splat()". Examples of other hardware names for this
    +    action include "duplicate" (ARM) and "broadcast" (x86).
    +
     **SRoA**
         Scalar Replacement of Aggregates
     
    
    Modified: vendor/llvm/dist/docs/LibFuzzer.rst
    ==============================================================================
    --- vendor/llvm/dist/docs/LibFuzzer.rst	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/docs/LibFuzzer.rst	Tue May 16 19:46:52 2017	(r318368)
    @@ -305,6 +305,10 @@ The most important command line options 
        - 1 : close ``stdout``
        - 2 : close ``stderr``
        - 3 : close both ``stdout`` and ``stderr``.
    +``-print_coverage``
    +   If 1, print coverage information as text at exit.
    +``-dump_coverage``
    +   If 1, dump coverage information as a .sancov file at exit.
     
     For the full list of flags run the fuzzer binary with ``-help=1``.
     
    @@ -543,12 +547,19 @@ You can get the coverage for your corpus
     
     .. code-block:: console
     
    -  ASAN_OPTIONS=coverage=1 ./fuzzer CORPUS_DIR -runs=0
    +  ./fuzzer CORPUS_DIR -runs=0 -print_coverage=1
     
     This will run all tests in the CORPUS_DIR but will not perform any fuzzing.
    -At the end of the process it will dump a single ``.sancov`` file with coverage 
    -information.  See SanitizerCoverage_ for details on querying the file using the
    -``sancov`` tool.
    +At the end of the process it will print text describing what code has been covered and what hasn't.
    +
    +Alternatively, use
    +
    +.. code-block:: console
    +
    +  ./fuzzer CORPUS_DIR -runs=0 -dump_coverage=1
    +
    +which will dump a ``.sancov`` file with coverage information.
    +See SanitizerCoverage_ for details on querying the file using the ``sancov`` tool.
     
     You may also use other ways to visualize coverage,
     e.g. using `Clang coverage `_,
    
    Modified: vendor/llvm/dist/docs/ReleaseNotes.rst
    ==============================================================================
    --- vendor/llvm/dist/docs/ReleaseNotes.rst	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/docs/ReleaseNotes.rst	Tue May 16 19:46:52 2017	(r318368)
    @@ -40,6 +40,10 @@ Non-comprehensive list of changes in thi
        functionality, or simply have a lot to talk about), see the `NOTE` below
        for adding a new subsection.
     
    +* LLVM's ``WeakVH`` has been renamed to ``WeakTrackingVH`` and a new ``WeakVH``
    +  has been introduced.  The new ``WeakVH`` nulls itself out on deletion, but
    +  does not track values across RAUW.
    +
     * ... next change ...
     
     .. NOTE
    
    Modified: vendor/llvm/dist/include/llvm/ADT/APInt.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/APInt.h	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/include/llvm/ADT/APInt.h	Tue May 16 19:46:52 2017	(r318368)
    @@ -157,6 +157,11 @@ private:
         return isSingleWord() ? U.VAL : U.pVal[whichWord(bitPosition)];
       }
     
    +  /// Utility method to change the bit width of this APInt to new bit width,
    +  /// allocating and/or deallocating as necessary. There is no guarantee on the
    +  /// value of any bits upon return. Caller should populate the bits after.
    +  void reallocate(unsigned NewBitWidth);
    +
       /// \brief Convert a char array into an APInt
       ///
       /// \param radix 2, 8, 10, 16, or 36
    @@ -1437,6 +1442,12 @@ public:
       /// as "bitPosition".
       void flipBit(unsigned bitPosition);
     
    +  /// Negate this APInt in place.
    +  void negate() {
    +    flipAllBits();
    +    ++(*this);
    +  }
    +
       /// Insert the bits from a smaller APInt starting at bitPosition.
       void insertBits(const APInt &SubBits, unsigned bitPosition);
     
    @@ -1646,12 +1657,7 @@ public:
       /// re-interprets the bits as a double. Note that it is valid to do this on
       /// any bit width. Exactly 64 bits will be translated.
       double bitsToDouble() const {
    -    union {
    -      uint64_t I;
    -      double D;
    -    } T;
    -    T.I = (isSingleWord() ? U.VAL : U.pVal[0]);
    -    return T.D;
    +    return BitsToDouble(getWord(0));
       }
     
       /// \brief Converts APInt bits to a double
    @@ -1660,12 +1666,7 @@ public:
       /// re-interprets the bits as a float. Note that it is valid to do this on
       /// any bit width. Exactly 32 bits will be translated.
       float bitsToFloat() const {
    -    union {
    -      unsigned I;
    -      float F;
    -    } T;
    -    T.I = unsigned((isSingleWord() ? U.VAL : U.pVal[0]));
    -    return T.F;
    +    return BitsToFloat(getWord(0));
       }
     
       /// \brief Converts a double to APInt bits.
    @@ -1673,12 +1674,7 @@ public:
       /// The conversion does not do a translation from double to integer, it just
       /// re-interprets the bits of the double.
       static APInt doubleToBits(double V) {
    -    union {
    -      uint64_t I;
    -      double D;
    -    } T;
    -    T.D = V;
    -    return APInt(sizeof T * CHAR_BIT, T.I);
    +    return APInt(sizeof(double) * CHAR_BIT, DoubleToBits(V));
       }
     
       /// \brief Converts a float to APInt bits.
    @@ -1686,12 +1682,7 @@ public:
       /// The conversion does not do a translation from float to integer, it just
       /// re-interprets the bits of the float.
       static APInt floatToBits(float V) {
    -    union {
    -      unsigned I;
    -      float F;
    -    } T;
    -    T.F = V;
    -    return APInt(sizeof T * CHAR_BIT, T.I);
    +    return APInt(sizeof(float) * CHAR_BIT, FloatToBits(V));
       }
     
       /// @}
    @@ -1852,10 +1843,9 @@ public:
                             unsigned);
     
       /// DST = LHS * RHS, where DST has width the sum of the widths of the
    -  /// operands.  No overflow occurs.  DST must be disjoint from both
    -  /// operands. Returns the number of parts required to hold the result.
    -  static unsigned tcFullMultiply(WordType *, const WordType *,
    -                                 const WordType *, unsigned, unsigned);
    +  /// operands. No overflow occurs. DST must be disjoint from both operands.
    +  static void tcFullMultiply(WordType *, const WordType *,
    +                             const WordType *, unsigned, unsigned);
     
       /// If RHS is zero LHS and REMAINDER are left unchanged, return one.
       /// Otherwise set LHS to LHS / RHS with the fractional part discarded, set
    @@ -1997,8 +1987,7 @@ inline raw_ostream &operator<<(raw_ostre
     }
     
     inline APInt operator-(APInt v) {
    -  v.flipAllBits();
    -  ++v;
    +  v.negate();
       return v;
     }
     
    
    Modified: vendor/llvm/dist/include/llvm/ADT/BitVector.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/BitVector.h	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/include/llvm/ADT/BitVector.h	Tue May 16 19:46:52 2017	(r318368)
    @@ -255,7 +255,7 @@ public:
     
       /// find_prev - Returns the index of the first set bit that precedes the
       /// the bit at \p PriorTo.  Returns -1 if all previous bits are unset.
    -  int find_prev(unsigned PriorTo) {
    +  int find_prev(unsigned PriorTo) const {
         if (PriorTo == 0)
           return -1;
     
    
    Modified: vendor/llvm/dist/include/llvm/ADT/STLExtras.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/STLExtras.h	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/include/llvm/ADT/STLExtras.h	Tue May 16 19:46:52 2017	(r318368)
    @@ -706,6 +706,18 @@ struct is_one_of {
           std::is_same::value || is_one_of::value;
     };
     
    +/// \brief traits class for checking whether type T is a base class for all
    +///  the given types in the variadic list.
    +template  struct are_base_of {
    +  static const bool value = true;
    +};
    +
    +template 
    +struct are_base_of {
    +  static const bool value =
    +      std::is_base_of::value && are_base_of::value;
    +};
    +
     //===----------------------------------------------------------------------===//
     //     Extra additions for arrays
     //===----------------------------------------------------------------------===//
    @@ -1079,7 +1091,7 @@ private:
     ///
     /// std::vector Items = {'A', 'B', 'C', 'D'};
     /// for (auto X : enumerate(Items)) {
    -///   printf("Item %d - %c\n", X.Index, X.Value);
    +///   printf("Item %d - %c\n", X.index(), X.value());
     /// }
     ///
     /// Output:
    
    Modified: vendor/llvm/dist/include/llvm/ADT/StringExtras.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/StringExtras.h	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/include/llvm/ADT/StringExtras.h	Tue May 16 19:46:52 2017	(r318368)
    @@ -106,6 +106,13 @@ static inline std::string fromHex(String
       return Output;
     }
     
    +/// \brief Convert the string \p S to an integer of the specified type using
    +/// the radix \p Base.  If \p Base is 0, auto-detects the radix.
    +/// Returns true if the number was successfully converted, false otherwise.
    +template  bool to_integer(StringRef S, N &Num, unsigned Base = 0) {
    +  return !S.getAsInteger(Base, Num);
    +}
    +
     static inline std::string utostr(uint64_t X, bool isNeg = false) {
       char Buffer[21];
       char *BufPtr = std::end(Buffer);
    
    Modified: vendor/llvm/dist/include/llvm/Analysis/CallGraph.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/Analysis/CallGraph.h	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/include/llvm/Analysis/CallGraph.h	Tue May 16 19:46:52 2017	(r318368)
    @@ -41,12 +41,6 @@
     /// of all of the caller-callee relationships, which is useful for
     /// transformations.
     ///
    -/// The CallGraph class also attempts to figure out what the root of the
    -/// CallGraph is, which it currently does by looking for a function named
    -/// 'main'. If no function named 'main' is found, the external node is used as
    -/// the entry node, reflecting the fact that any function without internal
    -/// linkage could be called into (which is common for libraries).
    -///
     //===----------------------------------------------------------------------===//
     
     #ifndef LLVM_ANALYSIS_CALLGRAPH_H
    @@ -82,10 +76,6 @@ class CallGraph {
       /// \brief A map from \c Function* to \c CallGraphNode*.
       FunctionMapTy FunctionMap;
     
    -  /// \brief Root is root of the call graph, or the external node if a 'main'
    -  /// function couldn't be found.
    -  CallGraphNode *Root;
    -
       /// \brief This node has edges to all external functions and those internal
       /// functions that have their address taken.
       CallGraphNode *ExternalCallingNode;
    
    Modified: vendor/llvm/dist/include/llvm/Analysis/ProfileSummaryInfo.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/Analysis/ProfileSummaryInfo.h	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/include/llvm/Analysis/ProfileSummaryInfo.h	Tue May 16 19:46:52 2017	(r318368)
    @@ -67,8 +67,8 @@ public:
       }
     
       /// Returns the profile count for \p CallInst.
    -  static Optional getProfileCount(const Instruction *CallInst,
    -                                            BlockFrequencyInfo *BFI);
    +  Optional getProfileCount(const Instruction *CallInst,
    +                                     BlockFrequencyInfo *BFI);
       /// \brief Returns true if \p F has hot function entry.
       bool isFunctionEntryHot(const Function *F);
       /// Returns true if \p F has hot function entry or hot call edge.
    
    Modified: vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h	Tue May 16 19:46:52 2017	(r318368)
    @@ -568,27 +568,16 @@ private:
           Predicates.insert(P);
         }
     
    -    /*implicit*/ ExitLimit(const SCEV *E)
    -        : ExactNotTaken(E), MaxNotTaken(E), MaxOrZero(false) {}
    +    /*implicit*/ ExitLimit(const SCEV *E);
     
         ExitLimit(
             const SCEV *E, const SCEV *M, bool MaxOrZero,
    -        ArrayRef *> PredSetList)
    -        : ExactNotTaken(E), MaxNotTaken(M), MaxOrZero(MaxOrZero) {
    -      assert((isa(ExactNotTaken) ||
    -              !isa(MaxNotTaken)) &&
    -             "Exact is not allowed to be less precise than Max");
    -      for (auto *PredSet : PredSetList)
    -        for (auto *P : *PredSet)
    -          addPredicate(P);
    -    }
    +        ArrayRef *> PredSetList);
     
         ExitLimit(const SCEV *E, const SCEV *M, bool MaxOrZero,
    -              const SmallPtrSetImpl &PredSet)
    -        : ExitLimit(E, M, MaxOrZero, {&PredSet}) {}
    +              const SmallPtrSetImpl &PredSet);
     
    -    ExitLimit(const SCEV *E, const SCEV *M, bool MaxOrZero)
    -        : ExitLimit(E, M, MaxOrZero, None) {}
    +    ExitLimit(const SCEV *E, const SCEV *M, bool MaxOrZero);
     
         /// Test whether this ExitLimit contains any computed information, or
         /// whether it's all SCEVCouldNotCompute values.
    @@ -782,7 +771,7 @@ private:
     
       /// Set the memoized range for the given SCEV.
       const ConstantRange &setRange(const SCEV *S, RangeSignHint Hint,
    -                                ConstantRange &&CR) {
    +                                ConstantRange CR) {
         DenseMap &Cache =
             Hint == HINT_RANGE_UNSIGNED ? UnsignedRanges : SignedRanges;
     
    
    Modified: vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.def
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.def	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.def	Tue May 16 19:46:52 2017	(r318368)
    @@ -161,6 +161,60 @@ TLI_DEFINE_STRING_INTERNAL("_Znwm")
     /// void *new(unsigned long, nothrow);
     TLI_DEFINE_ENUM_INTERNAL(ZnwmRKSt9nothrow_t)
     TLI_DEFINE_STRING_INTERNAL("_ZnwmRKSt9nothrow_t")
    +/// double __acos_finite(double x);
    +TLI_DEFINE_ENUM_INTERNAL(acos_finite)
    +TLI_DEFINE_STRING_INTERNAL("__acos_finite")
    +/// float __acosf_finite(float x);
    +TLI_DEFINE_ENUM_INTERNAL(acosf_finite)
    +TLI_DEFINE_STRING_INTERNAL("__acosf_finite")
    +/// double __acosh_finite(double x);
    +TLI_DEFINE_ENUM_INTERNAL(acosh_finite)
    +TLI_DEFINE_STRING_INTERNAL("__acosh_finite")
    +/// float __acoshf_finite(float x);
    +TLI_DEFINE_ENUM_INTERNAL(acoshf_finite)
    +TLI_DEFINE_STRING_INTERNAL("__acoshf_finite")
    +/// long double __acoshl_finite(long double x);
    +TLI_DEFINE_ENUM_INTERNAL(acoshl_finite)
    +TLI_DEFINE_STRING_INTERNAL("__acoshl_finite")
    +/// long double __acosl_finite(long double x);
    +TLI_DEFINE_ENUM_INTERNAL(acosl_finite)
    +TLI_DEFINE_STRING_INTERNAL("__acosl_finite")
    +/// double __asin_finite(double x);
    +TLI_DEFINE_ENUM_INTERNAL(asin_finite)
    +TLI_DEFINE_STRING_INTERNAL("__asin_finite")
    +/// float __asinf_finite(float x);
    +TLI_DEFINE_ENUM_INTERNAL(asinf_finite)
    +TLI_DEFINE_STRING_INTERNAL("__asinf_finite")
    +/// long double __asinl_finite(long double x);
    +TLI_DEFINE_ENUM_INTERNAL(asinl_finite)
    +TLI_DEFINE_STRING_INTERNAL("__asinl_finite")
    +/// double atan2_finite(double y, double x);
    +TLI_DEFINE_ENUM_INTERNAL(atan2_finite)
    +TLI_DEFINE_STRING_INTERNAL("__atan2_finite")
    +/// float atan2f_finite(float y, float x);
    +TLI_DEFINE_ENUM_INTERNAL(atan2f_finite)
    +TLI_DEFINE_STRING_INTERNAL("__atan2f_finite")
    +/// long double atan2l_finite(long double y, long double x);
    +TLI_DEFINE_ENUM_INTERNAL(atan2l_finite)
    +TLI_DEFINE_STRING_INTERNAL("__atan2l_finite")
    +/// double __atanh_finite(double x);
    +TLI_DEFINE_ENUM_INTERNAL(atanh_finite)
    +TLI_DEFINE_STRING_INTERNAL("__atanh_finite")
    +/// float __atanhf_finite(float x);
    +TLI_DEFINE_ENUM_INTERNAL(atanhf_finite)
    +TLI_DEFINE_STRING_INTERNAL("__atanhf_finite")
    +/// long double __atanhl_finite(long double x);
    +TLI_DEFINE_ENUM_INTERNAL(atanhl_finite)
    +TLI_DEFINE_STRING_INTERNAL("__atanhl_finite")
    +/// double __cosh_finite(double x);
    +TLI_DEFINE_ENUM_INTERNAL(cosh_finite)
    +TLI_DEFINE_STRING_INTERNAL("__cosh_finite")
    +/// float __coshf_finite(float x);
    +TLI_DEFINE_ENUM_INTERNAL(coshf_finite)
    +TLI_DEFINE_STRING_INTERNAL("__coshf_finite")
    +/// long double __coshl_finite(long double x);
    +TLI_DEFINE_ENUM_INTERNAL(coshl_finite)
    +TLI_DEFINE_STRING_INTERNAL("__coshl_finite")
     /// double __cospi(double x);
     TLI_DEFINE_ENUM_INTERNAL(cospi)
     TLI_DEFINE_STRING_INTERNAL("__cospi")
    @@ -180,12 +234,66 @@ TLI_DEFINE_STRING_INTERNAL("__cxa_guard_
     /// void __cxa_guard_release(guard_t *guard);
     TLI_DEFINE_ENUM_INTERNAL(cxa_guard_release)
     TLI_DEFINE_STRING_INTERNAL("__cxa_guard_release")
    +/// double __exp10_finite(double x);
    +TLI_DEFINE_ENUM_INTERNAL(exp10_finite)
    +TLI_DEFINE_STRING_INTERNAL("__exp10_finite")
    +/// float __exp10f_finite(float x);
    +TLI_DEFINE_ENUM_INTERNAL(exp10f_finite)
    +TLI_DEFINE_STRING_INTERNAL("__exp10f_finite")
    +/// long double __exp10l_finite(long double x);
    +TLI_DEFINE_ENUM_INTERNAL(exp10l_finite)
    +TLI_DEFINE_STRING_INTERNAL("__exp10l_finite")
    +/// double __exp2_finite(double x);
    +TLI_DEFINE_ENUM_INTERNAL(exp2_finite)
    +TLI_DEFINE_STRING_INTERNAL("__exp2_finite")
    +/// float __exp2f_finite(float x);
    +TLI_DEFINE_ENUM_INTERNAL(exp2f_finite)
    +TLI_DEFINE_STRING_INTERNAL("__exp2f_finite")
    +/// long double __exp2l_finite(long double x);
    +TLI_DEFINE_ENUM_INTERNAL(exp2l_finite)
    +TLI_DEFINE_STRING_INTERNAL("__exp2l_finite")
    +/// double __exp_finite(double x);
    +TLI_DEFINE_ENUM_INTERNAL(exp_finite)
    +TLI_DEFINE_STRING_INTERNAL("__exp_finite")
    +/// float __expf_finite(float x);
    +TLI_DEFINE_ENUM_INTERNAL(expf_finite)
    +TLI_DEFINE_STRING_INTERNAL("__expf_finite")
    +/// long double __expl_finite(long double x);
    +TLI_DEFINE_ENUM_INTERNAL(expl_finite)
    +TLI_DEFINE_STRING_INTERNAL("__expl_finite")
     /// int __isoc99_scanf (const char *format, ...)
     TLI_DEFINE_ENUM_INTERNAL(dunder_isoc99_scanf)
     TLI_DEFINE_STRING_INTERNAL("__isoc99_scanf")
     /// int __isoc99_sscanf(const char *s, const char *format, ...)
     TLI_DEFINE_ENUM_INTERNAL(dunder_isoc99_sscanf)
     TLI_DEFINE_STRING_INTERNAL("__isoc99_sscanf")
    +/// double __log10_finite(double x);
    +TLI_DEFINE_ENUM_INTERNAL(log10_finite)
    +TLI_DEFINE_STRING_INTERNAL("__log10_finite")
    +/// float __log10f_finite(float x);
    +TLI_DEFINE_ENUM_INTERNAL(log10f_finite)
    +TLI_DEFINE_STRING_INTERNAL("__log10f_finite")
    +/// long double __log10l_finite(long double x);
    +TLI_DEFINE_ENUM_INTERNAL(log10l_finite)
    +TLI_DEFINE_STRING_INTERNAL("__log10l_finite")
    +/// double __log2_finite(double x);
    +TLI_DEFINE_ENUM_INTERNAL(log2_finite)
    +TLI_DEFINE_STRING_INTERNAL("__log2_finite")
    +/// float __log2f_finite(float x);
    +TLI_DEFINE_ENUM_INTERNAL(log2f_finite)
    +TLI_DEFINE_STRING_INTERNAL("__log2f_finite")
    +/// long double __log2l_finite(long double x);
    +TLI_DEFINE_ENUM_INTERNAL(log2l_finite)
    +TLI_DEFINE_STRING_INTERNAL("__log2l_finite")
    +/// double __log_finite(double x);
    +TLI_DEFINE_ENUM_INTERNAL(log_finite)
    +TLI_DEFINE_STRING_INTERNAL("__log_finite")
    +/// float __logf_finite(float x);
    +TLI_DEFINE_ENUM_INTERNAL(logf_finite)
    +TLI_DEFINE_STRING_INTERNAL("__logf_finite")
    +/// long double __logl_finite(long double x);
    +TLI_DEFINE_ENUM_INTERNAL(logl_finite)
    +TLI_DEFINE_STRING_INTERNAL("__logl_finite")
     /// void *__memcpy_chk(void *s1, const void *s2, size_t n, size_t s1size);
     TLI_DEFINE_ENUM_INTERNAL(memcpy_chk)
     TLI_DEFINE_STRING_INTERNAL("__memcpy_chk")
    @@ -199,13 +307,30 @@ TLI_DEFINE_STRING_INTERNAL("__memset_chk
     // int __nvvm_reflect(const char *)
     TLI_DEFINE_ENUM_INTERNAL(nvvm_reflect)
     TLI_DEFINE_STRING_INTERNAL("__nvvm_reflect")
    -
    +/// double __pow_finite(double x, double y);
    +TLI_DEFINE_ENUM_INTERNAL(pow_finite)
    +TLI_DEFINE_STRING_INTERNAL("__pow_finite")
    +/// float _powf_finite(float x, float y);
    +TLI_DEFINE_ENUM_INTERNAL(powf_finite)
    +TLI_DEFINE_STRING_INTERNAL("__powf_finite")
    +/// long double __powl_finite(long double x, long double y);
    +TLI_DEFINE_ENUM_INTERNAL(powl_finite)
    +TLI_DEFINE_STRING_INTERNAL("__powl_finite")
     /// double __sincospi_stret(double x);
     TLI_DEFINE_ENUM_INTERNAL(sincospi_stret)
     TLI_DEFINE_STRING_INTERNAL("__sincospi_stret")
     /// float __sincospif_stret(float x);
     TLI_DEFINE_ENUM_INTERNAL(sincospif_stret)
     TLI_DEFINE_STRING_INTERNAL("__sincospif_stret")
    +/// double __sinh_finite(double x);
    +TLI_DEFINE_ENUM_INTERNAL(sinh_finite)
    +TLI_DEFINE_STRING_INTERNAL("__sinh_finite")
    +/// float _sinhf_finite(float x);
    +TLI_DEFINE_ENUM_INTERNAL(sinhf_finite)
    +TLI_DEFINE_STRING_INTERNAL("__sinhf_finite")
    +/// long double __sinhl_finite(long double x);
    +TLI_DEFINE_ENUM_INTERNAL(sinhl_finite)
    +TLI_DEFINE_STRING_INTERNAL("__sinhl_finite")
     /// double __sinpi(double x);
     TLI_DEFINE_ENUM_INTERNAL(sinpi)
     TLI_DEFINE_STRING_INTERNAL("__sinpi")
    
    Modified: vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h	Tue May 16 19:35:25 2017	(r318367)
    +++ vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h	Tue May 16 19:46:52 2017	(r318368)
    @@ -537,6 +537,9 @@ public:
       /// \return The width of the largest scalar or vector register type.
       unsigned getRegisterBitWidth(bool Vector) const;
     
    +  /// \return The width of the smallest vector register type.
    +  unsigned getMinVectorRegisterBitWidth() const;
    +
       /// \return True if it should be considered for address type promotion.
       /// \p AllowPromotionWithoutCommonHeader Set true if promoting \p I is
       /// profitable without finding other extensions fed by the same input.
    @@ -740,6 +743,22 @@ public:
                                     unsigned ChainSizeInBytes,
                                     VectorType *VecTy) const;
     
    +  /// Flags describing the kind of vector reduction.
    +  struct ReductionFlags {
    +    ReductionFlags() : IsMaxOp(false), IsSigned(false), NoNaN(false) {}
    +    bool IsMaxOp;  ///< If the op a min/max kind, true if it's a max operation.
    +    bool IsSigned; ///< Whether the operation is a signed int reduction.
    +    bool NoNaN;    ///< If op is an fp min/max, whether NaNs may be present.
    +  };
    +
    +  /// \returns True if the target wants to handle the given reduction idiom in
    +  /// the intrinsics form instead of the shuffle form.
    +  bool useReductionIntrinsic(unsigned Opcode, Type *Ty,
    +                             ReductionFlags Flags) const;
    +
    +  /// \returns True if the target wants to expand the given reduction intrinsic
    +  /// into a shuffle sequence.
    +  bool shouldExpandReduction(const IntrinsicInst *II) const;
       /// @}
     
     private:
    @@ -824,6 +843,7 @@ public:
                                 Type *Ty) = 0;
       virtual unsigned getNumberOfRegisters(bool Vector) = 0;
       virtual unsigned getRegisterBitWidth(bool Vector) = 0;
    +  virtual unsigned getMinVectorRegisterBitWidth() = 0;
       virtual bool shouldConsiderAddressTypePromotion(
           const Instruction &I, bool &AllowPromotionWithoutCommonHeader) = 0;
       virtual unsigned getCacheLineSize() = 0;
    @@ -895,6 +915,9 @@ public:
       virtual unsigned getStoreVectorFactor(unsigned VF, unsigned StoreSize,
                                             unsigned ChainSizeInBytes,
                                             VectorType *VecTy) const = 0;
    +  virtual bool useReductionIntrinsic(unsigned Opcode, Type *Ty,
    +                                     ReductionFlags) const = 0;
    +  virtual bool shouldExpandReduction(const IntrinsicInst *II) const = 0;
     };
     
     template 
    @@ -1057,6 +1080,9 @@ public:
       unsigned getRegisterBitWidth(bool Vector) override {
         return Impl.getRegisterBitWidth(Vector);
       }
    +  unsigned getMinVectorRegisterBitWidth() override {
    +    return Impl.getMinVectorRegisterBitWidth();
    +  }
       bool shouldConsiderAddressTypePromotion(
           const Instruction &I, bool &AllowPromotionWithoutCommonHeader) override {
         return Impl.shouldConsiderAddressTypePromotion(
    @@ -1200,6 +1226,13 @@ public:
                                     VectorType *VecTy) const override {
         return Impl.getStoreVectorFactor(VF, StoreSize, ChainSizeInBytes, VecTy);
       }
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:47:01 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BFAAD70298;
     Tue, 16 May 2017 19:47:01 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 549E81BCE;
     Tue, 16 May 2017 19:47:01 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJl0en096869;
     Tue, 16 May 2017 19:47:00 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJl0xp096868;
     Tue, 16 May 2017 19:47:00 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161947.v4GJl0xp096868@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 19:47:00 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318369 - vendor/llvm/llvm-trunk-r303197
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:47:01 -0000
    
    Author: dim
    Date: Tue May 16 19:47:00 2017
    New Revision: 318369
    URL: https://svnweb.freebsd.org/changeset/base/318369
    
    Log:
      Tag llvm trunk r303197.
    
    Added:
      vendor/llvm/llvm-trunk-r303197/
         - copied from r318368, vendor/llvm/dist/
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:47:14 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00D93D70300;
     Tue, 16 May 2017 19:47:14 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 715D61C93;
     Tue, 16 May 2017 19:47:13 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJlCRA096945;
     Tue, 16 May 2017 19:47:12 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJl98T096916;
     Tue, 16 May 2017 19:47:09 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161947.v4GJl98T096916@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 19:47:09 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318370 - in vendor/clang/dist: . cmake/caches docs
     include/clang-c include/clang/AST include/clang/Basic include/clang/Driver
     include/clang/Format include/clang/Frontend include/clang/...
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:47:14 -0000
    
    Author: dim
    Date: Tue May 16 19:47:09 2017
    New Revision: 318370
    URL: https://svnweb.freebsd.org/changeset/base/318370
    
    Log:
      Vendor import of clang trunk r303197:
      https://llvm.org/svn/llvm-project/cfe/trunk@303197
    
    Added:
      vendor/clang/dist/test/Analysis/builtin-assume.c   (contents, props changed)
      vendor/clang/dist/test/CXX/drs/dr20xx.cpp   (contents, props changed)
      vendor/clang/dist/test/CodeGen/asan-no-globals-no-comdat.cpp   (contents, props changed)
      vendor/clang/dist/test/CodeGen/mips-aggregate-arg.c   (contents, props changed)
      vendor/clang/dist/test/CodeGen/sparcv8-inline-asm.c   (contents, props changed)
      vendor/clang/dist/test/CodeGen/x86_64-mno-sse.c   (contents, props changed)
      vendor/clang/dist/test/CodeGen/xray-customevent.cpp   (contents, props changed)
      vendor/clang/dist/test/CodeGenCXX/array-default-argument.cpp   (contents, props changed)
      vendor/clang/dist/test/Import/conflicting-struct/
      vendor/clang/dist/test/Import/conflicting-struct/Inputs/
      vendor/clang/dist/test/Import/conflicting-struct/Inputs/S1.cpp   (contents, props changed)
      vendor/clang/dist/test/Import/conflicting-struct/Inputs/S2.cpp   (contents, props changed)
      vendor/clang/dist/test/Import/conflicting-struct/test.cpp   (contents, props changed)
      vendor/clang/dist/test/Index/Core/index-dependent-source.cpp   (contents, props changed)
      vendor/clang/dist/test/Index/Core/index-instantiated-source.cpp   (contents, props changed)
      vendor/clang/dist/test/Index/complete-available.m
      vendor/clang/dist/test/Modules/DebugInfoNamespace.cpp   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/DebugInfoNamespace/
      vendor/clang/dist/test/Modules/Inputs/DebugInfoNamespace/A.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/DebugInfoNamespace/B.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/DebugInfoNamespace/module.modulemap
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/Headers/
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/Headers/B.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/Headers/Sub.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/PrivateHeaders/
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/PrivateHeaders/BPriv.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Frameworks/Sub.framework/PrivateHeaders/SubPriv.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Headers/
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Headers/A.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Headers/Main.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Modules/
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Modules/module.modulemap
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/Modules/module.private.modulemap
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/PrivateHeaders/
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/PrivateHeaders/APriv.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/MainA.framework/PrivateHeaders/MainPriv.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/SameHeader/
      vendor/clang/dist/test/Modules/Inputs/SameHeader/A.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/SameHeader/B.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/SameHeader/C.h   (contents, props changed)
      vendor/clang/dist/test/Modules/Inputs/SameHeader/module.modulemap
      vendor/clang/dist/test/Modules/redefinition-same-header.m
      vendor/clang/dist/test/OpenMP/report_default_DSA.cpp   (contents, props changed)
      vendor/clang/dist/test/Sema/redefinition-same-header.c   (contents, props changed)
      vendor/clang/dist/test/Sema/vector-gcc-compat.c   (contents, props changed)
      vendor/clang/dist/test/Sema/vector-gcc-compat.cpp   (contents, props changed)
      vendor/clang/dist/test/SemaObjCXX/interface-return-type.mm
      vendor/clang/dist/test/SemaObjCXX/is-base-of.mm
      vendor/clang/dist/test/SemaOpenCL/array-init.cl
      vendor/clang/dist/test/SemaTemplate/typo-template-name.cpp   (contents, props changed)
    Modified:
      vendor/clang/dist/CMakeLists.txt
      vendor/clang/dist/cmake/caches/Apple-stage2.cmake
      vendor/clang/dist/cmake/caches/DistributionExample.cmake
      vendor/clang/dist/docs/CMakeLists.txt
      vendor/clang/dist/docs/ClangFormatStyleOptions.rst
      vendor/clang/dist/docs/ThreadSafetyAnalysis.rst
      vendor/clang/dist/include/clang-c/Index.h
      vendor/clang/dist/include/clang/AST/CXXInheritance.h
      vendor/clang/dist/include/clang/AST/Decl.h
      vendor/clang/dist/include/clang/AST/DeclCXX.h
      vendor/clang/dist/include/clang/AST/ExternalASTMerger.h
      vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h
      vendor/clang/dist/include/clang/Basic/Attr.td
      vendor/clang/dist/include/clang/Basic/Builtins.def
      vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td
      vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
      vendor/clang/dist/include/clang/Basic/TargetOptions.h
      vendor/clang/dist/include/clang/Driver/Options.td
      vendor/clang/dist/include/clang/Driver/SanitizerArgs.h
      vendor/clang/dist/include/clang/Format/Format.h
      vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def
      vendor/clang/dist/include/clang/Lex/MacroInfo.h
      vendor/clang/dist/include/clang/Lex/Preprocessor.h
      vendor/clang/dist/include/clang/Parse/Parser.h
      vendor/clang/dist/include/clang/Sema/Sema.h
      vendor/clang/dist/include/clang/Tooling/RefactoringCallbacks.h
      vendor/clang/dist/lib/AST/ASTImporter.cpp
      vendor/clang/dist/lib/AST/ASTStructuralEquivalence.cpp
      vendor/clang/dist/lib/AST/CXXInheritance.cpp
      vendor/clang/dist/lib/AST/DeclCXX.cpp
      vendor/clang/dist/lib/AST/ExternalASTMerger.cpp
      vendor/clang/dist/lib/AST/ODRHash.cpp
      vendor/clang/dist/lib/AST/Stmt.cpp
      vendor/clang/dist/lib/AST/Type.cpp
      vendor/clang/dist/lib/Basic/Targets.cpp
      vendor/clang/dist/lib/CodeGen/BackendUtil.cpp
      vendor/clang/dist/lib/CodeGen/CGBlocks.cpp
      vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp
      vendor/clang/dist/lib/CodeGen/CGCUDANV.cpp
      vendor/clang/dist/lib/CodeGen/CGCleanup.cpp
      vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp
      vendor/clang/dist/lib/CodeGen/CGDebugInfo.h
      vendor/clang/dist/lib/CodeGen/CGDecl.cpp
      vendor/clang/dist/lib/CodeGen/CGException.cpp
      vendor/clang/dist/lib/CodeGen/CGExpr.cpp
      vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp
      vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp
      vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp
      vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp
      vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp
      vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp
      vendor/clang/dist/lib/CodeGen/CodeGenAction.cpp
      vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp
      vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp
      vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp
      vendor/clang/dist/lib/CodeGen/TargetInfo.cpp
      vendor/clang/dist/lib/Driver/SanitizerArgs.cpp
      vendor/clang/dist/lib/Driver/ToolChains/Arch/Mips.cpp
      vendor/clang/dist/lib/Driver/ToolChains/Myriad.cpp
      vendor/clang/dist/lib/Driver/ToolChains/WebAssembly.cpp
      vendor/clang/dist/lib/Format/ContinuationIndenter.cpp
      vendor/clang/dist/lib/Format/Format.cpp
      vendor/clang/dist/lib/Format/TokenAnnotator.cpp
      vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp
      vendor/clang/dist/lib/Format/WhitespaceManager.cpp
      vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp
      vendor/clang/dist/lib/Headers/avxintrin.h
      vendor/clang/dist/lib/Headers/emmintrin.h
      vendor/clang/dist/lib/Headers/intrin.h
      vendor/clang/dist/lib/Headers/mmintrin.h
      vendor/clang/dist/lib/Headers/opencl-c.h
      vendor/clang/dist/lib/Headers/pmmintrin.h
      vendor/clang/dist/lib/Headers/prfchwintrin.h
      vendor/clang/dist/lib/Headers/smmintrin.h
      vendor/clang/dist/lib/Headers/tmmintrin.h
      vendor/clang/dist/lib/Headers/x86intrin.h
      vendor/clang/dist/lib/Headers/xmmintrin.h
      vendor/clang/dist/lib/Index/IndexBody.cpp
      vendor/clang/dist/lib/Index/IndexDecl.cpp
      vendor/clang/dist/lib/Index/IndexTypeSourceInfo.cpp
      vendor/clang/dist/lib/Index/IndexingContext.cpp
      vendor/clang/dist/lib/Lex/MacroInfo.cpp
      vendor/clang/dist/lib/Lex/ModuleMap.cpp
      vendor/clang/dist/lib/Lex/PPDirectives.cpp
      vendor/clang/dist/lib/Lex/Preprocessor.cpp
      vendor/clang/dist/lib/Parse/ParseDecl.cpp
      vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp
      vendor/clang/dist/lib/Parse/ParseExpr.cpp
      vendor/clang/dist/lib/Parse/ParseExprCXX.cpp
      vendor/clang/dist/lib/Parse/ParseTemplate.cpp
      vendor/clang/dist/lib/Sema/CMakeLists.txt
      vendor/clang/dist/lib/Sema/Sema.cpp
      vendor/clang/dist/lib/Sema/SemaCast.cpp
      vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp
      vendor/clang/dist/lib/Sema/SemaDecl.cpp
      vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp
      vendor/clang/dist/lib/Sema/SemaExpr.cpp
      vendor/clang/dist/lib/Sema/SemaExprCXX.cpp
      vendor/clang/dist/lib/Sema/SemaExprObjC.cpp
      vendor/clang/dist/lib/Sema/SemaInit.cpp
      vendor/clang/dist/lib/Sema/SemaLookup.cpp
      vendor/clang/dist/lib/Sema/SemaOverload.cpp
      vendor/clang/dist/lib/Sema/SemaStmt.cpp
      vendor/clang/dist/lib/Sema/SemaTemplate.cpp
      vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp
      vendor/clang/dist/lib/Sema/SemaType.cpp
      vendor/clang/dist/lib/Serialization/ASTReader.cpp
      vendor/clang/dist/lib/Serialization/ASTWriter.cpp
      vendor/clang/dist/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
      vendor/clang/dist/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
      vendor/clang/dist/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
      vendor/clang/dist/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
      vendor/clang/dist/lib/StaticAnalyzer/Checkers/SelectorExtras.h
      vendor/clang/dist/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
      vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
      vendor/clang/dist/lib/Tooling/RefactoringCallbacks.cpp
      vendor/clang/dist/test/CXX/drs/dr4xx.cpp
      vendor/clang/dist/test/CodeCompletion/member-access.cpp
      vendor/clang/dist/test/CodeGen/asan-globals-gc.cpp
      vendor/clang/dist/test/CodeGen/sanitize-recover.c
      vendor/clang/dist/test/CodeGen/thinlto_backend.ll
      vendor/clang/dist/test/CodeGenCXX/linetable-virtual-variadic.cpp
      vendor/clang/dist/test/CodeGenCXX/vla.cpp
      vendor/clang/dist/test/CodeGenObjC/arc-blocks.m
      vendor/clang/dist/test/CodeGenObjC/arc-foreach.m
      vendor/clang/dist/test/CodeGenOpenCL/amdgpu-debug-info-pointer-address-space.cl
      vendor/clang/dist/test/CodeGenOpenCL/amdgpu-debug-info-variable-expression.cl
      vendor/clang/dist/test/CodeGenOpenCL/constant-addr-space-globals.cl
      vendor/clang/dist/test/Driver/fsanitize.c
      vendor/clang/dist/test/Driver/myriad-toolchain.c
      vendor/clang/dist/test/Driver/wasm-toolchain.c
      vendor/clang/dist/test/FixIt/fixit-availability.c
      vendor/clang/dist/test/FixIt/fixit-availability.mm
      vendor/clang/dist/test/Index/Core/index-source.cpp
      vendor/clang/dist/test/Index/get-cursor.m
      vendor/clang/dist/test/Misc/warning-flags.c
      vendor/clang/dist/test/Modules/DebugInfoSubmoduleImport.c
      vendor/clang/dist/test/Modules/find-privateheaders.m
      vendor/clang/dist/test/Modules/odr_hash.cpp
      vendor/clang/dist/test/Modules/preprocess-module.cpp
      vendor/clang/dist/test/PCH/cxx-templates.cpp
      vendor/clang/dist/test/PCH/cxx-templates.h
      vendor/clang/dist/test/Parser/objc-available.m
      vendor/clang/dist/test/Preprocessor/predefined-arch-macros.c
      vendor/clang/dist/test/Preprocessor/x86_target_features.c
      vendor/clang/dist/test/Sema/overloadable.c
      vendor/clang/dist/test/Sema/typo-correction.c
      vendor/clang/dist/test/Sema/vector-cast.c
      vendor/clang/dist/test/Sema/vector-ops.c
      vendor/clang/dist/test/Sema/zvector.c
      vendor/clang/dist/test/SemaCXX/constructor-initializer.cpp
      vendor/clang/dist/test/SemaCXX/cxx1y-generic-lambdas.cpp
      vendor/clang/dist/test/SemaCXX/cxx1y-variable-templates_top_level.cpp
      vendor/clang/dist/test/SemaCXX/enable_if.cpp
      vendor/clang/dist/test/SemaCXX/for-range-examples.cpp
      vendor/clang/dist/test/SemaCXX/invalid-member-expr.cpp
      vendor/clang/dist/test/SemaCXX/modules-ts.cppm
      vendor/clang/dist/test/SemaCXX/type-traits.cpp
      vendor/clang/dist/test/SemaCXX/typo-correction.cpp
      vendor/clang/dist/test/SemaCXX/vector-no-lax.cpp
      vendor/clang/dist/test/SemaCXX/warn-unused-filescoped.cpp
      vendor/clang/dist/test/SemaObjC/method-bad-param.m
      vendor/clang/dist/test/SemaObjC/unguarded-availability.m
      vendor/clang/dist/test/SemaOpenCL/storageclass.cl
      vendor/clang/dist/test/SemaTemplate/deduction-crash.cpp
      vendor/clang/dist/test/SemaTemplate/default-arguments.cpp
      vendor/clang/dist/test/SemaTemplate/explicit-instantiation.cpp
      vendor/clang/dist/test/SemaTemplate/explicit-specialization-member.cpp
      vendor/clang/dist/test/SemaTemplate/ms-lookup-template-base-classes.cpp
      vendor/clang/dist/tools/c-index-test/c-index-test.c
      vendor/clang/dist/tools/clang-import-test/clang-import-test.cpp
      vendor/clang/dist/tools/libclang/CIndex.cpp
      vendor/clang/dist/tools/libclang/libclang.exports
      vendor/clang/dist/unittests/Format/FormatTest.cpp
      vendor/clang/dist/unittests/Format/FormatTestJS.cpp
      vendor/clang/dist/unittests/Format/FormatTestSelective.cpp
      vendor/clang/dist/unittests/Tooling/RecursiveASTVisitorTest.cpp
      vendor/clang/dist/unittests/Tooling/RefactoringCallbacksTest.cpp
      vendor/clang/dist/www/cxx_dr_status.html
    
    Modified: vendor/clang/dist/CMakeLists.txt
    ==============================================================================
    --- vendor/clang/dist/CMakeLists.txt	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/CMakeLists.txt	Tue May 16 19:47:09 2017	(r318370)
    @@ -579,10 +579,17 @@ if (CLANG_ENABLE_BOOTSTRAP)
         add_dependencies(clang-bootstrap-deps compiler-rt)
       endif()
     
    +  set(C_COMPILER "clang")
    +  set(CXX_COMPILER "clang++")
    +  if(WIN32)
    +    set(C_COMPILER "clang-cl.exe")
    +    set(CXX_COMPILER "clang-cl.exe")
    +  endif()
    +
       set(COMPILER_OPTIONS
    -    -DCMAKE_CXX_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++
    -    -DCMAKE_C_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang
    -    -DCMAKE_ASM_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
    +    -DCMAKE_CXX_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${CXX_COMPILER}
    +    -DCMAKE_C_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${C_COMPILER}
    +    -DCMAKE_ASM_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${C_COMPILER})
     
       if(BOOTSTRAP_LLVM_BUILD_INSTRUMENTED)
         add_dependencies(clang-bootstrap-deps llvm-profdata)
    
    Modified: vendor/clang/dist/cmake/caches/Apple-stage2.cmake
    ==============================================================================
    --- vendor/clang/dist/cmake/caches/Apple-stage2.cmake	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/cmake/caches/Apple-stage2.cmake	Tue May 16 19:47:09 2017	(r318370)
    @@ -13,6 +13,7 @@ set(CLANG_LINKS_TO_CREATE clang++ cc c++
     set(CMAKE_MACOSX_RPATH ON CACHE BOOL "")
     set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
     set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
    +set(LLVM_ENABLE_MODULES ON CACHE BOOL "")
     set(LLVM_EXTERNALIZE_DEBUGINFO ON CACHE BOOL "")
     set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
     set(BUG_REPORT_URL "http://developer.apple.com/bugreporter/" CACHE STRING "")
    @@ -28,8 +29,10 @@ set(LLVM_BUILD_TESTS ON CACHE BOOL "")
     set(LLVM_ENABLE_LTO ON CACHE BOOL "")
     set(CMAKE_C_FLAGS "-fno-stack-protector -fno-common -Wno-profile-instr-unprofiled" CACHE STRING "")
     set(CMAKE_CXX_FLAGS "-fno-stack-protector -fno-common -Wno-profile-instr-unprofiled" CACHE STRING "")
    -set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
    -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
    +if(LLVM_ENABLE_LTO AND NOT LLVM_ENABLE_LTO STREQUAL "THIN")
    +  set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
    +  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
    +endif()
     set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
     
     set(LIBCXX_INSTALL_LIBRARY OFF CACHE BOOL "")
    
    Modified: vendor/clang/dist/cmake/caches/DistributionExample.cmake
    ==============================================================================
    --- vendor/clang/dist/cmake/caches/DistributionExample.cmake	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/cmake/caches/DistributionExample.cmake	Tue May 16 19:47:09 2017	(r318370)
    @@ -29,6 +29,13 @@ set(CLANG_BOOTSTRAP_TARGETS
     
     # Setup the bootstrap build.
     set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
    -set(CLANG_BOOTSTRAP_CMAKE_ARGS
    -  -C ${CMAKE_CURRENT_LIST_DIR}/DistributionExample-stage2.cmake
    -  CACHE STRING "")
    +
    +if(STAGE2_CACHE_FILE)
    +  set(CLANG_BOOTSTRAP_CMAKE_ARGS
    +    -C ${STAGE2_CACHE_FILE}
    +    CACHE STRING "")
    +else()
    +  set(CLANG_BOOTSTRAP_CMAKE_ARGS
    +    -C ${CMAKE_CURRENT_LIST_DIR}/DistributionExample-stage2.cmake
    +    CACHE STRING "")
    +endif()
    
    Modified: vendor/clang/dist/docs/CMakeLists.txt
    ==============================================================================
    --- vendor/clang/dist/docs/CMakeLists.txt	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/docs/CMakeLists.txt	Tue May 16 19:47:09 2017	(r318370)
    @@ -91,8 +91,8 @@ endif()
     endif()
     
     if (LLVM_ENABLE_SPHINX)
    +  include(AddSphinxTarget)
       if (SPHINX_FOUND)
    -    include(AddSphinxTarget)
         if (${SPHINX_OUTPUT_HTML})
           add_sphinx_target(html clang)
           add_custom_command(TARGET docs-clang-html POST_BUILD
    
    Modified: vendor/clang/dist/docs/ClangFormatStyleOptions.rst
    ==============================================================================
    --- vendor/clang/dist/docs/ClangFormatStyleOptions.rst	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/docs/ClangFormatStyleOptions.rst	Tue May 16 19:47:09 2017	(r318370)
    @@ -209,23 +209,45 @@ the configuration (without a prefix: ``A
         float       b = 23;
         std::string ccc = 23;
     
    -**AlignEscapedNewlinesLeft** (``bool``)
    -  If ``true``, aligns escaped newlines as far left as possible.
    -  Otherwise puts them into the right-most column.
    +**AlignEscapedNewlines** (``EscapedNewlineAlignmentStyle``)
    +  Options for aligning backslashes in escaped newlines.
     
    -  .. code-block:: c++
    +  Possible values:
    +
    +  * ``ENAS_DontAlign`` (in configuration: ``DontAlign``)
    +    Don't align escaped newlines.
    +
    +    .. code-block:: c++
    +
    +      #define A \
    +        int aaaa; \
    +        int b; \
    +        int dddddddddd;
    +
    +  * ``ENAS_Left`` (in configuration: ``Left``)
    +    Align escaped newlines as far left as possible.
    +
    +    .. code-block:: c++
    +
    +      true:
    +      #define A   \
    +        int aaaa; \
    +        int b;    \
    +        int dddddddddd;
    +
    +      false:
    +
    +  * ``ENAS_Right`` (in configuration: ``Right``)
    +    Align escaped newlines in the right-most column.
    +
    +    .. code-block:: c++
    +
    +      #define A                                                                      \
    +        int aaaa;                                                                    \
    +        int b;                                                                       \
    +        int dddddddddd;
     
    -    true:
    -    #define A   \
    -      int aaaa; \
    -      int b;    \
    -      int dddddddddd;
     
    -    false:
    -    #define A                                                                      \
    -      int aaaa;                                                                    \
    -      int b;                                                                       \
    -      int dddddddddd;
     
     **AlignOperands** (``bool``)
       If ``true``, horizontally align operands of binary and ternary
    @@ -1525,7 +1547,7 @@ the configuration (without a prefix: ``A
         Use C++03-compatible syntax.
     
       * ``LS_Cpp11`` (in configuration: ``Cpp11``)
    -    Use features of C++11, C++14 and C++1z (e.g. ``A>`` instead of 
    +    Use features of C++11, C++14 and C++1z (e.g. ``A>`` instead of
         ``A >``).
     
       * ``LS_Auto`` (in configuration: ``Auto``)
    
    Modified: vendor/clang/dist/docs/ThreadSafetyAnalysis.rst
    ==============================================================================
    --- vendor/clang/dist/docs/ThreadSafetyAnalysis.rst	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/docs/ThreadSafetyAnalysis.rst	Tue May 16 19:47:09 2017	(r318370)
    @@ -884,11 +884,11 @@ implementation.
     
       // Deprecated.
       #define PT_GUARDED_VAR \
    -    THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded)
    +    THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_var)
     
       // Deprecated.
       #define GUARDED_VAR \
    -    THREAD_ANNOTATION_ATTRIBUTE__(guarded)
    +    THREAD_ANNOTATION_ATTRIBUTE__(guarded_var)
     
       // Replaced by REQUIRES
       #define EXCLUSIVE_LOCKS_REQUIRED(...) \
    
    Modified: vendor/clang/dist/include/clang-c/Index.h
    ==============================================================================
    --- vendor/clang/dist/include/clang-c/Index.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang-c/Index.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -32,7 +32,7 @@
      * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable.
      */
     #define CINDEX_VERSION_MAJOR 0
    -#define CINDEX_VERSION_MINOR 38
    +#define CINDEX_VERSION_MINOR 39
     
     #define CINDEX_VERSION_ENCODE(major, minor) ( \
           ((major) * 10000)                       \
    @@ -4081,6 +4081,23 @@ CINDEX_LINKAGE unsigned clang_Cursor_isO
     CINDEX_LINKAGE unsigned clang_Cursor_isVariadic(CXCursor C);
     
     /**
    + * \brief Returns non-zero if the given cursor points to a symbol marked with
    + * external_source_symbol attribute.
    + *
    + * \param language If non-NULL, and the attribute is present, will be set to
    + * the 'language' string from the attribute.
    + *
    + * \param definedIn If non-NULL, and the attribute is present, will be set to
    + * the 'definedIn' string from the attribute.
    + *
    + * \param isGenerated If non-NULL, and the attribute is present, will be set to
    + * non-zero if the 'generated_declaration' is set in the attribute.
    + */
    +CINDEX_LINKAGE unsigned clang_Cursor_isExternalSymbol(CXCursor C,
    +                                       CXString *language, CXString *definedIn,
    +                                       unsigned *isGenerated);
    +
    +/**
      * \brief Given a cursor that represents a declaration, return the associated
      * comment's source range.  The range may include multiple consecutive comments
      * with whitespace in between.
    
    Modified: vendor/clang/dist/include/clang/AST/CXXInheritance.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/AST/CXXInheritance.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/AST/CXXInheritance.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -161,7 +161,8 @@ class CXXBasePaths {
       void ComputeDeclsFound();
     
       bool lookupInBases(ASTContext &Context, const CXXRecordDecl *Record,
    -                     CXXRecordDecl::BaseMatchesCallback BaseMatches);
    +                     CXXRecordDecl::BaseMatchesCallback BaseMatches,
    +                     bool LookupInDependent = false);
     
     public:
       typedef std::list::iterator paths_iterator;
    
    Modified: vendor/clang/dist/include/clang/AST/Decl.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/AST/Decl.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/AST/Decl.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -966,9 +966,16 @@ public:
       /// hasLocalStorage - Returns true if a variable with function scope
       ///  is a non-static local variable.
       bool hasLocalStorage() const {
    -    if (getStorageClass() == SC_None)
    +    if (getStorageClass() == SC_None) {
    +      // OpenCL v1.2 s6.5.3: The __constant or constant address space name is
    +      // used to describe variables allocated in global memory and which are
    +      // accessed inside a kernel(s) as read-only variables. As such, variables
    +      // in constant address space cannot have local storage.
    +      if (getType().getAddressSpace() == LangAS::opencl_constant)
    +        return false;
           // Second check is for C++11 [dcl.stc]p4.
           return !isFileVarDecl() && getTSCSpec() == TSCS_unspecified;
    +    }
     
         // Global Named Register (GNU extension)
         if (getStorageClass() == SC_Register && !isLocalVarDeclOrParm())
    @@ -2478,7 +2485,7 @@ public:
       void setCapturedVLAType(const VariableArrayType *VLAType);
     
       /// getParent - Returns the parent of this field declaration, which
    -  /// is the struct in which this method is defined.
    +  /// is the struct in which this field is defined.
       const RecordDecl *getParent() const {
         return cast(getDeclContext());
       }
    
    Modified: vendor/clang/dist/include/clang/AST/DeclCXX.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/AST/DeclCXX.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/AST/DeclCXX.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -1563,10 +1563,13 @@ public:
       /// \param Paths used to record the paths from this class to its base class
       /// subobjects that match the search criteria.
       ///
    +  /// \param LookupInDependent can be set to true to extend the search to
    +  /// dependent base classes.
    +  ///
       /// \returns true if there exists any path from this class to a base class
       /// subobject that matches the search criteria.
    -  bool lookupInBases(BaseMatchesCallback BaseMatches,
    -                     CXXBasePaths &Paths) const;
    +  bool lookupInBases(BaseMatchesCallback BaseMatches, CXXBasePaths &Paths,
    +                     bool LookupInDependent = false) const;
     
       /// \brief Base-class lookup callback that determines whether the given
       /// base class specifier refers to a specific class declaration.
    @@ -1608,6 +1611,16 @@ public:
                                      CXXBasePath &Path, DeclarationName Name);
     
       /// \brief Base-class lookup callback that determines whether there exists
    +  /// a member with the given name.
    +  ///
    +  /// This callback can be used with \c lookupInBases() to find members
    +  /// of the given name within a C++ class hierarchy, including dependent
    +  /// classes.
    +  static bool
    +  FindOrdinaryMemberInDependentClasses(const CXXBaseSpecifier *Specifier,
    +                                       CXXBasePath &Path, DeclarationName Name);
    +
    +  /// \brief Base-class lookup callback that determines whether there exists
       /// an OpenMP declare reduction member with the given name.
       ///
       /// This callback can be used with \c lookupInBases() to find members
    @@ -1633,6 +1646,14 @@ public:
       /// \brief Get the indirect primary bases for this class.
       void getIndirectPrimaryBases(CXXIndirectPrimaryBaseSet& Bases) const;
     
    +  /// Performs an imprecise lookup of a dependent name in this class.
    +  ///
    +  /// This function does not follow strict semantic rules and should be used
    +  /// only when lookup rules can be relaxed, e.g. indexing.
    +  std::vector
    +  lookupDependentName(const DeclarationName &Name,
    +                      llvm::function_ref Filter);
    +
       /// Renders and displays an inheritance diagram
       /// for this C++ class and all of its base classes (transitively) using
       /// GraphViz.
    
    Modified: vendor/clang/dist/include/clang/AST/ExternalASTMerger.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/AST/ExternalASTMerger.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/AST/ExternalASTMerger.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -44,6 +44,8 @@ public:
       FindExternalLexicalDecls(const DeclContext *DC,
                                llvm::function_ref IsKindWeWant,
                                SmallVectorImpl &Result) override;
    +
    +   void CompleteType(TagDecl *Tag) override;
     };
     
     } // end namespace clang
    
    Modified: vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -2326,7 +2326,7 @@ DEF_TRAVERSE_STMT(LambdaExpr, {
       }
     
       TypeLoc TL = S->getCallOperator()->getTypeSourceInfo()->getTypeLoc();
    -  FunctionProtoTypeLoc Proto = TL.castAs();
    +  FunctionProtoTypeLoc Proto = TL.getAsAdjusted();
     
       if (S->hasExplicitParameters() && S->hasExplicitResultType()) {
         // Visit the whole type.
    
    Modified: vendor/clang/dist/include/clang/Basic/Attr.td
    ==============================================================================
    --- vendor/clang/dist/include/clang/Basic/Attr.td	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Basic/Attr.td	Tue May 16 19:47:09 2017	(r318370)
    @@ -652,6 +652,30 @@ def Availability : InheritableAttr {
                  .Case("tvos_app_extension", "tvOS (App Extension)")
                  .Case("watchos_app_extension", "watchOS (App Extension)")
                  .Default(llvm::StringRef());
    +}
    +static llvm::StringRef getPlatformNameSourceSpelling(llvm::StringRef Platform) {
    +    return llvm::StringSwitch(Platform)
    +             .Case("ios", "iOS")
    +             .Case("macos", "macOS")
    +             .Case("tvos", "tvOS")
    +             .Case("watchos", "watchOS")
    +             .Case("ios_app_extension", "iOSApplicationExtension")
    +             .Case("macos_app_extension", "macOSApplicationExtension")
    +             .Case("tvos_app_extension", "tvOSApplicationExtension")
    +             .Case("watchos_app_extension", "watchOSApplicationExtension")
    +             .Default(Platform);
    +}
    +static llvm::StringRef canonicalizePlatformName(llvm::StringRef Platform) {
    +    return llvm::StringSwitch(Platform)
    +             .Case("iOS", "ios")
    +             .Case("macOS", "macos")
    +             .Case("tvOS", "tvos")
    +             .Case("watchOS", "watchos")
    +             .Case("iOSApplicationExtension", "ios_app_extension")
    +             .Case("macOSApplicationExtension", "macos_app_extension")
    +             .Case("tvOSApplicationExtension", "tvos_app_extension")
    +             .Case("watchOSApplicationExtension", "watchos_app_extension")
    +             .Default(Platform);
     } }];
       let HasCustomParsing = 1;
       let DuplicatesAllowedWhileMerging = 1;
    
    Modified: vendor/clang/dist/include/clang/Basic/Builtins.def
    ==============================================================================
    --- vendor/clang/dist/include/clang/Basic/Builtins.def	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Basic/Builtins.def	Tue May 16 19:47:09 2017	(r318370)
    @@ -1409,6 +1409,9 @@ LANGBUILTIN(to_private, "v*v*", "tn", OC
     BUILTIN(__builtin_os_log_format_buffer_size, "zcC*.", "p:0:nut")
     BUILTIN(__builtin_os_log_format, "v*v*cC*.", "p:0:nt")
     
    +// Builtins for XRay
    +BUILTIN(__xray_customevent, "vcC*z", "")
    +
     #undef BUILTIN
     #undef LIBBUILTIN
     #undef LANGBUILTIN
    
    Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td
    ==============================================================================
    --- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td	Tue May 16 19:47:09 2017	(r318370)
    @@ -486,6 +486,7 @@ def UnneededInternalDecl : DiagGroup<"un
     def UnneededMemberFunction : DiagGroup<"unneeded-member-function">;
     def UnusedPrivateField : DiagGroup<"unused-private-field">;
     def UnusedFunction : DiagGroup<"unused-function", [UnneededInternalDecl]>;
    +def UnusedTemplate : DiagGroup<"unused-template", [UnneededInternalDecl]>;
     def UnusedMemberFunction : DiagGroup<"unused-member-function",
                                          [UnneededMemberFunction]>;
     def UnusedLabel : DiagGroup<"unused-label">;
    @@ -627,6 +628,7 @@ def Conversion : DiagGroup<"conversion",
     def Unused : DiagGroup<"unused",
                            [UnusedArgument, UnusedFunction, UnusedLabel,
                             // UnusedParameter, (matches GCC's behavior)
    +                        // UnusedTemplate, (clean-up libc++ before enabling)
                             // UnusedMemberFunction, (clean-up llvm before enabling)
                             UnusedPrivateField, UnusedLambdaCapture,
                             UnusedLocalTypedef, UnusedValue, UnusedVariable,
    
    Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
    ==============================================================================
    --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Tue May 16 19:47:09 2017	(r318370)
    @@ -303,6 +303,8 @@ def note_empty_parens_zero_initialize : 
       "replace parentheses with an initializer to declare a variable">;
     def warn_unused_function : Warning<"unused function %0">,
       InGroup, DefaultIgnore;
    +def warn_unused_template : Warning<"unused %select{function|variable}0 template %1">,
    +  InGroup, DefaultIgnore;
     def warn_unused_member_function : Warning<"unused member function %0">,
       InGroup, DefaultIgnore;
     def warn_used_but_marked_unused: Warning<"%0 was marked unused but was used">,
    @@ -2463,6 +2465,9 @@ def err_attribute_invalid_size : Error<
       "vector size not an integral multiple of component size">;
     def err_attribute_zero_size : Error<"zero vector size">;
     def err_attribute_size_too_large : Error<"vector size too large">;
    +def err_typecheck_vector_not_convertable_implict_truncation : Error<
    +   "cannot convert between %select{scalar|vector}0 type %1 and vector type"
    +   " %2 as implicit conversion would cause truncation">;
     def err_typecheck_vector_not_convertable : Error<
       "cannot convert between vector values of different size (%0 and %1)">;
     def err_typecheck_vector_not_convertable_non_scalar : Error<
    @@ -4607,6 +4612,8 @@ def err_abi_tag_on_redeclaration : Error
       "cannot add 'abi_tag' attribute in a redeclaration">;
     def err_new_abi_tag_on_redeclaration : Error<
       "'abi_tag' %0 missing in original declaration">;
    +def note_use_ifdef_guards : Note<
    +  "unguarded header; consider using #ifdef guards or #pragma once">;
     
     def note_deleted_dtor_no_operator_delete : Note<
       "virtual destructor requires an unambiguous, accessible 'operator delete'">;
    @@ -5775,6 +5782,9 @@ def err_objc_object_assignment : Error<
       "cannot assign to class object (%0 invalid)">;
     def err_typecheck_invalid_operands : Error<
       "invalid operands to binary expression (%0 and %1)">;
    +def err_typecheck_logical_vector_expr_gnu_cpp_restrict : Error<
    +  "logical expression with vector %select{type %1 and non-vector type %2|types"
    +  " %1 and %2}0 is only supported in C++">;
     def err_typecheck_sub_ptr_compatible : Error<
       "%diff{$ and $ are not pointers to compatible types|"
       "pointers to incompatible types}0,1">;
    @@ -8186,9 +8196,20 @@ def err_undeclared_use_suggest : Error<
       "use of undeclared %0; did you mean %1?">;
     def err_undeclared_var_use_suggest : Error<
       "use of undeclared identifier %0; did you mean %1?">;
    +def err_no_template : Error<"no template named %0">;
     def err_no_template_suggest : Error<"no template named %0; did you mean %1?">;
    +def err_no_member_template : Error<"no template named %0 in %1">;
     def err_no_member_template_suggest : Error<
       "no template named %0 in %1; did you mean %select{|simply }2%3?">;
    +def err_non_template_in_template_id : Error<
    +  "%0 does not name a template but is followed by template arguments">;
    +def err_non_template_in_template_id_suggest : Error<
    +  "%0 does not name a template but is followed by template arguments; "
    +  "did you mean %1?">;
    +def err_non_template_in_member_template_id_suggest : Error<
    +  "member %0 of %1 is not a template; did you mean %select{|simply }2%3?">;
    +def note_non_template_in_template_id_found : Note<
    +  "non-template declaration found by name lookup">;
     def err_mem_init_not_member_or_class_suggest : Error<
       "initializer %0 does not name a non-static data member or base "
       "class; did you mean the %select{base class|member}1 %2?">;
    @@ -8875,6 +8896,13 @@ def ext_equivalent_internal_linkage_decl
       InGroup>;
     def note_equivalent_internal_linkage_decl : Note<
       "declared here%select{ in module '%1'|}0">;
    +
    +def note_redefinition_modules_same_file : Note<
    +	"'%0' included multiple times, additional include site in header from module '%1'">;
    +def note_redefinition_modules_same_file_modulemap : Note<
    +	"consider adding '%0' as part of '%1' definition">;
    +def note_redefinition_include_same_file : Note<
    +	"'%0' included multiple times, additional include site here">;
     }
     
     let CategoryName = "Coroutines Issue" in {
    
    Modified: vendor/clang/dist/include/clang/Basic/TargetOptions.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/Basic/TargetOptions.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Basic/TargetOptions.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -24,8 +24,7 @@ namespace clang {
     /// \brief Options for controlling the target.
     class TargetOptions {
     public:
    -  /// If given, the name of the target triple to compile for. If not given the
    -  /// target will be selected to match the host.
    +  /// The name of the target triple to compile for.
       std::string Triple;
     
       /// When compiling for the device side, contains the triple used to compile
    
    Modified: vendor/clang/dist/include/clang/Driver/Options.td
    ==============================================================================
    --- vendor/clang/dist/include/clang/Driver/Options.td	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Driver/Options.td	Tue May 16 19:47:09 2017	(r318370)
    @@ -827,6 +827,9 @@ def fno_sanitize_address_use_after_scope
                                                Group,
                                                Flags<[CoreOption, DriverOption]>,
                                                HelpText<"Disable use-after-scope detection in AddressSanitizer">;
    +def fsanitize_address_globals_dead_stripping : Flag<["-"], "fsanitize-address-globals-dead-stripping">,
    +                                        Group,
    +                                        HelpText<"Enable linker dead stripping of globals in AddressSanitizer">;
     def fsanitize_recover : Flag<["-"], "fsanitize-recover">, Group;
     def fno_sanitize_recover : Flag<["-"], "fno-sanitize-recover">,
                                Flags<[CoreOption, DriverOption]>,
    
    Modified: vendor/clang/dist/include/clang/Driver/SanitizerArgs.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/Driver/SanitizerArgs.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Driver/SanitizerArgs.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -35,6 +35,7 @@ class SanitizerArgs {
       int AsanFieldPadding = 0;
       bool AsanSharedRuntime = false;
       bool AsanUseAfterScope = true;
    +  bool AsanGlobalsDeadStripping = false;
       bool LinkCXXRuntimes = false;
       bool NeedPIE = false;
       bool Stats = false;
    
    Modified: vendor/clang/dist/include/clang/Format/Format.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/Format/Format.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Format/Format.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -98,22 +98,39 @@ struct FormatStyle {
       /// \endcode
       bool AlignConsecutiveDeclarations;
     
    -  /// \brief If ``true``, aligns escaped newlines as far left as possible.
    -  /// Otherwise puts them into the right-most column.
    -  /// \code
    -  ///   true:
    -  ///   #define A   \
    -  ///     int aaaa; \
    -  ///     int b;    \
    -  ///     int dddddddddd;
    -  ///
    -  ///   false:
    -  ///   #define A                                                                      \
    -  ///     int aaaa;                                                                    \
    -  ///     int b;                                                                       \
    -  ///     int dddddddddd;
    -  /// \endcode
    -  bool AlignEscapedNewlinesLeft;
    +  /// \brief Different styles for aligning escaped newlines.
    +  enum EscapedNewlineAlignmentStyle {
    +    /// \brief Don't align escaped newlines.
    +    /// \code
    +    ///   #define A \
    +    ///     int aaaa; \
    +    ///     int b; \
    +    ///     int dddddddddd;
    +    /// \endcode
    +    ENAS_DontAlign,
    +    /// \brief Align escaped newlines as far left as possible.
    +    /// \code
    +    ///   true:
    +    ///   #define A   \
    +    ///     int aaaa; \
    +    ///     int b;    \
    +    ///     int dddddddddd;
    +    ///
    +    ///   false:
    +    /// \endcode
    +    ENAS_Left,
    +    /// \brief Align escaped newlines in the right-most column.
    +    /// \code
    +    ///   #define A                                                                      \
    +    ///     int aaaa;                                                                    \
    +    ///     int b;                                                                       \
    +    ///     int dddddddddd;
    +    /// \endcode
    +    ENAS_Right,
    +  };
    +
    +  /// \brief Options for aligning backslashes in escaped newlines.
    +  EscapedNewlineAlignmentStyle AlignEscapedNewlines;
     
       /// \brief If ``true``, horizontally align operands of binary and ternary
       /// expressions.
    @@ -1347,7 +1364,7 @@ struct FormatStyle {
                AlignAfterOpenBracket == R.AlignAfterOpenBracket &&
                AlignConsecutiveAssignments == R.AlignConsecutiveAssignments &&
                AlignConsecutiveDeclarations == R.AlignConsecutiveDeclarations &&
    -           AlignEscapedNewlinesLeft == R.AlignEscapedNewlinesLeft &&
    +           AlignEscapedNewlines == R.AlignEscapedNewlines &&
                AlignOperands == R.AlignOperands &&
                AlignTrailingComments == R.AlignTrailingComments &&
                AllowAllParametersOfDeclarationOnNextLine ==
    
    Modified: vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def
    ==============================================================================
    --- vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def	Tue May 16 19:47:09 2017	(r318370)
    @@ -137,6 +137,8 @@ CODEGENOPT(StructPathTBAA    , 1, 0) ///
     CODEGENOPT(SaveTempLabels    , 1, 0) ///< Save temporary labels.
     CODEGENOPT(SanitizeAddressUseAfterScope , 1, 0) ///< Enable use-after-scope detection
                                                     ///< in AddressSanitizer
    +CODEGENOPT(SanitizeAddressGlobalsDeadStripping, 1, 0) ///< Enable linker dead stripping
    +                                                      ///< of globals in AddressSanitizer
     CODEGENOPT(SanitizeMemoryTrackOrigins, 2, 0) ///< Enable tracking origins in
                                                  ///< MemorySanitizer
     CODEGENOPT(SanitizeMemoryUseAfterDtor, 1, 0) ///< Enable use-after-delete detection
    
    Modified: vendor/clang/dist/include/clang/Lex/MacroInfo.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/Lex/MacroInfo.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Lex/MacroInfo.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -105,9 +105,6 @@ class MacroInfo {
       /// \brief Must warn if the macro is unused at the end of translation unit.
       bool IsWarnIfUnused : 1;
     
    -  /// \brief Whether this macro info was loaded from an AST file.
    -  bool FromASTFile : 1;
    -
       /// \brief Whether this macro was used as header guard.
       bool UsedForHeaderGuard : 1;
     
    @@ -264,34 +261,16 @@ public:
         IsDisabled = true;
       }
     
    -  /// \brief Determine whether this macro info came from an AST file (such as
    -  /// a precompiled header or module) rather than having been parsed.
    -  bool isFromASTFile() const { return FromASTFile; }
    -
       /// \brief Determine whether this macro was used for a header guard.
       bool isUsedForHeaderGuard() const { return UsedForHeaderGuard; }
     
       void setUsedForHeaderGuard(bool Val) { UsedForHeaderGuard = Val; }
     
    -  /// \brief Retrieve the global ID of the module that owns this particular
    -  /// macro info.
    -  unsigned getOwningModuleID() const {
    -    if (isFromASTFile())
    -      return *(const unsigned *)(this + 1);
    -
    -    return 0;
    -  }
    -
       void dump() const;
     
     private:
       unsigned getDefinitionLengthSlow(const SourceManager &SM) const;
     
    -  void setOwningModuleID(unsigned ID) {
    -    assert(isFromASTFile());
    -    *(unsigned *)(this + 1) = ID;
    -  }
    -
       friend class Preprocessor;
     };
     
    
    Modified: vendor/clang/dist/include/clang/Lex/Preprocessor.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/Lex/Preprocessor.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Lex/Preprocessor.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -644,14 +644,6 @@ class Preprocessor {
       /// of that list.
       MacroInfoChain *MIChainHead;
     
    -  struct DeserializedMacroInfoChain {
    -    MacroInfo MI;
    -    unsigned OwningModuleID; // MUST be immediately after the MacroInfo object
    -                     // so it can be accessed by MacroInfo::getOwningModuleID().
    -    DeserializedMacroInfoChain *Next;
    -  };
    -  DeserializedMacroInfoChain *DeserialMIChainHead;
    -
       void updateOutOfDateIdentifier(IdentifierInfo &II) const;
     
     public:
    @@ -1669,10 +1661,6 @@ public:
       /// \brief Allocate a new MacroInfo object with the provided SourceLocation.
       MacroInfo *AllocateMacroInfo(SourceLocation L);
     
    -  /// \brief Allocate a new MacroInfo object loaded from an AST file.
    -  MacroInfo *AllocateDeserializedMacroInfo(SourceLocation L,
    -                                           unsigned SubModuleID);
    -
       /// \brief Turn the specified lexer token into a fully checked and spelled
       /// filename, e.g. as an operand of \#include. 
       ///
    @@ -1764,9 +1752,6 @@ private:
       /// macro name.
       void updateModuleMacroInfo(const IdentifierInfo *II, ModuleMacroInfo &Info);
     
    -  /// \brief Allocate a new MacroInfo object.
    -  MacroInfo *AllocateMacroInfo();
    -
       DefMacroDirective *AllocateDefMacroDirective(MacroInfo *MI,
                                                    SourceLocation Loc);
       UndefMacroDirective *AllocateUndefMacroDirective(SourceLocation UndefLoc);
    
    Modified: vendor/clang/dist/include/clang/Parse/Parser.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/Parse/Parser.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Parse/Parser.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -1488,6 +1488,8 @@ private:
                 K == tok::plusplus || K == tok::minusminus);
       }
     
    +  bool diagnoseUnknownTemplateId(ExprResult TemplateName, SourceLocation Less);
    +
       ExprResult ParsePostfixExpressionSuffix(ExprResult LHS);
       ExprResult ParseUnaryExprOrTypeTraitExpression();
       ExprResult ParseBuiltinPrimaryExpression();
    @@ -2723,10 +2725,7 @@ private:
       bool ParseGreaterThanInTemplateList(SourceLocation &RAngleLoc,
                                           bool ConsumeLastToken,
                                           bool ObjCGenericList);
    -  bool ParseTemplateIdAfterTemplateName(TemplateTy Template,
    -                                        SourceLocation TemplateNameLoc,
    -                                        const CXXScopeSpec &SS,
    -                                        bool ConsumeLastToken,
    +  bool ParseTemplateIdAfterTemplateName(bool ConsumeLastToken,
                                             SourceLocation &LAngleLoc,
                                             TemplateArgList &TemplateArgs,
                                             SourceLocation &RAngleLoc);
    
    Modified: vendor/clang/dist/include/clang/Sema/Sema.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/Sema/Sema.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Sema/Sema.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -1074,6 +1074,10 @@ public:
       /// correctly named definition after the renamed definition.
       llvm::SmallPtrSet TypoCorrectedFunctionDefinitions;
     
    +  /// Stack of types that correspond to the parameter entities that are
    +  /// currently being copy-initialized. Can be empty.
    +  llvm::SmallVector CurrentParameterCopyTypes;
    +
       void ReadMethodPool(Selector Sel);
       void updateOutOfDateSelector(Selector Sel);
     
    @@ -1456,6 +1460,11 @@ private:
       /// The modules we're currently parsing.
       llvm::SmallVector ModuleScopes;
     
    +  /// Get the module whose scope we are currently within.
    +  Module *getCurrentModule() const {
    +    return ModuleScopes.empty() ? nullptr : ModuleScopes.back().Module;
    +  }
    +
       VisibleModuleSet VisibleModules;
     
       Module *CachedFakeTopLevelModule;
    @@ -1466,7 +1475,7 @@ public:
     
       /// \brief Make a merged definition of an existing hidden definition \p ND
       /// visible at the specified location.
    -  void makeMergedDefinitionVisible(NamedDecl *ND, SourceLocation Loc);
    +  void makeMergedDefinitionVisible(NamedDecl *ND);
     
       bool isModuleVisible(Module *M) { return VisibleModules.isVisible(M); }
     
    @@ -1593,7 +1602,7 @@ public:
                                    Scope *S,
                                    CXXScopeSpec *SS,
                                    ParsedType &SuggestedType,
    -                               bool AllowClassTemplates = false);
    +                               bool IsTemplateName = false);
     
       /// Attempt to behave like MSVC in situations where lookup of an unqualified
       /// type name has failed in a dependent context. In these situations, we
    @@ -1738,6 +1747,23 @@ public:
       TemplateNameKindForDiagnostics
       getTemplateNameKindForDiagnostics(TemplateName Name);
     
    +  /// Determine whether it's plausible that E was intended to be a
    +  /// template-name.
    +  bool mightBeIntendedToBeTemplateName(ExprResult E) {
    +    if (!getLangOpts().CPlusPlus || E.isInvalid())
    +      return false;
    +    if (auto *DRE = dyn_cast(E.get()))
    +      return !DRE->hasExplicitTemplateArgs();
    +    if (auto *ME = dyn_cast(E.get()))
    +      return !ME->hasExplicitTemplateArgs();
    +    // Any additional cases recognized here should also be handled by
    +    // diagnoseExprIntendedAsTemplateName.
    +    return false;
    +  }
    +  void diagnoseExprIntendedAsTemplateName(Scope *S, ExprResult TemplateName,
    +                                          SourceLocation Less,
    +                                          SourceLocation Greater);
    +
       Decl *ActOnDeclarator(Scope *S, Declarator &D);
     
       NamedDecl *HandleDeclarator(Scope *S, Declarator &D,
    @@ -2336,6 +2362,7 @@ public:
       void MergeVarDeclTypes(VarDecl *New, VarDecl *Old, bool MergeTypeWithOld);
       void MergeVarDeclExceptionSpecs(VarDecl *New, VarDecl *Old);
       bool checkVarDeclRedefinition(VarDecl *OldDefn, VarDecl *NewDefn);
    +  void notePreviousDefinition(SourceLocation Old, SourceLocation New);
       bool MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S);
     
       // AssignmentAction - This is used by all the assignment diagnostic functions
    @@ -2726,7 +2753,8 @@ public:
       resolveAddressOfOnlyViableOverloadCandidate(Expr *E,
                                                   DeclAccessPair &FoundResult);
     
    -  bool resolveAndFixAddressOfOnlyViableOverloadCandidate(ExprResult &SrcExpr);
    +  bool resolveAndFixAddressOfOnlyViableOverloadCandidate(
    +      ExprResult &SrcExpr, bool DoFunctionPointerConversion = false);
     
       FunctionDecl *
       ResolveSingleFunctionTemplateSpecialization(OverloadExpr *ovl,
    @@ -3049,7 +3077,8 @@ public:
                               bool IncludeGlobalScope = true);
       void LookupVisibleDecls(DeclContext *Ctx, LookupNameKind Kind,
                               VisibleDeclConsumer &Consumer,
    -                          bool IncludeGlobalScope = true);
    +                          bool IncludeGlobalScope = true,
    +                          bool IncludeDependentBases = false);
     
       enum CorrectTypoKind {
         CTK_NonError,     // CorrectTypo used in a non error recovery situation.
    @@ -6084,6 +6113,7 @@ public:
                              TemplateArgumentListInfo *ExplicitTemplateArgs,
                                                LookupResult &Previous);
       bool CheckMemberSpecialization(NamedDecl *Member, LookupResult &Previous);
    +  void CompleteMemberSpecialization(NamedDecl *Member, LookupResult &Previous);
     
       DeclResult
       ActOnExplicitInstantiation(Scope *S,
    @@ -9259,6 +9289,8 @@ public:
       /// type checking binary operators (subroutines of CreateBuiltinBinOp).
       QualType InvalidOperands(SourceLocation Loc, ExprResult &LHS,
                                ExprResult &RHS);
    +  QualType InvalidLogicalVectorOperands(SourceLocation Loc, ExprResult &LHS,
    +                                 ExprResult &RHS);
       QualType CheckPointerToMemberOperands( // C++ 5.5
         ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK,
         SourceLocation OpLoc, bool isIndirect);
    @@ -10008,6 +10040,7 @@ public:
                                                  MacroInfo *MacroInfo,
                                                  unsigned Argument);
       void CodeCompleteNaturalLanguage();
    +  void CodeCompleteAvailabilityPlatformName();
       void GatherGlobalCodeCompletions(CodeCompletionAllocator &Allocator,
                                        CodeCompletionTUInfo &CCTUInfo,
                       SmallVectorImpl &Results);
    
    Modified: vendor/clang/dist/include/clang/Tooling/RefactoringCallbacks.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/Tooling/RefactoringCallbacks.h	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/include/clang/Tooling/RefactoringCallbacks.h	Tue May 16 19:47:09 2017	(r318370)
    @@ -47,6 +47,33 @@ protected:
       Replacements Replace;
     };
     
    +/// \brief Adaptor between \c ast_matchers::MatchFinder and \c
    +/// tooling::RefactoringTool.
    +///
    +/// Runs AST matchers and stores the \c tooling::Replacements in a map.
    +class ASTMatchRefactorer {
    +public:
    +  explicit ASTMatchRefactorer(
    +    std::map &FileToReplaces);
    +
    +  template 
    +  void addMatcher(const T &Matcher, RefactoringCallback *Callback) {
    +    MatchFinder.addMatcher(Matcher, Callback);
    +    Callbacks.push_back(Callback);
    +  }
    +
    +  void addDynamicMatcher(const ast_matchers::internal::DynTypedMatcher &Matcher,
    +                         RefactoringCallback *Callback);
    +
    +  std::unique_ptr newASTConsumer();
    +
    +private:
    +  friend class RefactoringASTConsumer;
    +  std::vector Callbacks;
    +  ast_matchers::MatchFinder MatchFinder;
    +  std::map &FileToReplaces;
    +};
    +
     /// \brief Replace the text of the statement bound to \c FromId with the text in
     /// \c ToText.
     class ReplaceStmtWithText : public RefactoringCallback {
    @@ -59,6 +86,29 @@ private:
       std::string ToText;
     };
     
    +/// \brief Replace the text of an AST node bound to \c FromId with the result of
    +/// evaluating the template in \c ToTemplate.
    +///
    +/// Expressions of the form ${NodeName} in \c ToTemplate will be
    +/// replaced by the text of the node bound to ${NodeName}. The string
    +/// "$$" will be replaced by "$".
    +class ReplaceNodeWithTemplate : public RefactoringCallback {
    +public:
    +  static llvm::Expected>
    +  create(StringRef FromId, StringRef ToTemplate);
    +  void run(const ast_matchers::MatchFinder::MatchResult &Result) override;
    +
    +private:
    +  struct TemplateElement {
    +    enum { Literal, Identifier } Type;
    +    std::string Value;
    +  };
    +  ReplaceNodeWithTemplate(llvm::StringRef FromId,
    +                          std::vector Template);
    +  std::string FromId;
    +  std::vector Template;
    +};
    +
     /// \brief Replace the text of the statement bound to \c FromId with the text of
     /// the statement bound to \c ToId.
     class ReplaceStmtWithStmt : public RefactoringCallback {
    
    Modified: vendor/clang/dist/lib/AST/ASTImporter.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/AST/ASTImporter.cpp	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/lib/AST/ASTImporter.cpp	Tue May 16 19:47:09 2017	(r318370)
    @@ -1622,10 +1622,18 @@ Decl *ASTNodeImporter::VisitRecordDecl(R
     
       // We may already have a record of the same name; try to find and match it.
       RecordDecl *AdoptDecl = nullptr;
    +  RecordDecl *PrevDecl = nullptr;
       if (!DC->isFunctionOrMethod()) {
         SmallVector ConflictingDecls;
         SmallVector FoundDecls;
         DC->getRedeclContext()->localUncachedLookup(SearchName, FoundDecls);
    +
    +    if (!FoundDecls.empty()) {
    +      // We're going to have to compare D against potentially conflicting Decls, so complete it.
    +      if (D->hasExternalLexicalStorage() && !D->isCompleteDefinition())
    +        D->getASTContext().getExternalSource()->CompleteType(D);
    +    }
    +
         for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
           if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
             continue;
    @@ -1652,6 +1660,8 @@ Decl *ASTNodeImporter::VisitRecordDecl(R
               }
             }
     
    +        PrevDecl = FoundRecord;
    +
             if (RecordDecl *FoundDef = FoundRecord->getDefinition()) {
               if ((SearchName && !D->isCompleteDefinition())
                   || (D->isCompleteDefinition() &&
    @@ -1744,6 +1754,10 @@ Decl *ASTNodeImporter::VisitRecordDecl(R
         LexicalDC->addDeclInternal(D2);
         if (D->isAnonymousStructOrUnion())
           D2->setAnonymousStructOrUnion(true);
    +    if (PrevDecl) {
    +      // FIXME: do this for all Redeclarables, not just RecordDecls.
    +      D2->setPreviousDecl(PrevDecl);
    +    }
       }
       
       Importer.Imported(D, D2);
    
    Modified: vendor/clang/dist/lib/AST/ASTStructuralEquivalence.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/AST/ASTStructuralEquivalence.cpp	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/lib/AST/ASTStructuralEquivalence.cpp	Tue May 16 19:47:09 2017	(r318370)
    @@ -855,6 +855,11 @@ static bool IsStructurallyEquivalent(Str
     
       if (CXXRecordDecl *D1CXX = dyn_cast(D1)) {
         if (CXXRecordDecl *D2CXX = dyn_cast(D2)) {
    +      if (D1CXX->hasExternalLexicalStorage() &&
    +          !D1CXX->isCompleteDefinition()) {
    +        D1CXX->getASTContext().getExternalSource()->CompleteType(D1CXX);
    +      }
    +
           if (D1CXX->getNumBases() != D2CXX->getNumBases()) {
             if (Context.Complain) {
               Context.Diag2(D2->getLocation(), diag::warn_odr_tag_type_inconsistent)
    
    Modified: vendor/clang/dist/lib/AST/CXXInheritance.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/AST/CXXInheritance.cpp	Tue May 16 19:47:00 2017	(r318369)
    +++ vendor/clang/dist/lib/AST/CXXInheritance.cpp	Tue May 16 19:47:09 2017	(r318370)
    @@ -13,6 +13,7 @@
     #include "clang/AST/CXXInheritance.h"
     #include "clang/AST/ASTContext.h"
     #include "clang/AST/DeclCXX.h"
    +#include "clang/AST/DeclTemplate.h"
     #include "clang/AST/RecordLayout.h"
     #include "llvm/ADT/SetVector.h"
     #include 
    @@ -174,9 +175,10 @@ bool CXXRecordDecl::forallBases(ForallBa
       return AllMatches;
     }
     
    -bool CXXBasePaths::lookupInBases(
    -    ASTContext &Context, const CXXRecordDecl *Record,
    -    CXXRecordDecl::BaseMatchesCallback BaseMatches) {
    +bool CXXBasePaths::lookupInBases(ASTContext &Context,
    +                                 const CXXRecordDecl *Record,
    +                                 CXXRecordDecl::BaseMatchesCallback BaseMatches,
    +                                 bool LookupInDependent) {
       bool FoundPath = false;
     
       // The access of the path down to this record.
    @@ -194,7 +196,7 @@ bool CXXBasePaths::lookupInBases(
         //   the base class scope is not examined during unqualified name lookup 
         //   either at the point of definition of the class template or member or 
         //   during an instantiation of the class tem- plate or member.
    -    if (BaseType->isDependentType())
    +    if (!LookupInDependent && BaseType->isDependentType())
           continue;
         
         // Determine whether we need to visit this base class at all,
    @@ -262,10 +264,28 @@ bool CXXBasePaths::lookupInBases(
             return FoundPath;
           }
         } else if (VisitBase) {
    -      CXXRecordDecl *BaseRecord
    -        = cast(BaseSpec.getType()->castAs()
    -                                ->getDecl());
    -      if (lookupInBases(Context, BaseRecord, BaseMatches)) {
    +      CXXRecordDecl *BaseRecord;
    +      if (LookupInDependent) {
    +        BaseRecord = nullptr;
    +        const TemplateSpecializationType *TST =
    +            BaseSpec.getType()->getAs();
    +        if (!TST) {
    +          if (auto *RT = BaseSpec.getType()->getAs())
    +            BaseRecord = cast(RT->getDecl());
    +        } else {
    +          TemplateName TN = TST->getTemplateName();
    +          if (auto *TD =
    +                  dyn_cast_or_null(TN.getAsTemplateDecl()))
    +            BaseRecord = TD->getTemplatedDecl();
    +        }
    +        if (BaseRecord && !BaseRecord->hasDefinition())
    +          BaseRecord = nullptr;
    +      } else {
    +        BaseRecord = cast(
    +            BaseSpec.getType()->castAs()->getDecl());
    +      }
    +      if (BaseRecord &&
    +          lookupInBases(Context, BaseRecord, BaseMatches, LookupInDependent)) {
             // C++ [class.member.lookup]p2:
             //   A member name f in one sub-object B hides a member name f in
             //   a sub-object A if A is a base class sub-object of B. Any
    @@ -299,9 +319,11 @@ bool CXXBasePaths::lookupInBases(
     }
     
     bool CXXRecordDecl::lookupInBases(BaseMatchesCallback BaseMatches,
    -                                  CXXBasePaths &Paths) const {
    +                                  CXXBasePaths &Paths,
    +                                  bool LookupInDependent) const {
       // If we didn't find anything, report that.
    -  if (!Paths.lookupInBases(getASTContext(), this, BaseMatches))
    +  if (!Paths.lookupInBases(getASTContext(), this, BaseMatches,
    +                           LookupInDependent))
         return false;
     
       // If we're not recording paths or we won't ever find ambiguities,
    @@ -387,23 +409,49 @@ bool CXXRecordDecl::FindTagMember(const 
       return false;
     }
     
    -bool CXXRecordDecl::FindOrdinaryMember(const CXXBaseSpecifier *Specifier, 
    -                                       CXXBasePath &Path,
    -                                       DeclarationName Name) {
    -  RecordDecl *BaseRecord =
    -    Specifier->getType()->castAs()->getDecl();
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:47:17 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE73FD70320;
     Tue, 16 May 2017 19:47:17 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 86A191CD8;
     Tue, 16 May 2017 19:47:17 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJlGiI096993;
     Tue, 16 May 2017 19:47:16 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJlGGE096992;
     Tue, 16 May 2017 19:47:16 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161947.v4GJlGGE096992@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 19:47:16 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318371 - vendor/clang/clang-trunk-r303197
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:47:18 -0000
    
    Author: dim
    Date: Tue May 16 19:47:16 2017
    New Revision: 318371
    URL: https://svnweb.freebsd.org/changeset/base/318371
    
    Log:
      Tag clang trunk r303197.
    
    Added:
      vendor/clang/clang-trunk-r303197/
         - copied from r318370, vendor/clang/dist/
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:47:25 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE8DFD70380;
     Tue, 16 May 2017 19:47:25 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 871C01DA2;
     Tue, 16 May 2017 19:47:25 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJlOWu097089;
     Tue, 16 May 2017 19:47:24 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJlJaB097039;
     Tue, 16 May 2017 19:47:19 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161947.v4GJlJaB097039@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 19:47:19 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318372 - in vendor/compiler-rt/dist: . cmake
     include/xray lib/asan lib/asan/tests lib/builtins lib/builtins/arm lib/esan
     lib/lsan lib/msan lib/msan/tests lib/sanitizer_common lib/sanit...
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:47:26 -0000
    
    Author: dim
    Date: Tue May 16 19:47:19 2017
    New Revision: 318372
    URL: https://svnweb.freebsd.org/changeset/base/318372
    
    Log:
      Vendor import of compiler-rt trunk r303197:
      https://llvm.org/svn/llvm-project/compiler-rt/trunk@303197
    
    Added:
      vendor/compiler-rt/dist/lib/scudo/scudo_allocator_combined.h   (contents, props changed)
      vendor/compiler-rt/dist/lib/scudo/scudo_crc32.h   (contents, props changed)
      vendor/compiler-rt/dist/test/asan/TestCases/Linux/sanbox_read_proc_self_maps_test.cc   (contents, props changed)
      vendor/compiler-rt/dist/test/asan/TestCases/Posix/strndup_oob_test.cc   (contents, props changed)
      vendor/compiler-rt/dist/test/msan/pr32842.c   (contents, props changed)
      vendor/compiler-rt/dist/test/msan/strndup.cc   (contents, props changed)
      vendor/compiler-rt/dist/test/xray/TestCases/Linux/custom-event-logging.cc   (contents, props changed)
    Modified:
      vendor/compiler-rt/dist/CMakeLists.txt
      vendor/compiler-rt/dist/cmake/config-ix.cmake
      vendor/compiler-rt/dist/include/xray/xray_interface.h
      vendor/compiler-rt/dist/lib/asan/asan_allocator.h
      vendor/compiler-rt/dist/lib/asan/asan_flags.cc
      vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc
      vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt
      vendor/compiler-rt/dist/lib/builtins/adddf3.c
      vendor/compiler-rt/dist/lib/builtins/addsf3.c
      vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cdcmpeq_check_nan.c
      vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cfcmpeq_check_nan.c
      vendor/compiler-rt/dist/lib/builtins/arm/aeabi_div0.c
      vendor/compiler-rt/dist/lib/builtins/arm/aeabi_drsub.c
      vendor/compiler-rt/dist/lib/builtins/arm/aeabi_frsub.c
      vendor/compiler-rt/dist/lib/builtins/ashldi3.c
      vendor/compiler-rt/dist/lib/builtins/ashrdi3.c
      vendor/compiler-rt/dist/lib/builtins/assembly.h
      vendor/compiler-rt/dist/lib/builtins/comparedf2.c
      vendor/compiler-rt/dist/lib/builtins/comparesf2.c
      vendor/compiler-rt/dist/lib/builtins/divdf3.c
      vendor/compiler-rt/dist/lib/builtins/divsf3.c
      vendor/compiler-rt/dist/lib/builtins/divsi3.c
      vendor/compiler-rt/dist/lib/builtins/extendhfsf2.c
      vendor/compiler-rt/dist/lib/builtins/extendsfdf2.c
      vendor/compiler-rt/dist/lib/builtins/fixdfdi.c
      vendor/compiler-rt/dist/lib/builtins/fixdfsi.c
      vendor/compiler-rt/dist/lib/builtins/fixsfdi.c
      vendor/compiler-rt/dist/lib/builtins/fixsfsi.c
      vendor/compiler-rt/dist/lib/builtins/fixunsdfdi.c
      vendor/compiler-rt/dist/lib/builtins/fixunsdfsi.c
      vendor/compiler-rt/dist/lib/builtins/fixunssfdi.c
      vendor/compiler-rt/dist/lib/builtins/fixunssfsi.c
      vendor/compiler-rt/dist/lib/builtins/floatdidf.c
      vendor/compiler-rt/dist/lib/builtins/floatdisf.c
      vendor/compiler-rt/dist/lib/builtins/floatsidf.c
      vendor/compiler-rt/dist/lib/builtins/floatsisf.c
      vendor/compiler-rt/dist/lib/builtins/floatundidf.c
      vendor/compiler-rt/dist/lib/builtins/floatundisf.c
      vendor/compiler-rt/dist/lib/builtins/floatunsidf.c
      vendor/compiler-rt/dist/lib/builtins/floatunsisf.c
      vendor/compiler-rt/dist/lib/builtins/int_lib.h
      vendor/compiler-rt/dist/lib/builtins/lshrdi3.c
      vendor/compiler-rt/dist/lib/builtins/muldf3.c
      vendor/compiler-rt/dist/lib/builtins/muldi3.c
      vendor/compiler-rt/dist/lib/builtins/mulsf3.c
      vendor/compiler-rt/dist/lib/builtins/negdf2.c
      vendor/compiler-rt/dist/lib/builtins/negsf2.c
      vendor/compiler-rt/dist/lib/builtins/subdf3.c
      vendor/compiler-rt/dist/lib/builtins/subsf3.c
      vendor/compiler-rt/dist/lib/builtins/truncdfhf2.c
      vendor/compiler-rt/dist/lib/builtins/truncdfsf2.c
      vendor/compiler-rt/dist/lib/builtins/truncsfhf2.c
      vendor/compiler-rt/dist/lib/builtins/udivsi3.c
      vendor/compiler-rt/dist/lib/esan/esan_interceptors.cpp
      vendor/compiler-rt/dist/lib/lsan/lsan_allocator.h
      vendor/compiler-rt/dist/lib/lsan/lsan_common_linux.cc
      vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc
      vendor/compiler-rt/dist/lib/msan/msan_allocator.cc
      vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc
      vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc
      vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_internal.h
      vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h
      vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc
      vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc
      vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h
      vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps.h
      vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_linux.cc
      vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_mac.cc
      vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc
      vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
      vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h
      vendor/compiler-rt/dist/lib/scudo/scudo_allocator.cpp
      vendor/compiler-rt/dist/lib/scudo/scudo_allocator.h
      vendor/compiler-rt/dist/lib/scudo/scudo_allocator_secondary.h
      vendor/compiler-rt/dist/lib/scudo/scudo_crc32.cpp
      vendor/compiler-rt/dist/lib/scudo/scudo_utils.h
      vendor/compiler-rt/dist/lib/tsan/check_analyze.sh
      vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.h
      vendor/compiler-rt/dist/lib/xray/xray_AArch64.cc
      vendor/compiler-rt/dist/lib/xray/xray_arm.cc
      vendor/compiler-rt/dist/lib/xray/xray_fdr_log_records.h
      vendor/compiler-rt/dist/lib/xray/xray_fdr_logging.cc
      vendor/compiler-rt/dist/lib/xray/xray_fdr_logging_impl.h
      vendor/compiler-rt/dist/lib/xray/xray_interface.cc
      vendor/compiler-rt/dist/lib/xray/xray_interface_internal.h
      vendor/compiler-rt/dist/lib/xray/xray_mips.cc
      vendor/compiler-rt/dist/lib/xray/xray_mips64.cc
      vendor/compiler-rt/dist/lib/xray/xray_powerpc64.cc
      vendor/compiler-rt/dist/lib/xray/xray_trampoline_powerpc64_asm.S
      vendor/compiler-rt/dist/lib/xray/xray_trampoline_x86_64.S
      vendor/compiler-rt/dist/lib/xray/xray_x86_64.cc
      vendor/compiler-rt/dist/test/asan/CMakeLists.txt
      vendor/compiler-rt/dist/test/asan/lit.cfg
      vendor/compiler-rt/dist/test/dfsan/custom.cc
      vendor/compiler-rt/dist/test/lsan/TestCases/link_turned_off.cc
      vendor/compiler-rt/dist/test/lsan/TestCases/recoverable_leak_check.cc
      vendor/compiler-rt/dist/test/lsan/lit.common.cfg
      vendor/compiler-rt/dist/test/msan/chained_origin_memcpy.cc
      vendor/compiler-rt/dist/test/msan/wcsncpy.cc
      vendor/compiler-rt/dist/test/safestack/canary.c
      vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc
      vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc
      vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/missing_return.cpp
      vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/misaligned.cpp
      vendor/compiler-rt/dist/test/ubsan/lit.common.cfg
      vendor/compiler-rt/dist/test/xray/TestCases/Linux/coverage-sample.cc
      vendor/compiler-rt/dist/test/xray/TestCases/Linux/func-id-utils.cc
    
    Modified: vendor/compiler-rt/dist/CMakeLists.txt
    ==============================================================================
    --- vendor/compiler-rt/dist/CMakeLists.txt	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/CMakeLists.txt	Tue May 16 19:47:19 2017	(r318372)
    @@ -31,6 +31,9 @@ mark_as_advanced(COMPILER_RT_BUILD_SANIT
     option(COMPILER_RT_BUILD_XRAY "Build xray" ON)
     mark_as_advanced(COMPILER_RT_BUILD_XRAY)
     
    +set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN
    +  "Build for a bare-metal target.")
    +
     if (COMPILER_RT_STANDALONE_BUILD)
       load_llvm_config()
     
    @@ -239,14 +242,24 @@ set(COMPILER_RT_LIBCXX_PATH ${LLVM_MAIN_
     if(EXISTS ${COMPILER_RT_LIBCXX_PATH}/)
       set(COMPILER_RT_HAS_LIBCXX_SOURCES TRUE)
     else()
    -  set(COMPILER_RT_HAS_LIBCXX_SOURCES FALSE)
    +  set(COMPILER_RT_LIBCXX_PATH ${LLVM_MAIN_SRC_DIR}/../libcxx)
    +  if(EXISTS ${COMPILER_RT_LIBCXX_PATH}/)
    +    set(COMPILER_RT_HAS_LIBCXX_SOURCES TRUE)
    +  else()
    +    set(COMPILER_RT_HAS_LIBCXX_SOURCES FALSE)
    +  endif()
     endif()
     
     set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld)
     if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
       set(COMPILER_RT_HAS_LLD TRUE)
     else()
    -  set(COMPILER_RT_HAS_LLD FALSE)
    +  set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/../lld)
    +  if(EXISTS ${COMPILER_RT_LLD_PATH}/)
    +    set(COMPILER_RT_HAS_LLD TRUE)
    +  else()
    +    set(COMPILER_RT_HAS_LLD FALSE)
    +  endif()
     endif()
     pythonize_bool(COMPILER_RT_HAS_LLD)
     
    
    Modified: vendor/compiler-rt/dist/cmake/config-ix.cmake
    ==============================================================================
    --- vendor/compiler-rt/dist/cmake/config-ix.cmake	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/cmake/config-ix.cmake	Tue May 16 19:47:19 2017	(r318372)
    @@ -476,7 +476,7 @@ else()
     endif()
     
     if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_SUPPORTED_ARCH AND
    -    OS_NAME MATCHES "Linux|FreeBSD")
    +    OS_NAME MATCHES "Darwin|Linux|FreeBSD")
       set(COMPILER_RT_HAS_LSAN TRUE)
     else()
       set(COMPILER_RT_HAS_LSAN FALSE)
    
    Modified: vendor/compiler-rt/dist/include/xray/xray_interface.h
    ==============================================================================
    --- vendor/compiler-rt/dist/include/xray/xray_interface.h	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/include/xray/xray_interface.h	Tue May 16 19:47:19 2017	(r318372)
    @@ -1,4 +1,4 @@
    -//===-- xray_interface.h ----------------------------------------*- C++ -*-===//
    +//===- xray_interface.h -----------------------------------------*- C++ -*-===//
     //
     //                     The LLVM Compiler Infrastructure
     //
    @@ -11,11 +11,12 @@
     //
     // APIs for controlling XRay functionality explicitly.
     //===----------------------------------------------------------------------===//
    +
     #ifndef XRAY_XRAY_INTERFACE_H
     #define XRAY_XRAY_INTERFACE_H
     
    +#include 
     #include 
    -#include 
     
     extern "C" {
     
    @@ -25,6 +26,7 @@ enum XRayEntryType {
       EXIT = 1,
       TAIL = 2,
       LOG_ARGS_ENTRY = 3,
    +  CUSTOM_EVENT = 4,
     };
     
     /// Provide a function to invoke for when instrumentation points are hit. This
    @@ -64,6 +66,9 @@ extern int __xray_set_handler_arg1(void 
     /// Returns 1 on success, 0 on error.
     extern int __xray_remove_handler_arg1();
     
    +/// Provide a function to invoke when XRay encounters a custom event.
    +extern int __xray_set_customevent_handler(void (*entry)(void*, std::size_t));
    +
     enum XRayPatchingStatus {
       NOT_INITIALIZED = 0,
       SUCCESS = 1,
    @@ -96,6 +101,6 @@ extern uintptr_t __xray_function_address
     /// encounter errors (when there are no instrumented functions, etc.).
     extern size_t __xray_max_function_id();
     
    -}
    +} // end extern "C"
     
    -#endif
    +#endif // XRAY_XRAY_INTERFACE_H
    
    Modified: vendor/compiler-rt/dist/lib/asan/asan_allocator.h
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/asan/asan_allocator.h	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/asan/asan_allocator.h	Tue May 16 19:47:19 2017	(r318372)
    @@ -161,10 +161,17 @@ typedef FlatByteMap ByteMap
     typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap;
     # endif
     typedef CompactSizeClassMap SizeClassMap;
    -typedef SizeClassAllocator32<0, SANITIZER_MMAP_RANGE_SIZE, 16,
    -  SizeClassMap, kRegionSizeLog,
    -  ByteMap,
    -  AsanMapUnmapCallback> PrimaryAllocator;
    +struct AP32 {
    +  static const uptr kSpaceBeg = 0;
    +  static const u64 kSpaceSize = SANITIZER_MMAP_RANGE_SIZE;
    +  static const uptr kMetadataSize = 16;
    +  typedef __asan::SizeClassMap SizeClassMap;
    +  static const uptr kRegionSizeLog = __asan::kRegionSizeLog;
    +  typedef __asan::ByteMap ByteMap;
    +  typedef AsanMapUnmapCallback MapUnmapCallback;
    +  static const uptr kFlags = 0;
    +};
    +typedef SizeClassAllocator32 PrimaryAllocator;
     #endif  // SANITIZER_CAN_USE_ALLOCATOR64
     
     static const uptr kNumberOfSizeClasses = SizeClassMap::kNumClasses;
    
    Modified: vendor/compiler-rt/dist/lib/asan/asan_flags.cc
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/asan/asan_flags.cc	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/asan/asan_flags.cc	Tue May 16 19:47:19 2017	(r318372)
    @@ -194,6 +194,10 @@ void InitializeFlags() {
         Report("WARNING: strchr* interceptors are enabled even though "
                "replace_str=0. Use intercept_strchr=0 to disable them.");
       }
    +  if (!f->replace_str && common_flags()->intercept_strndup) {
    +    Report("WARNING: strndup* interceptors are enabled even though "
    +           "replace_str=0. Use intercept_strndup=0 to disable them.");
    +  }
     }
     
     }  // namespace __asan
    
    Modified: vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc	Tue May 16 19:47:19 2017	(r318372)
    @@ -154,6 +154,27 @@ TEST(AddressSanitizer, MAYBE_StrDupOOBTe
       free(str);
     }
     
    +#if SANITIZER_TEST_HAS_STRNDUP
    +TEST(AddressSanitizer, MAYBE_StrNDupOOBTest) {
    +  size_t size = Ident(42);
    +  char *str = MallocAndMemsetString(size);
    +  char *new_str;
    +  // Normal strndup calls.
    +  str[size - 1] = '\0';
    +  new_str = strndup(str, size - 13);
    +  free(new_str);
    +  new_str = strndup(str + size - 1, 13);
    +  free(new_str);
    +  // Argument points to not allocated memory.
    +  EXPECT_DEATH(Ident(strndup(str - 1, 13)), LeftOOBReadMessage(1));
    +  EXPECT_DEATH(Ident(strndup(str + size, 13)), RightOOBReadMessage(0));
    +  // Overwrite the terminating '\0' and hit unallocated memory.
    +  str[size - 1] = 'z';
    +  EXPECT_DEATH(Ident(strndup(str, size + 13)), RightOOBReadMessage(0));
    +  free(str);
    +}
    +#endif // SANITIZER_TEST_HAS_STRNDUP
    +
     TEST(AddressSanitizer, StrCpyOOBTest) {
       size_t to_size = Ident(30);
       size_t from_size = Ident(6);  // less than to_size
    
    Modified: vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt	Tue May 16 19:47:19 2017	(r318372)
    @@ -66,7 +66,6 @@ set(GENERIC_SOURCES
       divti3.c
       divtf3.c
       divxc3.c
    -  enable_execute_stack.c
       eprintf.c
       extendsfdf2.c
       extendhfsf2.c
    @@ -191,6 +190,12 @@ option(COMPILER_RT_EXCLUDE_ATOMIC_BUILTI
       "Skip the atomic builtin (this may be needed if system headers are unavailable)"
       Off)
     
    +if(NOT COMPILER_RT_BAREMETAL_BUILD)
    +  set(GENERIC_SOURCES
    +    ${GENERIC_SOURCES}
    +    enable_execute_stack.c)
    +endif()
    +
     if(COMPILER_RT_HAS_ATOMIC_KEYWORD AND NOT COMPILER_RT_EXCLUDE_ATOMIC_BUILTIN)
       set(GENERIC_SOURCES
         ${GENERIC_SOURCES}
    @@ -478,11 +483,18 @@ else ()
     
       foreach (arch ${BUILTIN_SUPPORTED_ARCH})
         if (CAN_TARGET_${arch})
    +      # NOTE: some architectures (e.g. i386) have multiple names.  Ensure that
    +      # we catch them all.
    +      set(_arch ${arch})
    +      if("${arch}" STREQUAL "i686")
    +        set(_arch "i386|i686")
    +      endif()
    +
           # Filter out generic versions of routines that are re-implemented in
           # architecture specific manner.  This prevents multiple definitions of the
           # same symbols, making the symbol selection non-deterministic.
           foreach (_file ${${arch}_SOURCES})
    -        if (${_file} MATCHES ${arch}/*)
    +        if (${_file} MATCHES ${_arch}/*)
               get_filename_component(_name ${_file} NAME)
               string(REPLACE ".S" ".c" _cname "${_name}")
               list(REMOVE_ITEM ${arch}_SOURCES ${_cname})
    
    Modified: vendor/compiler-rt/dist/lib/builtins/adddf3.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/adddf3.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/adddf3.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -15,8 +15,13 @@
     #define DOUBLE_PRECISION
     #include "fp_add_impl.inc"
     
    -ARM_EABI_FNALIAS(dadd, adddf3)
    -
     COMPILER_RT_ABI double __adddf3(double a, double b){
         return __addXf3__(a, b);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI double __aeabi_dadd(double a, double b) {
    +  return __adddf3(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/addsf3.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/addsf3.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/addsf3.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -15,8 +15,13 @@
     #define SINGLE_PRECISION
     #include "fp_add_impl.inc"
     
    -ARM_EABI_FNALIAS(fadd, addsf3)
    -
     COMPILER_RT_ABI float __addsf3(float a, float b) {
         return __addXf3__(a, b);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI float __aeabi_fadd(float a, float b) {
    +  return __addsf3(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cdcmpeq_check_nan.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cdcmpeq_check_nan.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cdcmpeq_check_nan.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -8,9 +8,9 @@
     //===----------------------------------------------------------------------===//
     
     #include 
    +#include "../int_lib.h"
     
    -__attribute__((pcs("aapcs")))
    -__attribute__((visibility("hidden")))
    +AEABI_RTABI __attribute__((visibility("hidden")))
     int __aeabi_cdcmpeq_check_nan(double a, double b) {
         return __builtin_isnan(a) || __builtin_isnan(b);
     }
    
    Modified: vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cfcmpeq_check_nan.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cfcmpeq_check_nan.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cfcmpeq_check_nan.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -8,9 +8,9 @@
     //===----------------------------------------------------------------------===//
     
     #include 
    +#include "../int_lib.h"
     
    -__attribute__((pcs("aapcs")))
    -__attribute__((visibility("hidden")))
    +AEABI_RTABI __attribute__((visibility("hidden")))
     int __aeabi_cfcmpeq_check_nan(float a, float b) {
         return __builtin_isnan(a) || __builtin_isnan(b);
     }
    
    Modified: vendor/compiler-rt/dist/lib/builtins/arm/aeabi_div0.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/arm/aeabi_div0.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/arm/aeabi_div0.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -26,16 +26,18 @@
      * line.
      */
     
    +#include "../int_lib.h"
    +
     /* provide an unused declaration to pacify pendantic compilation */
     extern unsigned char declaration;
     
     #if defined(__ARM_EABI__)
    -int __attribute__((weak)) __attribute__((visibility("hidden")))
    +AEABI_RTABI int __attribute__((weak)) __attribute__((visibility("hidden")))
     __aeabi_idiv0(int return_value) {
       return return_value;
     }
     
    -long long __attribute__((weak)) __attribute__((visibility("hidden")))
    +AEABI_RTABI long long __attribute__((weak)) __attribute__((visibility("hidden")))
     __aeabi_ldiv0(long long return_value) {
       return return_value;
     }
    
    Modified: vendor/compiler-rt/dist/lib/builtins/arm/aeabi_drsub.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/arm/aeabi_drsub.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/arm/aeabi_drsub.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -10,10 +10,10 @@
     #define DOUBLE_PRECISION
     #include "../fp_lib.h"
     
    -COMPILER_RT_ABI fp_t
    +AEABI_RTABI fp_t
     __aeabi_dsub(fp_t, fp_t);
     
    -COMPILER_RT_ABI fp_t
    +AEABI_RTABI fp_t
     __aeabi_drsub(fp_t a, fp_t b) {
         return __aeabi_dsub(b, a);
     }
    
    Modified: vendor/compiler-rt/dist/lib/builtins/arm/aeabi_frsub.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/arm/aeabi_frsub.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/arm/aeabi_frsub.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -10,10 +10,10 @@
     #define SINGLE_PRECISION
     #include "../fp_lib.h"
     
    -COMPILER_RT_ABI fp_t
    +AEABI_RTABI fp_t
     __aeabi_fsub(fp_t, fp_t);
     
    -COMPILER_RT_ABI fp_t
    +AEABI_RTABI fp_t
     __aeabi_frsub(fp_t a, fp_t b) {
         return __aeabi_fsub(b, a);
     }
    
    Modified: vendor/compiler-rt/dist/lib/builtins/ashldi3.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/ashldi3.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/ashldi3.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -18,8 +18,6 @@
     
     /* Precondition:  0 <= b < bits_in_dword */
     
    -ARM_EABI_FNALIAS(llsl, ashldi3)
    -
     COMPILER_RT_ABI di_int
     __ashldi3(di_int a, si_int b)
     {
    @@ -41,3 +39,10 @@ __ashldi3(di_int a, si_int b)
         }
         return result.all;
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI di_int __aeabi_llsl(di_int a, si_int b) {
    +  return __ashldi3(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/ashrdi3.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/ashrdi3.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/ashrdi3.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -18,8 +18,6 @@
     
     /* Precondition:  0 <= b < bits_in_dword */
     
    -ARM_EABI_FNALIAS(lasr, ashrdi3)
    -
     COMPILER_RT_ABI di_int
     __ashrdi3(di_int a, si_int b)
     {
    @@ -42,3 +40,10 @@ __ashrdi3(di_int a, si_int b)
         }
         return result.all;
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI di_int __aeabi_lasr(di_int a, si_int b) {
    +  return __ashrdi3(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/assembly.h
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/assembly.h	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/assembly.h	Tue May 16 19:47:19 2017	(r318372)
    @@ -44,7 +44,8 @@
     #endif
     #define CONST_SECTION .section .rodata
     
    -#if defined(__GNU__) || defined(__ANDROID__) || defined(__FreeBSD__)
    +#if defined(__GNU__) || defined(__FreeBSD__) || defined(__Fuchsia__) || \
    +    defined(__linux__)
     #define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits
     #else
     #define NO_EXEC_STACK_DIRECTIVE
    
    Modified: vendor/compiler-rt/dist/lib/builtins/comparedf2.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/comparedf2.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/comparedf2.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -113,8 +113,6 @@ __gedf2(fp_t a, fp_t b) {
         }
     }
     
    -ARM_EABI_FNALIAS(dcmpun, unorddf2)
    -
     COMPILER_RT_ABI int
     __unorddf2(fp_t a, fp_t b) {
         const rep_t aAbs = toRep(a) & absMask;
    @@ -144,3 +142,9 @@ __gtdf2(fp_t a, fp_t b) {
         return __gedf2(a, b);
     }
     
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI int __aeabi_dcmpun(fp_t a, fp_t b) {
    +  return __unorddf2(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/comparesf2.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/comparesf2.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/comparesf2.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -113,8 +113,6 @@ __gesf2(fp_t a, fp_t b) {
         }
     }
     
    -ARM_EABI_FNALIAS(fcmpun, unordsf2)
    -
     COMPILER_RT_ABI int
     __unordsf2(fp_t a, fp_t b) {
         const rep_t aAbs = toRep(a) & absMask;
    @@ -143,3 +141,10 @@ COMPILER_RT_ABI enum GE_RESULT
     __gtsf2(fp_t a, fp_t b) {
         return __gesf2(a, b);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI int __aeabi_fcmpun(fp_t a, fp_t b) {
    +  return __unordsf2(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/divdf3.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/divdf3.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/divdf3.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -19,8 +19,6 @@
     #define DOUBLE_PRECISION
     #include "fp_lib.h"
     
    -ARM_EABI_FNALIAS(ddiv, divdf3)
    -
     COMPILER_RT_ABI fp_t
     __divdf3(fp_t a, fp_t b) {
         
    @@ -183,3 +181,10 @@ __divdf3(fp_t a, fp_t b) {
             return result;
         }
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI fp_t __aeabi_ddiv(fp_t a, fp_t b) {
    +  return __divdf3(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/divsf3.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/divsf3.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/divsf3.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -19,8 +19,6 @@
     #define SINGLE_PRECISION
     #include "fp_lib.h"
     
    -ARM_EABI_FNALIAS(fdiv, divsf3)
    -
     COMPILER_RT_ABI fp_t
     __divsf3(fp_t a, fp_t b) {
         
    @@ -167,3 +165,10 @@ __divsf3(fp_t a, fp_t b) {
             return fromRep(absResult | quotientSign);
         }
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI fp_t __aeabi_fdiv(fp_t a, fp_t b) {
    +  return __divsf3(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/divsi3.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/divsi3.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/divsi3.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -16,8 +16,6 @@
     
     /* Returns: a / b */
     
    -ARM_EABI_FNALIAS(idiv, divsi3)
    -
     COMPILER_RT_ABI si_int
     __divsi3(si_int a, si_int b)
     {
    @@ -35,3 +33,10 @@ __divsi3(si_int a, si_int b)
          */
         return ((su_int)a/(su_int)b ^ s_a) - s_a;    /* negate if s_a == -1 */
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI si_int __aeabi_idiv(si_int a, si_int b) {
    +  return __divsi3(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/extendhfsf2.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/extendhfsf2.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/extendhfsf2.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -12,8 +12,6 @@
     #define DST_SINGLE
     #include "fp_extend_impl.inc"
     
    -ARM_EABI_FNALIAS(h2f, extendhfsf2)
    -
     // Use a forwarding definition and noinline to implement a poor man's alias,
     // as there isn't a good cross-platform way of defining one.
     COMPILER_RT_ABI NOINLINE float __extendhfsf2(uint16_t a) {
    @@ -23,3 +21,10 @@ COMPILER_RT_ABI NOINLINE float __extendh
     COMPILER_RT_ABI float __gnu_h2f_ieee(uint16_t a) {
         return __extendhfsf2(a);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI float __aeabi_h2f(uint16_t a) {
    +  return __extendhfsf2(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/extendsfdf2.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/extendsfdf2.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/extendsfdf2.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -12,8 +12,13 @@
     #define DST_DOUBLE
     #include "fp_extend_impl.inc"
     
    -ARM_EABI_FNALIAS(f2d, extendsfdf2)
    -
     COMPILER_RT_ABI double __extendsfdf2(float a) {
         return __extendXfYf2__(a);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI double __aeabi_f2d(float a) {
    +  return __extendsfdf2(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/fixdfdi.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/fixdfdi.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/fixdfdi.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -10,7 +10,6 @@
     
     #define DOUBLE_PRECISION
     #include "fp_lib.h"
    -ARM_EABI_FNALIAS(d2lz, fixdfdi)
     
     #ifndef __SOFT_FP__
     /* Support for systems that have hardware floating-point; can set the invalid
    @@ -44,3 +43,15 @@ __fixdfdi(fp_t a) {
     }
     
     #endif
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI di_int
    +#if defined(__SOFT_FP__)
    +__aeabi_d2lz(fp_t a) {
    +#else
    +__aeabi_d2lz(double a) {
    +#endif
    +  return __fixdfdi(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/fixdfsi.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/fixdfsi.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/fixdfsi.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -14,9 +14,14 @@ typedef si_int fixint_t;
     typedef su_int fixuint_t;
     #include "fp_fixint_impl.inc"
     
    -ARM_EABI_FNALIAS(d2iz, fixdfsi)
    -
     COMPILER_RT_ABI si_int
     __fixdfsi(fp_t a) {
         return __fixint(a);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI si_int __aeabi_d2iz(fp_t a) {
    +  return __fixdfsi(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/fixsfdi.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/fixsfdi.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/fixsfdi.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -11,8 +11,6 @@
     #define SINGLE_PRECISION
     #include "fp_lib.h"
     
    -ARM_EABI_FNALIAS(f2lz, fixsfdi)
    -
     #ifndef __SOFT_FP__
     /* Support for systems that have hardware floating-point; can set the invalid
      * flag as a side-effect of computation.
    @@ -45,3 +43,15 @@ __fixsfdi(fp_t a) {
     }
     
     #endif
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI di_int
    +#if defined(__SOFT_FP__)
    +__aeabi_f2lz(fp_t a) {
    +#else
    +__aeabi_f2lz(float a) {
    +#endif
    +  return __fixsfdi(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/fixsfsi.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/fixsfsi.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/fixsfsi.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -14,9 +14,14 @@ typedef si_int fixint_t;
     typedef su_int fixuint_t;
     #include "fp_fixint_impl.inc"
     
    -ARM_EABI_FNALIAS(f2iz, fixsfsi)
    -
     COMPILER_RT_ABI si_int
     __fixsfsi(fp_t a) {
         return __fixint(a);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI si_int __aeabi_f2iz(fp_t a) {
    +  return __fixsfsi(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/fixunsdfdi.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/fixunsdfdi.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/fixunsdfdi.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -11,8 +11,6 @@
     #define DOUBLE_PRECISION
     #include "fp_lib.h"
     
    -ARM_EABI_FNALIAS(d2ulz, fixunsdfdi)
    -
     #ifndef __SOFT_FP__
     /* Support for systems that have hardware floating-point; can set the invalid
      * flag as a side-effect of computation.
    @@ -42,3 +40,15 @@ __fixunsdfdi(fp_t a) {
     }
     
     #endif
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI du_int
    +#if defined(__SOFT_FP__)
    +__aeabi_d2ulz(fp_t a) {
    +#else
    +__aeabi_d2ulz(double a) {
    +#endif
    +  return __fixunsdfdi(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/fixunsdfsi.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/fixunsdfsi.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/fixunsdfsi.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -13,9 +13,14 @@
     typedef su_int fixuint_t;
     #include "fp_fixuint_impl.inc"
     
    -ARM_EABI_FNALIAS(d2uiz, fixunsdfsi)
    -
     COMPILER_RT_ABI su_int
     __fixunsdfsi(fp_t a) {
         return __fixuint(a);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI su_int __aeabi_d2uiz(fp_t a) {
    +  return __fixunsdfsi(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/fixunssfdi.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/fixunssfdi.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/fixunssfdi.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -11,8 +11,6 @@
     #define SINGLE_PRECISION
     #include "fp_lib.h"
     
    -ARM_EABI_FNALIAS(f2ulz, fixunssfdi)
    -
     #ifndef __SOFT_FP__
     /* Support for systems that have hardware floating-point; can set the invalid
      * flag as a side-effect of computation.
    @@ -43,3 +41,15 @@ __fixunssfdi(fp_t a) {
     }
     
     #endif
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI du_int
    +#if defined(__SOFT_FP__)
    +__aeabi_f2ulz(fp_t a) {
    +#else
    +__aeabi_f2ulz(float a) {
    +#endif
    +  return __fixunssfdi(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/fixunssfsi.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/fixunssfsi.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/fixunssfsi.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -17,9 +17,14 @@
     typedef su_int fixuint_t;
     #include "fp_fixuint_impl.inc"
     
    -ARM_EABI_FNALIAS(f2uiz, fixunssfsi)
    -
     COMPILER_RT_ABI su_int
     __fixunssfsi(fp_t a) {
         return __fixuint(a);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI su_int __aeabi_f2uiz(fp_t a) {
    +  return __fixunssfsi(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/floatdidf.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/floatdidf.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/floatdidf.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -22,8 +22,6 @@
     
     /* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
     
    -ARM_EABI_FNALIAS(l2d, floatdidf)
    -
     #ifndef __SOFT_FP__
     /* Support for systems that have hardware floating-point; we'll set the inexact flag
      * as a side-effect of this computation.
    @@ -105,3 +103,10 @@ __floatdidf(di_int a)
         return fb.f;
     }
     #endif
    +
    +#if defined(__AEABI__)
    +AEABI_RTABI double __aeabi_l2d(di_int a) {
    +  return __floatdidf(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/floatdisf.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/floatdisf.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/floatdisf.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -22,8 +22,6 @@
     
     #include "int_lib.h"
     
    -ARM_EABI_FNALIAS(l2f, floatdisf)
    -
     COMPILER_RT_ABI float
     __floatdisf(di_int a)
     {
    @@ -78,3 +76,10 @@ __floatdisf(di_int a)
                ((su_int)a & 0x007FFFFF);   /* mantissa */
         return fb.f;
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI float __aeabi_l2f(di_int a) {
    +  return __floatdisf(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/floatsidf.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/floatsidf.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/floatsidf.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -18,8 +18,6 @@
     
     #include "int_lib.h"
     
    -ARM_EABI_FNALIAS(i2d, floatsidf)
    -
     COMPILER_RT_ABI fp_t
     __floatsidf(int a) {
         
    @@ -51,3 +49,10 @@ __floatsidf(int a) {
         // Insert the sign bit and return
         return fromRep(result | sign);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI fp_t __aeabi_i2d(int a) {
    +  return __floatsidf(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/floatsisf.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/floatsisf.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/floatsisf.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -18,8 +18,6 @@
     
     #include "int_lib.h"
     
    -ARM_EABI_FNALIAS(i2f, floatsisf)
    -
     COMPILER_RT_ABI fp_t
     __floatsisf(int a) {
         
    @@ -57,3 +55,10 @@ __floatsisf(int a) {
         // Insert the sign bit and return
         return fromRep(result | sign);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI fp_t __aeabi_i2f(int a) {
    +  return __floatsisf(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/floatundidf.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/floatundidf.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/floatundidf.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -22,8 +22,6 @@
     
     #include "int_lib.h"
     
    -ARM_EABI_FNALIAS(ul2d, floatundidf)
    -
     #ifndef __SOFT_FP__
     /* Support for systems that have hardware floating-point; we'll set the inexact flag
      * as a side-effect of this computation.
    @@ -104,3 +102,10 @@ __floatundidf(du_int a)
         return fb.f;
     }
     #endif
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI double __aeabi_ul2d(du_int a) {
    +  return __floatundidf(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/floatundisf.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/floatundisf.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/floatundisf.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -22,8 +22,6 @@
     
     #include "int_lib.h"
     
    -ARM_EABI_FNALIAS(ul2f, floatundisf)
    -
     COMPILER_RT_ABI float
     __floatundisf(du_int a)
     {
    @@ -75,3 +73,10 @@ __floatundisf(du_int a)
                ((su_int)a & 0x007FFFFF);  /* mantissa */
         return fb.f;
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI float __aeabi_ul2f(du_int a) {
    +  return __floatundisf(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/floatunsidf.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/floatunsidf.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/floatunsidf.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -18,8 +18,6 @@
     
     #include "int_lib.h"
     
    -ARM_EABI_FNALIAS(ui2d, floatunsidf)
    -
     COMPILER_RT_ABI fp_t
     __floatunsidf(unsigned int a) {
         
    @@ -40,3 +38,10 @@ __floatunsidf(unsigned int a) {
         result += (rep_t)(exponent + exponentBias) << significandBits;
         return fromRep(result);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI fp_t __aeabi_ui2d(unsigned int a) {
    +  return __floatunsidf(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/floatunsisf.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/floatunsisf.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/floatunsisf.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -18,8 +18,6 @@
     
     #include "int_lib.h"
     
    -ARM_EABI_FNALIAS(ui2f, floatunsisf)
    -
     COMPILER_RT_ABI fp_t
     __floatunsisf(unsigned int a) {
         
    @@ -48,3 +46,10 @@ __floatunsisf(unsigned int a) {
         result += (rep_t)(exponent + exponentBias) << significandBits;
         return fromRep(result);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI fp_t __aeabi_ui2f(unsigned int a) {
    +  return __floatunsisf(a);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/int_lib.h
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/int_lib.h	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/int_lib.h	Tue May 16 19:47:19 2017	(r318372)
    @@ -30,18 +30,17 @@
     /* ABI macro definitions */
     
     #if __ARM_EABI__
    -# define ARM_EABI_FNALIAS(aeabi_name, name)         \
    -  void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
     # ifdef COMPILER_RT_ARMHF_TARGET
     #   define COMPILER_RT_ABI
     # else
    -#   define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
    +#   define COMPILER_RT_ABI __attribute__((__pcs__("aapcs")))
     # endif
     #else
    -# define ARM_EABI_FNALIAS(aeabi_name, name)
     # define COMPILER_RT_ABI
     #endif
     
    +#define AEABI_RTABI __attribute__((__pcs__("aapcs")))
    +
     #ifdef _MSC_VER
     #define ALWAYS_INLINE __forceinline
     #define NOINLINE __declspec(noinline)
    
    Modified: vendor/compiler-rt/dist/lib/builtins/lshrdi3.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/lshrdi3.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/lshrdi3.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -18,8 +18,6 @@
     
     /* Precondition:  0 <= b < bits_in_dword */
     
    -ARM_EABI_FNALIAS(llsr, lshrdi3)
    -
     COMPILER_RT_ABI di_int
     __lshrdi3(di_int a, si_int b)
     {
    @@ -41,3 +39,10 @@ __lshrdi3(di_int a, si_int b)
         }
         return result.all;
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI di_int __aeabi_llsr(di_int a, si_int b) {
    +  return __lshrdi3(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/muldf3.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/muldf3.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/muldf3.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -15,8 +15,13 @@
     #define DOUBLE_PRECISION
     #include "fp_mul_impl.inc"
     
    -ARM_EABI_FNALIAS(dmul, muldf3)
    -
     COMPILER_RT_ABI fp_t __muldf3(fp_t a, fp_t b) {
         return __mulXf3__(a, b);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI fp_t __aeabi_dmul(fp_t a, fp_t b) {
    +  return __muldf3(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/muldi3.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/muldi3.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/muldi3.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -40,8 +40,6 @@ __muldsi3(su_int a, su_int b)
     
     /* Returns: a * b */
     
    -ARM_EABI_FNALIAS(lmul, muldi3)
    -
     COMPILER_RT_ABI di_int
     __muldi3(di_int a, di_int b)
     {
    @@ -54,3 +52,10 @@ __muldi3(di_int a, di_int b)
         r.s.high += x.s.high * y.s.low + x.s.low * y.s.high;
         return r.all;
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI di_int __aeabi_lmul(di_int a, di_int b) {
    +  return __muldi3(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/mulsf3.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/mulsf3.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/mulsf3.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -15,8 +15,13 @@
     #define SINGLE_PRECISION
     #include "fp_mul_impl.inc"
     
    -ARM_EABI_FNALIAS(fmul, mulsf3)
    -
     COMPILER_RT_ABI fp_t __mulsf3(fp_t a, fp_t b) {
         return __mulXf3__(a, b);
     }
    +
    +#if defined(__ARM_EABI__)
    +AEABI_RTABI fp_t __aeabi_fmul(fp_t a, fp_t b) {
    +  return __mulsf3(a, b);
    +}
    +#endif
    +
    
    Modified: vendor/compiler-rt/dist/lib/builtins/negdf2.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/negdf2.c	Tue May 16 19:47:16 2017	(r318371)
    +++ vendor/compiler-rt/dist/lib/builtins/negdf2.c	Tue May 16 19:47:19 2017	(r318372)
    @@ -14,9 +14,14 @@
     #define DOUBLE_PRECISION
     #include "fp_lib.h"
     
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:47:29 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id F07C3D703AC;
     Tue, 16 May 2017 19:47:29 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id A52CB1E11;
     Tue, 16 May 2017 19:47:29 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJlS0P097137;
     Tue, 16 May 2017 19:47:28 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJlS3Y097136;
     Tue, 16 May 2017 19:47:28 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161947.v4GJlS3Y097136@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 19:47:28 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318373 - vendor/compiler-rt/compiler-rt-trunk-r303197
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:47:30 -0000
    
    Author: dim
    Date: Tue May 16 19:47:28 2017
    New Revision: 318373
    URL: https://svnweb.freebsd.org/changeset/base/318373
    
    Log:
      Tag compiler-rt trunk r303197.
    
    Added:
      vendor/compiler-rt/compiler-rt-trunk-r303197/
         - copied from r318372, vendor/compiler-rt/dist/
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:47:36 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A9EBD70402;
     Tue, 16 May 2017 19:47:36 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 2C9721EC5;
     Tue, 16 May 2017 19:47:36 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJlZsA097215;
     Tue, 16 May 2017 19:47:35 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJlWlL097184;
     Tue, 16 May 2017 19:47:32 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161947.v4GJlWlL097184@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 19:47:32 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318374 - in vendor/libc++/dist: . docs include
     include/experimental include/ext include/support/win32 src src/include
     src/support/runtime src/support/win32 test/libcxx/input.output/fil...
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:47:36 -0000
    
    Author: dim
    Date: Tue May 16 19:47:31 2017
    New Revision: 318374
    URL: https://svnweb.freebsd.org/changeset/base/318374
    
    Log:
      Vendor import of libc++ trunk r303197:
      https://llvm.org/svn/llvm-project/libcxx/trunk@303197
    
    Added:
      vendor/libc++/dist/appveyor-reqs-install.cmd
      vendor/libc++/dist/include/support/win32/limits_msvc_win32.h   (contents, props changed)
      vendor/libc++/dist/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/
      vendor/libc++/dist/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/fopen.fail.cpp   (contents, props changed)
      vendor/libc++/dist/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/rename.fail.cpp   (contents, props changed)
      vendor/libc++/dist/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp   (contents, props changed)
      vendor/libc++/dist/test/libcxx/thread/thread.threads/thread.thread.this/
      vendor/libc++/dist/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp   (contents, props changed)
      vendor/libc++/dist/test/libcxx/utilities/function.objects/refwrap/
      vendor/libc++/dist/test/libcxx/utilities/function.objects/refwrap/binary.pass.cpp   (contents, props changed)
      vendor/libc++/dist/test/libcxx/utilities/function.objects/refwrap/unary.pass.cpp   (contents, props changed)
      vendor/libc++/dist/test/libcxx/utilities/template.bitset/includes.pass.cpp   (contents, props changed)
      vendor/libc++/dist/test/libcxx/utilities/tuple/tuple.tuple/empty_member.pass.cpp   (contents, props changed)
      vendor/libc++/dist/test/std/language.support/support.types/byteops/enum_direct_init.pass.cpp   (contents, props changed)
      vendor/libc++/dist/test/std/thread/thread.threads/thread.thread.this/sleep_for_tested_elsewhere.pass.cpp   (contents, props changed)
      vendor/libc++/dist/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp   (contents, props changed)
    Deleted:
      vendor/libc++/dist/include/support/win32/limits_win32.h
      vendor/libc++/dist/include/support/win32/locale_mgmt_win32.h
      vendor/libc++/dist/include/support/win32/support.h
      vendor/libc++/dist/install-appveyor-reqs.cmd
      vendor/libc++/dist/test/std/input.output/file.streams/c.files/no.global.filesystem.namespace/fopen.fail.cpp
      vendor/libc++/dist/test/std/input.output/file.streams/c.files/no.global.filesystem.namespace/lit.local.cfg
      vendor/libc++/dist/test/std/input.output/file.streams/c.files/no.global.filesystem.namespace/rename.fail.cpp
      vendor/libc++/dist/test/std/strings/string.view/string.view.modifiers/clear.pass.cpp
      vendor/libc++/dist/test/std/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
      vendor/libc++/dist/test/std/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
      vendor/libc++/dist/test/std/utilities/function.objects/refwrap/binary.pass.cpp
      vendor/libc++/dist/test/std/utilities/function.objects/refwrap/unary.pass.cpp
      vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/empty_member.pass.cpp
    Modified:
      vendor/libc++/dist/appveyor.yml
      vendor/libc++/dist/docs/CMakeLists.txt
      vendor/libc++/dist/docs/TestingLibcxx.rst
      vendor/libc++/dist/include/__bsd_locale_fallbacks.h
      vendor/libc++/dist/include/__config
      vendor/libc++/dist/include/__locale
      vendor/libc++/dist/include/__mutex_base
      vendor/libc++/dist/include/__threading_support
      vendor/libc++/dist/include/__undef_min_max
      vendor/libc++/dist/include/algorithm
      vendor/libc++/dist/include/ctype.h
      vendor/libc++/dist/include/experimental/numeric
      vendor/libc++/dist/include/ext/hash_map
      vendor/libc++/dist/include/ext/hash_set
      vendor/libc++/dist/include/limits
      vendor/libc++/dist/include/locale
      vendor/libc++/dist/include/memory
      vendor/libc++/dist/include/numeric
      vendor/libc++/dist/include/stdio.h
      vendor/libc++/dist/include/stdlib.h
      vendor/libc++/dist/include/string_view
      vendor/libc++/dist/include/support/win32/locale_win32.h
      vendor/libc++/dist/include/variant
      vendor/libc++/dist/include/wchar.h
      vendor/libc++/dist/src/include/atomic_support.h
      vendor/libc++/dist/src/locale.cpp
      vendor/libc++/dist/src/string.cpp
      vendor/libc++/dist/src/support/runtime/exception_pointer_msvc.ipp
      vendor/libc++/dist/src/support/win32/locale_win32.cpp
      vendor/libc++/dist/src/thread.cpp
      vendor/libc++/dist/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.prop.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/and.assign.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/and.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/lshift.fail.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/lshift.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/not.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/or.assign.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/or.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/rshift.fail.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/rshift.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/to_integer.fail.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/to_integer.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/xor.assign.pass.cpp
      vendor/libc++/dist/test/std/language.support/support.types/byteops/xor.pass.cpp
      vendor/libc++/dist/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp
      vendor/libc++/dist/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp
      vendor/libc++/dist/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp
      vendor/libc++/dist/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp
      vendor/libc++/dist/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp
      vendor/libc++/dist/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp
      vendor/libc++/dist/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp
      vendor/libc++/dist/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
      vendor/libc++/dist/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
      vendor/libc++/dist/test/std/re/re.traits/lookup_classname.pass.cpp
      vendor/libc++/dist/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp
      vendor/libc++/dist/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp
      vendor/libc++/dist/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
      vendor/libc++/dist/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
      vendor/libc++/dist/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target.pass.cpp
      vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
      vendor/libc++/dist/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp
      vendor/libc++/dist/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp
      vendor/libc++/dist/test/std/utilities/template.bitset/includes.pass.cpp
      vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp
      vendor/libc++/dist/test/std/utilities/utility/pairs/pairs.pair/dtor.pass.cpp
      vendor/libc++/dist/test/std/utilities/variant/variant.visit/visit.pass.cpp
      vendor/libc++/dist/test/support/archetypes.hpp
      vendor/libc++/dist/test/support/archetypes.ipp
      vendor/libc++/dist/test/support/filesystem_dynamic_test_helper.py
      vendor/libc++/dist/test/support/filesystem_test_helper.hpp
      vendor/libc++/dist/test/support/msvc_stdlib_force_include.hpp
      vendor/libc++/dist/test/support/test_macros.h
      vendor/libc++/dist/test/support/test_workarounds.h
      vendor/libc++/dist/utils/libcxx/test/config.py
      vendor/libc++/dist/utils/libcxx/test/executor.py
      vendor/libc++/dist/utils/libcxx/test/format.py
      vendor/libc++/dist/www/cxx1z_status.html
    
    Added: vendor/libc++/dist/appveyor-reqs-install.cmd
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/libc++/dist/appveyor-reqs-install.cmd	Tue May 16 19:47:31 2017	(r318374)
    @@ -0,0 +1,53 @@
    +@echo on
    +
    +if NOT EXIST C:\projects\deps (
    +  mkdir C:\projects\deps
    +)
    +cd C:\projects\deps
    +
    +::###########################################################################
    +:: Setup Compiler
    +::###########################################################################
    +if NOT EXIST llvm-installer.exe (
    +  appveyor DownloadFile http://llvm.org/pre-releases/win-snapshots/LLVM-5.0.0-r301646-win32.exe -FileName llvm-installer.exe
    +)
    +if "%CLANG_VERSION%"=="ToT" (
    +    START /WAIT llvm-installer.exe /S /D=C:\"Program Files\LLVM"
    +)
    +if DEFINED CLANG_VERSION  @set PATH="C:\Program Files\LLVM\bin";%PATH%
    +if DEFINED CLANG_VERSION  clang-cl -v
    +
    +if DEFINED MINGW_PATH rename "C:\Program Files\Git\usr\bin\sh.exe" "sh-ignored.exe"
    +if DEFINED MINGW_PATH @set "PATH=%PATH:C:\Program Files (x86)\Git\bin=%"
    +if DEFINED MINGW_PATH @set "PATH=%PATH%;%MINGW_PATH%"
    +if DEFINED MINGW_PATH g++ -v
    +
    +::###########################################################################
    +:: Install a recent CMake
    +::###########################################################################
    +if NOT EXIST cmake (
    +  appveyor DownloadFile https://cmake.org/files/v3.7/cmake-3.7.2-win64-x64.zip -FileName cmake.zip
    +  7z x cmake.zip -oC:\projects\deps > nul
    +  move C:\projects\deps\cmake-* C:\projects\deps\cmake
    +  rm cmake.zip
    +)
    +@set PATH=C:\projects\deps\cmake\bin;%PATH%
    +cmake --version
    +
    +::###########################################################################
    +:: Install Ninja
    +::###########################################################################
    +if NOT EXIST ninja (
    +  appveyor DownloadFile https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip -FileName ninja.zip
    +  7z x ninja.zip -oC:\projects\deps\ninja > nul
    +  rm ninja.zip
    +)
    +@set PATH=C:\projects\deps\ninja;%PATH%
    +ninja --version
    +
    +::###########################################################################
    +:: Setup the cached copy of LLVM
    +::###########################################################################
    +git clone --depth=1 http://llvm.org/git/llvm.git
    +
    +@echo off
    
    Modified: vendor/libc++/dist/appveyor.yml
    ==============================================================================
    --- vendor/libc++/dist/appveyor.yml	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/appveyor.yml	Tue May 16 19:47:31 2017	(r318374)
    @@ -11,24 +11,35 @@ configuration:
     environment:
       matrix:
         - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
    +      CMAKE_OPTIONS: -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe
           CLANG_VERSION: ToT
           MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat
           MSVC_SETUP_ARG: x86
    +      GENERATOR: Ninja
    +      MAKE_PROGRAM: ninja
           APPVEYOR_SAVE_CACHE_ON_ERROR: true
         - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
    +      CMAKE_OPTIONS: -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe
           CLANG_VERSION: 4
           MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
           MSVC_SETUP_ARG: x86_amd64
    +      GENERATOR: Ninja
    +      MAKE_PROGRAM: ninja
    +      APPVEYOR_SAVE_CACHE_ON_ERROR: true
    +    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
    +      MINGW_PATH: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin
    +      GENERATOR: MinGW Makefiles
    +      MAKE_PROGRAM: mingw32-make
           APPVEYOR_SAVE_CACHE_ON_ERROR: true
     
     install:
       ############################################################################
       # All external dependencies are installed in C:\projects\deps
       ############################################################################
    -  - call "%APPVEYOR_BUILD_FOLDER%\\install-appveyor-reqs.cmd"
    +  - call "%APPVEYOR_BUILD_FOLDER%\\appveyor-reqs-install.cmd"
     
     before_build:
    -  - call "%MSVC_SETUP_PATH%" %MSVC_SETUP_ARG%
    +  - if DEFINED MSVC_SETUP_PATH call "%MSVC_SETUP_PATH%" %MSVC_SETUP_ARG%
       - cd %APPVEYOR_BUILD_FOLDER%
     
     build_script:
    @@ -39,8 +50,7 @@ build_script:
       #############################################################################
       # Configuration Step
       #############################################################################
    -  - cmake -G Ninja %extra_cmake_flags%
    -    -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe
    +  - cmake -G "%GENERATOR%" %CMAKE_OPTIONS%
         "-DCMAKE_BUILD_TYPE=%configuration%"
         "-DLLVM_PATH=C:\projects\deps\llvm" -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
         -DLLVM_LIT_ARGS="-sv --show-xfail --show-unsupported"
    @@ -49,10 +59,10 @@ build_script:
       #############################################################################
       # Build Step
       #############################################################################
    -  - ninja
    +  - "%MAKE_PROGRAM%"
     
     test_script:
    -  - ninja check-cxx
    +  - "%MAKE_PROGRAM% check-cxx"
     
     on_failure:
       - appveyor PushArtifact CMakeFiles/CMakeOutput.log
    
    Modified: vendor/libc++/dist/docs/CMakeLists.txt
    ==============================================================================
    --- vendor/libc++/dist/docs/CMakeLists.txt	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/docs/CMakeLists.txt	Tue May 16 19:47:31 2017	(r318374)
    @@ -1,9 +1,9 @@
     
     if (LLVM_ENABLE_SPHINX)
    +  include(AddSphinxTarget)
       if (SPHINX_FOUND)
    -    include(AddSphinxTarget)
         if (${SPHINX_OUTPUT_HTML})
           add_sphinx_target(html libcxx)
         endif()
       endif()
    -endif()
    \ No newline at end of file
    +endif()
    
    Modified: vendor/libc++/dist/docs/TestingLibcxx.rst
    ==============================================================================
    --- vendor/libc++/dist/docs/TestingLibcxx.rst	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/docs/TestingLibcxx.rst	Tue May 16 19:47:31 2017	(r318374)
    @@ -119,7 +119,7 @@ configuration. Passing the option on the
     .. option:: libcxx_site_config=
     
       Specify the site configuration to use when running the tests.  This option
    -  overrides the enviroment variable LIBCXX_SITE_CONFIG.
    +  overrides the environment variable LIBCXX_SITE_CONFIG.
     
     .. option:: cxx_headers=
     
    
    Modified: vendor/libc++/dist/include/__bsd_locale_fallbacks.h
    ==============================================================================
    --- vendor/libc++/dist/include/__bsd_locale_fallbacks.h	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/__bsd_locale_fallbacks.h	Tue May 16 19:47:31 2017	(r318374)
    @@ -19,27 +19,24 @@
     
     _LIBCPP_BEGIN_NAMESPACE_STD
     
    -typedef _VSTD::remove_pointer::type __use_locale_struct;
    -typedef _VSTD::unique_ptr<__use_locale_struct, decltype(&uselocale)> __locale_raii;
    -
     inline _LIBCPP_ALWAYS_INLINE
     decltype(MB_CUR_MAX) __libcpp_mb_cur_max_l(locale_t __l)
     {
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         return MB_CUR_MAX;
     }
     
     inline _LIBCPP_ALWAYS_INLINE
     wint_t __libcpp_btowc_l(int __c, locale_t __l)
     {
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         return btowc(__c);
     }
     
     inline _LIBCPP_ALWAYS_INLINE
     int __libcpp_wctob_l(wint_t __c, locale_t __l)
     {
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         return wctob(__c);
     }
     
    @@ -47,14 +44,14 @@ inline _LIBCPP_ALWAYS_INLINE
     size_t __libcpp_wcsnrtombs_l(char *__dest, const wchar_t **__src, size_t __nwc,
                              size_t __len, mbstate_t *__ps, locale_t __l)
     {
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         return wcsnrtombs(__dest, __src, __nwc, __len, __ps);
     }
     
     inline _LIBCPP_ALWAYS_INLINE
     size_t __libcpp_wcrtomb_l(char *__s, wchar_t __wc, mbstate_t *__ps, locale_t __l)
     {
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         return wcrtomb(__s, __wc, __ps);
     }
     
    @@ -62,7 +59,7 @@ inline _LIBCPP_ALWAYS_INLINE
     size_t __libcpp_mbsnrtowcs_l(wchar_t * __dest, const char **__src, size_t __nms,
                           size_t __len, mbstate_t *__ps, locale_t __l)
     {
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         return mbsnrtowcs(__dest, __src, __nms, __len, __ps);
     }
     
    @@ -70,28 +67,28 @@ inline _LIBCPP_ALWAYS_INLINE
     size_t __libcpp_mbrtowc_l(wchar_t *__pwc, const char *__s, size_t __n,
                        mbstate_t *__ps, locale_t __l)
     {
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         return mbrtowc(__pwc, __s, __n, __ps);
     }
     
     inline _LIBCPP_ALWAYS_INLINE
     int __libcpp_mbtowc_l(wchar_t *__pwc, const char *__pmb, size_t __max, locale_t __l)
     {
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         return mbtowc(__pwc, __pmb, __max);
     }
     
     inline _LIBCPP_ALWAYS_INLINE
     size_t __libcpp_mbrlen_l(const char *__s, size_t __n, mbstate_t *__ps, locale_t __l)
     {
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         return mbrlen(__s, __n, __ps);
     }
     
     inline _LIBCPP_ALWAYS_INLINE
     lconv *__libcpp_localeconv_l(locale_t __l)
     {
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         return localeconv();
     }
     
    @@ -99,7 +96,7 @@ inline _LIBCPP_ALWAYS_INLINE
     size_t __libcpp_mbsrtowcs_l(wchar_t *__dest, const char **__src, size_t __len,
                          mbstate_t *__ps, locale_t __l)
     {
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         return mbsrtowcs(__dest, __src, __len, __ps);
     }
     
    @@ -107,7 +104,7 @@ inline
     int __libcpp_snprintf_l(char *__s, size_t __n, locale_t __l, const char *__format, ...) {
         va_list __va;
         va_start(__va, __format);
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         int __res = vsnprintf(__s, __n, __format, __va);
         va_end(__va);
         return __res;
    @@ -117,7 +114,7 @@ inline
     int __libcpp_asprintf_l(char **__s, locale_t __l, const char *__format, ...) {
         va_list __va;
         va_start(__va, __format);
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         int __res = vasprintf(__s, __format, __va);
         va_end(__va);
         return __res;
    @@ -127,7 +124,7 @@ inline
     int __libcpp_sscanf_l(const char *__s, locale_t __l, const char *__format, ...) {
         va_list __va;
         va_start(__va, __format);
    -    __locale_raii __current( uselocale(__l), uselocale );
    +    __libcpp_locale_guard __current(__l);
         int __res = vsscanf(__s, __format, __va);
         va_end(__va);
         return __res;
    
    Modified: vendor/libc++/dist/include/__config
    ==============================================================================
    --- vendor/libc++/dist/include/__config	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/__config	Tue May 16 19:47:31 2017	(r318374)
    @@ -129,6 +129,12 @@
     
     #define __has_keyword(__x) !(__is_identifier(__x))
     
    +#ifdef __has_include
    +#define __libcpp_has_include(__x) __has_include(__x)
    +#else
    +#define __libcpp_has_include(__x) 0
    +#endif
    +
     #if defined(__clang__)
     #define _LIBCPP_COMPILER_CLANG
     # ifndef __apple_build_version__
    @@ -968,7 +974,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit
     #  if defined(__GNUC__) && ((__GNUC__ >= 5) || (__GNUC__ == 4 && \
        (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2))) && !defined(__GXX_RTTI)
     #    define _LIBCPP_NO_RTTI
    -#  elif defined(_LIBCPP_MSVC) && !defined(_CPPRTTI)
    +#  elif defined(_LIBCPP_COMPILER_MSVC) && !defined(_CPPRTTI)
     #    define _LIBCPP_NO_RTTI
     #  endif
     #endif
    @@ -980,6 +986,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit
     // Thread API
     #if !defined(_LIBCPP_HAS_NO_THREADS) && \
         !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && \
    +    !defined(_LIBCPP_HAS_THREAD_API_WIN32) && \
         !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
     # if defined(__FreeBSD__) || \
         defined(__Fuchsia__) || \
    @@ -987,7 +994,8 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit
         defined(__linux__) || \
         defined(__APPLE__) || \
         defined(__CloudABI__) || \
    -    defined(__sun__)
    +    defined(__sun__) || \
    +    (defined(__MINGW32__) && __libcpp_has_include())
     #   define _LIBCPP_HAS_THREAD_API_PTHREAD
     # elif defined(_LIBCPP_WIN32API)
     #  define _LIBCPP_HAS_THREAD_API_WIN32
    
    Modified: vendor/libc++/dist/include/__locale
    ==============================================================================
    --- vendor/libc++/dist/include/__locale	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/__locale	Tue May 16 19:47:31 2017	(r318374)
    @@ -49,6 +49,25 @@
     
     _LIBCPP_BEGIN_NAMESPACE_STD
     
    +#if !defined(_LIBCPP_LOCALE__L_EXTENSIONS) || defined(_LIBCPP_MSVCRT)
    +struct __libcpp_locale_guard {
    +  _LIBCPP_INLINE_VISIBILITY
    +  __libcpp_locale_guard(locale_t& __loc) : __old_loc_(uselocale(__loc)) {}
    +
    +  _LIBCPP_INLINE_VISIBILITY
    +  ~__libcpp_locale_guard() {
    +    if (__old_loc_)
    +      uselocale(__old_loc_);
    +  }
    +
    +  locale_t __old_loc_;
    +private:
    +  __libcpp_locale_guard(__libcpp_locale_guard const&);
    +  __libcpp_locale_guard& operator=(__libcpp_locale_guard const&);
    +};
    +#endif
    +
    +
     class _LIBCPP_TYPE_VIS locale;
     
     template 
    
    Modified: vendor/libc++/dist/include/__mutex_base
    ==============================================================================
    --- vendor/libc++/dist/include/__mutex_base	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/__mutex_base	Tue May 16 19:47:31 2017	(r318374)
    @@ -15,6 +15,7 @@
     #include 
     #include 
     #include <__threading_support>
    +#include <__undef_min_max>
     
     #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
     #pragma GCC system_header
    
    Modified: vendor/libc++/dist/include/__threading_support
    ==============================================================================
    --- vendor/libc++/dist/include/__threading_support	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/__threading_support	Tue May 16 19:47:31 2017	(r318374)
    @@ -30,6 +30,7 @@
     #include 
     #include 
     #include 
    +#include <__undef_min_max>
     #endif
     
     #if defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \
    
    Modified: vendor/libc++/dist/include/__undef_min_max
    ==============================================================================
    --- vendor/libc++/dist/include/__undef_min_max	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/__undef_min_max	Tue May 16 19:47:31 2017	(r318374)
    @@ -10,7 +10,7 @@
     
     #ifdef min
     #if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
    -#if defined(_LIBCPP_MSVC)
    +#if defined(_LIBCPP_WARNING)
     _LIBCPP_WARNING("macro min is incompatible with C++.  Try #define NOMINMAX "
                     "before any Windows header. #undefing min")
     #else
    @@ -22,7 +22,7 @@ _LIBCPP_WARNING("macro min is incompatib
     
     #ifdef max
     #if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
    -#if defined(_LIBCPP_MSVC)
    +#if defined(_LIBCPP_WARNING)
     _LIBCPP_WARNING("macro max is incompatible with C++.  Try #define NOMINMAX "
                     "before any Windows header. #undefing max")
     #else
    
    Modified: vendor/libc++/dist/include/algorithm
    ==============================================================================
    --- vendor/libc++/dist/include/algorithm	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/algorithm	Tue May 16 19:47:31 2017	(r318374)
    @@ -644,8 +644,8 @@ template 
     #endif
     
     #include <__undef_min_max>
    @@ -783,51 +783,132 @@ struct __debug_less
     
     // Precondition:  __x != 0
     inline _LIBCPP_INLINE_VISIBILITY
    -unsigned
    -__ctz(unsigned __x)
    -{
    +unsigned __ctz(unsigned __x) {
    +#ifndef _LIBCPP_COMPILER_MSVC
         return static_cast(__builtin_ctz(__x));
    +#else
    +  static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
    +  static_assert(sizeof(unsigned long) == 4, "");
    +  unsigned long where;
    +  // Search from LSB to MSB for first set bit.
    +  // Returns zero if no set bit is found.
    +  if (_BitScanForward(&where, mask))
    +    return where;
    +  return 32;
    +#endif
     }
     
     inline _LIBCPP_INLINE_VISIBILITY
    -unsigned long
    -__ctz(unsigned long __x)
    -{
    +unsigned long __ctz(unsigned long __x) {
    +#ifndef _LIBCPP_COMPILER_MSVC
         return static_cast(__builtin_ctzl(__x));
    +#else
    +    static_assert(sizeof(unsigned long) == sizeof(unsigned), "");
    +    return __ctz(static_cast(__x));
    +#endif
     }
     
     inline _LIBCPP_INLINE_VISIBILITY
    -unsigned long long
    -__ctz(unsigned long long __x)
    -{
    +unsigned long long __ctz(unsigned long long __x) {
    +#ifndef _LIBCPP_COMPILER_MSVC
         return static_cast(__builtin_ctzll(__x));
    +#else
    +    unsigned long where;
    +// Search from LSB to MSB for first set bit.
    +// Returns zero if no set bit is found.
    +#if defined(_LIBCPP_HAS_BITSCAN64)
    +    (defined(_M_AMD64) || defined(__x86_64__))
    +  if (_BitScanForward64(&where, mask))
    +    return static_cast(where);
    +#else
    +  // Win32 doesn't have _BitScanForward64 so emulate it with two 32 bit calls.
    +  // Scan the Low Word.
    +  if (_BitScanForward(&where, static_cast(mask)))
    +    return where;
    +  // Scan the High Word.
    +  if (_BitScanForward(&where, static_cast(mask >> 32)))
    +    return where + 32; // Create a bit offset from the LSB.
    +#endif
    +  return 64;
    +#endif // _LIBCPP_COMPILER_MSVC
     }
     
     // Precondition:  __x != 0
     inline _LIBCPP_INLINE_VISIBILITY
    -unsigned
    -__clz(unsigned __x)
    -{
    +unsigned __clz(unsigned __x) {
    +#ifndef _LIBCPP_COMPILER_MSVC
         return static_cast(__builtin_clz(__x));
    +#else
    +  static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
    +  static_assert(sizeof(unsigned long) == 4, "");
    +  unsigned long where;
    +  // Search from LSB to MSB for first set bit.
    +  // Returns zero if no set bit is found.
    +  if (_BitScanReverse(&where, mask))
    +    return 31 - where;
    +  return 32; // Undefined Behavior.
    +#endif
     }
     
     inline _LIBCPP_INLINE_VISIBILITY
    -unsigned long
    -__clz(unsigned long __x)
    -{
    +unsigned long __clz(unsigned long __x) {
    +#ifndef _LIBCPP_COMPILER_MSVC
         return static_cast(__builtin_clzl (__x));
    +#else
    +    static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
    +    return __clz(static_cast(__x));
    +#endif
     }
     
     inline _LIBCPP_INLINE_VISIBILITY
    -unsigned long long
    -__clz(unsigned long long __x)
    -{
    +unsigned long long __clz(unsigned long long __x) {
    +#ifndef _LIBCPP_COMPILER_MSVC
         return static_cast(__builtin_clzll(__x));
    +#else
    +  unsigned long where;
    +// BitScanReverse scans from MSB to LSB for first set bit.
    +// Returns 0 if no set bit is found.
    +#if defined(_LIBCPP_HAS_BITSCAN64)
    +  if (_BitScanReverse64(&where, mask))
    +    return static_cast(63 - where);
    +#else
    +  // Scan the high 32 bits.
    +  if (_BitScanReverse(&where, static_cast(mask >> 32)))
    +    return 63 - (where + 32); // Create a bit offset from the MSB.
    +  // Scan the low 32 bits.
    +  if (_BitScanReverse(&where, static_cast(mask)))
    +    return 63 - where;
    +#endif
    +  return 64; // Undefined Behavior.
    +#endif // _LIBCPP_COMPILER_MSVC
    +}
    +
    +inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned __x) {
    +#ifndef _LIBCPP_COMPILER_MSVC
    +  return __builtin_popcount  (__x);
    +#else
    +  static_assert(sizeof(unsigned) == 4, "");
    +  return __popcnt(__x);
    +#endif
    +}
    +
    +inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned long __x) {
    +#ifndef _LIBCPP_COMPILER_MSVC
    +  return __builtin_popcountl (__x);
    +#else
    +  static_assert(sizeof(unsigned long) == 4, "");
    +  return __popcnt(__x);
    +#endif
     }
     
    -inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned           __x) {return __builtin_popcount  (__x);}
    -inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned      long __x) {return __builtin_popcountl (__x);}
    -inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned long long __x) {return __builtin_popcountll(__x);}
    +inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned long long __x) {
    +#ifndef _LIBCPP_COMPILER_MSVC
    +  return __builtin_popcountll(__x);
    +#else
    +  static_assert(sizeof(unsigned long long) == 8, "");
    +  return __popcnt64(__x);
    +#endif
    +}
     
     // all_of
     
    
    Modified: vendor/libc++/dist/include/ctype.h
    ==============================================================================
    --- vendor/libc++/dist/include/ctype.h	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/ctype.h	Tue May 16 19:47:31 2017	(r318374)
    @@ -40,15 +40,6 @@ int toupper(int c);
     
     #ifdef __cplusplus
     
    -#if defined(_LIBCPP_MSVCRT)
    -// We support including .h headers inside 'extern "C"' contexts, so switch
    -// back to C++ linkage before including these C++ headers.
    -extern "C++" {
    -  #include "support/win32/support.h"
    -  #include "support/win32/locale_win32.h"
    -}
    -#endif // _LIBCPP_MSVCRT
    -
     #undef isalnum
     #undef isalpha
     #undef isblank
    
    Modified: vendor/libc++/dist/include/experimental/numeric
    ==============================================================================
    --- vendor/libc++/dist/include/experimental/numeric	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/experimental/numeric	Tue May 16 19:47:31 2017	(r318374)
    @@ -66,11 +66,11 @@ struct __abs<_Result, _Source, false> {
     
     
     template
    -_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    -_Tp __gcd(_Tp __m, _Tp __n)
    +_LIBCPP_CONSTEXPR _LIBCPP_HIDDEN
    +inline _Tp __gcd(_Tp __m, _Tp __n)
     {
         static_assert((!is_signed<_Tp>::value), "" );
    -    return __n == 0 ? __m : __gcd<_Tp>(__n, __m % __n);
    +    return __n == 0 ? __m : _VSTD_LFTS_V2::__gcd<_Tp>(__n, __m % __n);
     }
     
     
    @@ -84,8 +84,9 @@ gcd(_Tp __m, _Up __n)
         static_assert((!is_same::type, bool>::value), "Second argument to gcd cannot be bool" );
         using _Rp = common_type_t<_Tp,_Up>;
         using _Wp = make_unsigned_t<_Rp>;
    -    return static_cast<_Rp>(__gcd(static_cast<_Wp>(__abs<_Rp, _Tp>()(__m)),
    -                                  static_cast<_Wp>(__abs<_Rp, _Up>()(__n))));
    +    return static_cast<_Rp>(_VSTD_LFTS_V2::__gcd(
    +      static_cast<_Wp>(__abs<_Rp, _Tp>()(__m)),
    +      static_cast<_Wp>(__abs<_Rp, _Up>()(__n))));
     }
     
     template
    @@ -100,7 +101,7 @@ lcm(_Tp __m, _Up __n)
             return 0;
     
         using _Rp = common_type_t<_Tp,_Up>;
    -    _Rp __val1 = __abs<_Rp, _Tp>()(__m) / gcd(__m, __n);
    +    _Rp __val1 = __abs<_Rp, _Tp>()(__m) / _VSTD_LFTS_V2::gcd(__m, __n);
         _Rp __val2 = __abs<_Rp, _Up>()(__n);
         _LIBCPP_ASSERT((numeric_limits<_Rp>::max() / __val1 > __val2), "Overflow in lcm");
         return __val1 * __val2;
    
    Modified: vendor/libc++/dist/include/ext/hash_map
    ==============================================================================
    --- vendor/libc++/dist/include/ext/hash_map	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/ext/hash_map	Tue May 16 19:47:31 2017	(r318374)
    @@ -207,7 +207,7 @@ template 
     
     #if __DEPRECATED
    -#if defined(_LIBCPP_MSVC)
    +#if defined(_LIBCPP_WARNING)
         _LIBCPP_WARNING("Use of the header  is deprecated.  Migrate to ")
     #else
     #   warning Use of the header  is deprecated.  Migrate to 
    
    Modified: vendor/libc++/dist/include/ext/hash_set
    ==============================================================================
    --- vendor/libc++/dist/include/ext/hash_set	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/ext/hash_set	Tue May 16 19:47:31 2017	(r318374)
    @@ -199,7 +199,7 @@ template 
     
     #if __DEPRECATED
    -#if defined(_LIBCPP_MSVC)
    +#if defined(_LIBCPP_WARNING)
         _LIBCPP_WARNING("Use of the header  is deprecated.  Migrate to ")
     #else
     #   warning Use of the header  is deprecated.  Migrate to 
    
    Modified: vendor/libc++/dist/include/limits
    ==============================================================================
    --- vendor/libc++/dist/include/limits	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/limits	Tue May 16 19:47:31 2017	(r318374)
    @@ -111,8 +111,8 @@ template<> class numeric_limits
     
    -#if defined(_LIBCPP_MSVCRT)
    -#include "support/win32/limits_win32.h"
    +#if defined(_LIBCPP_COMPILER_MSVC)
    +#include "support/win32/limits_msvc_win32.h"
     #endif // _LIBCPP_MSVCRT
     
     #if defined(__IBMCPP__)
    
    Modified: vendor/libc++/dist/include/locale
    ==============================================================================
    --- vendor/libc++/dist/include/locale	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/locale	Tue May 16 19:47:31 2017	(r318374)
    @@ -233,9 +233,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
     #define __cloc_defined
     #endif
     
    -typedef _VSTD::remove_pointer::type __locale_struct;
    -typedef _VSTD::unique_ptr<__locale_struct, decltype(&freelocale)> __locale_unique_ptr;
    -
     // __scan_keyword
     // Scans [__b, __e) until a match is found in the basic_strings range
     //  [__kb, __ke) or until it can be shown that there is no match in [__kb, __ke).
    
    Modified: vendor/libc++/dist/include/memory
    ==============================================================================
    --- vendor/libc++/dist/include/memory	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/memory	Tue May 16 19:47:31 2017	(r318374)
    @@ -996,11 +996,11 @@ struct __rebind_pointer {
     
     // allocator_traits
     
    -namespace __has_pointer_type_imp
    +struct __has_pointer_type_imp
     {
         template  static __two __test(...);
         template  static char __test(typename _Up::pointer* = 0);
    -}
    +};
     
     template 
     struct __has_pointer_type
    @@ -3924,7 +3924,10 @@ private:
     
         template 
             _LIBCPP_INLINE_VISIBILITY
    -        void
    +        typename enable_if*
    +        >::value,
    +            void>::type
             __enable_weak_this(const enable_shared_from_this<_Yp>* __e,
                                _OrigPtr* __ptr) _NOEXCEPT
             {
    @@ -3943,6 +3946,7 @@ private:
         template  friend class _LIBCPP_TEMPLATE_VIS weak_ptr;
     };
     
    +
     template
     inline
     _LIBCPP_CONSTEXPR
    
    Modified: vendor/libc++/dist/include/numeric
    ==============================================================================
    --- vendor/libc++/dist/include/numeric	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/numeric	Tue May 16 19:47:31 2017	(r318374)
    @@ -222,11 +222,11 @@ struct __abs<_Result, _Source, false> {
     
     
     template
    -_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    +_LIBCPP_CONSTEXPR _LIBCPP_HIDDEN
     _Tp __gcd(_Tp __m, _Tp __n)
     {
         static_assert((!is_signed<_Tp>::value), "");
    -    return __n == 0 ? __m : __gcd<_Tp>(__n, __m % __n);
    +    return __n == 0 ? __m : _VSTD::__gcd<_Tp>(__n, __m % __n);
     }
     
     
    @@ -240,8 +240,9 @@ gcd(_Tp __m, _Up __n)
         static_assert((!is_same::type, bool>::value), "Second argument to gcd cannot be bool" );
         using _Rp = common_type_t<_Tp,_Up>;
         using _Wp = make_unsigned_t<_Rp>;
    -    return static_cast<_Rp>(__gcd(static_cast<_Wp>(__abs<_Rp, _Tp>()(__m)),
    -                                  static_cast<_Wp>(__abs<_Rp, _Up>()(__n))));
    +    return static_cast<_Rp>(_VSTD::__gcd(
    +        static_cast<_Wp>(__abs<_Rp, _Tp>()(__m)),
    +        static_cast<_Wp>(__abs<_Rp, _Up>()(__n))));
     }
     
     template
    @@ -256,7 +257,7 @@ lcm(_Tp __m, _Up __n)
             return 0;
     
         using _Rp = common_type_t<_Tp,_Up>;
    -    _Rp __val1 = __abs<_Rp, _Tp>()(__m) / gcd(__m, __n);
    +    _Rp __val1 = __abs<_Rp, _Tp>()(__m) / _VSTD::gcd(__m, __n);
         _Rp __val2 = __abs<_Rp, _Up>()(__n);
         _LIBCPP_ASSERT((numeric_limits<_Rp>::max() / __val1 > __val2), "Overflow in lcm");
         return __val1 * __val2;
    
    Modified: vendor/libc++/dist/include/stdio.h
    ==============================================================================
    --- vendor/libc++/dist/include/stdio.h	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/stdio.h	Tue May 16 19:47:31 2017	(r318374)
    @@ -111,8 +111,9 @@ void perror(const char* s);
     
     // snprintf
     #if defined(_LIBCPP_MSVCRT)
    -extern "C++" {
    -#include "support/win32/support.h"
    +extern "C" {
    +int vasprintf(char **sptr, const char *__restrict fmt, va_list ap);
    +int asprintf(char **sptr, const char *__restrict fmt, ...);
     }
     #endif
     
    
    Modified: vendor/libc++/dist/include/stdlib.h
    ==============================================================================
    --- vendor/libc++/dist/include/stdlib.h	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/stdlib.h	Tue May 16 19:47:31 2017	(r318374)
    @@ -97,10 +97,6 @@ void *aligned_alloc(size_t alignment, si
     
     extern "C++" {
     
    -#ifdef _LIBCPP_MSVCRT
    -#include "support/win32/locale_win32.h"
    -#endif // _LIBCPP_MSVCRT
    -
     #undef abs
     #undef div
     #undef labs
    
    Modified: vendor/libc++/dist/include/string_view
    ==============================================================================
    --- vendor/libc++/dist/include/string_view	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/string_view	Tue May 16 19:47:31 2017	(r318374)
    @@ -103,7 +103,6 @@ namespace std {
           constexpr const_pointer data() const noexcept;
     
           // 7.7, basic_string_view modifiers
    -      constexpr void clear() noexcept;
           constexpr void remove_prefix(size_type n);
           constexpr void remove_suffix(size_type n);
           constexpr void swap(basic_string_view& s) noexcept;
    @@ -293,13 +292,6 @@ public:
     
     	// [string.view.modifiers], modifiers:
     	_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
    -	void clear() _NOEXCEPT
    -	{
    -		__data = nullptr;
    -		__size = 0;
    -	}
    -
    -	_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
     	void remove_prefix(size_type __n) _NOEXCEPT
     	{
     		_LIBCPP_ASSERT(__n <= size(), "remove_prefix() can't remove more than size()");
    
    Added: vendor/libc++/dist/include/support/win32/limits_msvc_win32.h
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/libc++/dist/include/support/win32/limits_msvc_win32.h	Tue May 16 19:47:31 2017	(r318374)
    @@ -0,0 +1,72 @@
    +// -*- C++ -*-
    +//===------------------ support/win32/limits_msvc_win32.h -----------------===//
    +//
    +//                     The LLVM Compiler Infrastructure
    +//
    +// This file is dual licensed under the MIT and the University of Illinois Open
    +// Source Licenses. See LICENSE.TXT for details.
    +//
    +//===----------------------------------------------------------------------===//
    +
    +#ifndef _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
    +#define _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
    +
    +#if !defined(_LIBCPP_MSVCRT)
    +#error "This header complements the Microsoft C Runtime library, and should not be included otherwise."
    +#endif
    +#if defined(__clang__)
    +#error "This header should only be included when using Microsofts C1XX frontend"
    +#endif
    +
    +#include  // CHAR_BIT
    +#include  // limit constants
    +#include  // HUGE_VAL
    +#include  // internal MSVC header providing the needed functionality
    +
    +#define __CHAR_BIT__       CHAR_BIT
    +
    +#define __FLT_MANT_DIG__   FLT_MANT_DIG
    +#define __FLT_DIG__        FLT_DIG
    +#define __FLT_RADIX__      FLT_RADIX
    +#define __FLT_MIN_EXP__    FLT_MIN_EXP
    +#define __FLT_MIN_10_EXP__ FLT_MIN_10_EXP
    +#define __FLT_MAX_EXP__    FLT_MAX_EXP
    +#define __FLT_MAX_10_EXP__ FLT_MAX_10_EXP
    +#define __FLT_MIN__        FLT_MIN
    +#define __FLT_MAX__        FLT_MAX
    +#define __FLT_EPSILON__    FLT_EPSILON
    +// predefined by MinGW GCC
    +#define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F
    +
    +#define __DBL_MANT_DIG__   DBL_MANT_DIG
    +#define __DBL_DIG__        DBL_DIG
    +#define __DBL_RADIX__      DBL_RADIX
    +#define __DBL_MIN_EXP__    DBL_MIN_EXP
    +#define __DBL_MIN_10_EXP__ DBL_MIN_10_EXP
    +#define __DBL_MAX_EXP__    DBL_MAX_EXP
    +#define __DBL_MAX_10_EXP__ DBL_MAX_10_EXP
    +#define __DBL_MIN__        DBL_MIN
    +#define __DBL_MAX__        DBL_MAX
    +#define __DBL_EPSILON__    DBL_EPSILON
    +// predefined by MinGW GCC
    +#define __DBL_DENORM_MIN__ double(4.94065645841246544177e-324L)
    +
    +#define __LDBL_MANT_DIG__   LDBL_MANT_DIG
    +#define __LDBL_DIG__        LDBL_DIG
    +#define __LDBL_RADIX__      LDBL_RADIX
    +#define __LDBL_MIN_EXP__    LDBL_MIN_EXP
    +#define __LDBL_MIN_10_EXP__ LDBL_MIN_10_EXP
    +#define __LDBL_MAX_EXP__    LDBL_MAX_EXP
    +#define __LDBL_MAX_10_EXP__ LDBL_MAX_10_EXP
    +#define __LDBL_MIN__        LDBL_MIN
    +#define __LDBL_MAX__        LDBL_MAX
    +#define __LDBL_EPSILON__    LDBL_EPSILON
    +// predefined by MinGW GCC
    +#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
    +
    +// __builtin replacements/workarounds
    +#define __builtin_huge_vall()    _LInf._Long_double
    +#define __builtin_nanl(__dummmy) _LNan._Long_double
    +#define __builtin_nansl(__dummy) _LSnan._Long_double
    +
    +#endif // _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
    
    Modified: vendor/libc++/dist/include/support/win32/locale_win32.h
    ==============================================================================
    --- vendor/libc++/dist/include/support/win32/locale_win32.h	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/support/win32/locale_win32.h	Tue May 16 19:47:31 2017	(r318374)
    @@ -12,9 +12,30 @@
     #define _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
     
     #include <__config>
    -#include "support/win32/support.h"
    -#include "support/win32/locale_mgmt_win32.h"
     #include 
    +#include  // _locale_t
    +
    +#define LC_COLLATE_MASK _M_COLLATE
    +#define LC_CTYPE_MASK _M_CTYPE
    +#define LC_MONETARY_MASK _M_MONETARY
    +#define LC_NUMERIC_MASK _M_NUMERIC
    +#define LC_TIME_MASK _M_TIME
    +#define LC_MESSAGES_MASK _M_MESSAGES
    +#define LC_ALL_MASK (  LC_COLLATE_MASK \
    +                     | LC_CTYPE_MASK \
    +                     | LC_MESSAGES_MASK \
    +                     | LC_MONETARY_MASK \
    +                     | LC_NUMERIC_MASK \
    +                     | LC_TIME_MASK )
    +
    +#define locale_t _locale_t
    +
    +// Locale management functions
    +#define freelocale _free_locale
    +// FIXME: base currently unused. Needs manual work to construct the new locale
    +locale_t newlocale( int mask, const char * locale, locale_t base );
    +locale_t uselocale( locale_t newloc );
    +
     
     lconv *localeconv_l( locale_t loc );
     size_t mbrlen_l( const char *__restrict s, size_t n,
    @@ -88,7 +109,6 @@ _LIBCPP_FUNC_VIS int snprintf_l(char *re
     _LIBCPP_FUNC_VIS int asprintf_l( char **ret, locale_t loc, const char *format, ... );
     _LIBCPP_FUNC_VIS int vasprintf_l( char **ret, locale_t loc, const char *format, va_list ap );
     
    -
     // not-so-pressing FIXME: use locale to determine blank characters
     inline int isblank_l( int c, locale_t /*loc*/ )
     {
    @@ -99,10 +119,4 @@ inline int iswblank_l( wint_t c, locale_
         return ( c == L' ' || c == L'\t' );
     }
     
    -#if defined(_LIBCPP_MSVCRT)
    -inline int isblank( int c, locale_t /*loc*/ )
    -{ return ( c == ' ' || c == '\t' ); }
    -inline int iswblank( wint_t c, locale_t /*loc*/ )
    -{ return ( c == L' ' || c == L'\t' ); }
    -#endif // _LIBCPP_MSVCRT
     #endif // _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
    
    Modified: vendor/libc++/dist/include/variant
    ==============================================================================
    --- vendor/libc++/dist/include/variant	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/variant	Tue May 16 19:47:31 2017	(r318374)
    @@ -425,30 +425,21 @@ struct __base {
         constexpr auto __fmatrix =
             __make_fmatrix<_Visitor&&,
                            decltype(_VSTD::forward<_Vs>(__vs).__as_base())...>();
    -    const size_t __indices[] = {__vs.index()...};
    -    return __at(__fmatrix, __indices)(_VSTD::forward<_Visitor>(__visitor),
    -                                      _VSTD::forward<_Vs>(__vs).__as_base()...);
    +    return __at(__fmatrix, __vs.index()...)(
    +        _VSTD::forward<_Visitor>(__visitor),
    +        _VSTD::forward<_Vs>(__vs).__as_base()...);
       }
     
     private:
       template 
       inline _LIBCPP_INLINE_VISIBILITY
    -  static constexpr const _Tp& __at_impl(const _Tp& __elem, const size_t*) {
    -    return __elem;
    -  }
    -
    -  template 
    -  inline _LIBCPP_INLINE_VISIBILITY
    -  static constexpr auto&& __at_impl(const array<_Tp, _Np>& __elems,
    -                                    const size_t* __index) {
    -    return __at_impl(__elems[*__index], __index + 1);
    -  }
    +  static constexpr const _Tp& __at(const _Tp& __elem) { return __elem; }
     
    -  template 
    +  template 
       inline _LIBCPP_INLINE_VISIBILITY
       static constexpr auto&& __at(const array<_Tp, _Np>& __elems,
    -                               const size_t (&__indices)[_Ip]) {
    -    return __at_impl(__elems, begin(__indices));
    +                               size_t __index, _Indices... __indices) {
    +    return __at(__elems[__index], __indices...);
       }
     
       template 
    @@ -1140,7 +1131,7 @@ public:
           : __impl(in_place_index<_Ip>, _VSTD::forward<_Arg>(__arg)) {}
     
       template  = 0,
    +            class = enable_if_t<(_Ip < sizeof...(_Types)), int>,
                 class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
                 enable_if_t, int> = 0>
       inline _LIBCPP_INLINE_VISIBILITY
    
    Modified: vendor/libc++/dist/include/wchar.h
    ==============================================================================
    --- vendor/libc++/dist/include/wchar.h	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/include/wchar.h	Tue May 16 19:47:31 2017	(r318374)
    @@ -166,9 +166,12 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP
     }
     #endif
     
    -#if defined(__cplusplus) && (defined(_LIBCPP_MSVCRT) || defined(__MINGW32__))
    -extern "C++" {
    -#include  // pull in *swprintf defines
    +#if defined(__cplusplus) && defined(_LIBCPP_MSVCRT)
    +extern "C" {
    +size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
    +                  size_t nmc, size_t len, mbstate_t *__restrict ps);
    +size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
    +                  size_t nwc, size_t len, mbstate_t *__restrict ps);
     }  // extern "C++"
     #endif  // __cplusplus && _LIBCPP_MSVCRT
     
    
    Modified: vendor/libc++/dist/src/include/atomic_support.h
    ==============================================================================
    --- vendor/libc++/dist/src/include/atomic_support.h	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/src/include/atomic_support.h	Tue May 16 19:47:31 2017	(r318374)
    @@ -29,7 +29,7 @@
     #endif
     
     #if !defined(_LIBCPP_HAS_ATOMIC_BUILTINS) && !defined(_LIBCPP_HAS_NO_THREADS)
    -# if defined(_LIBCPP_MSVC)
    +# if defined(_LIBCPP_WARNING)
         _LIBCPP_WARNING("Building libc++ without __atomic builtins is unsupported")
     # else
     #   warning Building libc++ without __atomic builtins is unsupported
    
    Modified: vendor/libc++/dist/src/locale.cpp
    ==============================================================================
    --- vendor/libc++/dist/src/locale.cpp	Tue May 16 19:47:28 2017	(r318373)
    +++ vendor/libc++/dist/src/locale.cpp	Tue May 16 19:47:31 2017	(r318374)
    @@ -45,6 +45,24 @@
     
     _LIBCPP_BEGIN_NAMESPACE_STD
     
    +struct __libcpp_unique_locale {
    +  __libcpp_unique_locale(const char* nm) : __loc_(newlocale(LC_ALL_MASK, nm, 0)) {}
    +
    +  ~__libcpp_unique_locale() {
    +    if (__loc_)
    +      freelocale(__loc_);
    +  }
    +
    +  explicit operator bool() const { return __loc_; }
    +
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:47:40 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99973D7043E;
     Tue, 16 May 2017 19:47:40 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 51F0F1F38;
     Tue, 16 May 2017 19:47:40 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJld6v097261;
     Tue, 16 May 2017 19:47:39 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJldQU097260;
     Tue, 16 May 2017 19:47:39 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161947.v4GJldQU097260@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 19:47:39 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318375 - vendor/libc++/libc++-trunk-r303197
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:47:40 -0000
    
    Author: dim
    Date: Tue May 16 19:47:39 2017
    New Revision: 318375
    URL: https://svnweb.freebsd.org/changeset/base/318375
    
    Log:
      Tag libc++ trunk r303197.
    
    Added:
      vendor/libc++/libc++-trunk-r303197/
         - copied from r318374, vendor/libc++/dist/
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:47:49 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id A85D6D7051C;
     Tue, 16 May 2017 19:47:49 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 5B76599;
     Tue, 16 May 2017 19:47:49 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJlmHf097380;
     Tue, 16 May 2017 19:47:48 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJlmKa097379;
     Tue, 16 May 2017 19:47:48 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161947.v4GJlmKa097379@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 19:47:48 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318377 - vendor/lld/lld-trunk-r303197
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:47:49 -0000
    
    Author: dim
    Date: Tue May 16 19:47:48 2017
    New Revision: 318377
    URL: https://svnweb.freebsd.org/changeset/base/318377
    
    Log:
      Tag lld trunk r303197.
    
    Added:
      vendor/lld/lld-trunk-r303197/
         - copied from r318376, vendor/lld/dist/
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:47:45 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id A72A2D704B4;
     Tue, 16 May 2017 19:47:45 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 44D2D1FC0;
     Tue, 16 May 2017 19:47:45 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJli2Q097332;
     Tue, 16 May 2017 19:47:44 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJlg3g097308;
     Tue, 16 May 2017 19:47:42 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161947.v4GJlg3g097308@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 19:47:42 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318376 - in vendor/lld/dist: COFF ELF docs
     include/lld/Core lib/Core lib/ReaderWriter/MachO test/COFF test/ELF
     test/ELF/Inputs test/ELF/linkerscript unittests unittests/CoreTests
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:47:45 -0000
    
    Author: dim
    Date: Tue May 16 19:47:41 2017
    New Revision: 318376
    URL: https://svnweb.freebsd.org/changeset/base/318376
    
    Log:
      Vendor import of lld trunk r303197:
      https://llvm.org/svn/llvm-project/lld/trunk@303197
    
    Added:
      vendor/lld/dist/test/ELF/gdb-index-empty.s   (contents, props changed)
      vendor/lld/dist/test/ELF/gdb-index-gc-sections.s   (contents, props changed)
      vendor/lld/dist/test/ELF/linkerscript/early-assign-symbol.s   (contents, props changed)
      vendor/lld/dist/test/ELF/linkerscript/symbol-memoryexpr.s   (contents, props changed)
      vendor/lld/dist/test/ELF/many-alloc-sections.s   (contents, props changed)
      vendor/lld/dist/test/ELF/x86-64-reloc-tpoff32-fpic.s   (contents, props changed)
    Deleted:
      vendor/lld/dist/include/lld/Core/Parallel.h
      vendor/lld/dist/include/lld/Core/TaskGroup.h
      vendor/lld/dist/lib/Core/TaskGroup.cpp
      vendor/lld/dist/test/COFF/constant-export.yaml
      vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model1.s
      vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model2.s
      vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model3.s
      vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model4.s
      vendor/lld/dist/test/ELF/i386-static-tls-model.s
      vendor/lld/dist/unittests/CoreTests/
    Modified:
      vendor/lld/dist/COFF/Driver.cpp
      vendor/lld/dist/COFF/ICF.cpp
      vendor/lld/dist/COFF/MapFile.cpp
      vendor/lld/dist/COFF/Writer.cpp
      vendor/lld/dist/ELF/Config.h
      vendor/lld/dist/ELF/Driver.cpp
      vendor/lld/dist/ELF/GdbIndex.h
      vendor/lld/dist/ELF/ICF.cpp
      vendor/lld/dist/ELF/InputFiles.cpp
      vendor/lld/dist/ELF/InputSection.cpp
      vendor/lld/dist/ELF/LinkerScript.cpp
      vendor/lld/dist/ELF/LinkerScript.h
      vendor/lld/dist/ELF/MapFile.cpp
      vendor/lld/dist/ELF/OutputSections.cpp
      vendor/lld/dist/ELF/OutputSections.h
      vendor/lld/dist/ELF/Relocations.cpp
      vendor/lld/dist/ELF/ScriptParser.cpp
      vendor/lld/dist/ELF/Strings.cpp
      vendor/lld/dist/ELF/Symbols.cpp
      vendor/lld/dist/ELF/Symbols.h
      vendor/lld/dist/ELF/SyntheticSections.cpp
      vendor/lld/dist/ELF/SyntheticSections.h
      vendor/lld/dist/ELF/Target.cpp
      vendor/lld/dist/ELF/Threads.h
      vendor/lld/dist/ELF/Thunks.cpp
      vendor/lld/dist/ELF/Writer.cpp
      vendor/lld/dist/ELF/Writer.h
      vendor/lld/dist/docs/CMakeLists.txt
      vendor/lld/dist/lib/Core/CMakeLists.txt
      vendor/lld/dist/lib/ReaderWriter/MachO/LayoutPass.cpp
      vendor/lld/dist/test/COFF/constant-export.test
      vendor/lld/dist/test/ELF/i386-tls-ie-shared.s
      vendor/lld/dist/test/ELF/incompatible-section-types2.s
      vendor/lld/dist/test/ELF/linkerscript/ehdr_start.s
      vendor/lld/dist/test/ELF/linkerscript/sections-constraint.s
      vendor/lld/dist/test/ELF/linkerscript/sections.s
      vendor/lld/dist/test/ELF/many-sections.s
      vendor/lld/dist/test/ELF/tls-dynamic-i686.s
      vendor/lld/dist/test/ELF/tls-opt-iele-i686-nopic.s
      vendor/lld/dist/unittests/CMakeLists.txt
    
    Modified: vendor/lld/dist/COFF/Driver.cpp
    ==============================================================================
    --- vendor/lld/dist/COFF/Driver.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/COFF/Driver.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -18,7 +18,6 @@
     #include "lld/Driver/Driver.h"
     #include "llvm/ADT/Optional.h"
     #include "llvm/ADT/StringSwitch.h"
    -#include "llvm/LibDriver/LibDriver.h"
     #include "llvm/Object/ArchiveWriter.h"
     #include "llvm/Option/Arg.h"
     #include "llvm/Option/ArgList.h"
    @@ -29,6 +28,7 @@
     #include "llvm/Support/TarWriter.h"
     #include "llvm/Support/TargetSelect.h"
     #include "llvm/Support/raw_ostream.h"
    +#include "llvm/ToolDrivers/llvm-lib/LibDriver.h"
     #include 
     #include 
     
    
    Modified: vendor/lld/dist/COFF/ICF.cpp
    ==============================================================================
    --- vendor/lld/dist/COFF/ICF.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/COFF/ICF.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -21,9 +21,9 @@
     #include "Chunks.h"
     #include "Error.h"
     #include "Symbols.h"
    -#include "lld/Core/Parallel.h"
     #include "llvm/ADT/Hashing.h"
     #include "llvm/Support/Debug.h"
    +#include "llvm/Support/Parallel.h"
     #include "llvm/Support/raw_ostream.h"
     #include 
     #include 
    @@ -192,7 +192,7 @@ void ICF::forEachClass(std::function
     getSymbolStrings(ArrayRef Syms) {
       std::vector Str(Syms.size());
    -  parallel_for((size_t)0, Syms.size(), [&](size_t I) {
    +  for_each_n(parallel::par, (size_t)0, Syms.size(), [&](size_t I) {
         raw_string_ostream OS(Str[I]);
         writeHeader(OS, Syms[I]->getRVA(), 0, 0);
         OS << indent(2) << toString(*Syms[I]);
    
    Modified: vendor/lld/dist/COFF/Writer.cpp
    ==============================================================================
    --- vendor/lld/dist/COFF/Writer.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/COFF/Writer.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -17,13 +17,13 @@
     #include "PDB.h"
     #include "SymbolTable.h"
     #include "Symbols.h"
    -#include "lld/Core/Parallel.h"
     #include "llvm/ADT/DenseMap.h"
     #include "llvm/ADT/STLExtras.h"
     #include "llvm/ADT/StringSwitch.h"
     #include "llvm/Support/Debug.h"
     #include "llvm/Support/Endian.h"
     #include "llvm/Support/FileOutputBuffer.h"
    +#include "llvm/Support/Parallel.h"
     #include "llvm/Support/RandomNumberGenerator.h"
     #include "llvm/Support/raw_ostream.h"
     #include 
    @@ -745,8 +745,8 @@ void Writer::writeSections() {
         // ADD instructions).
         if (Sec->getPermissions() & IMAGE_SCN_CNT_CODE)
           memset(SecBuf, 0xCC, Sec->getRawSize());
    -    parallel_for_each(Sec->getChunks().begin(), Sec->getChunks().end(),
    -                      [&](Chunk *C) { C->writeTo(SecBuf); });
    +    for_each(parallel::par, Sec->getChunks().begin(), Sec->getChunks().end(),
    +             [&](Chunk *C) { C->writeTo(SecBuf); });
       }
     }
     
    @@ -760,16 +760,14 @@ void Writer::sortExceptionTable() {
       uint8_t *End = Begin + Sec->getVirtualSize();
       if (Config->Machine == AMD64) {
         struct Entry { ulittle32_t Begin, End, Unwind; };
    -    parallel_sort(
    -        (Entry *)Begin, (Entry *)End,
    -        [](const Entry &A, const Entry &B) { return A.Begin < B.Begin; });
    +    sort(parallel::par, (Entry *)Begin, (Entry *)End,
    +         [](const Entry &A, const Entry &B) { return A.Begin < B.Begin; });
         return;
       }
       if (Config->Machine == ARMNT) {
         struct Entry { ulittle32_t Begin, Unwind; };
    -    parallel_sort(
    -        (Entry *)Begin, (Entry *)End,
    -        [](const Entry &A, const Entry &B) { return A.Begin < B.Begin; });
    +    sort(parallel::par, (Entry *)Begin, (Entry *)End,
    +         [](const Entry &A, const Entry &B) { return A.Begin < B.Begin; });
         return;
       }
       errs() << "warning: don't know how to handle .pdata.\n";
    
    Modified: vendor/lld/dist/ELF/Config.h
    ==============================================================================
    --- vendor/lld/dist/ELF/Config.h	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/Config.h	Tue May 16 19:47:41 2017	(r318376)
    @@ -73,7 +73,6 @@ struct VersionDefinition {
     // Most fields are initialized by the driver.
     struct Configuration {
       InputFile *FirstElf = nullptr;
    -  bool HasStaticTlsModel = false;
       uint8_t OSABI = 0;
       llvm::CachePruningPolicy ThinLTOCachePolicy;
       llvm::StringMap SectionStartMap;
    
    Modified: vendor/lld/dist/ELF/Driver.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/Driver.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/Driver.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -284,7 +284,7 @@ static int getInteger(opt::InputArgList 
       int V = Default;
       if (auto *Arg = Args.getLastArg(Key)) {
         StringRef S = Arg->getValue();
    -    if (S.getAsInteger(10, V))
    +    if (!to_integer(S, V, 10))
           error(Arg->getSpelling() + ": number expected, but got " + S);
       }
       return V;
    @@ -311,7 +311,7 @@ static uint64_t getZOptionValue(opt::Inp
         if (Pos != StringRef::npos && Key == Value.substr(0, Pos)) {
           Value = Value.substr(Pos + 1);
           uint64_t Result;
    -      if (Value.getAsInteger(0, Result))
    +      if (!to_integer(Value, Result))
             error("invalid " + Key + ": " + Value);
           return Result;
         }
    @@ -522,7 +522,7 @@ static uint64_t parseSectionAddress(Stri
       uint64_t VA = 0;
       if (S.startswith("0x"))
         S = S.drop_front(2);
    -  if (S.getAsInteger(16, VA))
    +  if (!to_integer(S, VA, 16))
         error("invalid argument: " + toString(Arg));
       return VA;
     }
    @@ -886,7 +886,7 @@ static uint64_t getImageBase(opt::InputA
     
       StringRef S = Arg->getValue();
       uint64_t V;
    -  if (S.getAsInteger(0, V)) {
    +  if (!to_integer(S, V)) {
         error("-image-base: number expected, but got " + S);
         return 0;
       }
    
    Modified: vendor/lld/dist/ELF/GdbIndex.h
    ==============================================================================
    --- vendor/lld/dist/ELF/GdbIndex.h	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/GdbIndex.h	Tue May 16 19:47:41 2017	(r318376)
    @@ -21,7 +21,7 @@ class InputSection;
     
     // Struct represents single entry of address area of gdb index.
     struct AddressEntry {
    -  InputSectionBase *Section;
    +  InputSection *Section;
       uint64_t LowAddress;
       uint64_t HighAddress;
       size_t CuIndex;
    
    Modified: vendor/lld/dist/ELF/ICF.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/ICF.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/ICF.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -325,7 +325,7 @@ void ICF::forEachClass(std::functi
       // Split sections into 256 shards and call Fn in parallel.
       size_t NumShards = 256;
       size_t Step = Sections.size() / NumShards;
    -  parallelFor(0, NumShards, [&](size_t I) {
    +  parallelForEachN(0, NumShards, [&](size_t I) {
         forEachClassRange(I * Step, (I + 1) * Step, Fn);
       });
       forEachClassRange(Step * NumShards, Sections.size(), Fn);
    
    Modified: vendor/lld/dist/ELF/InputFiles.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/InputFiles.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/InputFiles.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -383,9 +383,9 @@ elf::ObjectFile::createInputSectio
         // we see. The eglibc ARM dynamic loaders require the presence of an
         // attribute section for dlopen to work.
         // In a full implementation we would merge all attribute sections.
    -    if (In::ARMAttributes == nullptr) {
    -      In::ARMAttributes = make(this, &Sec, Name);
    -      return In::ARMAttributes;
    +    if (InX::ARMAttributes == nullptr) {
    +      InX::ARMAttributes = make(this, &Sec, Name);
    +      return InX::ARMAttributes;
         }
         return &InputSection::Discarded;
       case SHT_RELA:
    
    Modified: vendor/lld/dist/ELF/InputSection.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/InputSection.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/InputSection.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -324,7 +324,7 @@ void InputSection::copyRelocations(uint8
         // section, but for --emit-relocs it is an virtual address.
         P->r_offset = RelocatedSection->OutSec->Addr +
                       RelocatedSection->getOffset(Rel.r_offset);
    -    P->setSymbolAndType(In::SymTab->getSymbolIndex(&Body), Type,
    +    P->setSymbolAndType(InX::SymTab->getSymbolIndex(&Body), Type,
                             Config->IsMips64EL);
     
         if (Body.Type == STT_SECTION) {
    @@ -400,40 +400,40 @@ getRelocTargetVA(uint32_t Type, int64_t 
         return Body.getVA(A);
       case R_GOT:
       case R_RELAX_TLS_GD_TO_IE_ABS:
    -    return Body.getGotVA() + A;
    +    return Body.getGotVA() + A;
       case R_GOTONLY_PC:
    -    return In::Got->getVA() + A - P;
    +    return InX::Got->getVA() + A - P;
       case R_GOTONLY_PC_FROM_END:
    -    return In::Got->getVA() + A - P + In::Got->getSize();
    +    return InX::Got->getVA() + A - P + InX::Got->getSize();
       case R_GOTREL:
    -    return Body.getVA(A) - In::Got->getVA();
    +    return Body.getVA(A) - InX::Got->getVA();
       case R_GOTREL_FROM_END:
    -    return Body.getVA(A) - In::Got->getVA() - In::Got->getSize();
    +    return Body.getVA(A) - InX::Got->getVA() - InX::Got->getSize();
       case R_GOT_FROM_END:
       case R_RELAX_TLS_GD_TO_IE_END:
    -    return Body.getGotOffset() + A - In::Got->getSize();
    +    return Body.getGotOffset() + A - InX::Got->getSize();
       case R_GOT_OFF:
         return Body.getGotOffset() + A;
       case R_GOT_PAGE_PC:
       case R_RELAX_TLS_GD_TO_IE_PAGE_PC:
    -    return getAArch64Page(Body.getGotVA() + A) - getAArch64Page(P);
    +    return getAArch64Page(Body.getGotVA() + A) - getAArch64Page(P);
       case R_GOT_PC:
       case R_RELAX_TLS_GD_TO_IE:
    -    return Body.getGotVA() + A - P;
    +    return Body.getGotVA() + A - P;
       case R_HINT:
       case R_NONE:
       case R_TLSDESC_CALL:
         llvm_unreachable("cannot relocate hint relocs");
       case R_MIPS_GOTREL:
    -    return Body.getVA(A) - In::MipsGot->getGp();
    +    return Body.getVA(A) - InX::MipsGot->getGp();
       case R_MIPS_GOT_GP:
    -    return In::MipsGot->getGp() + A;
    +    return InX::MipsGot->getGp() + A;
       case R_MIPS_GOT_GP_PC: {
         // R_MIPS_LO16 expression has R_MIPS_GOT_GP_PC type iif the target
         // is _gp_disp symbol. In that case we should use the following
         // formula for calculation "AHL + GP - P + 4". For details see p. 4-19 at
         // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
    -    uint64_t V = In::MipsGot->getGp() + A - P;
    +    uint64_t V = InX::MipsGot->getGp() + A - P;
         if (Type == R_MIPS_LO16)
           V += 4;
         return V;
    @@ -442,24 +442,21 @@ getRelocTargetVA(uint32_t Type, int64_t 
         // If relocation against MIPS local symbol requires GOT entry, this entry
         // should be initialized by 'page address'. This address is high 16-bits
         // of sum the symbol's value and the addend.
    -    return In::MipsGot->getVA() +
    -           In::MipsGot->getPageEntryOffset(Body, A) -
    -           In::MipsGot->getGp();
    +    return InX::MipsGot->getVA() + InX::MipsGot->getPageEntryOffset(Body, A) -
    +           InX::MipsGot->getGp();
       case R_MIPS_GOT_OFF:
       case R_MIPS_GOT_OFF32:
         // In case of MIPS if a GOT relocation has non-zero addend this addend
         // should be applied to the GOT entry content not to the GOT entry offset.
         // That is why we use separate expression type.
    -    return In::MipsGot->getVA() +
    -           In::MipsGot->getBodyEntryOffset(Body, A) -
    -           In::MipsGot->getGp();
    +    return InX::MipsGot->getVA() + InX::MipsGot->getBodyEntryOffset(Body, A) -
    +           InX::MipsGot->getGp();
       case R_MIPS_TLSGD:
    -    return In::MipsGot->getVA() + In::MipsGot->getTlsOffset() +
    -           In::MipsGot->getGlobalDynOffset(Body) -
    -           In::MipsGot->getGp();
    +    return InX::MipsGot->getVA() + InX::MipsGot->getTlsOffset() +
    +           InX::MipsGot->getGlobalDynOffset(Body) - InX::MipsGot->getGp();
       case R_MIPS_TLSLD:
    -    return In::MipsGot->getVA() + In::MipsGot->getTlsOffset() +
    -           In::MipsGot->getTlsIndexOff() - In::MipsGot->getGp();
    +    return InX::MipsGot->getVA() + InX::MipsGot->getTlsOffset() +
    +           InX::MipsGot->getTlsIndexOff() - InX::MipsGot->getGp();
       case R_PAGE_PC:
       case R_PLT_PAGE_PC:
         if (Body.isUndefined() && !Body.isLocal() && Body.symbol()->isWeak())
    @@ -523,19 +520,18 @@ getRelocTargetVA(uint32_t Type, int64_t 
       case R_SIZE:
         return Body.getSize() + A;
       case R_TLSDESC:
    -    return In::Got->getGlobalDynAddr(Body) + A;
    +    return InX::Got->getGlobalDynAddr(Body) + A;
       case R_TLSDESC_PAGE:
    -    return getAArch64Page(In::Got->getGlobalDynAddr(Body) + A) -
    +    return getAArch64Page(InX::Got->getGlobalDynAddr(Body) + A) -
                getAArch64Page(P);
       case R_TLSGD:
    -    return In::Got->getGlobalDynOffset(Body) + A -
    -           In::Got->getSize();
    +    return InX::Got->getGlobalDynOffset(Body) + A - InX::Got->getSize();
       case R_TLSGD_PC:
    -    return In::Got->getGlobalDynAddr(Body) + A - P;
    +    return InX::Got->getGlobalDynAddr(Body) + A - P;
       case R_TLSLD:
    -    return In::Got->getTlsIndexOff() + A - In::Got->getSize();
    +    return InX::Got->getTlsIndexOff() + A - InX::Got->getSize();
       case R_TLSLD_PC:
    -    return In::Got->getTlsIndexVA() + A - P;
    +    return InX::Got->getTlsIndexVA() + A - P;
       }
       llvm_unreachable("Invalid expression");
     }
    
    Modified: vendor/lld/dist/ELF/LinkerScript.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/LinkerScript.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/LinkerScript.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -48,8 +48,12 @@ using namespace lld::elf;
     LinkerScript *elf::Script;
     
     uint64_t ExprValue::getValue() const {
    -  if (Sec)
    -    return Sec->getOffset(Val) + Sec->getOutputSection()->Addr;
    +  if (Sec) {
    +    if (Sec->getOutputSection())
    +      return Sec->getOffset(Val) + Sec->getOutputSection()->Addr;
    +    error("unable to evaluate expression: input section " + Sec->Name +
    +          " has no output section assigned");
    +  }
       return Val;
     }
     
    @@ -411,6 +415,7 @@ void LinkerScript::processCommands(Outpu
           if (OutputSection *Sec = Cmd->Sec) {
             assert(Sec->SectionIndex == INT_MAX);
             Sec->SectionIndex = I;
    +        SecToCommand[Sec] = Cmd;
           }
         }
       }
    @@ -440,6 +445,7 @@ void LinkerScript::fabricateDefaultComma
     
         auto *OSCmd = make(Sec->Name);
         OSCmd->Sec = Sec;
    +    SecToCommand[Sec] = OSCmd;
     
         // Prefer user supplied address over additional alignment constraint
         auto I = Config->SectionStartMap.find(Sec->Name);
    @@ -484,6 +490,7 @@ void LinkerScript::addOrphanSections(Out
           auto *Cmd = cast(*I);
           Factory.addInputSec(S, Name, Cmd->Sec);
           if (OutputSection *Sec = Cmd->Sec) {
    +        SecToCommand[Sec] = Cmd;
             unsigned Index = std::distance(Opt.Commands.begin(), I);
             assert(Sec->SectionIndex == INT_MAX || Sec->SectionIndex == Index);
             Sec->SectionIndex = Index;
    @@ -699,6 +706,7 @@ void LinkerScript::adjustSectionsBeforeS
         OutSec->SectionIndex = I;
         OutputSections->push_back(OutSec);
         Cmd->Sec = OutSec;
    +    SecToCommand[OutSec] = Cmd;
       }
     }
     
    @@ -822,16 +830,14 @@ void LinkerScript::placeOrphanSections()
         // If there is no command corresponding to this output section,
         // create one and put a InputSectionDescription in it so that both
         // representations agree on which input sections to use.
    -    auto Pos = std::find_if(CmdIter, E, [&](BaseCommand *Base) {
    -      auto *Cmd = dyn_cast(Base);
    -      return Cmd && Cmd->Name == Name;
    -    });
    -    if (Pos == E) {
    -      auto *Cmd = make(Name);
    +    OutputSectionCommand *Cmd = getCmd(Sec);
    +    if (!Cmd) {
    +      Cmd = make(Name);
           Opt.Commands.insert(CmdIter, Cmd);
           ++CmdIndex;
     
           Cmd->Sec = Sec;
    +      SecToCommand[Sec] = Cmd;
           auto *ISD = make("");
           for (InputSection *IS : Sec->Sections)
             ISD->Sections.push_back(IS);
    @@ -841,7 +847,11 @@ void LinkerScript::placeOrphanSections()
         }
     
         // Continue from where we found it.
    -    CmdIndex = (Pos - Opt.Commands.begin()) + 1;
    +    while (*CmdIter != Cmd) {
    +      ++CmdIter;
    +      ++CmdIndex;
    +    }
    +    ++CmdIndex;
       }
     }
     
    @@ -1000,7 +1010,7 @@ std::vector LinkerScript::cre
           break;
     
         // Assign headers specified by linker script
    -    for (size_t Id : getPhdrIndices(Sec->Name)) {
    +    for (size_t Id : getPhdrIndices(Sec)) {
           Ret[Id].add(Sec);
           if (Opt.PhdrsCommands[Id].Flags == UINT_MAX)
             Ret[Id].p_flags |= Sec->getPhdrFlags();
    @@ -1020,11 +1030,16 @@ bool LinkerScript::ignoreInterpSection()
       return true;
     }
     
    -Optional LinkerScript::getFiller(StringRef Name) {
    -  for (BaseCommand *Base : Opt.Commands)
    -    if (auto *Cmd = dyn_cast(Base))
    -      if (Cmd->Name == Name)
    -        return Cmd->Filler;
    +OutputSectionCommand *LinkerScript::getCmd(OutputSection *Sec) const {
    +  auto I = SecToCommand.find(Sec);
    +  if (I == SecToCommand.end())
    +    return nullptr;
    +  return I->second;
    +}
    +
    +Optional LinkerScript::getFiller(OutputSection *Sec) {
    +  if (OutputSectionCommand *Cmd = getCmd(Sec))
    +    return Cmd->Filler;
       return None;
     }
     
    @@ -1042,26 +1057,16 @@ static void writeInt(uint8_t *Buf, uint6
     }
     
     void LinkerScript::writeDataBytes(OutputSection *Sec, uint8_t *Buf) {
    -  auto I = std::find_if(Opt.Commands.begin(), Opt.Commands.end(),
    -                        [=](BaseCommand *Base) {
    -                          if (auto *Cmd = dyn_cast(Base))
    -                            if (Cmd->Sec == Sec)
    -                              return true;
    -                          return false;
    -                        });
    -  if (I == Opt.Commands.end())
    -    return;
    -  auto *Cmd = cast(*I);
    -  for (BaseCommand *Base : Cmd->Commands)
    -    if (auto *Data = dyn_cast(Base))
    -      writeInt(Buf + Data->Offset, Data->Expression().getValue(), Data->Size);
    +  if (OutputSectionCommand *Cmd = getCmd(Sec))
    +    for (BaseCommand *Base : Cmd->Commands)
    +      if (auto *Data = dyn_cast(Base))
    +        writeInt(Buf + Data->Offset, Data->Expression().getValue(), Data->Size);
     }
     
    -bool LinkerScript::hasLMA(StringRef Name) {
    -  for (BaseCommand *Base : Opt.Commands)
    -    if (auto *Cmd = dyn_cast(Base))
    -      if (Cmd->LMAExpr && Cmd->Name == Name)
    -        return true;
    +bool LinkerScript::hasLMA(OutputSection *Sec) {
    +  if (OutputSectionCommand *Cmd = getCmd(Sec))
    +    if (Cmd->LMAExpr)
    +      return true;
       return false;
     }
     
    @@ -1080,15 +1085,10 @@ ExprValue LinkerScript::getSymbolValue(c
     
     bool LinkerScript::isDefined(StringRef S) { return findSymbol(S) != nullptr; }
     
    -// Returns indices of ELF headers containing specific section, identified
    -// by Name. Each index is a zero based number of ELF header listed within
    -// PHDRS {} script block.
    -std::vector LinkerScript::getPhdrIndices(StringRef SectionName) {
    -  for (BaseCommand *Base : Opt.Commands) {
    -    auto *Cmd = dyn_cast(Base);
    -    if (!Cmd || Cmd->Name != SectionName)
    -      continue;
    -
    +// Returns indices of ELF headers containing specific section. Each index is a
    +// zero based number of ELF header listed within PHDRS {} script block.
    +std::vector LinkerScript::getPhdrIndices(OutputSection *Sec) {
    +  if (OutputSectionCommand *Cmd = getCmd(Sec)) {
         std::vector Ret;
         for (StringRef PhdrName : Cmd->Phdrs)
           Ret.push_back(getPhdrIndex(Cmd->Location, PhdrName));
    
    Modified: vendor/lld/dist/ELF/LinkerScript.h
    ==============================================================================
    --- vendor/lld/dist/ELF/LinkerScript.h	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/LinkerScript.h	Tue May 16 19:47:41 2017	(r318376)
    @@ -211,8 +211,9 @@ struct ScriptConfiguration {
       std::vector ReferencedSymbols;
     };
     
    -class LinkerScript {
    -protected:
    +class LinkerScript final {
    +  llvm::DenseMap SecToCommand;
    +  OutputSectionCommand *getCmd(OutputSection *Sec) const;
       void assignSymbol(SymbolAssignment *Cmd, bool InSec);
       void setDot(Expr E, const Twine &Loc, bool InSec);
     
    @@ -222,7 +223,7 @@ protected:
       std::vector
       createInputSectionList(OutputSectionCommand &Cmd);
     
    -  std::vector getPhdrIndices(StringRef SectionName);
    +  std::vector getPhdrIndices(OutputSection *Sec);
       size_t getPhdrIndex(const Twine &Loc, StringRef PhdrName);
     
       MemoryRegion *findMemoryRegion(OutputSectionCommand *Cmd);
    @@ -262,8 +263,8 @@ public:
       std::vector createPhdrs();
       bool ignoreInterpSection();
     
    -  llvm::Optional getFiller(StringRef Name);
    -  bool hasLMA(StringRef Name);
    +  llvm::Optional getFiller(OutputSection *Sec);
    +  bool hasLMA(OutputSection *Sec);
       bool shouldKeep(InputSectionBase *S);
       void assignOffsets(OutputSectionCommand *Cmd);
       void placeOrphanSections();
    
    Modified: vendor/lld/dist/ELF/MapFile.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/MapFile.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/MapFile.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -84,7 +84,7 @@ template 
     DenseMap
     getSymbolStrings(ArrayRef Syms) {
       std::vector Str(Syms.size());
    -  parallelFor(0, Syms.size(), [&](size_t I) {
    +  parallelForEachN(0, Syms.size(), [&](size_t I) {
         raw_string_ostream OS(Str[I]);
         writeHeader(OS, Syms[I]->getVA(), Syms[I]->template getSize(),
                           0);
    
    Modified: vendor/lld/dist/ELF/OutputSections.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/OutputSections.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/OutputSections.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -133,7 +133,7 @@ template  void OutputSection
       if (isa(First))
         return;
     
    -  this->Link = In::SymTab->OutSec->SectionIndex;
    +  this->Link = InX::SymTab->OutSec->SectionIndex;
       // sh_info for SHT_REL[A] sections should contain the section header index of
       // the section to which the relocation applies.
       InputSectionBase *S = First->getRelocatedSection();
    @@ -273,7 +273,7 @@ uint32_t OutputSection::getFiller() {
       // linker script. If nothing is specified and this is an executable section,
       // fall back to trap instructions to prevent bad diassembly and detect invalid
       // jumps to padding.
    -  if (Optional Filler = Script->getFiller(Name))
    +  if (Optional Filler = Script->getFiller(this))
         return *Filler;
       if (Flags & SHF_EXECINSTR)
         return Target->TrapInstr;
    @@ -297,7 +297,7 @@ template  void OutputSection
       if (Filler)
         fill(Buf, Sections.empty() ? Size : Sections[0]->OutSecOff, Filler);
     
    -  parallelFor(0, Sections.size(), [=](size_t I) {
    +  parallelForEachN(0, Sections.size(), [=](size_t I) {
         InputSection *Sec = Sections[I];
         Sec->writeTo(Buf);
     
    @@ -429,8 +429,11 @@ void OutputSectionFactory::addInputSec(I
           if (canMergeToProgbits(Sec->Type) && canMergeToProgbits(IS->Type))
             Sec->Type = SHT_PROGBITS;
           else
    -        error("Section has different type from others with the same name " +
    -              toString(IS));
    +        error("section type mismatch for " + IS->Name +
    +              "\n>>> " + toString(IS) + ": " +
    +              getELFSectionTypeName(Config->EMachine, IS->Type) +
    +              "\n>>> output section " + Sec->Name + ": " +
    +              getELFSectionTypeName(Config->EMachine, Sec->Type));
         }
         Sec->Flags |= Flags;
       } else {
    
    Modified: vendor/lld/dist/ELF/OutputSections.h
    ==============================================================================
    --- vendor/lld/dist/ELF/OutputSections.h	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/OutputSections.h	Tue May 16 19:47:41 2017	(r318376)
    @@ -50,6 +50,7 @@ public:
       template  void writeHeaderTo(typename ELFT::Shdr *SHdr);
     
       unsigned SectionIndex;
    +  unsigned SortRank;
     
       uint32_t getPhdrFlags() const;
     
    
    Modified: vendor/lld/dist/ELF/Relocations.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/Relocations.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/Relocations.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -106,21 +106,21 @@ static unsigned handleMipsTlsRelocation(
                                             InputSectionBase &C, uint64_t Offset,
                                             int64_t Addend, RelExpr Expr) {
       if (Expr == R_MIPS_TLSLD) {
    -    if (In::MipsGot->addTlsIndex() && Config->Pic)
    -      In::RelaDyn->addReloc({Target->TlsModuleIndexRel, In::MipsGot,
    -                                   In::MipsGot->getTlsIndexOff(), false,
    +    if (InX::MipsGot->addTlsIndex() && Config->Pic)
    +      In::RelaDyn->addReloc({Target->TlsModuleIndexRel, InX::MipsGot,
    +                                   InX::MipsGot->getTlsIndexOff(), false,
                                        nullptr, 0});
         C.Relocations.push_back({Expr, Type, Offset, Addend, &Body});
         return 1;
       }
     
       if (Expr == R_MIPS_TLSGD) {
    -    if (In::MipsGot->addDynTlsEntry(Body) && Body.isPreemptible()) {
    -      uint64_t Off = In::MipsGot->getGlobalDynOffset(Body);
    +    if (InX::MipsGot->addDynTlsEntry(Body) && Body.isPreemptible()) {
    +      uint64_t Off = InX::MipsGot->getGlobalDynOffset(Body);
           In::RelaDyn->addReloc(
    -          {Target->TlsModuleIndexRel, In::MipsGot, Off, false, &Body, 0});
    +          {Target->TlsModuleIndexRel, InX::MipsGot, Off, false, &Body, 0});
           if (Body.isPreemptible())
    -        In::RelaDyn->addReloc({Target->TlsOffsetRel, In::MipsGot,
    +        In::RelaDyn->addReloc({Target->TlsOffsetRel, InX::MipsGot,
                                          Off + Config->Wordsize, false, &Body, 0});
         }
         C.Relocations.push_back({Expr, Type, Offset, Addend, &Body});
    @@ -156,17 +156,17 @@ static unsigned handleARMTlsRelocation(u
       auto AddTlsReloc = [&](uint64_t Off, uint32_t Type, SymbolBody *Dest,
                              bool Dyn) {
         if (Dyn)
    -      In::RelaDyn->addReloc({Type, In::Got, Off, false, Dest, 0});
    +      In::RelaDyn->addReloc({Type, InX::Got, Off, false, Dest, 0});
         else
    -      In::Got->Relocations.push_back({R_ABS, Type, Off, 0, Dest});
    +      InX::Got->Relocations.push_back({R_ABS, Type, Off, 0, Dest});
       };
     
       // Local Dynamic is for access to module local TLS variables, while still
       // being suitable for being dynamically loaded via dlopen.
       // GOT[e0] is the module index, with a special value of 0 for the current
       // module. GOT[e1] is unused. There only needs to be one module index entry.
    -  if (Expr == R_TLSLD_PC && In::Got->addTlsIndex()) {
    -    AddTlsReloc(In::Got->getTlsIndexOff(), Target->TlsModuleIndexRel,
    +  if (Expr == R_TLSLD_PC && InX::Got->addTlsIndex()) {
    +    AddTlsReloc(InX::Got->getTlsIndexOff(), Target->TlsModuleIndexRel,
                     NeedDynId ? nullptr : &Body, NeedDynId);
         C.Relocations.push_back({Expr, Type, Offset, Addend, &Body});
         return 1;
    @@ -176,8 +176,8 @@ static unsigned handleARMTlsRelocation(u
       // the module index and offset of symbol in TLS block we can fill these in
       // using static GOT relocations.
       if (Expr == R_TLSGD_PC) {
    -    if (In::Got->addDynTlsEntry(Body)) {
    -      uint64_t Off = In::Got->getGlobalDynOffset(Body);
    +    if (InX::Got->addDynTlsEntry(Body)) {
    +      uint64_t Off = InX::Got->getGlobalDynOffset(Body);
           AddTlsReloc(Off, Target->TlsModuleIndexRel, &Body, NeedDynId);
           AddTlsReloc(Off + Config->Wordsize, Target->TlsOffsetRel, &Body,
                       NeedDynOff);
    @@ -207,10 +207,10 @@ handleTlsRelocation(uint32_t Type, Symbo
       bool IsPreemptible = isPreemptible(Body, Type);
       if (isRelExprOneOf(Expr) &&
           Config->Shared) {
    -    if (In::Got->addDynTlsEntry(Body)) {
    -      uint64_t Off = In::Got->getGlobalDynOffset(Body);
    -      In::RelaDyn->addReloc({Target->TlsDescRel, In::Got, Off,
    -                                   !IsPreemptible, &Body, 0});
    +    if (InX::Got->addDynTlsEntry(Body)) {
    +      uint64_t Off = InX::Got->getGlobalDynOffset(Body);
    +      In::RelaDyn->addReloc(
    +          {Target->TlsDescRel, InX::Got, Off, !IsPreemptible, &Body, 0});
         }
         if (Expr != R_TLSDESC_CALL)
           C.Relocations.push_back({Expr, Type, Offset, Addend, &Body});
    @@ -224,10 +224,10 @@ handleTlsRelocation(uint32_t Type, Symbo
               {R_RELAX_TLS_LD_TO_LE, Type, Offset, Addend, &Body});
           return 2;
         }
    -    if (In::Got->addTlsIndex())
    -      In::RelaDyn->addReloc({Target->TlsModuleIndexRel, In::Got,
    -                                   In::Got->getTlsIndexOff(), false,
    -                                   nullptr, 0});
    +    if (InX::Got->addTlsIndex())
    +      In::RelaDyn->addReloc({Target->TlsModuleIndexRel, InX::Got,
    +                                   InX::Got->getTlsIndexOff(), false, nullptr,
    +                                   0});
         C.Relocations.push_back({Expr, Type, Offset, Addend, &Body});
         return 1;
       }
    @@ -242,19 +242,19 @@ handleTlsRelocation(uint32_t Type, Symbo
       if (isRelExprOneOf(Expr)) {
         if (Config->Shared) {
    -      if (In::Got->addDynTlsEntry(Body)) {
    -        uint64_t Off = In::Got->getGlobalDynOffset(Body);
    +      if (InX::Got->addDynTlsEntry(Body)) {
    +        uint64_t Off = InX::Got->getGlobalDynOffset(Body);
             In::RelaDyn->addReloc(
    -            {Target->TlsModuleIndexRel, In::Got, Off, false, &Body, 0});
    +            {Target->TlsModuleIndexRel, InX::Got, Off, false, &Body, 0});
     
             // If the symbol is preemptible we need the dynamic linker to write
             // the offset too.
             uint64_t OffsetOff = Off + Config->Wordsize;
             if (IsPreemptible)
    -          In::RelaDyn->addReloc({Target->TlsOffsetRel, In::Got,
    -                                       OffsetOff, false, &Body, 0});
    +          In::RelaDyn->addReloc(
    +              {Target->TlsOffsetRel, InX::Got, OffsetOff, false, &Body, 0});
             else
    -          In::Got->Relocations.push_back(
    +          InX::Got->Relocations.push_back(
                   {R_ABS, Target->TlsOffsetRel, OffsetOff, 0, &Body});
           }
           C.Relocations.push_back({Expr, Type, Offset, Addend, &Body});
    @@ -268,8 +268,8 @@ handleTlsRelocation(uint32_t Type, Symbo
               {Target->adjustRelaxExpr(Type, nullptr, R_RELAX_TLS_GD_TO_IE), Type,
                Offset, Addend, &Body});
           if (!Body.isInGot()) {
    -        In::Got->addEntry(Body);
    -        In::RelaDyn->addReloc({Target->TlsGotRel, In::Got,
    +        InX::Got->addEntry(Body);
    +        In::RelaDyn->addReloc({Target->TlsGotRel, InX::Got,
                                          Body.getGotOffset(), false, &Body, 0});
           }
         } else {
    @@ -518,7 +518,7 @@ template  static void addCop
       // See if this symbol is in a read-only segment. If so, preserve the symbol's
       // memory protection by reserving space in the .bss.rel.ro section.
       bool IsReadOnly = isReadOnly(SS);
    -  BssSection *Sec = IsReadOnly ? In::BssRelRo : In::Bss;
    +  BssSection *Sec = IsReadOnly ? InX::BssRelRo : InX::Bss;
       uint64_t Off = Sec->reserveSpace(SymSize, SS->getAlignment());
     
       // Look through the DSO's dynamic symbol table for aliases and create a
    @@ -774,7 +774,7 @@ static void addPltEntry(PltSection *Plt,
     
     template 
     static void addGotEntry(SymbolBody &Sym, bool Preemptible) {
    -  In::Got->addEntry(Sym);
    +  InX::Got->addEntry(Sym);
     
       uint64_t Off = Sym.getGotOffset();
       uint32_t DynType;
    @@ -792,10 +792,10 @@ static void addGotEntry(SymbolBody &Sym,
       bool Constant = !Preemptible && !(Config->Pic && !isAbsolute(Sym));
       if (!Constant)
         In::RelaDyn->addReloc(
    -        {DynType, In::Got, Off, !Preemptible, &Sym, 0});
    +        {DynType, InX::Got, Off, !Preemptible, &Sym, 0});
     
       if (Constant || (!Config->IsRela && !Preemptible))
    -    In::Got->Relocations.push_back({Expr, DynType, Off, 0, &Sym});
    +    InX::Got->Relocations.push_back({Expr, DynType, Off, 0, &Sym});
     }
     
     // The reason we have to do this early scan is as follows
    @@ -856,7 +856,7 @@ static void scanRelocs(InputSectionBase 
         // needs it to be created. Here we request for that.
         if (isRelExprOneOf(Expr))
    -      In::Got->HasGotOffRel = true;
    +      InX::Got->HasGotOffRel = true;
     
         // Read an addend.
         int64_t Addend = computeAddend(Rel, Sec.Data.data());
    @@ -874,11 +874,11 @@ static void scanRelocs(InputSectionBase 
         // If a relocation needs PLT, we create PLT and GOTPLT slots for the symbol.
         if (needsPlt(Expr) && !Body.isInPlt()) {
           if (Body.isGnuIFunc() && !Preemptible)
    -        addPltEntry(InX::Iplt, In::IgotPlt, In::RelaIplt,
    +        addPltEntry(InX::Iplt, InX::IgotPlt, In::RelaIplt,
                         Target->IRelativeRel, Body, true);
           else
    -        addPltEntry(InX::Plt, In::GotPlt, In::RelaPlt,
    -                    Target->PltRel, Body, !Preemptible);
    +        addPltEntry(InX::Plt, InX::GotPlt, In::RelaPlt, Target->PltRel,
    +                    Body, !Preemptible);
         }
     
         // Create a GOT slot if a relocation needs GOT.
    @@ -891,9 +891,9 @@ static void scanRelocs(InputSectionBase 
             // See "Global Offset Table" in Chapter 5 in the following document
             // for detailed description:
             // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
    -        In::MipsGot->addEntry(Body, Addend, Expr);
    +        InX::MipsGot->addEntry(Body, Addend, Expr);
             if (Body.isTls() && Body.isPreemptible())
    -          In::RelaDyn->addReloc({Target->TlsGotRel, In::MipsGot,
    +          In::RelaDyn->addReloc({Target->TlsGotRel, InX::MipsGot,
                                            Body.getGotOffset(), false, &Body, 0});
           } else if (!Body.isInGot()) {
             addGotEntry(Body, Preemptible);
    @@ -927,7 +927,7 @@ static void scanRelocs(InputSectionBase 
           // a dynamic relocation.
           // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf p.4-19
           if (Config->EMachine == EM_MIPS)
    -        In::MipsGot->addEntry(Body, Addend, Expr);
    +        InX::MipsGot->addEntry(Body, Addend, Expr);
           continue;
         }
     
    
    Modified: vendor/lld/dist/ELF/ScriptParser.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/ScriptParser.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/ScriptParser.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -639,7 +639,7 @@ ScriptParser::readOutputSectionDescripti
     // We are compatible with ld.gold because it's easier to implement.
     uint32_t ScriptParser::parseFill(StringRef Tok) {
       uint32_t V = 0;
    -  if (Tok.getAsInteger(0, V))
    +  if (!to_integer(Tok, V))
         setError("invalid filler expression: " + Tok);
     
       uint32_t Buf;
    @@ -778,23 +778,23 @@ static Optional parseInt(Strin
     
       // Hexadecimal
       uint64_t Val;
    -  if (Tok.startswith_lower("0x") && !Tok.substr(2).getAsInteger(16, Val))
    +  if (Tok.startswith_lower("0x") && to_integer(Tok.substr(2), Val, 16))
         return Val;
    -  if (Tok.endswith_lower("H") && !Tok.drop_back().getAsInteger(16, Val))
    +  if (Tok.endswith_lower("H") && to_integer(Tok.drop_back(), Val, 16))
         return Val;
     
       // Decimal
       if (Tok.endswith_lower("K")) {
    -    if (Tok.drop_back().getAsInteger(10, Val))
    +    if (!to_integer(Tok.drop_back(), Val, 10))
           return None;
         return Val * 1024;
       }
       if (Tok.endswith_lower("M")) {
    -    if (Tok.drop_back().getAsInteger(10, Val))
    +    if (!to_integer(Tok.drop_back(), Val, 10))
           return None;
         return Val * 1024 * 1024;
       }
    -  if (Tok.getAsInteger(10, Val))
    +  if (!to_integer(Tok, Val, 10))
         return None;
       return Val;
     }
    @@ -900,10 +900,22 @@ Expr ScriptParser::readPrimary() {
         StringRef Name = readParenLiteral();
         return [=] { return Script->isDefined(Name) ? 1 : 0; };
       }
    +  if (Tok == "LENGTH") {
    +    StringRef Name = readParenLiteral();
    +    if (Script->Opt.MemoryRegions.count(Name) == 0)
    +      setError("memory region not defined: " + Name);
    +    return [=] { return Script->Opt.MemoryRegions[Name].Length; };
    +  }
       if (Tok == "LOADADDR") {
         StringRef Name = readParenLiteral();
         return [=] { return Script->getOutputSection(Location, Name)->getLMA(); };
       }
    +  if (Tok == "ORIGIN") {
    +    StringRef Name = readParenLiteral();
    +    if (Script->Opt.MemoryRegions.count(Name) == 0)
    +      setError("memory region not defined: " + Name);
    +    return [=] { return Script->Opt.MemoryRegions[Name].Origin; };
    +  }
       if (Tok == "SEGMENT_START") {
         expect("(");
         skip();
    
    Modified: vendor/lld/dist/ELF/Strings.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/Strings.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/Strings.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -46,7 +46,7 @@ int elf::getPriority(StringRef S) {
       if (Pos == StringRef::npos)
         return 65536;
       int V;
    -  if (S.substr(Pos + 1).getAsInteger(10, V))
    +  if (!to_integer(S.substr(Pos + 1), V, 10))
         return 65536;
       return V;
     }
    @@ -68,7 +68,7 @@ std::vector elf::parseHex(Strin
         StringRef B = S.substr(0, 2);
         S = S.substr(2);
         uint8_t H;
    -    if (B.getAsInteger(16, H)) {
    +    if (!to_integer(B, H, 16)) {
           error("not a hexadecimal value: " + B);
           return {};
         }
    
    Modified: vendor/lld/dist/ELF/Symbols.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/Symbols.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/Symbols.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -163,8 +163,8 @@ uint64_t SymbolBody::getVA(int64_t Adden
       return OutVA + Addend;
     }
     
    -template  typename ELFT::uint SymbolBody::getGotVA() const {
    -  return In::Got->getVA() + getGotOffset();
    +uint64_t SymbolBody::getGotVA() const {
    +  return InX::Got->getVA() + getGotOffset();
     }
     
     uint64_t SymbolBody::getGotOffset() const {
    @@ -370,11 +370,6 @@ std::string lld::toString(const SymbolBo
       return B.getName();
     }
     
    -template uint32_t SymbolBody::template getGotVA() const;
    -template uint32_t SymbolBody::template getGotVA() const;
    -template uint64_t SymbolBody::template getGotVA() const;
    -template uint64_t SymbolBody::template getGotVA() const;
    -
     template uint32_t SymbolBody::template getSize() const;
     template uint32_t SymbolBody::template getSize() const;
     template uint64_t SymbolBody::template getSize() const;
    
    Modified: vendor/lld/dist/ELF/Symbols.h
    ==============================================================================
    --- vendor/lld/dist/ELF/Symbols.h	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/Symbols.h	Tue May 16 19:47:41 2017	(r318376)
    @@ -78,7 +78,7 @@ public:
       uint64_t getVA(int64_t Addend = 0) const;
     
       uint64_t getGotOffset() const;
    -  template  typename ELFT::uint getGotVA() const;
    +  uint64_t getGotVA() const;
       uint64_t getGotPltOffset() const;
       uint64_t getGotPltVA() const;
       uint64_t getPltVA() const;
    
    Modified: vendor/lld/dist/ELF/SyntheticSections.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/SyntheticSections.cpp	Tue May 16 19:47:39 2017	(r318375)
    +++ vendor/lld/dist/ELF/SyntheticSections.cpp	Tue May 16 19:47:41 2017	(r318376)
    @@ -186,7 +186,7 @@ template  void MipsOptionsSe
       Options->size = getSize();
     
       if (!Config->Relocatable)
    -    Reginfo.ri_gp_value = In::MipsGot->getGp();
    +    Reginfo.ri_gp_value = InX::MipsGot->getGp();
       memcpy(Buf + sizeof(Elf_Mips_Options), &Reginfo, sizeof(Reginfo));
     }
     
    @@ -244,7 +244,7 @@ MipsReginfoSection::MipsReginfoSec
     
     template  void MipsReginfoSection::writeTo(uint8_t *Buf) {
       if (!Config->Relocatable)
    -    Reginfo.ri_gp_value = In::MipsGot->getGp();
    +    Reginfo.ri_gp_value = InX::MipsGot->getGp();
       memcpy(Buf, &Reginfo, sizeof(Reginfo));
     }
     
    @@ -293,13 +293,12 @@ InputSection *elf::createInterpSection()
       return Sec;
     }
     
    -template 
     SymbolBody *elf::addSyntheticLocal(StringRef Name, uint8_t Type, uint64_t Value,
                                        uint64_t Size, InputSectionBase *Section) {
       auto *S = make(Name, /*IsLocal*/ true, STV_DEFAULT, Type,
                                      Value, Size, Section, nullptr);
    -  if (In::SymTab)
    -    In::SymTab->addSymbol(S);
    +  if (InX::SymTab)
    +    InX::SymTab->addSymbol(S);
       return S;
     }
     
    @@ -356,7 +355,7 @@ void BuildIdSection::computeHash(
       std::vector Hashes(Chunks.size() * HashSize);
     
       // Compute hash values.
    -  parallelFor(0, Chunks.size(), [&](size_t I) {
    +  parallelForEachN(0, Chunks.size(), [&](size_t I) {
         HashFn(Hashes.data() + I * HashSize, Chunks[I]);
       });
     
    @@ -618,17 +617,16 @@ template  void EhFrameSectio
       }
     }
     
    -template 
    -GotSection::GotSection()
    +GotBaseSection::GotBaseSection()
         : SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_PROGBITS,
                            Target->GotEntrySize, ".got") {}
     
    -template  void GotSection::addEntry(SymbolBody &Sym) {
    +void GotBaseSection::addEntry(SymbolBody &Sym) {
       Sym.GotIndex = NumEntries;
       ++NumEntries;
     }
     
    -template  bool GotSection::addDynTlsEntry(SymbolBody &Sym) {
    +bool GotBaseSection::addDynTlsEntry(SymbolBody &Sym) {
       if (Sym.GlobalDynIndex != -1U)
         return false;
       Sym.GlobalDynIndex = NumEntries;
    @@ -639,7 +637,7 @@ template  bool GotSection bool GotSection::addTlsIndex() {
    +bool GotBaseSection::addTlsIndex() {
       if (TlsIndexOff != uint32_t(-1))
         return false;
       TlsIndexOff = NumEntries * Config->Wordsize;
    @@ -647,21 +645,19 @@ template  bool GotSection
    -uint64_t GotSection::getGlobalDynAddr(const SymbolBody &B) const {
    +uint64_t GotBaseSection::getGlobalDynAddr(const SymbolBody &B) const {
       return this->getVA() + B.GlobalDynIndex * Config->Wordsize;
     }
     
    -template 
    -uint64_t GotSection::getGlobalDynOffset(const SymbolBody &B) const {
    +uint64_t GotBaseSection::getGlobalDynOffset(const SymbolBody &B) const {
       return B.GlobalDynIndex * Config->Wordsize;
     }
     
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:48:03 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id D984DD70603;
     Tue, 16 May 2017 19:48:03 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 73124211;
     Tue, 16 May 2017 19:48:03 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJm2Z5097467;
     Tue, 16 May 2017 19:48:02 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJlxPv097432;
     Tue, 16 May 2017 19:47:59 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161947.v4GJlxPv097432@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 19:47:59 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318378 - in vendor/lldb/dist: include/lldb
     include/lldb/API include/lldb/Breakpoint include/lldb/Core
     include/lldb/DataFormatters include/lldb/Expression include/lldb/Host
     include/lldb...
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:48:04 -0000
    
    Author: dim
    Date: Tue May 16 19:47:58 2017
    New Revision: 318378
    URL: https://svnweb.freebsd.org/changeset/base/318378
    
    Log:
      Vendor import of lldb trunk r303197:
      https://llvm.org/svn/llvm-project/lldb/trunk@303197
    
    Added:
      vendor/lldb/dist/include/lldb/Utility/Status.h   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/Makefile   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/main.cpp   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/Makefile   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/TestFunctionTemplateParameterPack.py   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/main.cpp   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/ptr_refs/
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/ptr_refs/main.m
      vendor/lldb/dist/source/Utility/Status.cpp   (contents, props changed)
      vendor/lldb/dist/unittests/Utility/StatusTest.cpp   (contents, props changed)
    Deleted:
      vendor/lldb/dist/include/lldb/Utility/Error.h
      vendor/lldb/dist/source/Utility/Error.cpp
      vendor/lldb/dist/unittests/Utility/ErrorTest.cpp
    Modified:
      vendor/lldb/dist/include/lldb/API/SBError.h
      vendor/lldb/dist/include/lldb/API/SBPlatform.h
      vendor/lldb/dist/include/lldb/API/SBTarget.h
      vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h
      vendor/lldb/dist/include/lldb/Breakpoint/BreakpointID.h
      vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h
      vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h
      vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolver.h
      vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverAddress.h
      vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverFileLine.h
      vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
      vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverName.h
      vendor/lldb/dist/include/lldb/Breakpoint/Watchpoint.h
      vendor/lldb/dist/include/lldb/Core/Communication.h
      vendor/lldb/dist/include/lldb/Core/Connection.h
      vendor/lldb/dist/include/lldb/Core/Debugger.h
      vendor/lldb/dist/include/lldb/Core/FormatEntity.h
      vendor/lldb/dist/include/lldb/Core/MappedHash.h
      vendor/lldb/dist/include/lldb/Core/Module.h
      vendor/lldb/dist/include/lldb/Core/ModuleList.h
      vendor/lldb/dist/include/lldb/Core/PluginManager.h
      vendor/lldb/dist/include/lldb/Core/RegisterValue.h
      vendor/lldb/dist/include/lldb/Core/Scalar.h
      vendor/lldb/dist/include/lldb/Core/SearchFilter.h
      vendor/lldb/dist/include/lldb/Core/StructuredData.h
      vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h
      vendor/lldb/dist/include/lldb/Core/Timer.h
      vendor/lldb/dist/include/lldb/Core/UserSettingsController.h
      vendor/lldb/dist/include/lldb/Core/Value.h
      vendor/lldb/dist/include/lldb/Core/ValueObject.h
      vendor/lldb/dist/include/lldb/Core/ValueObjectConstResult.h
      vendor/lldb/dist/include/lldb/Core/ValueObjectConstResultCast.h
      vendor/lldb/dist/include/lldb/Core/ValueObjectConstResultChild.h
      vendor/lldb/dist/include/lldb/Core/ValueObjectConstResultImpl.h
      vendor/lldb/dist/include/lldb/Core/ValueObjectDynamicValue.h
      vendor/lldb/dist/include/lldb/Core/ValueObjectRegister.h
      vendor/lldb/dist/include/lldb/Core/ValueObjectSyntheticFilter.h
      vendor/lldb/dist/include/lldb/Core/ValueObjectVariable.h
      vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h
      vendor/lldb/dist/include/lldb/Expression/DWARFExpression.h
      vendor/lldb/dist/include/lldb/Expression/ExpressionParser.h
      vendor/lldb/dist/include/lldb/Expression/IRExecutionUnit.h
      vendor/lldb/dist/include/lldb/Expression/IRInterpreter.h
      vendor/lldb/dist/include/lldb/Expression/IRMemoryMap.h
      vendor/lldb/dist/include/lldb/Expression/LLVMUserExpression.h
      vendor/lldb/dist/include/lldb/Expression/Materializer.h
      vendor/lldb/dist/include/lldb/Expression/REPL.h
      vendor/lldb/dist/include/lldb/Expression/UserExpression.h
      vendor/lldb/dist/include/lldb/Expression/UtilityFunction.h
      vendor/lldb/dist/include/lldb/Host/File.h
      vendor/lldb/dist/include/lldb/Host/FileCache.h
      vendor/lldb/dist/include/lldb/Host/FileSystem.h
      vendor/lldb/dist/include/lldb/Host/Host.h
      vendor/lldb/dist/include/lldb/Host/HostNativeProcessBase.h
      vendor/lldb/dist/include/lldb/Host/HostNativeThreadBase.h
      vendor/lldb/dist/include/lldb/Host/HostProcess.h
      vendor/lldb/dist/include/lldb/Host/HostThread.h
      vendor/lldb/dist/include/lldb/Host/IOObject.h
      vendor/lldb/dist/include/lldb/Host/LockFileBase.h
      vendor/lldb/dist/include/lldb/Host/MainLoop.h
      vendor/lldb/dist/include/lldb/Host/MainLoopBase.h
      vendor/lldb/dist/include/lldb/Host/MonitoringProcessLauncher.h
      vendor/lldb/dist/include/lldb/Host/PipeBase.h
      vendor/lldb/dist/include/lldb/Host/ProcessLauncher.h
      vendor/lldb/dist/include/lldb/Host/Socket.h
      vendor/lldb/dist/include/lldb/Host/ThreadLauncher.h
      vendor/lldb/dist/include/lldb/Host/common/NativeBreakpoint.h
      vendor/lldb/dist/include/lldb/Host/common/NativeBreakpointList.h
      vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h
      vendor/lldb/dist/include/lldb/Host/common/NativeRegisterContext.h
      vendor/lldb/dist/include/lldb/Host/common/NativeThreadProtocol.h
      vendor/lldb/dist/include/lldb/Host/common/NativeWatchpointList.h
      vendor/lldb/dist/include/lldb/Host/common/SoftwareBreakpoint.h
      vendor/lldb/dist/include/lldb/Host/common/TCPSocket.h
      vendor/lldb/dist/include/lldb/Host/common/UDPSocket.h
      vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
      vendor/lldb/dist/include/lldb/Host/posix/DomainSocket.h
      vendor/lldb/dist/include/lldb/Host/posix/HostProcessPosix.h
      vendor/lldb/dist/include/lldb/Host/posix/HostThreadPosix.h
      vendor/lldb/dist/include/lldb/Host/posix/LockFilePosix.h
      vendor/lldb/dist/include/lldb/Host/posix/PipePosix.h
      vendor/lldb/dist/include/lldb/Host/posix/ProcessLauncherPosix.h
      vendor/lldb/dist/include/lldb/Host/posix/ProcessLauncherPosixFork.h
      vendor/lldb/dist/include/lldb/Host/windows/ConnectionGenericFileWindows.h
      vendor/lldb/dist/include/lldb/Host/windows/HostProcessWindows.h
      vendor/lldb/dist/include/lldb/Host/windows/HostThreadWindows.h
      vendor/lldb/dist/include/lldb/Host/windows/LockFileWindows.h
      vendor/lldb/dist/include/lldb/Host/windows/PipeWindows.h
      vendor/lldb/dist/include/lldb/Host/windows/ProcessLauncherWindows.h
      vendor/lldb/dist/include/lldb/Interpreter/Args.h
      vendor/lldb/dist/include/lldb/Interpreter/CommandInterpreter.h
      vendor/lldb/dist/include/lldb/Interpreter/CommandReturnObject.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionGroupArchitecture.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionGroupBoolean.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionGroupFile.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionGroupFormat.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionGroupOutputFile.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionGroupPlatform.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionGroupString.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionGroupUInt64.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionGroupUUID.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionGroupVariable.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionGroupWatchpoint.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValue.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueArch.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueArray.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueBoolean.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueChar.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueDictionary.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueEnumeration.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueFileSpec.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueFileSpecList.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueFormat.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueFormatEntity.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueLanguage.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValuePathMappings.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueProperties.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueRegex.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueSInt64.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueString.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueUInt64.h
      vendor/lldb/dist/include/lldb/Interpreter/OptionValueUUID.h
      vendor/lldb/dist/include/lldb/Interpreter/Options.h
      vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreter.h
      vendor/lldb/dist/include/lldb/Symbol/ClangASTContext.h
      vendor/lldb/dist/include/lldb/Symbol/ObjectFile.h
      vendor/lldb/dist/include/lldb/Symbol/SymbolContext.h
      vendor/lldb/dist/include/lldb/Symbol/Variable.h
      vendor/lldb/dist/include/lldb/Target/ABI.h
      vendor/lldb/dist/include/lldb/Target/DynamicLoader.h
      vendor/lldb/dist/include/lldb/Target/Language.h
      vendor/lldb/dist/include/lldb/Target/LanguageRuntime.h
      vendor/lldb/dist/include/lldb/Target/Memory.h
      vendor/lldb/dist/include/lldb/Target/ModuleCache.h
      vendor/lldb/dist/include/lldb/Target/ObjCLanguageRuntime.h
      vendor/lldb/dist/include/lldb/Target/PathMappingList.h
      vendor/lldb/dist/include/lldb/Target/Platform.h
      vendor/lldb/dist/include/lldb/Target/Process.h
      vendor/lldb/dist/include/lldb/Target/ProcessLaunchInfo.h
      vendor/lldb/dist/include/lldb/Target/ProcessStructReader.h
      vendor/lldb/dist/include/lldb/Target/RegisterContext.h
      vendor/lldb/dist/include/lldb/Target/StackFrame.h
      vendor/lldb/dist/include/lldb/Target/StructuredDataPlugin.h
      vendor/lldb/dist/include/lldb/Target/Target.h
      vendor/lldb/dist/include/lldb/Target/TargetList.h
      vendor/lldb/dist/include/lldb/Target/Thread.h
      vendor/lldb/dist/include/lldb/Target/ThreadSpec.h
      vendor/lldb/dist/include/lldb/Utility/JSON.h
      vendor/lldb/dist/include/lldb/Utility/RegularExpression.h
      vendor/lldb/dist/include/lldb/Utility/SelectHelper.h
      vendor/lldb/dist/include/lldb/Utility/UUID.h
      vendor/lldb/dist/include/lldb/lldb-forward.h
      vendor/lldb/dist/include/lldb/lldb-private-enumerations.h
      vendor/lldb/dist/include/lldb/lldb-private-interfaces.h
      vendor/lldb/dist/include/lldb/lldb-private-types.h
      vendor/lldb/dist/lldb.xcodeproj/project.pbxproj
      vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py
      vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
      vendor/lldb/dist/scripts/Xcode/repo.py
      vendor/lldb/dist/source/API/SBBreakpoint.cpp
      vendor/lldb/dist/source/API/SBBreakpointLocation.cpp
      vendor/lldb/dist/source/API/SBCommandReturnObject.cpp
      vendor/lldb/dist/source/API/SBDebugger.cpp
      vendor/lldb/dist/source/API/SBError.cpp
      vendor/lldb/dist/source/API/SBFrame.cpp
      vendor/lldb/dist/source/API/SBHostOS.cpp
      vendor/lldb/dist/source/API/SBModule.cpp
      vendor/lldb/dist/source/API/SBPlatform.cpp
      vendor/lldb/dist/source/API/SBProcess.cpp
      vendor/lldb/dist/source/API/SBStream.cpp
      vendor/lldb/dist/source/API/SBStructuredData.cpp
      vendor/lldb/dist/source/API/SBTarget.cpp
      vendor/lldb/dist/source/API/SBThread.cpp
      vendor/lldb/dist/source/API/SBValue.cpp
      vendor/lldb/dist/source/API/SystemInitializerFull.cpp
      vendor/lldb/dist/source/Breakpoint/Breakpoint.cpp
      vendor/lldb/dist/source/Breakpoint/BreakpointID.cpp
      vendor/lldb/dist/source/Breakpoint/BreakpointIDList.cpp
      vendor/lldb/dist/source/Breakpoint/BreakpointList.cpp
      vendor/lldb/dist/source/Breakpoint/BreakpointLocation.cpp
      vendor/lldb/dist/source/Breakpoint/BreakpointOptions.cpp
      vendor/lldb/dist/source/Breakpoint/BreakpointResolver.cpp
      vendor/lldb/dist/source/Breakpoint/BreakpointResolverAddress.cpp
      vendor/lldb/dist/source/Breakpoint/BreakpointResolverFileLine.cpp
      vendor/lldb/dist/source/Breakpoint/BreakpointResolverFileRegex.cpp
      vendor/lldb/dist/source/Breakpoint/BreakpointResolverName.cpp
      vendor/lldb/dist/source/Breakpoint/Watchpoint.cpp
      vendor/lldb/dist/source/Commands/CommandObjectArgs.cpp
      vendor/lldb/dist/source/Commands/CommandObjectArgs.h
      vendor/lldb/dist/source/Commands/CommandObjectBreakpoint.cpp
      vendor/lldb/dist/source/Commands/CommandObjectBreakpointCommand.cpp
      vendor/lldb/dist/source/Commands/CommandObjectBugreport.cpp
      vendor/lldb/dist/source/Commands/CommandObjectCommands.cpp
      vendor/lldb/dist/source/Commands/CommandObjectDisassemble.cpp
      vendor/lldb/dist/source/Commands/CommandObjectDisassemble.h
      vendor/lldb/dist/source/Commands/CommandObjectExpression.cpp
      vendor/lldb/dist/source/Commands/CommandObjectExpression.h
      vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp
      vendor/lldb/dist/source/Commands/CommandObjectHelp.h
      vendor/lldb/dist/source/Commands/CommandObjectLog.cpp
      vendor/lldb/dist/source/Commands/CommandObjectMemory.cpp
      vendor/lldb/dist/source/Commands/CommandObjectPlatform.cpp
      vendor/lldb/dist/source/Commands/CommandObjectPlugin.cpp
      vendor/lldb/dist/source/Commands/CommandObjectProcess.cpp
      vendor/lldb/dist/source/Commands/CommandObjectRegister.cpp
      vendor/lldb/dist/source/Commands/CommandObjectSettings.cpp
      vendor/lldb/dist/source/Commands/CommandObjectSource.cpp
      vendor/lldb/dist/source/Commands/CommandObjectTarget.cpp
      vendor/lldb/dist/source/Commands/CommandObjectThread.cpp
      vendor/lldb/dist/source/Commands/CommandObjectType.cpp
      vendor/lldb/dist/source/Commands/CommandObjectWatchpoint.cpp
      vendor/lldb/dist/source/Commands/CommandObjectWatchpointCommand.cpp
      vendor/lldb/dist/source/Core/Address.cpp
      vendor/lldb/dist/source/Core/ArchSpec.cpp
      vendor/lldb/dist/source/Core/Communication.cpp
      vendor/lldb/dist/source/Core/Debugger.cpp
      vendor/lldb/dist/source/Core/Disassembler.cpp
      vendor/lldb/dist/source/Core/DynamicLoader.cpp
      vendor/lldb/dist/source/Core/EmulateInstruction.cpp
      vendor/lldb/dist/source/Core/FormatEntity.cpp
      vendor/lldb/dist/source/Core/IOHandler.cpp
      vendor/lldb/dist/source/Core/Mangled.cpp
      vendor/lldb/dist/source/Core/Module.cpp
      vendor/lldb/dist/source/Core/ModuleList.cpp
      vendor/lldb/dist/source/Core/PluginManager.cpp
      vendor/lldb/dist/source/Core/RegisterValue.cpp
      vendor/lldb/dist/source/Core/Scalar.cpp
      vendor/lldb/dist/source/Core/SearchFilter.cpp
      vendor/lldb/dist/source/Core/StructuredData.cpp
      vendor/lldb/dist/source/Core/Timer.cpp
      vendor/lldb/dist/source/Core/UserSettingsController.cpp
      vendor/lldb/dist/source/Core/Value.cpp
      vendor/lldb/dist/source/Core/ValueObject.cpp
      vendor/lldb/dist/source/Core/ValueObjectCast.cpp
      vendor/lldb/dist/source/Core/ValueObjectChild.cpp
      vendor/lldb/dist/source/Core/ValueObjectConstResult.cpp
      vendor/lldb/dist/source/Core/ValueObjectConstResultCast.cpp
      vendor/lldb/dist/source/Core/ValueObjectConstResultChild.cpp
      vendor/lldb/dist/source/Core/ValueObjectConstResultImpl.cpp
      vendor/lldb/dist/source/Core/ValueObjectDynamicValue.cpp
      vendor/lldb/dist/source/Core/ValueObjectMemory.cpp
      vendor/lldb/dist/source/Core/ValueObjectRegister.cpp
      vendor/lldb/dist/source/Core/ValueObjectSyntheticFilter.cpp
      vendor/lldb/dist/source/Core/ValueObjectVariable.cpp
      vendor/lldb/dist/source/DataFormatters/StringPrinter.cpp
      vendor/lldb/dist/source/DataFormatters/TypeFormat.cpp
      vendor/lldb/dist/source/Expression/DWARFExpression.cpp
      vendor/lldb/dist/source/Expression/FunctionCaller.cpp
      vendor/lldb/dist/source/Expression/IRDynamicChecks.cpp
      vendor/lldb/dist/source/Expression/IRExecutionUnit.cpp
      vendor/lldb/dist/source/Expression/IRInterpreter.cpp
      vendor/lldb/dist/source/Expression/IRMemoryMap.cpp
      vendor/lldb/dist/source/Expression/LLVMUserExpression.cpp
      vendor/lldb/dist/source/Expression/Materializer.cpp
      vendor/lldb/dist/source/Expression/REPL.cpp
      vendor/lldb/dist/source/Expression/UserExpression.cpp
      vendor/lldb/dist/source/Expression/UtilityFunction.cpp
      vendor/lldb/dist/source/Host/common/Editline.cpp
      vendor/lldb/dist/source/Host/common/File.cpp
      vendor/lldb/dist/source/Host/common/FileCache.cpp
      vendor/lldb/dist/source/Host/common/Host.cpp
      vendor/lldb/dist/source/Host/common/HostProcess.cpp
      vendor/lldb/dist/source/Host/common/HostThread.cpp
      vendor/lldb/dist/source/Host/common/LockFileBase.cpp
      vendor/lldb/dist/source/Host/common/MainLoop.cpp
      vendor/lldb/dist/source/Host/common/MonitoringProcessLauncher.cpp
      vendor/lldb/dist/source/Host/common/NativeBreakpoint.cpp
      vendor/lldb/dist/source/Host/common/NativeBreakpointList.cpp
      vendor/lldb/dist/source/Host/common/NativeProcessProtocol.cpp
      vendor/lldb/dist/source/Host/common/NativeRegisterContext.cpp
      vendor/lldb/dist/source/Host/common/NativeThreadProtocol.cpp
      vendor/lldb/dist/source/Host/common/NativeWatchpointList.cpp
      vendor/lldb/dist/source/Host/common/PipeBase.cpp
      vendor/lldb/dist/source/Host/common/Socket.cpp
      vendor/lldb/dist/source/Host/common/SoftwareBreakpoint.cpp
      vendor/lldb/dist/source/Host/common/Symbols.cpp
      vendor/lldb/dist/source/Host/common/TCPSocket.cpp
      vendor/lldb/dist/source/Host/common/ThreadLauncher.cpp
      vendor/lldb/dist/source/Host/common/UDPSocket.cpp
      vendor/lldb/dist/source/Host/freebsd/Host.cpp
      vendor/lldb/dist/source/Host/linux/Host.cpp
      vendor/lldb/dist/source/Host/macosx/Host.mm
      vendor/lldb/dist/source/Host/macosx/Symbols.cpp
      vendor/lldb/dist/source/Host/netbsd/Host.cpp
      vendor/lldb/dist/source/Host/openbsd/Host.cpp
      vendor/lldb/dist/source/Host/posix/ConnectionFileDescriptorPosix.cpp
      vendor/lldb/dist/source/Host/posix/DomainSocket.cpp
      vendor/lldb/dist/source/Host/posix/FileSystem.cpp
      vendor/lldb/dist/source/Host/posix/HostProcessPosix.cpp
      vendor/lldb/dist/source/Host/posix/HostThreadPosix.cpp
      vendor/lldb/dist/source/Host/posix/LockFilePosix.cpp
      vendor/lldb/dist/source/Host/posix/PipePosix.cpp
      vendor/lldb/dist/source/Host/posix/ProcessLauncherPosix.cpp
      vendor/lldb/dist/source/Host/posix/ProcessLauncherPosixFork.cpp
      vendor/lldb/dist/source/Host/windows/ConnectionGenericFileWindows.cpp
      vendor/lldb/dist/source/Host/windows/FileSystem.cpp
      vendor/lldb/dist/source/Host/windows/Host.cpp
      vendor/lldb/dist/source/Host/windows/HostProcessWindows.cpp
      vendor/lldb/dist/source/Host/windows/HostThreadWindows.cpp
      vendor/lldb/dist/source/Host/windows/LockFileWindows.cpp
      vendor/lldb/dist/source/Host/windows/PipeWindows.cpp
      vendor/lldb/dist/source/Host/windows/ProcessLauncherWindows.cpp
      vendor/lldb/dist/source/Initialization/SystemInitializerCommon.cpp
      vendor/lldb/dist/source/Interpreter/Args.cpp
      vendor/lldb/dist/source/Interpreter/CommandInterpreter.cpp
      vendor/lldb/dist/source/Interpreter/CommandObject.cpp
      vendor/lldb/dist/source/Interpreter/CommandReturnObject.cpp
      vendor/lldb/dist/source/Interpreter/OptionGroupArchitecture.cpp
      vendor/lldb/dist/source/Interpreter/OptionGroupBoolean.cpp
      vendor/lldb/dist/source/Interpreter/OptionGroupFile.cpp
      vendor/lldb/dist/source/Interpreter/OptionGroupFormat.cpp
      vendor/lldb/dist/source/Interpreter/OptionGroupOutputFile.cpp
      vendor/lldb/dist/source/Interpreter/OptionGroupPlatform.cpp
      vendor/lldb/dist/source/Interpreter/OptionGroupString.cpp
      vendor/lldb/dist/source/Interpreter/OptionGroupUInt64.cpp
      vendor/lldb/dist/source/Interpreter/OptionGroupUUID.cpp
      vendor/lldb/dist/source/Interpreter/OptionGroupValueObjectDisplay.cpp
      vendor/lldb/dist/source/Interpreter/OptionGroupVariable.cpp
      vendor/lldb/dist/source/Interpreter/OptionGroupWatchpoint.cpp
      vendor/lldb/dist/source/Interpreter/OptionValue.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueArch.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueArray.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueBoolean.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueChar.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueDictionary.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueEnumeration.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueFileSpec.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueFileSpecLIst.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueFormat.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueFormatEntity.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueLanguage.cpp
      vendor/lldb/dist/source/Interpreter/OptionValuePathMappings.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueProperties.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueRegex.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueSInt64.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueString.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueUInt64.cpp
      vendor/lldb/dist/source/Interpreter/OptionValueUUID.cpp
      vendor/lldb/dist/source/Interpreter/Options.cpp
      vendor/lldb/dist/source/Interpreter/ScriptInterpreter.cpp
      vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
      vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h
      vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp
      vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h
      vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
      vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h
      vendor/lldb/dist/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
      vendor/lldb/dist/source/Plugins/ABI/SysV-arm/ABISysV_arm.h
      vendor/lldb/dist/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
      vendor/lldb/dist/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h
      vendor/lldb/dist/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp
      vendor/lldb/dist/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h
      vendor/lldb/dist/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
      vendor/lldb/dist/source/Plugins/ABI/SysV-i386/ABISysV_i386.h
      vendor/lldb/dist/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
      vendor/lldb/dist/source/Plugins/ABI/SysV-mips/ABISysV_mips.h
      vendor/lldb/dist/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
      vendor/lldb/dist/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h
      vendor/lldb/dist/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
      vendor/lldb/dist/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
      vendor/lldb/dist/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
      vendor/lldb/dist/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
      vendor/lldb/dist/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp
      vendor/lldb/dist/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h
      vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
      vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h
      vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
      vendor/lldb/dist/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
      vendor/lldb/dist/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h
      vendor/lldb/dist/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
      vendor/lldb/dist/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h
      vendor/lldb/dist/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp
      vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
      vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
      vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h
      vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
      vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
      vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
      vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
      vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
      vendor/lldb/dist/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp
      vendor/lldb/dist/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h
      vendor/lldb/dist/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
      vendor/lldb/dist/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h
      vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
      vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
      vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
      vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
      vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
      vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
      vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
      vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/IRForTarget.h
      vendor/lldb/dist/source/Plugins/ExpressionParser/Go/GoParser.cpp
      vendor/lldb/dist/source/Plugins/ExpressionParser/Go/GoParser.h
      vendor/lldb/dist/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp
      vendor/lldb/dist/source/Plugins/Instruction/ARM/EmulateInstructionARM.h
      vendor/lldb/dist/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
      vendor/lldb/dist/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h
      vendor/lldb/dist/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
      vendor/lldb/dist/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h
      vendor/lldb/dist/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
      vendor/lldb/dist/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h
      vendor/lldb/dist/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
      vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
      vendor/lldb/dist/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
      vendor/lldb/dist/source/Plugins/Language/CPlusPlus/BlockPointer.cpp
      vendor/lldb/dist/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp
      vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxx.cpp
      vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
      vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
      vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
      vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
      vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
      vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
      vendor/lldb/dist/source/Plugins/Language/Go/GoFormatterFunctions.cpp
      vendor/lldb/dist/source/Plugins/Language/Java/JavaFormatterFunctions.cpp
      vendor/lldb/dist/source/Plugins/Language/ObjC/CF.cpp
      vendor/lldb/dist/source/Plugins/Language/ObjC/Cocoa.cpp
      vendor/lldb/dist/source/Plugins/Language/ObjC/NSArray.cpp
      vendor/lldb/dist/source/Plugins/Language/ObjC/NSDictionary.cpp
      vendor/lldb/dist/source/Plugins/Language/ObjC/NSError.cpp
      vendor/lldb/dist/source/Plugins/Language/ObjC/NSException.cpp
      vendor/lldb/dist/source/Plugins/Language/ObjC/NSSet.cpp
      vendor/lldb/dist/source/Plugins/Language/ObjC/NSString.cpp
      vendor/lldb/dist/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
      vendor/lldb/dist/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.cpp
      vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
      vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
      vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
      vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
      vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
      vendor/lldb/dist/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
      vendor/lldb/dist/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
      vendor/lldb/dist/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp
      vendor/lldb/dist/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
      vendor/lldb/dist/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
      vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
      vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
      vendor/lldb/dist/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
      vendor/lldb/dist/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
      vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
      vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
      vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/WindowsMiniDump.cpp
      vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/WindowsMiniDump.h
      vendor/lldb/dist/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp
      vendor/lldb/dist/source/Plugins/OperatingSystem/Go/OperatingSystemGo.h
      vendor/lldb/dist/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
      vendor/lldb/dist/source/Plugins/Platform/Android/AdbClient.cpp
      vendor/lldb/dist/source/Plugins/Platform/Android/AdbClient.h
      vendor/lldb/dist/source/Plugins/Platform/Android/PlatformAndroid.cpp
      vendor/lldb/dist/source/Plugins/Platform/Android/PlatformAndroid.h
      vendor/lldb/dist/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
      vendor/lldb/dist/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h
      vendor/lldb/dist/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
      vendor/lldb/dist/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
      vendor/lldb/dist/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
      vendor/lldb/dist/source/Plugins/Platform/Kalimba/PlatformKalimba.h
      vendor/lldb/dist/source/Plugins/Platform/Linux/PlatformLinux.cpp
      vendor/lldb/dist/source/Plugins/Platform/Linux/PlatformLinux.h
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.h
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
      vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
      vendor/lldb/dist/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
      vendor/lldb/dist/source/Plugins/Platform/NetBSD/PlatformNetBSD.h
      vendor/lldb/dist/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
      vendor/lldb/dist/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
      vendor/lldb/dist/source/Plugins/Platform/POSIX/PlatformPOSIX.h
      vendor/lldb/dist/source/Plugins/Platform/Windows/PlatformWindows.cpp
      vendor/lldb/dist/source/Plugins/Platform/Windows/PlatformWindows.h
      vendor/lldb/dist/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
      vendor/lldb/dist/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
      vendor/lldb/dist/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp
      vendor/lldb/dist/source/Plugins/Process/Darwin/DarwinProcessLauncher.h
      vendor/lldb/dist/source/Plugins/Process/Darwin/MachException.cpp
      vendor/lldb/dist/source/Plugins/Process/Darwin/MachException.h
      vendor/lldb/dist/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
      vendor/lldb/dist/source/Plugins/Process/Darwin/NativeProcessDarwin.h
      vendor/lldb/dist/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp
      vendor/lldb/dist/source/Plugins/Process/Darwin/NativeThreadDarwin.h
      vendor/lldb/dist/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp
      vendor/lldb/dist/source/Plugins/Process/Darwin/NativeThreadListDarwin.h
      vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
      vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h
      vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
      vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.h
      vendor/lldb/dist/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp
      vendor/lldb/dist/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.cpp
      vendor/lldb/dist/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.cpp
      vendor/lldb/dist/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.cpp
      vendor/lldb/dist/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.cpp
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.h
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeThreadLinux.cpp
      vendor/lldb/dist/source/Plugins/Process/Linux/NativeThreadLinux.h
      vendor/lldb/dist/source/Plugins/Process/Linux/SingleStepCheck.cpp
      vendor/lldb/dist/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
      vendor/lldb/dist/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h
      vendor/lldb/dist/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
      vendor/lldb/dist/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
      vendor/lldb/dist/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.cpp
      vendor/lldb/dist/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.cpp
      vendor/lldb/dist/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp
      vendor/lldb/dist/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.cpp
      vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
      vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
      vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
      vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
      vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
      vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
      vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
      vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
      vendor/lldb/dist/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
      vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
      vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextMemory.cpp
      vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp
      vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextThreadMemory.h
      vendor/lldb/dist/source/Plugins/Process/Utility/ThreadMemory.cpp
      vendor/lldb/dist/source/Plugins/Process/Utility/ThreadMemory.h
      vendor/lldb/dist/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
      vendor/lldb/dist/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
      vendor/lldb/dist/source/Plugins/Process/Windows/Common/DebuggerThread.h
      vendor/lldb/dist/source/Plugins/Process/Windows/Common/IDebugDelegate.h
      vendor/lldb/dist/source/Plugins/Process/Windows/Common/LocalDebugDelegate.cpp
      vendor/lldb/dist/source/Plugins/Process/Windows/Common/LocalDebugDelegate.h
      vendor/lldb/dist/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
      vendor/lldb/dist/source/Plugins/Process/Windows/Common/ProcessWindows.h
      vendor/lldb/dist/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp
      vendor/lldb/dist/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
      vendor/lldb/dist/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
      vendor/lldb/dist/source/Plugins/Process/elf-core/ProcessElfCore.cpp
      vendor/lldb/dist/source/Plugins/Process/elf-core/ProcessElfCore.h
      vendor/lldb/dist/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
      vendor/lldb/dist/source/Plugins/Process/elf-core/ThreadElfCore.cpp
      vendor/lldb/dist/source/Plugins/Process/elf-core/ThreadElfCore.h
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
      vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
      vendor/lldb/dist/source/Plugins/Process/mach-core/ProcessMachCore.cpp
      vendor/lldb/dist/source/Plugins/Process/mach-core/ProcessMachCore.h
      vendor/lldb/dist/source/Plugins/Process/minidump/MinidumpParser.cpp
      vendor/lldb/dist/source/Plugins/Process/minidump/MinidumpParser.h
      vendor/lldb/dist/source/Plugins/Process/minidump/MinidumpTypes.cpp
      vendor/lldb/dist/source/Plugins/Process/minidump/MinidumpTypes.h
      vendor/lldb/dist/source/Plugins/Process/minidump/ProcessMinidump.cpp
      vendor/lldb/dist/source/Plugins/Process/minidump/ProcessMinidump.h
      vendor/lldb/dist/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
      vendor/lldb/dist/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
      vendor/lldb/dist/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
      vendor/lldb/dist/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h
      vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
      vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.cpp
      vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
      vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
      vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
      vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
      vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
      vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp
      vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
      vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
      vendor/lldb/dist/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
      vendor/lldb/dist/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
      vendor/lldb/dist/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
      vendor/lldb/dist/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.h
      vendor/lldb/dist/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
      vendor/lldb/dist/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.h
      vendor/lldb/dist/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
      vendor/lldb/dist/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.h
      vendor/lldb/dist/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
      vendor/lldb/dist/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.h
      vendor/lldb/dist/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
      vendor/lldb/dist/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
      vendor/lldb/dist/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
      vendor/lldb/dist/source/Symbol/ClangASTContext.cpp
      vendor/lldb/dist/source/Symbol/CompactUnwindInfo.cpp
      vendor/lldb/dist/source/Symbol/CompilerType.cpp
      vendor/lldb/dist/source/Symbol/DWARFCallFrameInfo.cpp
      vendor/lldb/dist/source/Symbol/JavaASTContext.cpp
      vendor/lldb/dist/source/Symbol/ObjectFile.cpp
      vendor/lldb/dist/source/Symbol/SymbolContext.cpp
      vendor/lldb/dist/source/Symbol/Symtab.cpp
      vendor/lldb/dist/source/Symbol/Type.cpp
      vendor/lldb/dist/source/Symbol/Variable.cpp
      vendor/lldb/dist/source/Target/Language.cpp
      vendor/lldb/dist/source/Target/LanguageRuntime.cpp
      vendor/lldb/dist/source/Target/Memory.cpp
      vendor/lldb/dist/source/Target/ModuleCache.cpp
      vendor/lldb/dist/source/Target/ObjCLanguageRuntime.cpp
      vendor/lldb/dist/source/Target/PathMappingList.cpp
      vendor/lldb/dist/source/Target/Platform.cpp
      vendor/lldb/dist/source/Target/Process.cpp
      vendor/lldb/dist/source/Target/ProcessLaunchInfo.cpp
      vendor/lldb/dist/source/Target/RegisterContext.cpp
      vendor/lldb/dist/source/Target/StackFrame.cpp
      vendor/lldb/dist/source/Target/StopInfo.cpp
      vendor/lldb/dist/source/Target/Target.cpp
      vendor/lldb/dist/source/Target/TargetList.cpp
      vendor/lldb/dist/source/Target/Thread.cpp
      vendor/lldb/dist/source/Target/ThreadPlanCallFunction.cpp
      vendor/lldb/dist/source/Target/ThreadPlanTracer.cpp
      vendor/lldb/dist/source/Target/ThreadSpec.cpp
      vendor/lldb/dist/source/Utility/CMakeLists.txt
      vendor/lldb/dist/source/Utility/JSON.cpp
      vendor/lldb/dist/source/Utility/SelectHelper.cpp
      vendor/lldb/dist/source/Utility/UUID.cpp
      vendor/lldb/dist/tools/debugserver/source/DNBError.h
      vendor/lldb/dist/tools/debugserver/source/JSON.cpp
      vendor/lldb/dist/tools/debugserver/source/JSON.h
      vendor/lldb/dist/tools/debugserver/source/MacOSX/MachException.cpp
      vendor/lldb/dist/tools/debugserver/source/MacOSX/MachProcess.mm
      vendor/lldb/dist/tools/debugserver/source/MacOSX/MachTask.mm
      vendor/lldb/dist/tools/debugserver/source/MacOSX/MachThreadList.cpp
      vendor/lldb/dist/tools/debugserver/source/MacOSX/MachVMMemory.cpp
      vendor/lldb/dist/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
      vendor/lldb/dist/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp
      vendor/lldb/dist/tools/debugserver/source/PseudoTerminal.cpp
      vendor/lldb/dist/tools/debugserver/source/PseudoTerminal.h
      vendor/lldb/dist/tools/debugserver/source/RNBContext.cpp
      vendor/lldb/dist/tools/debugserver/source/RNBRemote.cpp
      vendor/lldb/dist/tools/lldb-mi/MICmdBase.cpp
      vendor/lldb/dist/tools/lldb-mi/MICmdCmdData.h
      vendor/lldb/dist/tools/lldb-mi/MIDriver.cpp
      vendor/lldb/dist/tools/lldb-mi/MIDriverBase.cpp
      vendor/lldb/dist/tools/lldb-server/Acceptor.cpp
      vendor/lldb/dist/tools/lldb-server/Acceptor.h
      vendor/lldb/dist/tools/lldb-server/lldb-gdbserver.cpp
      vendor/lldb/dist/tools/lldb-server/lldb-platform.cpp
      vendor/lldb/dist/unittests/Breakpoint/BreakpointIDTest.cpp
      vendor/lldb/dist/unittests/Core/ScalarTest.cpp
      vendor/lldb/dist/unittests/Core/TimerTest.cpp
      vendor/lldb/dist/unittests/Editline/EditlineTest.cpp
      vendor/lldb/dist/unittests/Expression/GoParserTest.cpp
      vendor/lldb/dist/unittests/Host/MainLoopTest.cpp
      vendor/lldb/dist/unittests/Host/SocketTest.cpp
      vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
      vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp
      vendor/lldb/dist/unittests/Target/ModuleCacheTest.cpp
      vendor/lldb/dist/unittests/Utility/CMakeLists.txt
      vendor/lldb/dist/unittests/debugserver/RNBSocketTest.cpp
    
    Modified: vendor/lldb/dist/include/lldb/API/SBError.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/API/SBError.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/API/SBError.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -68,18 +68,18 @@ protected:
       friend class SBBreakpoint;
       friend class SBBreakpointLocation;
     
    -  lldb_private::Error *get();
    +  lldb_private::Status *get();
     
    -  lldb_private::Error *operator->();
    +  lldb_private::Status *operator->();
     
    -  const lldb_private::Error &operator*() const;
    +  const lldb_private::Status &operator*() const;
     
    -  lldb_private::Error &ref();
    +  lldb_private::Status &ref();
     
    -  void SetError(const lldb_private::Error &lldb_error);
    +  void SetError(const lldb_private::Status &lldb_error);
     
     private:
    -  std::unique_ptr m_opaque_ap;
    +  std::unique_ptr m_opaque_ap;
     
       void CreateIfNeeded();
     };
    
    Modified: vendor/lldb/dist/include/lldb/API/SBPlatform.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/API/SBPlatform.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/API/SBPlatform.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -156,7 +156,8 @@ protected:
       void SetSP(const lldb::PlatformSP &platform_sp);
     
       SBError ExecuteConnected(
    -      const std::function &func);
    +      const std::function
    +          &func);
     
       lldb::PlatformSP m_opaque_sp;
     };
    
    Modified: vendor/lldb/dist/include/lldb/API/SBTarget.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/API/SBTarget.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/API/SBTarget.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -544,7 +544,7 @@ public:
       ///     into this call
       ///
       /// @param[out] error
    -  ///     Error information is written here if the memory read fails.
    +  ///     Status information is written here if the memory read fails.
       ///
       /// @return
       ///     The amount of data read in host bytes.
    
    Modified: vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -169,7 +169,7 @@ public:
     
         virtual bool EvaluatePrecondition(StoppointCallbackContext &context);
     
    -    virtual Error ConfigurePrecondition(Args &options);
    +    virtual Status ConfigurePrecondition(Args &options);
     
         virtual void GetDescription(Stream &stream, lldb::DescriptionLevel level);
       };
    @@ -178,7 +178,7 @@ public:
     
       // Saving & restoring breakpoints:
       static lldb::BreakpointSP CreateFromStructuredData(
    -      Target &target, StructuredData::ObjectSP &data_object_sp, Error &error);
    +      Target &target, StructuredData::ObjectSP &data_object_sp, Status &error);
     
       static bool
       SerializedBreakpointMatchesNames(StructuredData::ObjectSP &bkpt_object_sp,
    @@ -613,7 +613,7 @@ public:
     
       lldb::SearchFilterSP GetSearchFilter() { return m_filter_sp; }
     
    -  bool AddName(const char *new_name, Error &error);
    +  bool AddName(llvm::StringRef new_name, Status &error);
     
       void RemoveName(const char *name_to_remove) {
         if (name_to_remove)
    
    Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointID.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointID.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointID.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -84,7 +84,7 @@ public:
       ///     \b true if the name is a breakpoint name (as opposed to an ID or
       ///     range) false otherwise.
       //------------------------------------------------------------------
    -  static bool StringIsBreakpointName(llvm::StringRef str, Error &error);
    +  static bool StringIsBreakpointName(llvm::StringRef str, Status &error);
     
       //------------------------------------------------------------------
       /// Takes a breakpoint ID and the breakpoint location id and returns
    
    Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -161,7 +161,7 @@ public:
       //------------------------------------------------------------------
       const char *GetConditionText(size_t *hash = nullptr) const;
     
    -  bool ConditionSaysStop(ExecutionContext &exe_ctx, Error &error);
    +  bool ConditionSaysStop(ExecutionContext &exe_ctx, Status &error);
     
       //------------------------------------------------------------------
       /// Set the valid thread to be checked when the breakpoint is hit.
    
    Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -50,7 +50,7 @@ public:
     
         static std::unique_ptr
         CreateFromStructuredData(const StructuredData::Dictionary &options_dict,
    -                             Error &error);
    +                             Status &error);
     
         StringList user_source;
         std::string script_source;
    @@ -119,7 +119,7 @@ public:
       static std::unique_ptr
       CreateFromStructuredData(Target &target,
                                const StructuredData::Dictionary &data_dict,
    -                           Error &error);
    +                           Status &error);
     
       virtual StructuredData::ObjectSP SerializeToStructuredData();
     
    
    Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolver.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolver.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolver.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -140,7 +140,7 @@ public:
     
       static lldb::BreakpointResolverSP
       CreateFromStructuredData(const StructuredData::Dictionary &resolver_dict,
    -                           Error &error);
    +                           Status &error);
     
       virtual StructuredData::ObjectSP SerializeToStructuredData() {
         return StructuredData::ObjectSP();
    @@ -192,7 +192,7 @@ public:
     
       static const char *ResolverTyToName(enum ResolverTy);
     
    -  static ResolverTy NameToResolverTy(const char *name);
    +  static ResolverTy NameToResolverTy(llvm::StringRef name);
     
       virtual lldb::BreakpointResolverSP
       CopyForBreakpoint(Breakpoint &breakpoint) = 0;
    
    Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverAddress.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverAddress.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverAddress.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -39,7 +39,7 @@ public:
       static BreakpointResolver *
       CreateFromStructuredData(Breakpoint *bkpt,
                                const StructuredData::Dictionary &options_dict,
    -                           Error &error);
    +                           Status &error);
     
       StructuredData::ObjectSP SerializeToStructuredData() override;
     
    
    Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverFileLine.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverFileLine.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverFileLine.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -36,7 +36,7 @@ public:
       static BreakpointResolver *
       CreateFromStructuredData(Breakpoint *bkpt,
                                const StructuredData::Dictionary &data_dict,
    -                           Error &error);
    +                           Status &error);
     
       StructuredData::ObjectSP SerializeToStructuredData() override;
     
    
    Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverFileRegex.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverFileRegex.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -38,7 +38,7 @@ public:
       static BreakpointResolver *
       CreateFromStructuredData(Breakpoint *bkpt,
                                const StructuredData::Dictionary &options_dict,
    -                           Error &error);
    +                           Status &error);
     
       StructuredData::ObjectSP SerializeToStructuredData() override;
     
    
    Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverName.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverName.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverName.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -57,7 +57,7 @@ public:
       static BreakpointResolver *
       CreateFromStructuredData(Breakpoint *bkpt,
                                const StructuredData::Dictionary &data_dict,
    -                           Error &error);
    +                           Status &error);
     
       StructuredData::ObjectSP SerializeToStructuredData() override;
     
    
    Modified: vendor/lldb/dist/include/lldb/Breakpoint/Watchpoint.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Breakpoint/Watchpoint.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Breakpoint/Watchpoint.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -100,7 +100,7 @@ public:
       void DumpSnapshots(Stream *s, const char *prefix = nullptr) const;
       void DumpWithLevel(Stream *s, lldb::DescriptionLevel description_level) const;
       Target &GetTarget() { return m_target; }
    -  const Error &GetError() { return m_error; }
    +  const Status &GetError() { return m_error; }
     
       //------------------------------------------------------------------
       /// Returns the WatchpointOptions structure set for this watchpoint.
    @@ -213,8 +213,8 @@ private:
       lldb::ValueObjectSP m_old_value_sp;
       lldb::ValueObjectSP m_new_value_sp;
       CompilerType m_type;
    -  Error m_error; // An error object describing errors associated with this
    -                 // watchpoint.
    +  Status m_error; // An error object describing errors associated with this
    +                  // watchpoint.
       WatchpointOptions
           m_options; // Settable watchpoint options, which is a delegate to handle
                      // the callback machinery.
    
    Modified: vendor/lldb/dist/include/lldb/Core/Communication.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/Communication.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/Communication.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -33,7 +33,7 @@ namespace lldb_private {
     class ConstString;
     }
     namespace lldb_private {
    -class Error;
    +class Status;
     }
     
     namespace lldb_private {
    @@ -71,7 +71,7 @@ namespace lldb_private {
     /// reads data and caches any received bytes. To start the read thread
     /// clients call:
     ///
    -///     bool Communication::StartReadThread (Error *);
    +///     bool Communication::StartReadThread (Status *);
     ///
     /// If true is returned a read thread has been spawned that will
     /// continually execute a call to the pure virtual DoRead function:
    @@ -154,10 +154,10 @@ public:
       ///     internal error object should be filled in with an
       ///     appropriate value based on the result of this function.
       ///
    -  /// @see Error& Communication::GetError ();
    +  /// @see Status& Communication::GetError ();
       /// @see bool Connection::Connect (const char *url);
       //------------------------------------------------------------------
    -  lldb::ConnectionStatus Connect(const char *url, Error *error_ptr);
    +  lldb::ConnectionStatus Connect(const char *url, Status *error_ptr);
     
       //------------------------------------------------------------------
       /// Disconnect the communications connection if one is currently
    @@ -168,10 +168,10 @@ public:
       ///     internal error object should be filled in with an
       ///     appropriate value based on the result of this function.
       ///
    -  /// @see Error& Communication::GetError ();
    +  /// @see Status& Communication::GetError ();
       /// @see bool Connection::Disconnect ();
       //------------------------------------------------------------------
    -  lldb::ConnectionStatus Disconnect(Error *error_ptr = nullptr);
    +  lldb::ConnectionStatus Disconnect(Status *error_ptr = nullptr);
     
       //------------------------------------------------------------------
       /// Check if the connection is valid.
    @@ -217,7 +217,7 @@ public:
       /// @see size_t Connection::Read (void *, size_t);
       //------------------------------------------------------------------
       size_t Read(void *dst, size_t dst_len, const Timeout &timeout,
    -              lldb::ConnectionStatus &status, Error *error_ptr);
    +              lldb::ConnectionStatus &status, Status *error_ptr);
     
       //------------------------------------------------------------------
       /// The actual write function that attempts to write to the
    @@ -237,7 +237,7 @@ public:
       ///     The number of bytes actually Written.
       //------------------------------------------------------------------
       size_t Write(const void *src, size_t src_len, lldb::ConnectionStatus &status,
    -               Error *error_ptr);
    +               Status *error_ptr);
     
       //------------------------------------------------------------------
       /// Sets the connection that it to be used by this class.
    @@ -280,7 +280,7 @@ public:
       /// @see void Communication::AppendBytesToCache (const uint8_t * bytes, size_t
       /// len, bool broadcast);
       //------------------------------------------------------------------
    -  virtual bool StartReadThread(Error *error_ptr = nullptr);
    +  virtual bool StartReadThread(Status *error_ptr = nullptr);
     
       //------------------------------------------------------------------
       /// Stops the read thread by cancelling it.
    @@ -289,9 +289,9 @@ public:
       ///     \b True if the read thread was successfully canceled, \b
       ///     false otherwise.
       //------------------------------------------------------------------
    -  virtual bool StopReadThread(Error *error_ptr = nullptr);
    +  virtual bool StopReadThread(Status *error_ptr = nullptr);
     
    -  virtual bool JoinReadThread(Error *error_ptr = nullptr);
    +  virtual bool JoinReadThread(Status *error_ptr = nullptr);
       //------------------------------------------------------------------
       /// Checks if there is a currently running read thread.
       ///
    @@ -361,7 +361,7 @@ protected:
     
       size_t ReadFromConnection(void *dst, size_t dst_len,
                                 const Timeout &timeout,
    -                            lldb::ConnectionStatus &status, Error *error_ptr);
    +                            lldb::ConnectionStatus &status, Status *error_ptr);
     
       //------------------------------------------------------------------
       /// Append new bytes that get read from the read thread into the
    
    Modified: vendor/lldb/dist/include/lldb/Core/Connection.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/Connection.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/Connection.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -22,7 +22,7 @@
     #include  // for size_t
     
     namespace lldb_private {
    -class Error;
    +class Status;
     }
     namespace lldb_private {
     template  class Timeout;
    @@ -75,10 +75,10 @@ public:
       ///     internal error object should be filled in with an
       ///     appropriate value based on the result of this function.
       ///
    -  /// @see Error& Communication::GetError ();
    +  /// @see Status& Communication::GetError ();
       //------------------------------------------------------------------
       virtual lldb::ConnectionStatus Connect(llvm::StringRef url,
    -                                         Error *error_ptr) = 0;
    +                                         Status *error_ptr) = 0;
     
       //------------------------------------------------------------------
       /// Disconnect the communications connection if one is currently
    @@ -94,9 +94,9 @@ public:
       ///     internal error object should be filled in with an
       ///     appropriate value based on the result of this function.
       ///
    -  /// @see Error& Communication::GetError ();
    +  /// @see Status& Communication::GetError ();
       //------------------------------------------------------------------
    -  virtual lldb::ConnectionStatus Disconnect(Error *error_ptr) = 0;
    +  virtual lldb::ConnectionStatus Disconnect(Status *error_ptr) = 0;
     
       //------------------------------------------------------------------
       /// Check if the connection is valid.
    @@ -137,7 +137,7 @@ public:
       //------------------------------------------------------------------
       virtual size_t Read(void *dst, size_t dst_len,
                           const Timeout &timeout,
    -                      lldb::ConnectionStatus &status, Error *error_ptr) = 0;
    +                      lldb::ConnectionStatus &status, Status *error_ptr) = 0;
     
       //------------------------------------------------------------------
       /// The actual write function that attempts to write to the
    @@ -162,7 +162,7 @@ public:
       ///     The number of bytes actually Written.
       //------------------------------------------------------------------
       virtual size_t Write(const void *dst, size_t dst_len,
    -                       lldb::ConnectionStatus &status, Error *error_ptr) = 0;
    +                       lldb::ConnectionStatus &status, Status *error_ptr) = 0;
     
       //------------------------------------------------------------------
       /// Returns a URI that describes this connection object
    
    Modified: vendor/lldb/dist/include/lldb/Core/Debugger.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/Debugger.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/Debugger.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -30,8 +30,8 @@
     #include "lldb/Target/Platform.h"
     #include "lldb/Target/TargetList.h"
     #include "lldb/Utility/ConstString.h" // for ConstString
    -#include "lldb/Utility/Error.h"       // for Error
     #include "lldb/Utility/FileSpec.h"    // for FileSpec
    +#include "lldb/Utility/Status.h"      // for Status
     #include "lldb/Utility/UserID.h"
     #include "lldb/lldb-defines.h"              // for DISALLOW_COPY_AND_ASSIGN
     #include "lldb/lldb-enumerations.h"         // for ScriptLanguage, Langua...
    @@ -239,9 +239,9 @@ public:
         eStopDisassemblyTypeAlways
       };
     
    -  Error SetPropertyValue(const ExecutionContext *exe_ctx,
    -                         VarSetOperationType op, llvm::StringRef property_path,
    -    llvm::StringRef value) override;
    +  Status SetPropertyValue(const ExecutionContext *exe_ctx,
    +                          VarSetOperationType op, llvm::StringRef property_path,
    +                          llvm::StringRef value) override;
     
       bool GetAutoConfirm() const;
     
    @@ -306,7 +306,7 @@ public:
     
       const ConstString &GetInstanceName() { return m_instance_name; }
     
    -  bool LoadPlugin(const FileSpec &spec, Error &error);
    +  bool LoadPlugin(const FileSpec &spec, Status &error);
     
       void ExecuteIOHandlers();
     
    @@ -318,7 +318,7 @@ public:
     
       bool IsHandlingEvents() const { return m_event_handler_thread.IsJoinable(); }
     
    -  Error RunREPL(lldb::LanguageType language, const char *repl_options);
    +  Status RunREPL(lldb::LanguageType language, const char *repl_options);
     
       // This is for use in the command interpreter, when you either want the
       // selected target, or if no target
    
    Modified: vendor/lldb/dist/include/lldb/Core/FormatEntity.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/FormatEntity.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/FormatEntity.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -10,8 +10,8 @@
     #ifndef liblldb_FormatEntity_h_
     #define liblldb_FormatEntity_h_
     
    -#include "lldb/Utility/Error.h"
    -#include "lldb/Utility/FileSpec.h"  // for FileSpec
    +#include "lldb/Utility/FileSpec.h" // for FileSpec
    +#include "lldb/Utility/Status.h"
     #include "lldb/lldb-enumerations.h" // for Format::eFormatDefault, Format
     #include "lldb/lldb-types.h"        // for addr_t
     #include                 // for min
    @@ -205,11 +205,11 @@ public:
                                 const Address *addr, ValueObject *valobj,
                                 bool function_changed, bool initial_function);
     
    -  static Error Parse(const llvm::StringRef &format, Entry &entry);
    +  static Status Parse(const llvm::StringRef &format, Entry &entry);
     
    -  static Error ExtractVariableInfo(llvm::StringRef &format_str,
    -                                   llvm::StringRef &variable_name,
    -                                   llvm::StringRef &variable_format);
    +  static Status ExtractVariableInfo(llvm::StringRef &format_str,
    +                                    llvm::StringRef &variable_name,
    +                                    llvm::StringRef &variable_format);
     
       static size_t AutoComplete(llvm::StringRef s, int match_start_point,
                                  int max_return_elements, bool &word_complete,
    @@ -228,8 +228,8 @@ public:
                                  llvm::StringRef element_format);
     
     protected:
    -  static Error ParseInternal(llvm::StringRef &format, Entry &parent_entry,
    -                             uint32_t depth);
    +  static Status ParseInternal(llvm::StringRef &format, Entry &parent_entry,
    +                              uint32_t depth);
     };
     } // namespace lldb_private
     
    
    Modified: vendor/lldb/dist/include/lldb/Core/MappedHash.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/MappedHash.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/MappedHash.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -326,7 +326,7 @@ public:
               1u, // Bucket hash data collision, but key didn't match
           eResultEndOfHashData = 2u, // The chain of items for this hash data in
                                      // this bucket is terminated, search no more
    -      eResultError = 3u          // Error parsing the hash data, abort
    +      eResultError = 3u          // Status parsing the hash data, abort
         };
     
         struct Pair {
    @@ -409,7 +409,7 @@ public:
                       // searching
                       return false;
                     case eResultError:
    -                  // Error parsing the hash data, abort
    +                  // Status parsing the hash data, abort
                       return false;
                     }
                   }
    
    Modified: vendor/lldb/dist/include/lldb/Core/Module.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/Module.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/Module.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -17,8 +17,8 @@
     #include "lldb/Symbol/TypeSystem.h"
     #include "lldb/Target/PathMappingList.h"
     #include "lldb/Utility/ConstString.h" // for ConstString
    -#include "lldb/Utility/Error.h"       // for Error
     #include "lldb/Utility/FileSpec.h"
    +#include "lldb/Utility/Status.h" // for Status
     #include "lldb/Utility/UUID.h"
     #include "lldb/lldb-defines.h"      // for DISALLOW_COPY_AND_ASSIGN
     #include "lldb/lldb-enumerations.h" // for LanguageType, SymbolType
    @@ -652,7 +652,7 @@ public:
       //------------------------------------------------------------------
       bool IsLoadedInTarget(Target *target);
     
    -  bool LoadScriptingResourceInTarget(Target *target, Error &error,
    +  bool LoadScriptingResourceInTarget(Target *target, Status &error,
                                          Stream *feedback_stream = nullptr);
     
       //------------------------------------------------------------------
    @@ -728,7 +728,7 @@ public:
       ///     failed (see the `error` for more information in that case).
       //------------------------------------------------------------------
       ObjectFile *GetMemoryObjectFile(const lldb::ProcessSP &process_sp,
    -                                  lldb::addr_t header_addr, Error &error,
    +                                  lldb::addr_t header_addr, Status &error,
                                       size_t size_to_read = 512);
       //------------------------------------------------------------------
       /// Get the symbol vendor interface for the current architecture.
    @@ -1033,7 +1033,7 @@ public:
       ///
       /// @return
       //------------------------------------------------------------------
    -  Error LoadInMemory(Target &target, bool set_pc);
    +  Status LoadInMemory(Target &target, bool set_pc);
     
       //----------------------------------------------------------------------
       /// @class LookupInfo Module.h "lldb/Core/Module.h"
    
    Modified: vendor/lldb/dist/include/lldb/Core/ModuleList.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/ModuleList.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/ModuleList.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -12,9 +12,9 @@
     
     #include "lldb/Core/Address.h"     // for Address
     #include "lldb/Core/ModuleSpec.h"  // for ModuleSpec
    -#include "lldb/Utility/Error.h"    // for Error
     #include "lldb/Utility/FileSpec.h" // for FileSpec
     #include "lldb/Utility/Iterable.h"
    +#include "lldb/Utility/Status.h" // for Status
     #include "lldb/lldb-enumerations.h"
     #include "lldb/lldb-forward.h"
     #include "lldb/lldb-types.h"
    @@ -530,18 +530,18 @@ public:
       //------------------------------------------------------------------
       size_t GetSize() const;
     
    -  bool LoadScriptingResourcesInTarget(Target *target, std::list &errors,
    +  bool LoadScriptingResourcesInTarget(Target *target, std::list &errors,
                                           Stream *feedback_stream = nullptr,
                                           bool continue_on_error = true);
     
       static bool ModuleIsInCache(const Module *module_ptr);
     
    -  static Error GetSharedModule(const ModuleSpec &module_spec,
    -                               lldb::ModuleSP &module_sp,
    -                               const FileSpecList *module_search_paths_ptr,
    -                               lldb::ModuleSP *old_module_sp_ptr,
    -                               bool *did_create_ptr,
    -                               bool always_create = false);
    +  static Status GetSharedModule(const ModuleSpec &module_spec,
    +                                lldb::ModuleSP &module_sp,
    +                                const FileSpecList *module_search_paths_ptr,
    +                                lldb::ModuleSP *old_module_sp_ptr,
    +                                bool *did_create_ptr,
    +                                bool always_create = false);
     
       static bool RemoveSharedModule(lldb::ModuleSP &module_sp);
     
    
    Modified: vendor/lldb/dist/include/lldb/Core/PluginManager.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/PluginManager.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/PluginManager.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -10,8 +10,8 @@
     #ifndef liblldb_PluginManager_h_
     #define liblldb_PluginManager_h_
     
    -#include "lldb/Utility/Error.h" // for Error
     #include "lldb/Utility/FileSpec.h"
    +#include "lldb/Utility/Status.h"          // for Status
     #include "lldb/lldb-enumerations.h"       // for ScriptLanguage
     #include "lldb/lldb-forward.h"            // for OptionValuePropertiesSP
     #include "lldb/lldb-private-interfaces.h" // for DebuggerInitializeCallback
    @@ -202,8 +202,8 @@ public:
       static ObjectFileCreateMemoryInstance
       GetObjectFileCreateMemoryCallbackForPluginName(const ConstString &name);
     
    -  static Error SaveCore(const lldb::ProcessSP &process_sp,
    -                        const FileSpec &outfile);
    +  static Status SaveCore(const lldb::ProcessSP &process_sp,
    +                         const FileSpec &outfile);
     
       //------------------------------------------------------------------
       // ObjectContainer
    
    Modified: vendor/lldb/dist/include/lldb/Core/RegisterValue.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/RegisterValue.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/RegisterValue.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -12,7 +12,7 @@
     
     #include "lldb/Core/Scalar.h"
     #include "lldb/Utility/Endian.h"
    -#include "lldb/Utility/Error.h"     // for Error
    +#include "lldb/Utility/Status.h"    // for Status
     #include "lldb/lldb-enumerations.h" // for ByteOrder, Format
     #include "lldb/lldb-types.h"        // for offset_t
     
    @@ -105,11 +105,11 @@ public:
       // into "dst".
       uint32_t GetAsMemoryData(const RegisterInfo *reg_info, void *dst,
                                uint32_t dst_len, lldb::ByteOrder dst_byte_order,
    -                           Error &error) const;
    +                           Status &error) const;
     
       uint32_t SetFromMemoryData(const RegisterInfo *reg_info, const void *src,
                                  uint32_t src_len, lldb::ByteOrder src_byte_order,
    -                             Error &error);
    +                             Status &error);
     
       bool GetScalarValue(Scalar &scalar) const;
     
    @@ -241,13 +241,13 @@ public:
     
       bool SignExtend(uint32_t sign_bitpos);
     
    -  Error SetValueFromString(const RegisterInfo *reg_info,
    -                           llvm::StringRef value_str);
    -  Error SetValueFromString(const RegisterInfo *reg_info,
    -                           const char *value_str) = delete;
    +  Status SetValueFromString(const RegisterInfo *reg_info,
    +                            llvm::StringRef value_str);
    +  Status SetValueFromString(const RegisterInfo *reg_info,
    +                            const char *value_str) = delete;
     
    -  Error SetValueFromData(const RegisterInfo *reg_info, DataExtractor &data,
    -                         lldb::offset_t offset, bool partial_data_ok);
    +  Status SetValueFromData(const RegisterInfo *reg_info, DataExtractor &data,
    +                          lldb::offset_t offset, bool partial_data_ok);
     
       // The default value of 0 for reg_name_right_align_at means no alignment at
       // all.
    
    Modified: vendor/lldb/dist/include/lldb/Core/Scalar.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/Scalar.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/Scalar.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -10,7 +10,7 @@
     #ifndef liblldb_Scalar_h_
     #define liblldb_Scalar_h_
     
    -#include "lldb/Utility/Error.h"      // for Error
    +#include "lldb/Utility/Status.h"     // for Status
     #include "lldb/lldb-enumerations.h"  // for Encoding, ByteOrder
     #include "lldb/lldb-private-types.h" // for type128
     
    @@ -146,7 +146,7 @@ public:
       bool GetData(DataExtractor &data, size_t limit_byte_size = UINT32_MAX) const;
     
       size_t GetAsMemoryData(void *dst, size_t dst_len,
    -                         lldb::ByteOrder dst_byte_order, Error &error) const;
    +                         lldb::ByteOrder dst_byte_order, Status &error) const;
     
       bool IsZero() const;
     
    @@ -272,11 +272,11 @@ public:
     
       long double LongDouble(long double fail_value = 0.0) const;
     
    -  Error SetValueFromCString(const char *s, lldb::Encoding encoding,
    -                            size_t byte_size);
    +  Status SetValueFromCString(const char *s, lldb::Encoding encoding,
    +                             size_t byte_size);
     
    -  Error SetValueFromData(DataExtractor &data, lldb::Encoding encoding,
    -                         size_t byte_size);
    +  Status SetValueFromData(DataExtractor &data, lldb::Encoding encoding,
    +                          size_t byte_size);
     
       static bool UIntValueIsValidForSize(uint64_t uval64, size_t total_byte_size) {
         if (total_byte_size > 8)
    
    Modified: vendor/lldb/dist/include/lldb/Core/SearchFilter.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/SearchFilter.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/SearchFilter.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -28,7 +28,7 @@ namespace lldb_private {
     class CompileUnit;
     }
     namespace lldb_private {
    -class Error;
    +class Status;
     }
     namespace lldb_private {
     class Function;
    @@ -250,7 +250,7 @@ public:
       static lldb::SearchFilterSP
       CreateFromStructuredData(Target &target,
                                const StructuredData::Dictionary &data_dict,
    -                           Error &error);
    +                           Status &error);
     
       virtual StructuredData::ObjectSP SerializeToStructuredData() {
         return StructuredData::ObjectSP();
    @@ -285,7 +285,7 @@ public:
     
       static const char *FilterTyToName(enum FilterTy);
     
    -  static FilterTy NameToFilterTy(const char *name);
    +  static FilterTy NameToFilterTy(llvm::StringRef name);
     
     protected:
       // Serialization of SearchFilter options:
    @@ -351,7 +351,7 @@ public:
       static lldb::SearchFilterSP
       CreateFromStructuredData(Target &target,
                                const StructuredData::Dictionary &data_dict,
    -                           Error &error);
    +                           Status &error);
     
       StructuredData::ObjectSP SerializeToStructuredData() override;
     
    @@ -405,7 +405,7 @@ public:
       static lldb::SearchFilterSP
       CreateFromStructuredData(Target &target,
                                const StructuredData::Dictionary &data_dict,
    -                           Error &error);
    +                           Status &error);
     
       StructuredData::ObjectSP SerializeToStructuredData() override;
     
    @@ -462,7 +462,7 @@ public:
       static lldb::SearchFilterSP
       CreateFromStructuredData(Target &target,
                                const StructuredData::Dictionary &data_dict,
    -                           Error &error);
    +                           Status &error);
     
       StructuredData::ObjectSP SerializeToStructuredData() override;
     
    @@ -515,7 +515,7 @@ public:
       static lldb::SearchFilterSP
       CreateFromStructuredData(Target &target,
                                const StructuredData::Dictionary &data_dict,
    -                           Error &error);
    +                           Status &error);
     
       StructuredData::ObjectSP SerializeToStructuredData() override;
     
    
    Modified: vendor/lldb/dist/include/lldb/Core/StructuredData.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/StructuredData.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/StructuredData.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -28,7 +28,7 @@
     #include  // for uint64_t
     
     namespace lldb_private {
    -class Error;
    +class Status;
     }
     namespace lldb_private {
     class Stream;
    @@ -143,15 +143,12 @@ public:
                                                 : nullptr);
         }
     
    -    std::string GetStringValue(const char *fail_value = nullptr) {
    +    llvm::StringRef GetStringValue(const char *fail_value = nullptr) {
           String *s = GetAsString();
           if (s)
             return s->GetValue();
     
    -      if (fail_value && fail_value[0])
    -        return std::string(fail_value);
    -
    -      return std::string();
    +      return fail_value;
         }
     
         Generic *GetAsGeneric() {
    @@ -220,7 +217,7 @@ public:
           return success;
         }
     
    -    bool GetItemAtIndexAsString(size_t idx, std::string &result) const {
    +    bool GetItemAtIndexAsString(size_t idx, llvm::StringRef &result) const {
           ObjectSP value_sp = GetItemAtIndex(idx);
           if (value_sp.get()) {
             if (auto string_value = value_sp->GetAsString()) {
    @@ -231,8 +228,8 @@ public:
           return false;
         }
     
    -    bool GetItemAtIndexAsString(size_t idx, std::string &result,
    -                                const std::string &default_val) const {
    +    bool GetItemAtIndexAsString(size_t idx, llvm::StringRef &result,
    +                                llvm::StringRef default_val) const {
           bool success = GetItemAtIndexAsString(idx, result);
           if (!success)
             result = default_val;
    @@ -339,18 +336,13 @@ public:
     
       class String : public Object {
       public:
    -    String(const char *cstr = nullptr) : Object(Type::eTypeString), m_value() {
    -      if (cstr)
    -        m_value = cstr;
    -    }
    -
    -    String(const std::string &s) : Object(Type::eTypeString), m_value(s) {}
    -
    -    String(const std::string &&s) : Object(Type::eTypeString), m_value(s) {}
    +    String() : Object(Type::eTypeString) {}
    +    explicit String(llvm::StringRef S)
    +        : Object(Type::eTypeString), m_value(S) {}
     
    -    void SetValue(const std::string &string) { m_value = string; }
    +    void SetValue(llvm::StringRef S) { m_value = S; }
     
    -    const std::string &GetValue() { return m_value; }
    +    llvm::StringRef GetValue() { return m_value; }
     
         void Dump(Stream &s, bool pretty_print = true) const override;
     
    @@ -430,7 +422,7 @@ public:
         }
     
         bool GetValueForKeyAsString(llvm::StringRef key,
    -                                std::string &result) const {
    +                                llvm::StringRef &result) const {
           ObjectSP value_sp = GetValueForKey(key);
           if (value_sp.get()) {
             if (auto string_value = value_sp->GetAsString()) {
    @@ -441,14 +433,14 @@ public:
           return false;
         }
     
    -    bool GetValueForKeyAsString(llvm::StringRef key, std::string &result,
    +    bool GetValueForKeyAsString(llvm::StringRef key, llvm::StringRef &result,
                                     const char *default_val) const {
           bool success = GetValueForKeyAsString(key, result);
           if (!success) {
             if (default_val)
               result = default_val;
             else
    -          result.clear();
    +          result = llvm::StringRef();
           }
           return success;
         }
    @@ -513,7 +505,7 @@ public:
           AddItem(key, std::make_shared(value));
         }
     
    -    void AddStringItem(llvm::StringRef key, std::string value) {
    +    void AddStringItem(llvm::StringRef key, llvm::StringRef value) {
           AddItem(key, std::make_shared(std::move(value)));
         }
     
    @@ -558,7 +550,7 @@ public:
     
       static ObjectSP ParseJSON(std::string json_text);
     
    -  static ObjectSP ParseJSONFromFile(const FileSpec &file, Error &error);
    +  static ObjectSP ParseJSONFromFile(const FileSpec &file, Status &error);
     };
     
     } // namespace lldb_private
    
    Modified: vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -12,9 +12,9 @@
     
     #include "lldb/Core/Event.h"
     #include "lldb/Core/StructuredData.h"
    -#include "lldb/Utility/Error.h"
    -#include "lldb/Utility/Stream.h"
     #include "lldb/Target/StructuredDataPlugin.h"
    +#include "lldb/Utility/Status.h"
    +#include "lldb/Utility/Stream.h"
     #include "lldb/lldb-forward.h"
     
     #pragma mark--
    @@ -45,8 +45,8 @@ public:
         m_data_sp.reset();
       }
     
    -  Error GetAsJSON(Stream &stream) const {
    -    Error error;
    +  Status GetAsJSON(Stream &stream) const {
    +    Status error;
     
         if (!m_data_sp) {
           error.SetErrorString("No structured data.");
    @@ -57,8 +57,8 @@ public:
         return error;
       }
     
    -  Error GetDescription(Stream &stream) const {
    -    Error error;
    +  Status GetDescription(Stream &stream) const {
    +    Status error;
     
         if (!m_data_sp) {
           error.SetErrorString("Cannot pretty print structured data: "
    
    Modified: vendor/lldb/dist/include/lldb/Core/Timer.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/Timer.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/Timer.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -37,10 +37,23 @@ namespace lldb_private {
     
     class Timer {
     public:
    +  class Category {
    +  public:
    +    explicit Category(const char *category_name);
    +
    +  private:
    +    friend class Timer;
    +    const char *m_name;
    +    std::atomic m_nanos;
    +    std::atomic m_next;
    +
    +    DISALLOW_COPY_AND_ASSIGN(Category);
    +  };
    +
       //--------------------------------------------------------------
       /// Default constructor.
       //--------------------------------------------------------------
    -  Timer(const char *category, const char *format, ...)
    +  Timer(Category &category, const char *format, ...)
           __attribute__((format(printf, 3, 4)));
     
       //--------------------------------------------------------------
    @@ -62,7 +75,7 @@ protected:
       using TimePoint = std::chrono::steady_clock::time_point;
       void ChildDuration(TimePoint::duration dur) { m_child_duration += dur; }
     
    -  const char *m_category;
    +  Category &m_category;
       TimePoint m_total_start;
       TimePoint::duration m_child_duration{0};
     
    
    Modified: vendor/lldb/dist/include/lldb/Core/UserSettingsController.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/UserSettingsController.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/UserSettingsController.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -10,7 +10,7 @@
     #ifndef liblldb_UserSettingsController_h_
     #define liblldb_UserSettingsController_h_
     
    -#include "lldb/Utility/Error.h"             // for Error
    +#include "lldb/Utility/Status.h"            // for Status
     #include "lldb/lldb-forward.h"              // for OptionValuePropertiesSP
     #include "lldb/lldb-private-enumerations.h" // for VarSetOperationType
     
    @@ -57,15 +57,16 @@ public:
       virtual lldb::OptionValueSP GetPropertyValue(const ExecutionContext *exe_ctx,
                                                    llvm::StringRef property_path,
                                                    bool will_modify,
    -                                               Error &error) const;
    +                                               Status &error) const;
     
    -  virtual Error SetPropertyValue(const ExecutionContext *exe_ctx,
    -                                 VarSetOperationType op,
    -    llvm::StringRef property_path, llvm::StringRef value);
    -
    -  virtual Error DumpPropertyValue(const ExecutionContext *exe_ctx, Stream &strm,
    -    llvm::StringRef property_path,
    -                                  uint32_t dump_mask);
    +  virtual Status SetPropertyValue(const ExecutionContext *exe_ctx,
    +                                  VarSetOperationType op,
    +                                  llvm::StringRef property_path,
    +                                  llvm::StringRef value);
    +
    +  virtual Status DumpPropertyValue(const ExecutionContext *exe_ctx,
    +                                   Stream &strm, llvm::StringRef property_path,
    +                                   uint32_t dump_mask);
     
       virtual void DumpAllPropertyValues(const ExecutionContext *exe_ctx,
                                          Stream &strm, uint32_t dump_mask);
    
    Modified: vendor/lldb/dist/include/lldb/Core/Value.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/Value.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/Value.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -13,7 +13,7 @@
     #include "lldb/Core/Scalar.h"
     #include "lldb/Symbol/CompilerType.h"
     #include "lldb/Utility/DataBufferHeap.h"
    -#include "lldb/Utility/Error.h"
    +#include "lldb/Utility/Status.h"
     #include "lldb/lldb-enumerations.h"         // for ByteOrder, ByteOrder::eB...
     #include "lldb/lldb-private-enumerations.h" // for AddressType
     #include "lldb/lldb-private-types.h"        // for type128, RegisterInfo
    @@ -219,11 +219,11 @@ public:
     
       lldb::Format GetValueDefaultFormat();
     
    -  uint64_t GetValueByteSize(Error *error_ptr, ExecutionContext *exe_ctx);
    +  uint64_t GetValueByteSize(Status *error_ptr, ExecutionContext *exe_ctx);
     
    -  Error GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data,
    -                       uint32_t data_offset,
    -                       Module *module); // Can be nullptr
    +  Status GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data,
    +                        uint32_t data_offset,
    +                        Module *module); // Can be nullptr
     
       static const char *GetValueTypeAsCString(ValueType context_type);
     
    
    Modified: vendor/lldb/dist/include/lldb/Core/ValueObject.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Core/ValueObject.h	Tue May 16 19:47:48 2017	(r318377)
    +++ vendor/lldb/dist/include/lldb/Core/ValueObject.h	Tue May 16 19:47:58 2017	(r318378)
    @@ -18,8 +18,8 @@
     #include "lldb/Target/Process.h"
     #include "lldb/Utility/ConstString.h"
     #include "lldb/Utility/DataExtractor.h"
    -#include "lldb/Utility/Error.h"
     #include "lldb/Utility/SharedCluster.h"
    +#include "lldb/Utility/Status.h"
     #include "lldb/Utility/UserID.h"
     #include "lldb/lldb-defines.h"              // for LLDB_INVALID...
     #include "lldb/lldb-enumerations.h"         // for DynamicValue...
    @@ -462,7 +462,7 @@ public:
     
       virtual int64_t GetValueAsSigned(int64_t fail_value, bool *success = nullptr);
     
    -  virtual bool SetValueFromCString(const char *value_str, Error &error);
    +  virtual bool SetValueFromCString(const char *value_str, Status &error);
     
       // Return the module associated with this value object in case the
       // value is from an executable file and might have its data in
    @@ -482,7 +482,7 @@ public:
       //------------------------------------------------------------------
       // The functions below should NOT be modified by subclasses
       //------------------------------------------------------------------
    -  const Error &GetError();
    +  const Status &GetError();
     
       const ConstString &GetName() const;
     
    @@ -520,7 +520,7 @@ public:
       // return 'false' whenever you set the error, otherwise
       // callers may assume true means everything is OK - this will
       // break breakpoint conditions among potentially a few others
    -  virtual bool IsLogicalTrue(Error &error);
    +  virtual bool IsLogicalTrue(Status &error);
     
       virtual const char *GetLocationAsCString();
     
    @@ -620,7 +620,7 @@ public:
     
       virtual lldb::ValueObjectSP CreateConstantValue(const ConstString &name);
     
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:48:08 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0C78D70631;
     Tue, 16 May 2017 19:48:08 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 590E2284;
     Tue, 16 May 2017 19:48:08 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJm71l097520;
     Tue, 16 May 2017 19:48:07 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJm7Bm097519;
     Tue, 16 May 2017 19:48:07 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705161948.v4GJm7Bm097519@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Tue, 16 May 2017 19:48:07 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318379 - vendor/lldb/lldb-trunk-r303197
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:48:08 -0000
    
    Author: dim
    Date: Tue May 16 19:48:07 2017
    New Revision: 318379
    URL: https://svnweb.freebsd.org/changeset/base/318379
    
    Log:
      Tag lldb trunk r303197.
    
    Added:
      vendor/lldb/lldb-trunk-r303197/
         - copied from r318378, vendor/lldb/dist/
    
    From owner-svn-src-all@freebsd.org  Tue May 16 19:53:40 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 580C9D70A96;
     Tue, 16 May 2017 19:53:40 +0000 (UTC) (envelope-from kib@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 1107A3E9;
     Tue, 16 May 2017 19:53:40 +0000 (UTC) (envelope-from kib@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJrdEr001574;
     Tue, 16 May 2017 19:53:39 GMT (envelope-from kib@FreeBSD.org)
    Received: (from kib@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJrdmU001573;
     Tue, 16 May 2017 19:53:39 GMT (envelope-from kib@FreeBSD.org)
    Message-Id: <201705161953.v4GJrdmU001573@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
     using -f
    From: Konstantin Belousov 
    Date: Tue, 16 May 2017 19:53:39 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318380 - head/libexec/rtld-elf
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 19:53:40 -0000
    
    Author: kib
    Date: Tue May 16 19:53:38 2017
    New Revision: 318380
    URL: https://svnweb.freebsd.org/changeset/base/318380
    
    Log:
      Pretend that there is some security when executing in direct mode.
      
      Do not allow direct exec if we the process is suid. Try to follow Unix
      permission checks for DACs, ignore ACLs.
      
      Reviewed by:	emaste
      Sponsored by:	The FreeBSD Foundation
      MFC after:	2 weeks
      Differential revision:	https://reviews.freebsd.org/D10750
    
    Modified:
      head/libexec/rtld-elf/rtld.c
    
    Modified: head/libexec/rtld-elf/rtld.c
    ==============================================================================
    --- head/libexec/rtld-elf/rtld.c	Tue May 16 19:48:07 2017	(r318379)
    +++ head/libexec/rtld-elf/rtld.c	Tue May 16 19:53:38 2017	(r318380)
    @@ -345,12 +345,14 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
         const Elf_Phdr *phdr;
         Objlist initlist;
         RtldLockState lockstate;
    +    struct stat st;
         Elf_Addr *argcp;
         char **argv, *argv0, **env, **envp, *kexecpath, *library_path_rpath;
         caddr_t imgentry;
         char buf[MAXPATHLEN];
         int argc, fd, i, mib[2], phnum;
         size_t len;
    +    bool dir_enable;
     
         /*
          * On entry, the dynamic linker itself has not been relocated yet.
    @@ -419,6 +421,11 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
     	assert(aux_info[AT_PHDR] != NULL);
     	phdr = (const Elf_Phdr *)aux_info[AT_PHDR]->a_un.a_ptr;
     	if (phdr == obj_rtld.phdr) {
    +	    if (!trust) {
    +		rtld_printf("Tainted process refusing to run binary %s\n",
    +		  argv0);
    +		rtld_die();
    +	    }
     	    dbg("opening main program in direct exec mode");
     	    if (argc >= 2) {
     		argv0 = argv[1];
    @@ -428,6 +435,37 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
     		      rtld_strerror(errno));
     		    rtld_die();
     		}
    +		if (fstat(fd, &st) == -1) {
    +		    rtld_printf("Stat %s: %s\n", argv0,
    +		      rtld_strerror(errno));
    +		    rtld_die();
    +		}
    +
    +		/*
    +		 * Rough emulation of the permission checks done by
    +		 * execve(2), only Unix DACs are checked, ACLs are
    +		 * ignored.  Preserve the semantic of disabling owner
    +		 * to execute if owner x bit is cleared, even if
    +		 * others x bit is enabled.
    +		 * mmap(2) does not allow to mmap with PROT_EXEC if
    +		 * binary' file comes from noexec mount.  We cannot
    +		 * set VV_TEXT on the binary.
    +		 */
    +		dir_enable = false;
    +		if (st.st_uid == geteuid()) {
    +		    if ((st.st_mode & S_IXUSR) != 0)
    +			dir_enable = true;
    +		} else if (st.st_gid == getegid()) {
    +		    if ((st.st_mode & S_IXGRP) != 0)
    +			dir_enable = true;
    +		} else if ((st.st_mode & S_IXOTH) != 0) {
    +		    dir_enable = true;
    +		}
    +		if (!dir_enable) {
    +		    rtld_printf("No execute permission for binary %s\n",
    +		      argv0);
    +		    rtld_die();
    +		}
     
     		/*
     		 * For direct exec mode, argv[0] is the interpreter
    
    From owner-svn-src-all@freebsd.org  Tue May 16 20:08:56 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41967D70DCE;
     Tue, 16 May 2017 20:08:56 +0000 (UTC)
     (envelope-from tuexen@freebsd.org)
    Received: from drew.franken.de (drew.ipv6.franken.de
     [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client CN "*.franken.de",
     Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK))
     by mx1.freebsd.org (Postfix) with ESMTPS id 0C95BDD9;
     Tue, 16 May 2017 20:08:56 +0000 (UTC)
     (envelope-from tuexen@freebsd.org)
    Received: from [IPv6:2003:cd:6bc9:d100:a4e8:994e:c9c6:cc3d]
     (p200300CD6BC9D100A4E8994EC9C6CC3D.dip0.t-ipconnect.de
     [IPv6:2003:cd:6bc9:d100:a4e8:994e:c9c6:cc3d])
     (Authenticated sender: macmic)
     by mail-n.franken.de (Postfix) with ESMTPSA id 85C18721E2825;
     Tue, 16 May 2017 22:08:51 +0200 (CEST)
    Content-Type: text/plain; charset=us-ascii
    Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
    Subject: Re: svn commit: r317732 - head/usr.bin/truss
    From: Michael Tuexen 
    In-Reply-To: <1678847.Pdl09MfElI@ralph.baldwin.cx>
    Date: Tue, 16 May 2017 22:08:50 +0200
    Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Content-Transfer-Encoding: quoted-printable
    Message-Id: <6E31B0EF-74B4-4D9A-8126-1161AEF4F3CE@freebsd.org>
    References: <201705030923.v439NEWv072629@repo.freebsd.org>
     <1678847.Pdl09MfElI@ralph.baldwin.cx>
    To: John Baldwin 
    X-Mailer: Apple Mail (2.3273)
    X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00
     autolearn=disabled version=3.4.1
    X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 20:08:56 -0000
    
    > On 16. May 2017, at 20:28, John Baldwin  wrote:
    >=20
    > On Wednesday, May 03, 2017 09:23:14 AM Michael Tuexen wrote:
    >> Author: tuexen
    >> Date: Wed May  3 09:23:13 2017
    >> New Revision: 317732
    >> URL: https://svnweb.freebsd.org/changeset/base/317732
    >>=20
    >> Log:
    >>  Decode the third argument of socket().
    >=20
    > This is not quite right for sockets that aren't PF_INET.  Probably =
    this
    > warrants a const char *sysdecode_socket_protocol(int domain, int =
    protocol)
    > that honors the domain in deciding what protocol value to output.  For =
    now
    > this could just handle PF_INET:
    >=20
    > const char *
    > sysdecode_socket_protocol(int domain, int protocol)
    > {
    >=20
    >    switch (domain) {
    >        case PF_INET:
    >            return (lookup_value(sockipproto, protocol));
    >        default:
    >            return (NULL));
    > }
    >=20
    > Then use this in truss.
    Yes, you are right. Will fix this tomorrow.
    
    Best regards
    Michael
    >=20
    > The socket option stuff currently hardcodes IP protocols and levels =
    only
    > because we don't have a good way of obtaining the domain of an =
    existing
    > socket in a target process.  For socket()'s protocol argument though =
    we
    > readily have the domain available.
    >=20
    > At some point in the future we might address the socket option issue =
    by
    > caching the domain argument when sockets are created in a table, and =
    for
    > truss when attaching to an existing process using the kinfo_file =
    interface to
    > learn about existing sockets, but that's not entirely trivial.
    >=20
    > --=20
    > John Baldwin
    
    
    From owner-svn-src-all@freebsd.org  Tue May 16 21:34:42 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38328D70543;
     Tue, 16 May 2017 21:34:42 +0000 (UTC)
     (envelope-from davidcs@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 029FD1DCE;
     Tue, 16 May 2017 21:34:41 +0000 (UTC)
     (envelope-from davidcs@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GLYfLc043046;
     Tue, 16 May 2017 21:34:41 GMT (envelope-from davidcs@FreeBSD.org)
    Received: (from davidcs@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GLYe8d043042;
     Tue, 16 May 2017 21:34:40 GMT (envelope-from davidcs@FreeBSD.org)
    Message-Id: <201705162134.v4GLYe8d043042@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: davidcs set sender to
     davidcs@FreeBSD.org using -f
    From: David C Somayajulu 
    Date: Tue, 16 May 2017 21:34:40 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318382 - in head/sys: dev/qlnx/qlnxe modules/qlnx/qlnxe
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 21:34:42 -0000
    
    Author: davidcs
    Date: Tue May 16 21:34:40 2017
    New Revision: 318382
    URL: https://svnweb.freebsd.org/changeset/base/318382
    
    Log:
      1. Move Rx Processing to fp_taskqueue(). With this CPU utilization for processing interrupts drops to around 1% for 100G and under 1% for other speeds.
      2. Use sysctls for TRACE_LRO_CNT and TRACE_TSO_PKT_LEN
      3. remove unused mtx tx_lock
      4. bind taskqueue kernel thread to the appropriate cpu core
      5. when tx_ring is full, stop further transmits till at least 1/16th of the Tx Ring is empty. In our case 1K entries. Also if there are rx_pkts to process, put the taskqueue thread to sleep for 100ms, before enabling interrupts.
      6. Use rx_pkt_threshold of 128.
      
      MFC after:3 days
    
    Modified:
      head/sys/dev/qlnx/qlnxe/qlnx_def.h
      head/sys/dev/qlnx/qlnxe/qlnx_os.c
      head/sys/dev/qlnx/qlnxe/qlnx_os.h
      head/sys/modules/qlnx/qlnxe/Makefile
    
    Modified: head/sys/dev/qlnx/qlnxe/qlnx_def.h
    ==============================================================================
    --- head/sys/dev/qlnx/qlnxe/qlnx_def.h	Tue May 16 19:54:47 2017	(r318381)
    +++ head/sys/dev/qlnx/qlnxe/qlnx_def.h	Tue May 16 21:34:40 2017	(r318382)
    @@ -191,6 +191,7 @@ struct qlnx_fastpath {
     	struct mtx		tx_mtx;
     	char			tx_mtx_name[32];
     	struct buf_ring		*tx_br;
    +	uint32_t		tx_ring_full;
     
     	struct task		fp_task;
     	struct taskqueue	*fp_taskqueue;
    @@ -364,6 +365,8 @@ struct qlnx_host {
     	/* debug */
     
     	uint32_t                dbg_level;
    +	uint32_t                dbg_trace_lro_cnt;
    +	uint32_t                dbg_trace_tso_pkt_len;
     	uint32_t                dp_level;
     	uint32_t                dp_module;
     
    @@ -386,7 +389,6 @@ struct qlnx_host {
     
     	/* tx related */
     	struct callout		tx_callout;
    -	struct mtx		tx_lock;
     	uint32_t		txr_idx;
     
     	/* rx related */
    
    Modified: head/sys/dev/qlnx/qlnxe/qlnx_os.c
    ==============================================================================
    --- head/sys/dev/qlnx/qlnxe/qlnx_os.c	Tue May 16 19:54:47 2017	(r318381)
    +++ head/sys/dev/qlnx/qlnxe/qlnx_os.c	Tue May 16 21:34:40 2017	(r318382)
    @@ -382,16 +382,77 @@ qlnx_fp_taskqueue(void *context, int pen
             struct ifnet		*ifp;
             struct mbuf		*mp;
             int			ret;
    +	int			lro_enable, tc;
    +	int			rx_int = 0, total_rx_count = 0;
    +	struct thread		*cthread;
     
             fp = context;
     
             if (fp == NULL)
                     return;
     
    +	cthread = curthread;
    +
    +	thread_lock(cthread);
    +
    +	if (!sched_is_bound(cthread))
    +		sched_bind(cthread, fp->rss_id);
    +
    +	thread_unlock(cthread);
    +
             ha = (qlnx_host_t *)fp->edev;
     
             ifp = ha->ifp;
     
    +	lro_enable = ha->ifp->if_capenable & IFCAP_LRO;
    +
    +	rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold, lro_enable);
    +
    +	if (rx_int) {
    +		fp->rx_pkts += rx_int;
    +		total_rx_count += rx_int;
    +	}
    +
    +#ifdef QLNX_SOFT_LRO
    +	{
    +		struct lro_ctrl *lro;
    +
    +		lro = &fp->rxq->lro;
    +
    +		if (lro_enable && total_rx_count) {
    +
    +#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO)
    +
    +			if (ha->dbg_trace_lro_cnt) {
    +				if (lro->lro_mbuf_count & ~1023)
    +					fp->lro_cnt_1024++;
    +				else if (lro->lro_mbuf_count & ~511)
    +					fp->lro_cnt_512++;
    +				else if (lro->lro_mbuf_count & ~255)
    +					fp->lro_cnt_256++;
    +				else if (lro->lro_mbuf_count & ~127)
    +					fp->lro_cnt_128++;
    +				else if (lro->lro_mbuf_count & ~63)
    +					fp->lro_cnt_64++;
    +			}
    +			tcp_lro_flush_all(lro);
    +
    +#else
    +			struct lro_entry *queued;
    +
    +			while ((!SLIST_EMPTY(&lro->lro_active))) {
    +				queued = SLIST_FIRST(&lro->lro_active);
    +				SLIST_REMOVE_HEAD(&lro->lro_active, next);
    +				tcp_lro_flush(lro, queued);
    +			}
    +#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */
    +		}
    +	}
    +#endif /* #ifdef QLNX_SOFT_LRO */
    +
    +	ecore_sb_update_sb_idx(fp->sb_info);
    +	rmb();
    +
             mtx_lock(&fp->tx_mtx);
     
             if (((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
    @@ -401,13 +462,19 @@ qlnx_fp_taskqueue(void *context, int pen
                     goto qlnx_fp_taskqueue_exit;
             }
     
    -        (void)qlnx_tx_int(ha, fp, fp->txq[0]);
    +	for (tc = 0; tc < ha->num_tc; tc++) {
    +		(void)qlnx_tx_int(ha, fp, fp->txq[tc]);
    +	}
     
             mp = drbr_peek(ifp, fp->tx_br);
     
             while (mp != NULL) {
     
    -                ret = qlnx_send(ha, fp, &mp);
    +		if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
    +			ret = qlnx_send(ha, fp, &mp);
    +		} else {
    +			ret = -1;
    +		}
     
                     if (ret) {
     
    @@ -428,14 +495,28 @@ qlnx_fp_taskqueue(void *context, int pen
                             fp->tx_pkts_processed++;
                     }
     
    +		if (fp->tx_ring_full)
    +			break;
    +
                     mp = drbr_peek(ifp, fp->tx_br);
             }
     
    -        (void)qlnx_tx_int(ha, fp, fp->txq[0]);
    +	for (tc = 0; tc < ha->num_tc; tc++) {
    +		(void)qlnx_tx_int(ha, fp, fp->txq[tc]);
    +	}
     
             mtx_unlock(&fp->tx_mtx);
     
     qlnx_fp_taskqueue_exit:
    +	if (rx_int) {
    +		if (fp->fp_taskqueue != NULL)
    +			taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task);
    +	} else {
    +		if (fp->tx_ring_full) {
    +			qlnx_mdelay(__func__, 100);
    +		}
    +		ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1);
    +	}
     
             QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret));
             return;
    @@ -504,7 +585,9 @@ qlnx_drain_fp_taskqueues(qlnx_host_t *ha
                     fp = &ha->fp_array[i];
     
     		if (fp->fp_taskqueue != NULL) {
    +			QLNX_UNLOCK(ha);
     			taskqueue_drain(fp->fp_taskqueue, &fp->fp_task);
    +			QLNX_LOCK(ha);
     		}
     	}
     	return;
    @@ -540,7 +623,6 @@ qlnx_pci_attach(device_t dev)
             ha->pci_dev = dev;
     
     	mtx_init(&ha->hw_lock, "qlnx_hw_lock", MTX_NETWORK_LOCK, MTX_DEF);
    -        mtx_init(&ha->tx_lock, "qlnx_tx_lock", MTX_NETWORK_LOCK, MTX_DEF);
     
             ha->flags.lock_init = 1;
     
    @@ -944,7 +1026,6 @@ qlnx_release(qlnx_host_t *ha)
                     pci_release_msi(dev);
     
             if (ha->flags.lock_init) {
    -                mtx_destroy(&ha->tx_lock);
                     mtx_destroy(&ha->hw_lock);
             }
     
    @@ -1226,7 +1307,6 @@ qlnx_add_fp_stats_sysctls(qlnx_host_t *h
     			CTLFLAG_RD, &ha->fp_array[i].err_tx_cons_idx_conflict,
     			"err_tx_cons_idx_conflict");
     
    -#ifdef QLNX_TRACE_LRO_CNT
     		SYSCTL_ADD_QUAD(ctx, node_children,
     			OID_AUTO, "lro_cnt_64",
     			CTLFLAG_RD, &ha->fp_array[i].lro_cnt_64,
    @@ -1251,7 +1331,6 @@ qlnx_add_fp_stats_sysctls(qlnx_host_t *h
     			OID_AUTO, "lro_cnt_1024",
     			CTLFLAG_RD, &ha->fp_array[i].lro_cnt_1024,
     			"lro_cnt_1024");
    -#endif /* #ifdef QLNX_TRACE_LRO_CNT */
     
     		/* Rx Related */
     
    @@ -1710,6 +1789,18 @@ qlnx_add_sysctls(qlnx_host_t *ha)
                     OID_AUTO, "dp_level", CTLFLAG_RW,
                     &ha->dp_level, ha->dp_level, "DP Level");
     
    +        ha->dbg_trace_lro_cnt = 0;
    +        SYSCTL_ADD_UINT(ctx, children,
    +                OID_AUTO, "dbg_trace_lro_cnt", CTLFLAG_RW,
    +                &ha->dbg_trace_lro_cnt, ha->dbg_trace_lro_cnt,
    +		"Trace LRO Counts");
    +
    +        ha->dbg_trace_tso_pkt_len = 0;
    +        SYSCTL_ADD_UINT(ctx, children,
    +                OID_AUTO, "dbg_trace_tso_pkt_len", CTLFLAG_RW,
    +                &ha->dbg_trace_tso_pkt_len, ha->dbg_trace_tso_pkt_len,
    +		"Trace TSO packet lengths");
    +
             ha->dp_module = 0;
             SYSCTL_ADD_UINT(ctx, children,
                     OID_AUTO, "dp_module", CTLFLAG_RW,
    @@ -1755,7 +1846,7 @@ qlnx_add_sysctls(qlnx_host_t *ha)
                     &ha->tx_coalesce_usecs, ha->tx_coalesce_usecs,
     		"tx_coalesce_usecs");
     
    -	ha->rx_pkt_threshold = 32;
    +	ha->rx_pkt_threshold = 128;
             SYSCTL_ADD_UINT(ctx, children,
                     OID_AUTO, "rx_pkt_threshold", CTLFLAG_RW,
                     &ha->rx_pkt_threshold, ha->rx_pkt_threshold,
    @@ -2162,7 +2253,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd
     			ifp->if_mtu = ifr->ifr_mtu;
     			ha->max_frame_size =
     				ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
    -			if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) {
    +			if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
     				qlnx_init_locked(ha);
     			}
     
    @@ -2178,7 +2269,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd
     		QLNX_LOCK(ha);
     
     		if (ifp->if_flags & IFF_UP) {
    -			if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) {
    +			if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
     				if ((ifp->if_flags ^ ha->if_flags) &
     					IFF_PROMISC) {
     					ret = qlnx_set_promisc(ha);
    @@ -2712,6 +2803,16 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     	tx_data_bd	= NULL;
     
     	txq = fp->txq[0];
    +
    +	if (fp->tx_ring_full) {
    +		elem_left = ecore_chain_get_elem_left(&txq->tx_pbl);
    +
    +		if (elem_left < (TX_RING_SIZE >> 4)) 
    +			return (-1);
    +		else 
    +			fp->tx_ring_full = 0;
    +	}
    +
     	idx = txq->sw_tx_prod;
     
     	map = txq->sw_tx_ring[idx].map;
    @@ -2720,20 +2821,18 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     	ret = bus_dmamap_load_mbuf_sg(ha->tx_tag, map, m_head, segs, &nsegs,
     			BUS_DMA_NOWAIT);
     
    -#ifdef QLNX_TRACE_TSO_PKT_LEN
    -
    -	if (!fp->tx_tso_min_pkt_len) {
    -		fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len;
    -		fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len;
    -	} else {
    -		if (fp->tx_tso_min_pkt_len > m_head->m_pkthdr.len)
    +	if (ha->dbg_trace_tso_pkt_len) {
    +		if (!fp->tx_tso_min_pkt_len) {
     			fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len;
    -		if (fp->tx_tso_max_pkt_len < m_head->m_pkthdr.len)
    -			fp->tx_tso_max_pkt_len = m_head->m_pkthdr.len;
    +			fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len;
    +		} else {
    +			if (fp->tx_tso_min_pkt_len > m_head->m_pkthdr.len)
    +				fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len;
    +			if (fp->tx_tso_max_pkt_len < m_head->m_pkthdr.len)
    +				fp->tx_tso_max_pkt_len = m_head->m_pkthdr.len;
    +		}
     	}
     
    -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */
    -
     	if (m_head->m_pkthdr.csum_flags & CSUM_TSO)
     		offset = qlnx_tcp_offset(ha, m_head);
     
    @@ -2815,14 +2914,12 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     
     	QL_ASSERT(ha, (nsegs != 0), ("qlnx_send: empty packet"));
     
    -#ifdef QLNX_TRACE_TSO_PKT_LEN
    -
    -	if (nsegs < QLNX_FP_MAX_SEGS)
    -		fp->tx_pkts[(nsegs - 1)]++;
    -	else
    -		fp->tx_pkts[(QLNX_FP_MAX_SEGS - 1)]++; 
    -
    -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */
    +	if (ha->dbg_trace_tso_pkt_len) {
    +		if (nsegs < QLNX_FP_MAX_SEGS)
    +			fp->tx_pkts[(nsegs - 1)]++;
    +		else
    +			fp->tx_pkts[(QLNX_FP_MAX_SEGS - 1)]++; 
    +	}
     
     	if ((nsegs + QLNX_TX_ELEM_RESERVE) >
     		(int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) {
    @@ -2843,6 +2940,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     				__func__, nsegs, elem_left, fp->rss_id));
     
     			fp->err_tx_nsegs_gt_elem_left++;
    +			fp->tx_ring_full = 1;
     			ha->storm_stats_enable = 1;
     			return (ENOBUFS);
     		}
    @@ -3051,15 +3149,13 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     
     	first_bd->data.nbds = nbd;
     
    -#ifdef QLNX_TRACE_TSO_PKT_LEN
    -
    -	if (fp->tx_tso_max_nsegs < nsegs)
    -		fp->tx_tso_max_nsegs = nsegs;
    -
    -	if ((nsegs < fp->tx_tso_min_nsegs) || (!fp->tx_tso_min_nsegs))
    -		fp->tx_tso_min_nsegs = nsegs;
    +	if (ha->dbg_trace_tso_pkt_len) {
    +		if (fp->tx_tso_max_nsegs < nsegs)
    +			fp->tx_tso_max_nsegs = nsegs;
     
    -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */
    +		if ((nsegs < fp->tx_tso_min_nsegs) || (!fp->tx_tso_min_nsegs))
    +			fp->tx_tso_min_nsegs = nsegs;
    +	}
     
     	txq->sw_tx_ring[idx].nsegs = nsegs;
     	txq->sw_tx_prod = (txq->sw_tx_prod + 1) & (TX_RING_SIZE - 1);
    @@ -4188,11 +4284,9 @@ qlnx_fp_isr(void *arg)
             qlnx_ivec_t		*ivec = arg;
             qlnx_host_t		*ha;
             struct qlnx_fastpath	*fp = NULL;
    -        int			idx, lro_enable, tc;
    -        int			rx_int = 0, total_rx_count = 0;
    +        int			idx;
     
             ha = ivec->ha;
    -        lro_enable = ha->ifp->if_capenable & IFCAP_LRO;
     
             if (ha->state != QLNX_STATE_OPEN) {
                     return;
    @@ -4214,73 +4308,8 @@ qlnx_fp_isr(void *arg)
                     ha->err_fp_null++;
             } else {
                     ecore_sb_ack(fp->sb_info, IGU_INT_DISABLE, 0);
    -
    -                do {
    -                        for (tc = 0; tc < ha->num_tc; tc++) {
    -                                if (mtx_trylock(&fp->tx_mtx)) {
    -                                        qlnx_tx_int(ha, fp, fp->txq[tc]);
    -                                        mtx_unlock(&fp->tx_mtx);
    -                                }
    -                        }
    -
    -                        rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold,
    -                                        lro_enable);
    -
    -                        if (rx_int) {
    -                                fp->rx_pkts += rx_int;
    -				total_rx_count += rx_int;
    -			}
    -
    -                } while (rx_int);
    -
    -
    -#ifdef QLNX_SOFT_LRO
    -                {
    -                        struct lro_ctrl *lro;
    -
    -                        lro = &fp->rxq->lro;
    -
    -                        if (lro_enable && total_rx_count) {
    -
    -#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO)
    -
    -#ifdef QLNX_TRACE_LRO_CNT
    -				if (lro->lro_mbuf_count & ~1023)
    -					fp->lro_cnt_1024++;
    -				else if (lro->lro_mbuf_count & ~511)
    -					fp->lro_cnt_512++;
    -				else if (lro->lro_mbuf_count & ~255)
    -					fp->lro_cnt_256++;
    -				else if (lro->lro_mbuf_count & ~127)
    -					fp->lro_cnt_128++;
    -				else if (lro->lro_mbuf_count & ~63)
    -					fp->lro_cnt_64++;
    -#endif /* #ifdef QLNX_TRACE_LRO_CNT */
    -
    -                                tcp_lro_flush_all(lro);
    -
    -#else
    -                                struct lro_entry *queued;
    -
    -                                while ((!SLIST_EMPTY(&lro->lro_active))) {
    -                                        queued = SLIST_FIRST(&lro->lro_active);
    -                                        SLIST_REMOVE_HEAD(&lro->lro_active, \
    -						next);
    -                                        tcp_lro_flush(lro, queued);
    -                                }
    -#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */
    -                        }
    -                }
    -#endif /* #ifdef QLNX_SOFT_LRO */
    -
    -                if (fp->fp_taskqueue != NULL)
    -                        taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task);
    -
    -                ecore_sb_update_sb_idx(fp->sb_info);
    -                rmb();
    -                ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1);
    -
    -                return;
    +		if (fp->fp_taskqueue != NULL)
    +			taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task);
             }
     
             return;
    @@ -5150,6 +5179,8 @@ qlnx_init_fp(qlnx_host_t *ha)
     		snprintf(fp->name, sizeof(fp->name), "%s-fp-%d", qlnx_name_str,
     			rss_id);
     
    +		fp->tx_ring_full = 0;
    +
     		/* reset all the statistics counters */
     
     		fp->tx_pkts_processed = 0;
    
    Modified: head/sys/dev/qlnx/qlnxe/qlnx_os.h
    ==============================================================================
    --- head/sys/dev/qlnx/qlnxe/qlnx_os.h	Tue May 16 19:54:47 2017	(r318381)
    +++ head/sys/dev/qlnx/qlnxe/qlnx_os.h	Tue May 16 21:34:40 2017	(r318382)
    @@ -92,6 +92,7 @@
     #include 
     #include 
     #include 
    +#include 
     
     static __inline int qlnx_ms_to_hz(int ms)
     {
    @@ -138,10 +139,6 @@ MALLOC_DECLARE(M_QLNXBUF);
     #define QLNX_LOCK(ha)		mtx_lock(&ha->hw_lock)
     #define QLNX_UNLOCK(ha)		mtx_unlock(&ha->hw_lock)
     
    - 
    -#define QLNX_TX_LOCK(ha)	mtx_lock(&ha->tx_lock);
    -#define QLNX_TX_UNLOCK(ha)	mtx_unlock(&ha->tx_lock);
    -
     /*
      * structure encapsulating a DMA buffer
      */
    
    Modified: head/sys/modules/qlnx/qlnxe/Makefile
    ==============================================================================
    --- head/sys/modules/qlnx/qlnxe/Makefile	Tue May 16 19:54:47 2017	(r318381)
    +++ head/sys/modules/qlnx/qlnxe/Makefile	Tue May 16 21:34:40 2017	(r318382)
    @@ -65,8 +65,6 @@ CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi
     #CFLAGS += -DQLNX_SOFT_LRO
     #CFLAGS += -DQLNX_QSORT_LRO
     #CFLAGS += -DQLNX_MAX_COALESCE
    -#CFLAGS += -DQLNX_TRACE_LRO_CNT
    -#CFLAGS += -DQLNX_TRACE_TSO_PKT_LEN
     
     
     .include 
    
    From owner-svn-src-all@freebsd.org  Tue May 16 21:46:32 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 018DED70864;
     Tue, 16 May 2017 21:46:32 +0000 (UTC)
     (envelope-from davidcs@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 98927790;
     Tue, 16 May 2017 21:46:31 +0000 (UTC)
     (envelope-from davidcs@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GLkUZh047018;
     Tue, 16 May 2017 21:46:30 GMT (envelope-from davidcs@FreeBSD.org)
    Received: (from davidcs@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GLkUMQ047015;
     Tue, 16 May 2017 21:46:30 GMT (envelope-from davidcs@FreeBSD.org)
    Message-Id: <201705162146.v4GLkUMQ047015@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: davidcs set sender to
     davidcs@FreeBSD.org using -f
    From: David C Somayajulu 
    Date: Tue, 16 May 2017 21:46:30 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318383 - head/sys/dev/qlnx/qlnxe
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 21:46:32 -0000
    
    Author: davidcs
    Date: Tue May 16 21:46:30 2017
    New Revision: 318383
    URL: https://svnweb.freebsd.org/changeset/base/318383
    
    Log:
      QL_DPRINT macro modfied to handle multiple args; print line#.
      
      Submitted by:Shminderjit.Singh@cavium.com
      MFC after:3 days
    
    Modified:
      head/sys/dev/qlnx/qlnxe/qlnx_def.h
      head/sys/dev/qlnx/qlnxe/qlnx_ioctl.c
      head/sys/dev/qlnx/qlnxe/qlnx_os.c
    
    Modified: head/sys/dev/qlnx/qlnxe/qlnx_def.h
    ==============================================================================
    --- head/sys/dev/qlnx/qlnxe/qlnx_def.h	Tue May 16 21:34:40 2017	(r318382)
    +++ head/sys/dev/qlnx/qlnxe/qlnx_def.h	Tue May 16 21:46:30 2017	(r318383)
    @@ -483,35 +483,141 @@ typedef struct qlnx_host qlnx_host_t;
     
     #ifdef QLNX_DEBUG
     
    -#define QL_DPRINT1(ha, x)       if (ha->dbg_level & 0x0001) device_printf x
    -#define QL_DPRINT2(ha, x)       if (ha->dbg_level & 0x0002) device_printf x
    -#define QL_DPRINT3(ha, x)       if (ha->dbg_level & 0x0004) device_printf x
    -#define QL_DPRINT4(ha, x)       if (ha->dbg_level & 0x0008) device_printf x
    -#define QL_DPRINT5(ha, x)       if (ha->dbg_level & 0x0010) device_printf x
    -#define QL_DPRINT6(ha, x)       if (ha->dbg_level & 0x0020) device_printf x
    -#define QL_DPRINT7(ha, x)       if (ha->dbg_level & 0x0040) device_printf x
    -#define QL_DPRINT8(ha, x)       if (ha->dbg_level & 0x0080) device_printf x
    -#define QL_DPRINT9(ha, x)       if (ha->dbg_level & 0x0100) device_printf x
    -#define QL_DPRINT11(ha, x)      if (ha->dbg_level & 0x0400) device_printf x
    -#define QL_DPRINT12(ha, x)      if (ha->dbg_level & 0x0800) device_printf x
    -#define QL_DPRINT13(ha, x)      if (ha->dbg_level & 0x1000) device_printf x
    -#define QL_DPRINT14(ha, x)      if (ha->dbg_level & 0x2000) device_printf x
    +#define QL_DPRINT1(ha, x, ...) 					\
    +	do { 							\
    +		if ((ha)->dbg_level & 0x0001) {			\
    +			device_printf ((ha)->pci_dev,		\
    +				"[%s:%d]" x,			\
    +				__func__, __LINE__,		\
    +				## __VA_ARGS__);		\
    +		}						\
    +	} while (0)
    +
    +#define QL_DPRINT2(ha, x, ...)					\
    +	do { 							\
    +		if ((ha)->dbg_level & 0x0002) {			\
    +			device_printf ((ha)->pci_dev,		\
    +				"[%s:%d]" x,			\
    +				__func__, __LINE__,		\
    +				## __VA_ARGS__);		\
    +		}						\
    +	} while (0)
    +
    +#define QL_DPRINT3(ha, x, ...)					\
    +	do { 							\
    +		if ((ha)->dbg_level & 0x0004) {			\
    +			device_printf ((ha)->pci_dev,		\
    +				"[%s:%d]" x,			\
    +				__func__, __LINE__,		\
    +				## __VA_ARGS__);		\
    +		}						\
    +	} while (0)
    +
    +#define QL_DPRINT4(ha, x, ...)					\
    +	do { 							\
    +		if ((ha)->dbg_level & 0x0008) {			\
    +			device_printf ((ha)->pci_dev,		\
    +				"[%s:%d]" x,			\
    +				__func__, __LINE__,		\
    +				## __VA_ARGS__);		\
    +		}						\
    +	} while (0)
    +
    +#define QL_DPRINT5(ha, x, ...)					\
    +	do { 							\
    +		if ((ha)->dbg_level & 0x0010) {			\
    +			device_printf ((ha)->pci_dev,		\
    +				"[%s:%d]" x,			\
    +				__func__, __LINE__,		\
    +				## __VA_ARGS__);		\
    +		}						\
    +	} while (0)
    +
    +#define QL_DPRINT6(ha, x, ...)					\
    +	do { 							\
    +		if ((ha)->dbg_level & 0x0020) {			\
    +			device_printf ((ha)->pci_dev,		\
    +				"[%s:%d]" x,			\
    +				__func__, __LINE__,		\
    +				## __VA_ARGS__);		\
    +		}						\
    +	} while (0)
    +
    +#define QL_DPRINT7(ha, x, ...)					\
    +	do { 							\
    +		if ((ha)->dbg_level & 0x0040) {			\
    +			device_printf ((ha)->pci_dev,		\
    +				"[%s:%d]" x,			\
    +				__func__, __LINE__,		\
    +				## __VA_ARGS__);		\
    +		}						\
    +	} while (0)
    +
    +#define QL_DPRINT8(ha, x, ...)					\
    +	do { 							\
    +		if ((ha)->dbg_level & 0x0080) {			\
    +			device_printf ((ha)->pci_dev,		\
    +				"[%s:%d]" x,			\
    +				__func__, __LINE__,		\
    +				## __VA_ARGS__);		\
    +		}						\
    +	} while (0)
    +
    +#define QL_DPRINT9(ha, x, ...)					\
    +	do { 							\
    +		if ((ha)->dbg_level & 0x0100) {			\
    +			device_printf ((ha)->pci_dev,		\
    +				"[%s:%d]" x,			\
    +				__func__, __LINE__,		\
    +				## __VA_ARGS__);		\
    +		}						\
    +	} while (0)
    +
    +#define QL_DPRINT11(ha, x, ...)					\
    +	do { 							\
    +		if ((ha)->dbg_level & 0x0400) {			\
    +			device_printf ((ha)->pci_dev,		\
    +				"[%s:%d]" x,			\
    +				__func__, __LINE__,		\
    +				## __VA_ARGS__);		\
    +		}						\
    +	} while (0)
    +
    +#define QL_DPRINT12(ha, x, ...)					\
    +	do { 							\
    +		if ((ha)->dbg_level & 0x0800) {			\
    +			device_printf ((ha)->pci_dev,		\
    +				"[%s:%d]" x,			\
    +				__func__, __LINE__,		\
    +				## __VA_ARGS__);		\
    +		}						\
    +	} while (0)
    +
    +#define QL_DPRINT13(ha, x, ...)					\
    +	do { 							\
    +		if ((ha)->dbg_level & 0x1000) {			\
    +			device_printf ((ha)->pci_dev,		\
    +				"[%s:%d]" x,			\
    +				__func__, __LINE__,		\
    +				## __VA_ARGS__);		\
    +		}						\
    +	} while (0)
    +
     
     #else
     
    -#define QL_DPRINT1(ha, x)
    -#define QL_DPRINT2(ha, x)
    -#define QL_DPRINT3(ha, x)
    -#define QL_DPRINT4(ha, x)
    -#define QL_DPRINT5(ha, x)
    -#define QL_DPRINT6(ha, x)
    -#define QL_DPRINT7(ha, x)
    -#define QL_DPRINT8(ha, x)
    -#define QL_DPRINT9(ha, x)
    -#define QL_DPRINT11(ha, x)
    -#define QL_DPRINT12(ha, x)
    -#define QL_DPRINT13(ha, x)
    -#define QL_DPRINT14(ha, x)
    +#define QL_DPRINT1(ha, x, ...)
    +#define QL_DPRINT2(ha, x, ...)
    +#define QL_DPRINT3(ha, x, ...)
    +#define QL_DPRINT4(ha, x, ...)
    +#define QL_DPRINT5(ha, x, ...)
    +#define QL_DPRINT6(ha, x, ...)
    +#define QL_DPRINT7(ha, x, ...)
    +#define QL_DPRINT8(ha, x, ...)
    +#define QL_DPRINT9(ha, x, ...)
    +#define QL_DPRINT11(ha, x, ...)
    +#define QL_DPRINT12(ha, x, ...)
    +#define QL_DPRINT13(ha, x, ...)
     
     #endif /* #ifdef QLNX_DEBUG */
     
    
    Modified: head/sys/dev/qlnx/qlnxe/qlnx_ioctl.c
    ==============================================================================
    --- head/sys/dev/qlnx/qlnxe/qlnx_ioctl.c	Tue May 16 21:34:40 2017	(r318382)
    +++ head/sys/dev/qlnx/qlnxe/qlnx_ioctl.c	Tue May 16 21:46:30 2017	(r318383)
    @@ -121,8 +121,7 @@ qlnx_grc_dump(qlnx_host_t *ha, uint32_t 
     	p_ptt = ecore_ptt_acquire(p_hwfn);
     
     	if (!p_ptt) {
    -		QL_DPRINT1(ha, (ha->pci_dev, "%s : ecore_ptt_acquire failed\n",
    -			__func__));
    +		QL_DPRINT1(ha,"ecore_ptt_acquire failed\n");
     		return (rval);
     	}
     
    @@ -133,9 +132,8 @@ qlnx_grc_dump(qlnx_host_t *ha, uint32_t 
     	 	rval = 0;	
     		ha->grcdump_taken = 1;
     	} else
    -		QL_DPRINT1(ha, (ha->pci_dev,
    -			"%s : ecore_dbg_grc_dump failed [%d, 0x%x]\n",
    -			__func__, hwfn_index, rval));
    +		QL_DPRINT1(ha,"ecore_dbg_grc_dump failed [%d, 0x%x]\n",
    +			   hwfn_index, rval);
     
     	ecore_ptt_release(p_hwfn, p_ptt);
     
    @@ -177,8 +175,7 @@ qlnx_get_grc_dump(qlnx_host_t *ha, qlnx_
     
     		grcdump->grcdump_dwords[i] = dwords;
     
    -		QL_DPRINT1(ha, (ha->pci_dev, "%s: grcdump_dwords[%d] = 0x%x\n",
    -			__func__, i, dwords));
    +		QL_DPRINT1(ha,"grcdump_dwords[%d] = 0x%x\n", i, dwords);
     
     		rval = copyout(ha->grcdump[i], grcdump->grcdump[i],
     				ha->grcdump_size[i]);
    @@ -213,8 +210,7 @@ qlnx_idle_chk(qlnx_host_t *ha, uint32_t 
     	p_ptt = ecore_ptt_acquire(p_hwfn);
     
     	if (!p_ptt) {
    -		QL_DPRINT1(ha, (ha->pci_dev,
    -			"%s : ecore_ptt_acquire failed\n", __func__));
    +		QL_DPRINT1(ha,"ecore_ptt_acquire failed\n");
     		return (rval);
     	}
     
    @@ -225,9 +221,8 @@ qlnx_idle_chk(qlnx_host_t *ha, uint32_t 
     	 	rval = 0;	
     		ha->idle_chk_taken = 1;
     	} else
    -		QL_DPRINT1(ha, (ha->pci_dev,
    -			"%s : ecore_dbg_idle_chk_dump failed [%d, 0x%x]\n",
    -			__func__, hwfn_index, rval));
    +		QL_DPRINT1(ha,"ecore_dbg_idle_chk_dump failed [%d, 0x%x]\n",
    +			   hwfn_index, rval);
     
     	ecore_ptt_release(p_hwfn, p_ptt);
     
    @@ -271,8 +266,7 @@ qlnx_get_idle_chk(qlnx_host_t *ha, qlnx_
     		
     		idle_chk->idle_chk_dwords[i] = dwords;
     
    -		QL_DPRINT1(ha, (ha->pci_dev, "%s: idle_chk_dwords[%d] = 0x%x\n",
    -			__func__, i, dwords));
    +		QL_DPRINT1(ha,"idle_chk_dwords[%d] = 0x%x\n", i, dwords);
     
                    	rval = copyout(ha->idle_chk[i], idle_chk->idle_chk[i],
     				ha->idle_chk_size[i]);
    @@ -299,9 +293,8 @@ qlnx_get_trace_cmd_size(qlnx_host_t *ha,
             p_ptt = ecore_ptt_acquire(p_hwfn);
     
             if (!p_ptt) {
    -                QL_DPRINT1(ha, (ha->pci_dev,
    -			"%s: ecore_ptt_acquire [%d, 0x%x]failed\n",
    -                        __func__, hwfn_index, cmd));
    +                QL_DPRINT1(ha, "ecore_ptt_acquire [%d, 0x%x]failed\n",
    +                           hwfn_index, cmd);
                     return (0);
             }
     
    @@ -334,8 +327,7 @@ qlnx_get_trace_cmd_size(qlnx_host_t *ha,
     	}
     
             if (rval != DBG_STATUS_OK) {
    -                QL_DPRINT1(ha, (ha->pci_dev, "%s : cmd = 0x%x failed [0x%x]\n",
    -                        __func__, cmd, rval));
    +                QL_DPRINT1(ha,"cmd = 0x%x failed [0x%x]\n", cmd, rval);
     		num_dwords = 0;
             }
     
    @@ -369,9 +361,8 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn
     
     	buffer = qlnx_zalloc(trace->size[hwfn_index]);
     	if (buffer == NULL) { 
    -                QL_DPRINT1(ha, (ha->pci_dev,
    -			"%s: qlnx_zalloc [%d, 0x%x]failed\n",
    -                        __func__, hwfn_index, trace->cmd));
    +                QL_DPRINT1(ha,"qlnx_zalloc [%d, 0x%x]failed\n",
    +                           hwfn_index, trace->cmd);
                     return (ENXIO);
     	}
     	ecore_dbg_set_app_ver(ecore_dbg_get_fw_func_ver());
    @@ -380,9 +371,8 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn
             p_ptt = ecore_ptt_acquire(p_hwfn);
     
             if (!p_ptt) {
    -                QL_DPRINT1(ha, (ha->pci_dev,
    -			"%s: ecore_ptt_acquire [%d, 0x%x]failed\n",
    -                        __func__, hwfn_index, trace->cmd));
    +                QL_DPRINT1(ha, "ecore_ptt_acquire [%d, 0x%x]failed\n",
    +                           hwfn_index, trace->cmd);
                     return (ENXIO);
             }
     
    @@ -420,8 +410,7 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn
     	}
     
             if (rval != DBG_STATUS_OK) {
    -                QL_DPRINT1(ha, (ha->pci_dev, "%s : cmd = 0x%x failed [0x%x]\n",
    -                        __func__, trace->cmd, rval));
    +                QL_DPRINT1(ha,"cmd = 0x%x failed [0x%x]\n", trace->cmd, rval);
     		num_dwords = 0;
             }
     
    @@ -609,21 +598,18 @@ qlnx_write_nvram(qlnx_host_t *ha, qlnx_n
     
     	ret = copyin(nvram->data, buf, nvram->data_len);
     
    -	QL_DPRINT9(ha,
    -		(ha->pci_dev, "%s: issue cmd = 0x%x data = %p "
    -		" data_len = 0x%x ret = 0x%x exit\n", __func__,
    -		cmd, nvram->data, nvram->data_len, ret));
    +	QL_DPRINT9(ha, "issue cmd = 0x%x data = %p \
    +		 data_len = 0x%x ret = 0x%x exit\n",
    +		cmd, nvram->data, nvram->data_len, ret);
     
     	if (ret == 0) {
     		ret = ecore_mcp_nvm_write(&ha->cdev, cmd,
     			nvram->offset, buf, nvram->data_len);
     	}
     
    -	QL_DPRINT9(ha,
    -		(ha->pci_dev, "%s: cmd = 0x%x data = %p "
    -		" data_len = 0x%x resp = 0x%x ret = 0x%x exit\n",
    -		__func__, cmd, nvram->data, nvram->data_len,
    -		ha->cdev.mcp_nvm_resp, ret));
    +	QL_DPRINT9(ha, "cmd = 0x%x data = %p \
    +		 data_len = 0x%x resp = 0x%x ret = 0x%x exit\n",
    +		cmd, nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret);
     
     	free(buf, M_QLNXBUF);
     
    @@ -644,10 +630,9 @@ qlnx_read_nvram(qlnx_host_t *ha, qlnx_nv
     	ret = ecore_mcp_nvm_read(&ha->cdev, nvram->offset, buf,
     		nvram->data_len);
     
    -	QL_DPRINT9(ha, (ha->pci_dev, "%s: data = %p data_len = 0x%x "
    -		" resp = 0x%x ret = 0x%x exit\n", __func__,
    -		nvram->data, nvram->data_len,
    -		ha->cdev.mcp_nvm_resp, ret));
    +	QL_DPRINT9(ha, " data = %p data_len = 0x%x \
    +		 resp = 0x%x ret = 0x%x exit\n",
    +		nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret);
     
     	if (ret == 0) {
     		ret = copyout(buf, nvram->data, nvram->data_len);
    @@ -672,10 +657,9 @@ qlnx_get_nvram_resp(qlnx_host_t *ha, qln
     
     	ret = ecore_mcp_nvm_resp(&ha->cdev, buf);
     
    -	QL_DPRINT9(ha, (ha->pci_dev, "%s: data = %p data_len = 0x%x "
    -		" resp = 0x%x ret = 0x%x exit\n", __func__,
    -		nvram->data, nvram->data_len,
    -		ha->cdev.mcp_nvm_resp, ret));
    +	QL_DPRINT9(ha, "data = %p data_len = 0x%x \
    +		 resp = 0x%x ret = 0x%x exit\n",
    +		nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret);
     
     	if (ret == 0) {
     		ret = copyout(buf, nvram->data, nvram->data_len);
    @@ -708,28 +692,25 @@ qlnx_nvram(qlnx_host_t *ha, qlnx_nvram_t
     	case QLNX_NVRAM_CMD_SET_SECURE_MODE:
     		ret = ecore_mcp_nvm_set_secure_mode(&ha->cdev, nvram->offset);
     
    -		QL_DPRINT9(ha, (ha->pci_dev,
    -			"%s: QLNX_NVRAM_CMD_SET_SECURE_MODE "
    -			" resp = 0x%x ret = 0x%x exit\n", __func__,
    -			ha->cdev.mcp_nvm_resp, ret));
    +		QL_DPRINT9(ha, "QLNX_NVRAM_CMD_SET_SECURE_MODE \
    +			 resp = 0x%x ret = 0x%x exit\n",
    +			 ha->cdev.mcp_nvm_resp, ret);
     		break;
     
     	case QLNX_NVRAM_CMD_DEL_FILE:
     		ret = ecore_mcp_nvm_del_file(&ha->cdev, nvram->offset);
     
    -		QL_DPRINT9(ha, (ha->pci_dev,
    -			"%s: QLNX_NVRAM_CMD_DEL_FILE "
    -			" resp = 0x%x ret = 0x%x exit\n", __func__,
    -			ha->cdev.mcp_nvm_resp, ret));
    +		QL_DPRINT9(ha, "QLNX_NVRAM_CMD_DEL_FILE \
    +			 resp = 0x%x ret = 0x%x exit\n",
    +			ha->cdev.mcp_nvm_resp, ret);
     		break;
     
     	case QLNX_NVRAM_CMD_PUT_FILE_BEGIN:
     		ret = ecore_mcp_nvm_put_file_begin(&ha->cdev, nvram->offset);
     
    -		QL_DPRINT9(ha, (ha->pci_dev,
    -			"%s: QLNX_NVRAM_CMD_PUT_FILE_BEGIN "
    -			" resp = 0x%x ret = 0x%x exit\n", __func__,
    -			ha->cdev.mcp_nvm_resp, ret));
    +		QL_DPRINT9(ha, "QLNX_NVRAM_CMD_PUT_FILE_BEGIN \
    +			 resp = 0x%x ret = 0x%x exit\n",
    +			ha->cdev.mcp_nvm_resp, ret);
     		break;
     
     	case QLNX_NVRAM_CMD_GET_NVRAM_RESP:
    
    Modified: head/sys/dev/qlnx/qlnxe/qlnx_os.c
    ==============================================================================
    --- head/sys/dev/qlnx/qlnxe/qlnx_os.c	Tue May 16 21:34:40 2017	(r318382)
    +++ head/sys/dev/qlnx/qlnxe/qlnx_os.c	Tue May 16 21:46:30 2017	(r318383)
    @@ -303,7 +303,7 @@ qlnx_sp_intr(void *arg)
     
     	ha = (qlnx_host_t *)p_hwfn->p_dev;
     
    -	QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
    +	QL_DPRINT2(ha, "enter\n");
     
     	for (i = 0; i < ha->cdev.num_hwfns; i++) {
     		if (&ha->cdev.hwfns[i] == p_hwfn) {
    @@ -311,7 +311,7 @@ qlnx_sp_intr(void *arg)
     			break;
     		}
     	}
    -	QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
    +	QL_DPRINT2(ha, "exit\n");
     	
     	return;
     }
    @@ -353,8 +353,7 @@ qlnx_create_sp_taskqueues(qlnx_host_t *h
     		taskqueue_start_threads(&ha->sp_taskqueue[i], 1, PI_NET, "%s",
     			tq_name);
     
    -		QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__,
    -			ha->sp_taskqueue[i]));
    +		QL_DPRINT1(ha, "%p\n", ha->sp_taskqueue[i]);
     	}
     
     	return (0);
    @@ -518,7 +517,7 @@ qlnx_fp_taskqueue_exit:
     		ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1);
     	}
     
    -        QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret));
    +        QL_DPRINT2(ha, "exit ret = %d\n", ret);
             return;
     }
     
    @@ -548,8 +547,7 @@ qlnx_create_fp_taskqueues(qlnx_host_t *h
     		taskqueue_start_threads(&fp->fp_taskqueue, 1, PI_NET, "%s",
     			tq_name);
     
    -		QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__,
    -			fp->fp_taskqueue));
    +		QL_DPRINT1(ha, "%p\n",fp->fp_taskqueue);
     	}
     
     	return (0);
    @@ -711,15 +709,14 @@ qlnx_pci_attach(device_t dev)
     	else
     		ha->num_rss = ha->msix_count - ha->cdev.num_hwfns;
     
    -	QL_DPRINT1(ha, (dev, "%s:\n\t\t\tpci_reg [%p, 0x%08x 0x%08x]"
    +	QL_DPRINT1(ha, "\n\t\t\tpci_reg [%p, 0x%08x 0x%08x]"
     		"\n\t\t\tdbells [%p, 0x%08x 0x%08x]"
     		"\n\t\t\tmsix [%p, 0x%08x 0x%08x 0x%x 0x%x]"
     		"\n\t\t\t[ncpus = %d][num_rss = 0x%x] [num_tc = 0x%x]\n",
    -		__func__, ha->pci_reg, rsrc_len_reg,
    +		 ha->pci_reg, rsrc_len_reg,
     		ha->reg_rid, ha->pci_dbells, rsrc_len_dbells, ha->dbells_rid,
     		ha->msix_bar, rsrc_len_msix, ha->msix_rid, pci_msix_count(dev),
    -		ha->msix_count, mp_ncpus, ha->num_rss, ha->num_tc));
    -
    +		ha->msix_count, mp_ncpus, ha->num_rss, ha->num_tc);
             if (pci_alloc_msix(dev, &ha->msix_count)) {
                     device_printf(dev, "%s: pci_alloc_msix[%d] failed\n", __func__,
                             ha->msix_count);
    @@ -755,9 +752,9 @@ qlnx_pci_attach(device_t dev)
     			goto qlnx_pci_attach_err;
     		}
     
    -		QL_DPRINT1(ha, (dev, "%s: p_hwfn [%p] sp_irq_rid %d"
    -			" sp_irq %p sp_handle %p\n", __func__, p_hwfn,
    -			ha->sp_irq_rid[i], ha->sp_irq[i], ha->sp_handle[i]));
    +		QL_DPRINT1(ha, "p_hwfn [%p] sp_irq_rid %d"
    +			" sp_irq %p sp_handle %p\n", p_hwfn,
    +			ha->sp_irq_rid[i], ha->sp_irq[i], ha->sp_handle[i]);
     
     	}
     
    @@ -800,8 +797,8 @@ qlnx_pci_attach(device_t dev)
     			goto qlnx_pci_attach_err;
     
     		ha->grcdump_size[i] = ha->grcdump_size[i] << 2;
    -		QL_DPRINT1(ha, (dev, "grcdump_size[%d] = 0x%08x\n",
    -			i, ha->grcdump_size[i]));
    +		QL_DPRINT1(ha, "grcdump_size[%d] = 0x%08x\n",
    +			i, ha->grcdump_size[i]);
     
     		ha->grcdump[i] = qlnx_zalloc(ha->grcdump_size[i]);
     		if (ha->grcdump[i] == NULL) {
    @@ -815,8 +812,8 @@ qlnx_pci_attach(device_t dev)
     			goto qlnx_pci_attach_err;
     
     		ha->idle_chk_size[i] = ha->idle_chk_size[i] << 2;
    -		QL_DPRINT1(ha, (dev, "idle_chk_size[%d] = 0x%08x\n",
    -			i, ha->idle_chk_size[i]));
    +		QL_DPRINT1(ha, "idle_chk_size[%d] = 0x%08x\n",
    +			i, ha->idle_chk_size[i]);
     
     		ha->idle_chk[i] = qlnx_zalloc(ha->idle_chk_size[i]);
     
    @@ -855,8 +852,8 @@ qlnx_pci_attach(device_t dev)
     		FW_MAJOR_VERSION, FW_MINOR_VERSION, FW_REVISION_VERSION,
     		FW_ENGINEERING_VERSION);
     
    -	QL_DPRINT1(ha, (dev, "%s: STORM_FW version %s MFW version %s\n",
    -		__func__, ha->stormfw_ver, ha->mfw_ver));
    +	QL_DPRINT1(ha, "STORM_FW version %s MFW version %s\n",
    +		 ha->stormfw_ver, ha->mfw_ver);
     
     	qlnx_init_ifnet(dev, ha);
     
    @@ -874,7 +871,7 @@ qlnx_pci_attach_err0:
                     goto qlnx_pci_attach_err;
             }
     
    -	QL_DPRINT2(ha, (dev, "%s: success\n", __func__));
    +	QL_DPRINT2(ha, "success\n");
     
             return (0);
     
    @@ -958,7 +955,7 @@ qlnx_release(qlnx_host_t *ha)
     
             dev = ha->pci_dev;
     
    -	QL_DPRINT2(ha, (dev, "%s: enter\n", __func__));
    +	QL_DPRINT2(ha, "enter\n");
     
     	for (i = 0; i < QLNX_MAX_HW_FUNCS; i++) {
     		if (ha->idle_chk[i] != NULL) {
    @@ -1041,7 +1038,7 @@ qlnx_release(qlnx_host_t *ha)
                     (void) bus_release_resource(dev, SYS_RES_MEMORY, ha->msix_rid,
                                     ha->msix_bar);
     
    -	QL_DPRINT2(ha, (dev, "%s: exit\n", __func__));
    +	QL_DPRINT2(ha, "exit\n");
     	return;
     }
     
    @@ -1053,14 +1050,14 @@ qlnx_trigger_dump(qlnx_host_t *ha)
     	if (ha->ifp != NULL)
     		ha->ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING);
     
    -	QL_DPRINT2(ha, (ha->pci_dev, "%s: start\n", __func__));
    +	QL_DPRINT2(ha, "enter\n");
     
     	for (i = 0; i < ha->cdev.num_hwfns; i++) {
     		qlnx_grc_dump(ha, &ha->grcdump_dwords[i], i);
     		qlnx_idle_chk(ha, &ha->idle_chk_dwords[i], i);
     	}
     
    -	QL_DPRINT2(ha, (ha->pci_dev, "%s: end\n", __func__));
    +	QL_DPRINT2(ha, "exit\n");
     
     	return;
     }
    @@ -1779,12 +1776,11 @@ qlnx_add_sysctls(qlnx_host_t *ha)
     		"\tpersonality = 6 => Default in Shared Memory\n");
     
             ha->dbg_level = 0;
    -
             SYSCTL_ADD_UINT(ctx, children,
                     OID_AUTO, "debug", CTLFLAG_RW,
                     &ha->dbg_level, ha->dbg_level, "Debug Level");
     
    -        ha->dp_level = 0;
    +        ha->dp_level = 0x01;
             SYSCTL_ADD_UINT(ctx, children,
                     OID_AUTO, "dp_level", CTLFLAG_RW,
                     &ha->dp_level, ha->dp_level, "DP Level");
    @@ -1999,7 +1995,7 @@ qlnx_init_ifnet(device_t dev, qlnx_host_
     
             ifmedia_set(&ha->media, (IFM_ETHER | IFM_AUTO));
     
    -        QL_DPRINT2(ha, (dev, "%s: exit\n", __func__));
    +        QL_DPRINT2(ha, "exit\n");
     
             return;
     }
    @@ -2009,6 +2005,8 @@ qlnx_init_locked(qlnx_host_t *ha)
     {
     	struct ifnet	*ifp = ha->ifp;
     
    +	QL_DPRINT1(ha, "Driver Initialization start \n");
    +
     	qlnx_stop(ha);
     
     	if (qlnx_load(ha) == 0) {
    @@ -2026,13 +2024,13 @@ qlnx_init(void *arg)
     
     	ha = (qlnx_host_t *)arg;
     
    -	QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
    +	QL_DPRINT2(ha, "enter\n");
     
     	QLNX_LOCK(ha);
     	qlnx_init_locked(ha);
     	QLNX_UNLOCK(ha);
     
    -	QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
    +	QL_DPRINT2(ha, "exit\n");
     
     	return;
     }
    @@ -2221,8 +2219,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd
     
     	switch (cmd) {
     	case SIOCSIFADDR:
    -		QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFADDR (0x%lx)\n",
    -			__func__, cmd));
    +		QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx)\n", cmd);
     
     		if (ifa->ifa_addr->sa_family == AF_INET) {
     			ifp->if_flags |= IFF_UP;
    @@ -2231,10 +2228,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd
     				qlnx_init_locked(ha);
     				QLNX_UNLOCK(ha);
     			}
    -			QL_DPRINT4(ha, (ha->pci_dev,
    -				"%s: SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n",
    -				__func__, cmd,
    -				ntohl(IA_SIN(ifa)->sin_addr.s_addr)));
    +			QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n",
    +				   cmd, ntohl(IA_SIN(ifa)->sin_addr.s_addr));
     
     			arp_ifinit(ifp, ifa);
     		} else {
    @@ -2243,8 +2238,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd
     		break;
     
     	case SIOCSIFMTU:
    -		QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFMTU (0x%lx)\n",
    -			__func__, cmd));
    +		QL_DPRINT4(ha, "SIOCSIFMTU (0x%lx)\n", cmd);
     
     		if (ifr->ifr_mtu > QLNX_MAX_MTU) {
     			ret = EINVAL;
    @@ -2263,8 +2257,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd
     		break;
     
     	case SIOCSIFFLAGS:
    -		QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFFLAGS (0x%lx)\n",
    -			__func__, cmd));
    +		QL_DPRINT4(ha, "SIOCSIFFLAGS (0x%lx)\n", cmd);
     
     		QLNX_LOCK(ha);
     
    @@ -2292,8 +2285,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd
     		break;
     
     	case SIOCADDMULTI:
    -		QL_DPRINT4(ha, (ha->pci_dev,
    -			"%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd));
    +		QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCADDMULTI", cmd);
     
     		if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
     			if (qlnx_set_multi(ha, 1))
    @@ -2302,8 +2294,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd
     		break;
     
     	case SIOCDELMULTI:
    -		QL_DPRINT4(ha, (ha->pci_dev,
    -			"%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd));
    +		QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCDELMULTI", cmd);
     
     		if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
     			if (qlnx_set_multi(ha, 0))
    @@ -2313,9 +2304,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd
     
     	case SIOCSIFMEDIA:
     	case SIOCGIFMEDIA:
    -		QL_DPRINT4(ha, (ha->pci_dev,
    -			"%s: SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n",
    -			__func__, cmd));
    +		QL_DPRINT4(ha, "SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n", cmd);
    +
     		ret = ifmedia_ioctl(ifp, ifr, &ha->media, cmd);
     		break;
     
    @@ -2323,8 +2313,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd
     		
     		mask = ifr->ifr_reqcap ^ ifp->if_capenable;
     
    -		QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFCAP (0x%lx)\n",
    -			__func__, cmd));
    +		QL_DPRINT4(ha, "SIOCSIFCAP (0x%lx)\n", cmd);
     
     		if (mask & IFCAP_HWCSUM)
     			ifp->if_capenable ^= IFCAP_HWCSUM;
    @@ -2367,8 +2356,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd
     		p_ptt = ecore_ptt_acquire(p_hwfn);
     
     		if (!p_ptt) {
    -			QL_DPRINT1(ha, (ha->pci_dev, "%s :"
    -				" ecore_ptt_acquire failed\n", __func__));
    +			QL_DPRINT1(ha, "ecore_ptt_acquire failed\n");
     			ret = -1;
     			break;
     		}
    @@ -2386,20 +2374,19 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd
     
     		ret = copyout(&i2c, ifr->ifr_data, sizeof(i2c));
     
    -		QL_DPRINT8(ha, (ha->pci_dev, "SIOCGI2C copyout ret = %d"
    -			" len = %d addr = 0x%02x offset = 0x%04x"
    -			" data[0..7]=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x"
    -			" 0x%02x 0x%02x 0x%02x\n",
    +		QL_DPRINT8(ha, "SIOCGI2C copyout ret = %d \
    +			 len = %d addr = 0x%02x offset = 0x%04x \
    +			 data[0..7]=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x \
    +			 0x%02x 0x%02x 0x%02x\n",
     			ret, i2c.len, i2c.dev_addr, i2c.offset,
     			i2c.data[0], i2c.data[1], i2c.data[2], i2c.data[3],
    -			i2c.data[4], i2c.data[5], i2c.data[6], i2c.data[7]));
    +			i2c.data[4], i2c.data[5], i2c.data[6], i2c.data[7]);
     		break;
     	}
     #endif /* #if (__FreeBSD_version >= 1100101) */
     
     	default:
    -		QL_DPRINT4(ha, (ha->pci_dev, "%s: default (0x%lx)\n",
    -			__func__, cmd));
    +		QL_DPRINT4(ha, "default (0x%lx)\n", cmd);
     		ret = ether_ioctl(ifp, cmd, data);
     		break;
     	}
    @@ -2416,14 +2403,14 @@ qlnx_media_change(struct ifnet *ifp)
     
     	ha = (qlnx_host_t *)ifp->if_softc;
     
    -	QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
    +	QL_DPRINT2(ha, "enter\n");
     
     	ifm = &ha->media;
     
     	if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER)
     		ret = EINVAL;
     
    -	QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
    +	QL_DPRINT2(ha, "exit\n");
     
     	return (ret);
     }
    @@ -2435,7 +2422,7 @@ qlnx_media_status(struct ifnet *ifp, str
     
     	ha = (qlnx_host_t *)ifp->if_softc;
     
    -	QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
    +	QL_DPRINT2(ha, "enter\n");
     
     	ifmr->ifm_status = IFM_AVALID;
     	ifmr->ifm_active = IFM_ETHER;
    @@ -2451,8 +2438,7 @@ qlnx_media_status(struct ifnet *ifp, str
     				(IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE);
     	}
     
    -	QL_DPRINT2(ha, (ha->pci_dev, "%s: exit (%s)\n", __func__,
    -		(ha->link_up ? "link_up" : "link_down")));
    +	QL_DPRINT2(ha, "exit (%s)\n", (ha->link_up ? "link_up" : "link_down"));
     
     	return;
     }
    @@ -2478,20 +2464,19 @@ qlnx_free_tx_pkt(qlnx_host_t *ha, struct
     
     		QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_MBUF_NULL);
     
    -		QL_DPRINT1(ha, (ha->pci_dev, "%s: (mp == NULL) "
    +		QL_DPRINT1(ha, "(mp == NULL) "
     			" tx_idx = 0x%x"
     			" ecore_prod_idx = 0x%x"
     			" ecore_cons_idx = 0x%x"
     			" hw_bd_cons = 0x%x"
     			" txq_db_last = 0x%x"
     			" elem_left = 0x%x\n",
    -			__func__,
     			fp->rss_id,
     			ecore_chain_get_prod_idx(&txq->tx_pbl),
     			ecore_chain_get_cons_idx(&txq->tx_pbl),
     			le16toh(*txq->hw_cons_ptr),
     			txq->tx_db.raw,
    -			ecore_chain_get_elem_left(&txq->tx_pbl)));
    +			ecore_chain_get_elem_left(&txq->tx_pbl));
     
     		fp->err_tx_free_pkt_null++;
     
    @@ -2552,20 +2537,20 @@ qlnx_tx_int(qlnx_host_t *ha, struct qlnx
     
     			QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_DIFF);
     
    -			QL_DPRINT1(ha, (ha->pci_dev, "%s: (diff = 0x%x) "
    +			QL_DPRINT1(ha, "(diff = 0x%x) "
     				" tx_idx = 0x%x"
     				" ecore_prod_idx = 0x%x"
     				" ecore_cons_idx = 0x%x"
     				" hw_bd_cons = 0x%x"
     				" txq_db_last = 0x%x"
     				" elem_left = 0x%x\n",
    -				__func__, diff,
    +				diff,
     				fp->rss_id,
     				ecore_chain_get_prod_idx(&txq->tx_pbl),
     				ecore_chain_get_cons_idx(&txq->tx_pbl),
     				le16toh(*txq->hw_cons_ptr),
     				txq->tx_db.raw,
    -				ecore_chain_get_elem_left(&txq->tx_pbl)));
    +				ecore_chain_get_elem_left(&txq->tx_pbl));
     
     			fp->err_tx_cons_idx_conflict++;
     
    @@ -2587,7 +2572,7 @@ qlnx_transmit(struct ifnet *ifp, struct 
             struct qlnx_fastpath	*fp;
             int			rss_id = 0, ret = 0;
     
    -        QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
    +        QL_DPRINT2(ha, "enter\n");
     
     #if __FreeBSD_version >= 1100000
             if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE)
    @@ -2615,7 +2600,7 @@ qlnx_transmit(struct ifnet *ifp, struct 
     
     qlnx_transmit_exit:
     
    -        QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret));
    +        QL_DPRINT2(ha, "exit ret = %d\n", ret);
             return ret;
     }
     
    @@ -2629,7 +2614,7 @@ qlnx_qflush(struct ifnet *ifp)
     
     	ha = (qlnx_host_t *)ifp->if_softc;
     
    -	QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
    +	QL_DPRINT2(ha, "enter\n");
     
     	for (rss_id = 0; rss_id < ha->num_rss; rss_id++) {
     
    @@ -2648,7 +2633,7 @@ qlnx_qflush(struct ifnet *ifp)
     			mtx_unlock(&fp->tx_mtx);
     		}
     	}
    -	QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
    +	QL_DPRINT2(ha, "exit\n");
     
     	return;
     }
    @@ -2792,7 +2777,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     	uint32_t		nbds_in_hdr = 0;
     	uint32_t		offset = 0;
     
    -	QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__));
    +	QL_DPRINT8(ha, "enter\n");
     
     	if (!ha->link_up)
     		return (-1);
    @@ -2844,8 +2829,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     
     		struct mbuf *m;
     
    -		QL_DPRINT8(ha, (ha->pci_dev, "%s: EFBIG [%d]\n", __func__,
    -			m_head->m_pkthdr.len));
    +		QL_DPRINT8(ha, "EFBIG [%d]\n", m_head->m_pkthdr.len);
     
     		fp->tx_defrag++;
     
    @@ -2855,9 +2839,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     			fp->tx_pkts_freed++;
     			m_freem(m_head);
     			*m_headp = NULL;
    -			QL_DPRINT1(ha, (ha->pci_dev,
    -				"%s: m_defrag() = NULL [%d]\n",
    -				__func__, ret));
    +			QL_DPRINT1(ha, "m_defrag() = NULL [%d]\n", ret);
     			return (ENOBUFS);
     		}
     
    @@ -2869,9 +2851,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     
     			fp->err_tx_defrag_dmamap_load++;
     
    -			QL_DPRINT1(ha, (ha->pci_dev,
    -				"%s: bus_dmamap_load_mbuf_sg failed0[%d, %d]\n",
    -				__func__, ret, m_head->m_pkthdr.len));
    +			QL_DPRINT1(ha,
    +				"bus_dmamap_load_mbuf_sg failed0 [%d, %d]\n",
    +				ret, m_head->m_pkthdr.len);
     
     			fp->tx_pkts_freed++;
     			m_freem(m_head);
    @@ -2885,9 +2867,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     
     			fp->err_tx_non_tso_max_seg++;
     
    -			QL_DPRINT1(ha, (ha->pci_dev,
    -				"%s: (%d) nsegs too many for non-TSO[%d, %d]\n",
    -				__func__, ret, nsegs, m_head->m_pkthdr.len));
    +			QL_DPRINT1(ha,
    +				"(%d) nsegs too many for non-TSO [%d, %d]\n",
    +				ret, nsegs, m_head->m_pkthdr.len);
     
     			fp->tx_pkts_freed++;
     			m_freem(m_head);
    @@ -2902,10 +2884,8 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     
     		fp->err_tx_dmamap_load++;
     
    -		QL_DPRINT1(ha, (ha->pci_dev,
    -			"%s: bus_dmamap_load_mbuf_sg failed1[%d, %d]\n",
    -			__func__, ret, m_head->m_pkthdr.len));
    -
    +		QL_DPRINT1(ha, "bus_dmamap_load_mbuf_sg failed1 [%d, %d]\n",
    +			   ret, m_head->m_pkthdr.len);
     		fp->tx_pkts_freed++;
     		m_freem(m_head);
     		*m_headp = NULL;
    @@ -2924,9 +2904,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     	if ((nsegs + QLNX_TX_ELEM_RESERVE) >
     		(int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) {
     
    -		QL_DPRINT1(ha, (ha->pci_dev, "%s: (%d, 0x%x) insuffient BDs"
    -			"in chain[%d] trying to free packets\n",
    -			__func__, nsegs, elem_left, fp->rss_id));
    +		QL_DPRINT1(ha, "(%d, 0x%x) insuffient BDs"
    +			" in chain[%d] trying to free packets\n",
    +			nsegs, elem_left, fp->rss_id);
     
     		fp->tx_nsegs_gt_elem_left++;
     
    @@ -2935,9 +2915,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     		if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left =
     			ecore_chain_get_elem_left(&txq->tx_pbl))) {
     
    -			QL_DPRINT1(ha, (ha->pci_dev,
    -				"%s: (%d, 0x%x) insuffient BDs in chain[%d]\n",
    -				__func__, nsegs, elem_left, fp->rss_id));
    +			QL_DPRINT1(ha,
    +				"(%d, 0x%x) insuffient BDs in chain[%d]\n",
    +				nsegs, elem_left, fp->rss_id);
     
     			fp->err_tx_nsegs_gt_elem_left++;
     			fp->tx_ring_full = 1;
    @@ -3165,7 +3145,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f
     
     	qlnx_txq_doorbell_wr32(ha, txq->doorbell_addr, txq->tx_db.raw);
        
    -	QL_DPRINT8(ha, (ha->pci_dev, "%s: exit\n", __func__));
    +	QL_DPRINT8(ha, "exit\n");
     	return (0);
     }
     
    @@ -3185,6 +3165,8 @@ qlnx_stop(qlnx_host_t *ha)
     	 * propagate the if_drv_flags
     	 * state to each tx thread
     	 */
    +        QL_DPRINT1(ha, "QLNX STATE = %d\n",ha->state);
    +
     	if (ha->state == QLNX_STATE_OPEN) {
             	for (i = 0; i < ha->num_rss; i++) {
     			struct qlnx_fastpath *fp = &ha->fp_array[i];
    @@ -3277,8 +3259,7 @@ qlnx_rx_jumbo_chain(qlnx_host_t *ha, str
                     mp = sw_rx_data->data;
     
     		if (mp == NULL) {
    -                	QL_DPRINT1(ha, (ha->pci_dev, "%s: mp = NULL\n",
    -				__func__));
    +                	QL_DPRINT1(ha, "mp = NULL\n");
     			fp->err_rx_mp_null++;
             		rxq->sw_rx_cons  =
     				(rxq->sw_rx_cons + 1) & (RX_RING_SIZE - 1);
    @@ -3293,10 +3274,8 @@ qlnx_rx_jumbo_chain(qlnx_host_t *ha, str
     
                     if (qlnx_alloc_rx_buffer(ha, rxq) != 0) {
     
    -                        QL_DPRINT1(ha, (ha->pci_dev,
    -				"%s: New buffer allocation failed, dropping"
    -				" incoming packet and reusing its buffer\n",
    -				__func__));
    +                        QL_DPRINT1(ha, "New buffer allocation failed, dropping"
    +				" incoming packet and reusing its buffer\n");
     
                             qlnx_reuse_rx_data(rxq);
                             fp->err_rx_alloc_errors++;
    @@ -3356,29 +3335,29 @@ qlnx_tpa_start(qlnx_host_t *ha,
     	dev = ha->pci_dev;
     	agg_index = cqe->tpa_agg_index;
     
    -        QL_DPRINT7(ha, (dev, "%s[%d]: enter\n "
    -                "\t type = 0x%x\n"
    -                "\t bitfields = 0x%x\n"
    -                "\t seg_len = 0x%x\n"
    -                "\t pars_flags = 0x%x\n"
    -                "\t vlan_tag = 0x%x\n"
    -                "\t rss_hash = 0x%x\n"
    -                "\t len_on_first_bd = 0x%x\n"
    -                "\t placement_offset = 0x%x\n"
    -                "\t tpa_agg_index = 0x%x\n"
    -                "\t header_len = 0x%x\n"
    -                "\t ext_bd_len_list[0] = 0x%x\n"
    -                "\t ext_bd_len_list[1] = 0x%x\n"
    -                "\t ext_bd_len_list[2] = 0x%x\n"
    -                "\t ext_bd_len_list[3] = 0x%x\n"
    -                "\t ext_bd_len_list[4] = 0x%x\n",
    -                __func__, fp->rss_id, cqe->type, cqe->bitfields, cqe->seg_len,
    +        QL_DPRINT7(ha, "[rss_id = %d]: enter\n \
    +                \t type = 0x%x\n \
    +                \t bitfields = 0x%x\n \
    +                \t seg_len = 0x%x\n \
    +                \t pars_flags = 0x%x\n \
    +                \t vlan_tag = 0x%x\n \
    +                \t rss_hash = 0x%x\n \
    +                \t len_on_first_bd = 0x%x\n \
    +                \t placement_offset = 0x%x\n \
    +                \t tpa_agg_index = 0x%x\n \
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Tue May 16 21:54:52 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFEEED70AF3;
     Tue, 16 May 2017 21:54:52 +0000 (UTC)
     (envelope-from jilles@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 8B3ADD35;
     Tue, 16 May 2017 21:54:52 +0000 (UTC)
     (envelope-from jilles@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GLspSX050919;
     Tue, 16 May 2017 21:54:51 GMT (envelope-from jilles@FreeBSD.org)
    Received: (from jilles@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GLspGF050916;
     Tue, 16 May 2017 21:54:51 GMT (envelope-from jilles@FreeBSD.org)
    Message-Id: <201705162154.v4GLspGF050916@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: jilles set sender to
     jilles@FreeBSD.org using -f
    From: Jilles Tjoelker 
    Date: Tue, 16 May 2017 21:54:51 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318385 - head/bin/sh
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 21:54:52 -0000
    
    Author: jilles
    Date: Tue May 16 21:54:51 2017
    New Revision: 318385
    URL: https://svnweb.freebsd.org/changeset/base/318385
    
    Log:
      sh: Simplify output buffering.
      
      Similarly to how STPUTC was changed, change struct output to store the
      pointer just past the end of the available space instead of the size of the
      available space, so after writing a character it is only necessary to
      increment a pointer and not to decrement a counter.
    
    Modified:
      head/bin/sh/eval.c
      head/bin/sh/output.c
      head/bin/sh/output.h
    
    Modified: head/bin/sh/eval.c
    ==============================================================================
    --- head/bin/sh/eval.c	Tue May 16 21:50:29 2017	(r318384)
    +++ head/bin/sh/eval.c	Tue May 16 21:54:51 2017	(r318385)
    @@ -1080,8 +1080,8 @@ evalcommand(union node *cmd, int flags, 
     #endif
     		mode = (cmdentry.u.index == EXECCMD)? 0 : REDIR_PUSH;
     		if (flags == EV_BACKCMD) {
    -			memout.nleft = 0;
     			memout.nextc = memout.buf;
    +			memout.bufend = memout.buf;
     			memout.bufsize = 64;
     			mode |= REDIR_BACKQ;
     		}
    @@ -1134,8 +1134,11 @@ cmddone:
     			exitshell(exitstatus);
     		if (flags == EV_BACKCMD) {
     			backcmd->buf = memout.buf;
    -			backcmd->nleft = memout.nextc - memout.buf;
    +			backcmd->nleft = memout.buf != NULL ?
    +			    memout.nextc - memout.buf : 0;
     			memout.buf = NULL;
    +			memout.nextc = NULL;
    +			memout.bufend = NULL;
     		}
     		if (cmdentry.u.index != EXECCMD)
     			popredir();
    
    Modified: head/bin/sh/output.c
    ==============================================================================
    --- head/bin/sh/output.c	Tue May 16 21:50:29 2017	(r318384)
    +++ head/bin/sh/output.c	Tue May 16 21:54:51 2017	(r318385)
    @@ -71,9 +71,9 @@ __FBSDID("$FreeBSD$");
     
     static int doformat_wr(void *, const char *, int);
     
    -struct output output = {NULL, 0, NULL, OUTBUFSIZ, 1, 0};
    -struct output errout = {NULL, 0, NULL, 256, 2, 0};
    -struct output memout = {NULL, 0, NULL, 0, MEM_OUT, 0};
    +struct output output = {NULL, NULL, NULL, OUTBUFSIZ, 1, 0};
    +struct output errout = {NULL, NULL, NULL, 256, 2, 0};
    +struct output memout = {NULL, NULL, NULL, 0, MEM_OUT, 0};
     struct output *out1 = &output;
     struct output *out2 = &errout;
     
    @@ -214,20 +214,19 @@ emptyoutbuf(struct output *dest)
     		INTOFF;
     		dest->buf = ckmalloc(dest->bufsize);
     		dest->nextc = dest->buf;
    -		dest->nleft = dest->bufsize;
    +		dest->bufend = dest->buf + dest->bufsize;
     		INTON;
     	} else if (dest->fd == MEM_OUT) {
    -		offset = dest->bufsize;
    +		offset = dest->nextc - dest->buf;
     		INTOFF;
     		dest->bufsize <<= 1;
     		dest->buf = ckrealloc(dest->buf, dest->bufsize);
    -		dest->nleft = dest->bufsize - offset;
    +		dest->bufend = dest->buf + dest->bufsize;
     		dest->nextc = dest->buf + offset;
     		INTON;
     	} else {
     		flushout(dest);
     	}
    -	dest->nleft--;
     }
     
     
    @@ -248,7 +247,6 @@ flushout(struct output *dest)
     	if (xwrite(dest->fd, dest->buf, dest->nextc - dest->buf) < 0)
     		dest->flags |= OUTPUT_ERR;
     	dest->nextc = dest->buf;
    -	dest->nleft = dest->bufsize;
     }
     
     
    @@ -258,8 +256,9 @@ freestdout(void)
     	INTOFF;
     	if (output.buf) {
     		ckfree(output.buf);
    +		output.nextc = NULL;
     		output.buf = NULL;
    -		output.nleft = 0;
    +		output.bufend = NULL;
     	}
     	INTON;
     }
    
    Modified: head/bin/sh/output.h
    ==============================================================================
    --- head/bin/sh/output.h	Tue May 16 21:50:29 2017	(r318384)
    +++ head/bin/sh/output.h	Tue May 16 21:54:51 2017	(r318385)
    @@ -40,7 +40,7 @@
     
     struct output {
     	char *nextc;
    -	int nleft;
    +	char *bufend;
     	char *buf;
     	int bufsize;
     	short fd;
    @@ -75,7 +75,7 @@ void fmtstr(char *, int, const char *, .
     void doformat(struct output *, const char *, va_list) __printflike(2, 0);
     int xwrite(int, const char *, int);
     
    -#define outc(c, file)	(--(file)->nleft < 0? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c)))
    +#define outc(c, file)	((file)->nextc == (file)->bufend ? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c)))
     #define out1c(c)	outc(c, out1);
     #define out2c(c)	outcslow(c, out2);
     
    
    From owner-svn-src-all@freebsd.org  Tue May 16 23:15:41 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA40AD70300;
     Tue, 16 May 2017 23:15:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 8D0B31A02;
     Tue, 16 May 2017 23:15:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GNFe0s083437;
     Tue, 16 May 2017 23:15:40 GMT (envelope-from jhb@FreeBSD.org)
    Received: (from jhb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GNFehn083436;
     Tue, 16 May 2017 23:15:40 GMT (envelope-from jhb@FreeBSD.org)
    Message-Id: <201705162315.v4GNFehn083436@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
     using -f
    From: John Baldwin 
    Date: Tue, 16 May 2017 23:15:40 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318386 - head/share/man/man7
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 23:15:41 -0000
    
    Author: jhb
    Date: Tue May 16 23:15:40 2017
    New Revision: 318386
    URL: https://svnweb.freebsd.org/changeset/base/318386
    
    Log:
      Note that the first release of FreeBSD/alpha was 3.2.
      
      Alpha is explicitly mentioned in the release announcements beginning with
      3.2.
    
    Modified:
      head/share/man/man7/arch.7
    
    Modified: head/share/man/man7/arch.7
    ==============================================================================
    --- head/share/man/man7/arch.7	Tue May 16 21:54:51 2017	(r318385)
    +++ head/share/man/man7/arch.7	Tue May 16 23:15:40 2017	(r318386)
    @@ -26,7 +26,7 @@
     .\"
     .\" $FreeBSD$
     .\"
    -.Dd May 5, 2017
    +.Dd May 16, 2017
     .Dt ARCH 7
     .Os
     .Sh NAME
    @@ -90,7 +90,7 @@ architectures, the final release.
     .Pp
     .Bl -column -offset indent "Sy Architecture" "Sy Initial Release" "Sy Final Release"
     .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release
    -.It alpha       Ta 3.x   Ta 6.4
    +.It alpha       Ta 3.2   Ta 6.4
     .It amd64       Ta 5.1
     .It arm         Ta 6.0
     .It armeb       Ta 8.0
    
    From owner-svn-src-all@freebsd.org  Tue May 16 23:18:52 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F4C1D70393;
     Tue, 16 May 2017 23:18:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id F3D471B98;
     Tue, 16 May 2017 23:18:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GNIpV5083573;
     Tue, 16 May 2017 23:18:51 GMT (envelope-from jhb@FreeBSD.org)
    Received: (from jhb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GNIpeq083572;
     Tue, 16 May 2017 23:18:51 GMT (envelope-from jhb@FreeBSD.org)
    Message-Id: <201705162318.v4GNIpeq083572@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
     using -f
    From: John Baldwin 
    Date: Tue, 16 May 2017 23:18:50 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318387 - head/sys/dev/cxgbe
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 23:18:52 -0000
    
    Author: jhb
    Date: Tue May 16 23:18:50 2017
    New Revision: 318387
    URL: https://svnweb.freebsd.org/changeset/base/318387
    
    Log:
      Add support for child devices that aren't ports.
      
      Invoke any identify routines of child drivers during attach before attaching
      children, and delete any remaining devices after deleting ports.
      
      MFC after:	1 month
      Sponsored by:	Chelsio Communications
    
    Modified:
      head/sys/dev/cxgbe/t4_main.c
    
    Modified: head/sys/dev/cxgbe/t4_main.c
    ==============================================================================
    --- head/sys/dev/cxgbe/t4_main.c	Tue May 16 23:15:40 2017	(r318386)
    +++ head/sys/dev/cxgbe/t4_main.c	Tue May 16 23:18:50 2017	(r318387)
    @@ -1186,6 +1186,12 @@ t4_attach(device_t dev)
     		goto done;
     	}
     
    +	rc = bus_generic_probe(dev);
    +	if (rc != 0) {
    +		device_printf(dev, "failed to probe child drivers: %d\n", rc);
    +		goto done;
    +	}
    +
     	rc = bus_generic_attach(dev);
     	if (rc != 0) {
     		device_printf(dev,
    @@ -1339,6 +1345,8 @@ t4_detach_common(device_t dev)
     		}
     	}
     
    +	device_delete_children(dev);
    +
     	if (sc->flags & FULL_INIT_DONE)
     		adapter_full_uninit(sc);
     
    
    From owner-svn-src-all@freebsd.org  Tue May 16 23:31:53 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF67ED707D5;
     Tue, 16 May 2017 23:31:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 8270734F;
     Tue, 16 May 2017 23:31:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GNVqke090501;
     Tue, 16 May 2017 23:31:52 GMT (envelope-from jhb@FreeBSD.org)
    Received: (from jhb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GNVqRj090497;
     Tue, 16 May 2017 23:31:52 GMT (envelope-from jhb@FreeBSD.org)
    Message-Id: <201705162331.v4GNVqRj090497@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
     using -f
    From: John Baldwin 
    Date: Tue, 16 May 2017 23:31:52 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318388 - in head: share/man/man9 sys/kern sys/sys
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Tue, 16 May 2017 23:31:53 -0000
    
    Author: jhb
    Date: Tue May 16 23:31:52 2017
    New Revision: 318388
    URL: https://svnweb.freebsd.org/changeset/base/318388
    
    Log:
      Add sglist_append_sglist().
      
      This function permits a range of one scatter/gather list to be appended to
      another sglist.  This can be used to construct a scatter/gather list that
      reorders or duplicates ranges from one or more existing scatter/gather
      lists.
      
      Sponsored by:	Chelsio Communications
    
    Modified:
      head/share/man/man9/Makefile
      head/share/man/man9/sglist.9
      head/sys/kern/subr_sglist.c
      head/sys/sys/sglist.h
    
    Modified: head/share/man/man9/Makefile
    ==============================================================================
    --- head/share/man/man9/Makefile	Tue May 16 23:18:50 2017	(r318387)
    +++ head/share/man/man9/Makefile	Tue May 16 23:31:52 2017	(r318388)
    @@ -1572,6 +1572,7 @@ MLINKS+=sglist.9 sglist_alloc.9 \
     	sglist.9 sglist_append_bio.9 \
     	sglist.9 sglist_append_mbuf.9 \
     	sglist.9 sglist_append_phys.9 \
    +	sglist.9 sglist_append_sglist.9 \
     	sglist.9 sglist_append_uio.9 \
     	sglist.9 sglist_append_user.9 \
     	sglist.9 sglist_append_vmpages.9 \
    
    Modified: head/share/man/man9/sglist.9
    ==============================================================================
    --- head/share/man/man9/sglist.9	Tue May 16 23:18:50 2017	(r318387)
    +++ head/share/man/man9/sglist.9	Tue May 16 23:31:52 2017	(r318388)
    @@ -26,7 +26,7 @@
     .\"
     .\" $FreeBSD$
     .\"
    -.Dd January 12, 2014
    +.Dd May 16, 2017
     .Dt SGLIST 9
     .Os
     .Sh NAME
    @@ -36,6 +36,7 @@
     .Nm sglist_append_bio ,
     .Nm sglist_append_mbuf ,
     .Nm sglist_append_phys ,
    +.Nm sglist_append_sglist ,
     .Nm sglist_append_uio ,
     .Nm sglist_append_user ,
     .Nm sglist_append_vmpages ,
    @@ -67,6 +68,8 @@
     .Ft int
     .Fn sglist_append_phys "struct sglist *sg" "vm_paddr_t paddr" "size_t len"
     .Ft int
    +.Fn sglist_append_sglist "struct sglist *sg" "struct sglist *source" "size_t offset" "size_t len"
    +.Ft int
     .Fn sglist_append_uio "struct sglist *sg" "struct uio *uio"
     .Ft int
     .Fn sglist_append_user "struct sglist *sg" "void *buf" "size_t len" "struct thread *td"
    @@ -252,6 +255,20 @@ and is
     bytes long.
     .Pp
     The
    +.Nm sglist_append_sglist
    +function appends physical address ranges described by the scatter/gather list
    +.Fa source
    +to the scatter/gather list
    +.Fa sg .
    +The physical address ranges start at offset
    +.Fa offset
    +within
    +.Fa source
    +and continue for
    +.Fa len
    +bytes.
    +.Pp
    +The
     .Nm sglist_append_uio
     function appends the physical address ranges described by a
     .Xr uio 9
    
    Modified: head/sys/kern/subr_sglist.c
    ==============================================================================
    --- head/sys/kern/subr_sglist.c	Tue May 16 23:18:50 2017	(r318387)
    +++ head/sys/kern/subr_sglist.c	Tue May 16 23:31:52 2017	(r318388)
    @@ -413,6 +413,49 @@ sglist_append_user(struct sglist *sg, vo
     }
     
     /*
    + * Append a subset of an existing scatter/gather list 'source' to a
    + * the scatter/gather list 'sg'.  If there are insufficient segments,
    + * then this fails with EFBIG.
    + */
    +int
    +sglist_append_sglist(struct sglist *sg, struct sglist *source, size_t offset,
    +    size_t length)
    +{
    +	struct sgsave save;
    +	struct sglist_seg *ss;
    +	size_t seglen;
    +	int error, i;
    +
    +	if (sg->sg_maxseg == 0 || length == 0)
    +		return (EINVAL);
    +	SGLIST_SAVE(sg, save);
    +	error = EINVAL;
    +	ss = &sg->sg_segs[sg->sg_nseg - 1];
    +	for (i = 0; i < source->sg_nseg; i++) {
    +		if (offset >= source->sg_segs[i].ss_len) {
    +			offset -= source->sg_segs[i].ss_len;
    +			continue;
    +		}
    +		seglen = source->sg_segs[i].ss_len - offset;
    +		if (seglen > length)
    +			seglen = length;
    +		error = _sglist_append_range(sg, &ss,
    +		    source->sg_segs[i].ss_paddr + offset, seglen);
    +		if (error)
    +			break;
    +		offset = 0;
    +		length -= seglen;
    +		if (length == 0)
    +			break;
    +	}
    +	if (length != 0)
    +		error = EINVAL;
    +	if (error)
    +		SGLIST_RESTORE(sg, save);
    +	return (error);
    +}
    +
    +/*
      * Append the segments that describe a single uio to a scatter/gather
      * list.  If there are insufficient segments, then this fails with
      * EFBIG.
    
    Modified: head/sys/sys/sglist.h
    ==============================================================================
    --- head/sys/sys/sglist.h	Tue May 16 23:18:50 2017	(r318387)
    +++ head/sys/sys/sglist.h	Tue May 16 23:31:52 2017	(r318388)
    @@ -88,6 +88,8 @@ int	sglist_append_bio(struct sglist *sg,
     int	sglist_append_mbuf(struct sglist *sg, struct mbuf *m0);
     int	sglist_append_phys(struct sglist *sg, vm_paddr_t paddr,
     	    size_t len);
    +int	sglist_append_sglist(struct sglist *sg, struct sglist *source,
    +	    size_t offset, size_t length);
     int	sglist_append_uio(struct sglist *sg, struct uio *uio);
     int	sglist_append_user(struct sglist *sg, void *buf, size_t len,
     	    struct thread *td);
    
    From owner-svn-src-all@freebsd.org  Wed May 17 00:18:43 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECE8BD6D30F;
     Wed, 17 May 2017 00:18:43 +0000 (UTC)
     (envelope-from yaneurabeya@gmail.com)
    Received: from mail-pg0-x236.google.com (mail-pg0-x236.google.com
     [IPv6:2607:f8b0:400e:c05::236])
     (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
     (Client CN "smtp.gmail.com",
     Issuer "Google Internet Authority G2" (verified OK))
     by mx1.freebsd.org (Postfix) with ESMTPS id B914C16FB;
     Wed, 17 May 2017 00:18:43 +0000 (UTC)
     (envelope-from yaneurabeya@gmail.com)
    Received: by mail-pg0-x236.google.com with SMTP id u28so83902992pgn.1;
     Tue, 16 May 2017 17:18:43 -0700 (PDT)
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
     h=subject:mime-version:from:in-reply-to:date:cc:message-id:references
     :to; bh=qwaUPid/suTagBeQcLlC8wiQSKvQPfxxj+wvXROAMKo=;
     b=hRukyZHrCNQECbOLkc00qC2WLYj02Nihmm9rY2xBxOQ0iCMAymAnzWiFbEkXyQA571
     jFuUadQACV9+NHsV78Kwg3k6XqGl7N9XCHoVHfyuSdRUk4WfqJmmBWmG1fTHq0fAzSvQ
     Dh1fkzmWhyErNUE6Gu+1dNGkNEki5tnb+U+5aTFwLKJth1Z0KpkjNteS8v/lYKVld4de
     N5JwYDJTvaPsNniST8y6jwah9CaOoCA/iybV2+n+PEEGBSemKePGQukmEP4mIgANouZE
     pQQGEXfD2JS+Z3Gtw6mB1Fr9Rg7c9M77rmqIpjyD35LpY+5NyyMX13xTom6YrD76Ej8Z
     M2Ag==
    X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
     d=1e100.net; s=20161025;
     h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc
     :message-id:references:to;
     bh=qwaUPid/suTagBeQcLlC8wiQSKvQPfxxj+wvXROAMKo=;
     b=ua9CDXSdMAwMkUyWcBwSArYy2MI0OHdnx+vBbKJaU3iX02DeYg78QbYqNFvbPdIU6g
     MzrGLorFLJilY8lx3NMfbnc81mpieh2QYxW0lbN/3AOhRl5+/4zFswuIJYuLxe96bcsQ
     8TivvSwV1MOzropu2bGF9+8D/PrknvD0Xe6Si7apYKWnhrOaq8nCE1in4lvKdlhQ+UA2
     xbwOVBLjBwJLwjA0SFT0lD16ejlFm/7FPpdA29aIIDiqAngTJbC6Ok7jqIFQ4yoevV9o
     SOXk0XtJkJNRS9m3zexUoWzY1aSeXtL+SzAhCtyQlWn24GH+Fw1xts4vmJIXVLxcJUyE
     LUAg==
    X-Gm-Message-State: AODbwcCxlJTaCPMGEdFyUfFPQp91BcQtXIXQquKvYhKmae2eJiv+PmKp
     0nKupT9GojrPsA0UpJA=
    X-Received: by 10.99.1.85 with SMTP id 82mr734669pgb.164.1494980323134;
     Tue, 16 May 2017 17:18:43 -0700 (PDT)
    Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net.
     [73.19.52.228])
     by smtp.gmail.com with ESMTPSA id w30sm311140pge.45.2017.05.16.17.18.41
     (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
     Tue, 16 May 2017 17:18:42 -0700 (PDT)
    Subject: Re: svn commit: r318364 - in head: contrib/libxo contrib/libxo/doc
     contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved
     contrib/libxo/tests/gettext/saved contrib/libxo/xo lib/lib...
    Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
    Content-Type: multipart/signed;
     boundary="Apple-Mail=_D9DA0645-2E96-4BCD-B1FE-AE6360BAA2E6";
     protocol="application/pgp-signature"; micalg=pgp-sha512
    X-Pgp-Agent: GPGMail
    From: "Ngie Cooper (yaneurabeya)" 
    In-Reply-To: <201705161846.v4GIkuTS071275@repo.freebsd.org>
    Date: Tue, 16 May 2017 17:18:40 -0700
    Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Message-Id: 
    References: <201705161846.v4GIkuTS071275@repo.freebsd.org>
    To: Phil Shafer 
    X-Mailer: Apple Mail (2.3124)
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 00:18:44 -0000
    
    
    --Apple-Mail=_D9DA0645-2E96-4BCD-B1FE-AE6360BAA2E6
    Content-Transfer-Encoding: 7bit
    Content-Type: text/plain;
    	charset=us-ascii
    
    
    > On May 16, 2017, at 11:46, Phil Shafer  wrote:
    > 
    > Author: phil
    > Date: Tue May 16 18:46:56 2017
    > New Revision: 318364
    > URL: https://svnweb.freebsd.org/changeset/base/318364
    > 
    > Log:
    >  Import libxo-0.7.2; add xo_options.7.
    > 
    >  Submitted by:	phil
    >  Reviewed by:	sjg
    >  Approved by:	sjg (mentor)
    
    Relnotes: yes
    
    Also, what does this upgrade entail, in terms of new features/risk?
    
    Thanks,
    -Ngie
    
    --Apple-Mail=_D9DA0645-2E96-4BCD-B1FE-AE6360BAA2E6
    Content-Transfer-Encoding: 7bit
    Content-Disposition: attachment;
    	filename=signature.asc
    Content-Type: application/pgp-signature;
    	name=signature.asc
    Content-Description: Message signed with OpenPGP using GPGMail
    
    -----BEGIN PGP SIGNATURE-----
    Comment: GPGTools - https://gpgtools.org
    
    iQIcBAEBCgAGBQJZG5bgAAoJEPWDqSZpMIYVbHMP/ioSQzCX1rr80SSmcntluq4W
    +jGDy2QVifToVo0yhYCN9N/k5B/FfM6zvKUtg907QeaSU1VecVNm8GfZr8C3zfgy
    dcEP310LiIM+ctjgaOLgwsEjjmr20NaFHfD4Eam/uYjWkohNH0DXX5qcelvmd+/s
    0A+J9LaU6BlOiVvHSITFiSLL1EkTz74xuFEmx1j7OURJQ+KhFWhaOS6tNb3f+wKT
    ss/ICjX4jbL7551gHL0EjcEkssoV58xOZTrE0ywBzUypV3D+NK2FOcGhJMwNSsx4
    V5pCvXvoQnn8BKPY5J7/4ivzsawhmz2o/Hi/JCb8aCipSx2DyyOB3GK6c8RZZCdU
    5GD1OxCBmxZGQ2FThjrkBIFCvC5j2vpf88hoeZdRUxrB2Aq43Aq8dWC8AWcRIAOr
    3vdS6xit7UBThUvJNGt7GQwiCIP2sAR+HwjZiK442MSmLj86J6RA/fYYd7L5D+c7
    tX2WYibsULUw/eCsUexZcxXGKXngqgPgv95bOQilaNdQX/ZgNqfFdTkvYvdnVcTi
    mE49RXc+t1eDxZtocV4VPXRJreYJ71pjndMzu7VubDfFsbv2ufhqwPBCGOFFlkAm
    LHiAlV/nGQDwbPYTQCA1996oMX9TUgPkOerDx6Xs3LiU9EdcaZfv6j2CTr4dYUFm
    OH3thGx4+NP9CNZX96QK
    =0CNf
    -----END PGP SIGNATURE-----
    
    --Apple-Mail=_D9DA0645-2E96-4BCD-B1FE-AE6360BAA2E6--
    
    From owner-svn-src-all@freebsd.org  Wed May 17 00:34:39 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9792DD6DB85;
     Wed, 17 May 2017 00:34:39 +0000 (UTC)
     (envelope-from emaste@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 34037361;
     Wed, 17 May 2017 00:34:39 +0000 (UTC)
     (envelope-from emaste@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H0YcWh015848;
     Wed, 17 May 2017 00:34:38 GMT (envelope-from emaste@FreeBSD.org)
    Received: (from emaste@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H0YY0k015810;
     Wed, 17 May 2017 00:34:34 GMT (envelope-from emaste@FreeBSD.org)
    Message-Id: <201705170034.v4H0YY0k015810@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: emaste set sender to
     emaste@FreeBSD.org using -f
    From: Ed Maste 
    Date: Wed, 17 May 2017 00:34:34 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318389 - in head/sys: amd64/amd64 arm/arm arm/include
     crypto/des ddb dev/cs dev/ixgb dev/lge dev/mse dev/my dev/pcn dev/ppbus
     dev/ppc dev/qlxgb dev/qlxgbe dev/qlxge dev/rl dev/sound/pc...
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 00:34:39 -0000
    
    Author: emaste
    Date: Wed May 17 00:34:34 2017
    New Revision: 318389
    URL: https://svnweb.freebsd.org/changeset/base/318389
    
    Log:
      Remove register keyword from sys/ and ANSIfy prototypes
      
      A long long time ago the register keyword told the compiler to store
      the corresponding variable in a CPU register, but it is not relevant
      for any compiler used in the FreeBSD world today.
      
      ANSIfy related prototypes while here.
      
      Reviewed by:	cem, jhb
      Sponsored by:	The FreeBSD Foundation
      Differential Revision:	https://reviews.freebsd.org/D10193
    
    Modified:
      head/sys/amd64/amd64/sys_machdep.c
      head/sys/amd64/amd64/vm_machdep.c
      head/sys/arm/arm/sys_machdep.c
      head/sys/arm/arm/vm_machdep.c
      head/sys/arm/include/atomic-v4.h
      head/sys/crypto/des/des_enc.c
      head/sys/crypto/des/des_setkey.c
      head/sys/ddb/db_access.c
      head/sys/ddb/db_output.c
      head/sys/ddb/db_sym.c
      head/sys/dev/cs/if_cs.c
      head/sys/dev/ixgb/if_ixgb.c
      head/sys/dev/lge/if_lge.c
      head/sys/dev/mse/mse_isa.c
      head/sys/dev/my/if_my.c
      head/sys/dev/pcn/if_pcn.c
      head/sys/dev/ppbus/immio.c
      head/sys/dev/ppbus/vpoio.c
      head/sys/dev/ppc/ppc.c
      head/sys/dev/qlxgb/qla_os.c
      head/sys/dev/qlxgbe/ql_os.c
      head/sys/dev/qlxge/qls_os.c
      head/sys/dev/rl/if_rl.c
      head/sys/dev/sound/pci/fm801.c
      head/sys/dev/speaker/spkr.c
      head/sys/dev/tl/if_tl.c
      head/sys/dev/usb/usb_busdma.c
      head/sys/dev/wb/if_wb.c
      head/sys/dev/xl/if_xl.c
      head/sys/fs/fifofs/fifo_vnops.c
      head/sys/fs/nandfs/nandfs_vnops.c
      head/sys/i386/i386/in_cksum.c
      head/sys/i386/i386/k6_mem.c
      head/sys/i386/i386/sys_machdep.c
      head/sys/i386/i386/vm_machdep.c
      head/sys/i386/ibcs2/ibcs2_misc.c
      head/sys/i386/ibcs2/ibcs2_other.c
      head/sys/i386/ibcs2/ibcs2_signal.c
      head/sys/i386/ibcs2/ibcs2_socksys.c
      head/sys/i386/isa/ccbque.h
      head/sys/i386/isa/elink.c
      head/sys/kern/inflate.c
      head/sys/kern/kern_clock.c
      head/sys/kern/kern_exec.c
      head/sys/kern/kern_prot.c
      head/sys/kern/kern_resource.c
      head/sys/kern/kern_sig.c
      head/sys/kern/kern_timeout.c
      head/sys/kern/kern_xxx.c
      head/sys/kern/sched_4bsd.c
      head/sys/kern/sysv_msg.c
      head/sys/kern/vfs_export.c
      head/sys/kern/vfs_mount.c
      head/sys/kern/vfs_syscalls.c
      head/sys/kern/vfs_vnops.c
      head/sys/libkern/zlib.c
      head/sys/mips/cavium/cryptocteon/cavium_crypto.c
      head/sys/mips/mips/vm_machdep.c
      head/sys/net/altq/altq_rio.c
      head/sys/net/altq/altq_rmclass.h
      head/sys/net/bpf_filter.c
      head/sys/net/if_llatbl.c
      head/sys/net/if_media.c
      head/sys/net/slcompress.c
      head/sys/netinet/in.c
      head/sys/netinet/in_cksum.c
      head/sys/netinet/ip_icmp.c
      head/sys/netinet6/in6_pcb.c
      head/sys/netinet6/raw_ip6.c
      head/sys/netipsec/ipsec_mbuf.c
      head/sys/rpc/clnt.h
      head/sys/sparc64/include/pcpu.h
    
    Modified: head/sys/amd64/amd64/sys_machdep.c
    ==============================================================================
    --- head/sys/amd64/amd64/sys_machdep.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/amd64/amd64/sys_machdep.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -169,9 +169,7 @@ update_gdt_fsbase(struct thread *td, uin
     }
     
     int
    -sysarch(td, uap)
    -	struct thread *td;
    -	register struct sysarch_args *uap;
    +sysarch(struct thread *td, struct sysarch_args *uap)
     {
     	int error = 0;
     	struct pcb *pcb = curthread->td_pcb;
    
    Modified: head/sys/amd64/amd64/vm_machdep.c
    ==============================================================================
    --- head/sys/amd64/amd64/vm_machdep.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/amd64/amd64/vm_machdep.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -148,13 +148,9 @@ alloc_fpusave(int flags)
      * ready to run and return to user mode.
      */
     void
    -cpu_fork(td1, p2, td2, flags)
    -	register struct thread *td1;
    -	register struct proc *p2;
    -	struct thread *td2;
    -	int flags;
    +cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
     {
    -	register struct proc *p1;
    +	struct proc *p1;
     	struct pcb *pcb2;
     	struct mdproc *mdp1, *mdp2;
     	struct proc_ldt *pldt;
    
    Modified: head/sys/arm/arm/sys_machdep.c
    ==============================================================================
    --- head/sys/arm/arm/sys_machdep.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/arm/arm/sys_machdep.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -188,9 +188,7 @@ arm32_get_tp(struct thread *td, void *ar
     }
     
     int
    -sysarch(td, uap)
    -	struct thread *td;
    -	register struct sysarch_args *uap;
    +sysarch(struct thread *td, struct sysarch_args *uap)
     {
     	int error;
     
    
    Modified: head/sys/arm/arm/vm_machdep.c
    ==============================================================================
    --- head/sys/arm/arm/vm_machdep.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/arm/arm/vm_machdep.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -93,8 +93,7 @@ uint32_t initial_fpscr = VFPSCR_DN | VFP
      * ready to run and return to user mode.
      */
     void
    -cpu_fork(register struct thread *td1, register struct proc *p2,
    -    struct thread *td2, int flags)
    +cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
     {
     	struct pcb *pcb2;
     	struct trapframe *tf;
    
    Modified: head/sys/arm/include/atomic-v4.h
    ==============================================================================
    --- head/sys/arm/include/atomic-v4.h	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/arm/include/atomic-v4.h	Wed May 17 00:34:34 2017	(r318389)
    @@ -299,7 +299,7 @@ atomic_clear_32(volatile uint32_t *addre
     static __inline u_int32_t
     atomic_cmpset_32(volatile u_int32_t *p, volatile u_int32_t cmpval, volatile u_int32_t newval)
     {
    -	register int done, ras_start = ARM_RAS_START;
    +	int done, ras_start = ARM_RAS_START;
     
     	__asm __volatile("1:\n"
     	    "adr	%1, 1b\n"
    
    Modified: head/sys/crypto/des/des_enc.c
    ==============================================================================
    --- head/sys/crypto/des/des_enc.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/crypto/des/des_enc.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -69,14 +69,14 @@ extern	const DES_LONG des_SPtrans[8][64]
     
     void des_encrypt1(DES_LONG *data, des_key_schedule ks, int enc)
     {
    -	register DES_LONG l,r,t,u;
    +	DES_LONG l,r,t,u;
     #ifdef DES_PTR
    -	register const unsigned char *des_SP=(const unsigned char *)des_SPtrans;
    +	const unsigned char *des_SP=(const unsigned char *)des_SPtrans;
     #endif
     #ifndef DES_UNROLL
    -	register int i;
    +	int i;
     #endif
    -	register DES_LONG *s;
    +	DES_LONG *s;
     
     	r=data[0];
     	l=data[1];
    @@ -167,14 +167,14 @@ void des_encrypt1(DES_LONG *data, des_ke
     
     void des_encrypt2(DES_LONG *data, des_key_schedule ks, int enc)
     {
    -	register DES_LONG l,r,t,u;
    +	DES_LONG l,r,t,u;
     #ifdef DES_PTR
    -	register const unsigned char *des_SP=(const unsigned char *)des_SPtrans;
    +	const unsigned char *des_SP=(const unsigned char *)des_SPtrans;
     #endif
     #ifndef DES_UNROLL
    -	register int i;
    +	int i;
     #endif
    -	register DES_LONG *s;
    +	DES_LONG *s;
     
     	r=data[0];
     	l=data[1];
    @@ -259,7 +259,7 @@ void des_encrypt2(DES_LONG *data, des_ke
     void des_encrypt3(DES_LONG *data, des_key_schedule ks1, des_key_schedule ks2,
     	     des_key_schedule ks3)
     {
    -	register DES_LONG l,r;
    +	DES_LONG l,r;
     
     	l=data[0];
     	r=data[1];
    @@ -279,7 +279,7 @@ void des_encrypt3(DES_LONG *data, des_ke
     void des_decrypt3(DES_LONG *data, des_key_schedule ks1, des_key_schedule ks2,
     	     des_key_schedule ks3)
     {
    -	register DES_LONG l,r;
    +	DES_LONG l,r;
     
     	l=data[0];
     	r=data[1];
    
    Modified: head/sys/crypto/des/des_setkey.c
    ==============================================================================
    --- head/sys/crypto/des/des_setkey.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/crypto/des/des_setkey.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -172,10 +172,10 @@ int des_set_key_checked(des_cblock *key,
     void des_set_key_unchecked(des_cblock *key, des_key_schedule schedule)
     {
     	static int shifts2[16]={0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0};
    -	register DES_LONG c,d,t,s,t2;
    -	register const unsigned char *in;
    -	register DES_LONG *k;
    -	register int i;
    +	DES_LONG c,d,t,s,t2;
    +	const unsigned char *in;
    +	DES_LONG *k;
    +	int i;
     
     	k = &schedule->ks.deslong[0];
     	in = &(*key)[0];
    
    Modified: head/sys/ddb/db_access.c
    ==============================================================================
    --- head/sys/ddb/db_access.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/ddb/db_access.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -57,8 +57,8 @@ db_expr_t
     db_get_value(db_addr_t addr, int size, bool is_signed)
     {
     	char		data[sizeof(u_int64_t)];
    -	register db_expr_t value;
    -	register int	i;
    +	db_expr_t	value;
    +	int		i;
     
     	if (db_read_bytes(addr, size, data) != 0) {
     		db_printf("*** error reading from address %llx ***\n",
    @@ -87,7 +87,7 @@ void
     db_put_value(db_addr_t addr, int size, db_expr_t value)
     {
     	char		data[sizeof(int)];
    -	register int	i;
    +	int		i;
     
     #if	BYTE_MSF
     	for (i = size - 1; i >= 0; i--)
    
    Modified: head/sys/ddb/db_output.c
    ==============================================================================
    --- head/sys/ddb/db_output.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/ddb/db_output.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -92,7 +92,7 @@ static void	db_pager(void);
     void
     db_force_whitespace(void)
     {
    -	register int last_print, next_tab;
    +	int last_print, next_tab;
     
     	last_print = db_last_non_space;
     	while (last_print < db_output_position) {
    @@ -355,7 +355,7 @@ db_iprintf(const char *fmt,...)
     	char bufr[DDB_BUFR_SIZE];
     #endif
     	struct dbputchar_arg dca;
    -	register int i;
    +	int i;
     	va_list listp;
     
     	for (i = db_indent; i >= 8; i -= 8)
    
    Modified: head/sys/ddb/db_sym.c
    ==============================================================================
    --- head/sys/ddb/db_sym.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/ddb/db_sym.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -286,10 +286,10 @@ static c_db_sym_t
     db_lookup(const char *symstr)
     {
     	c_db_sym_t sp;
    -	register int i;
    +	int i;
     	int symtab_start = 0;
     	int symtab_end = db_nsymtab;
    -	register const char *cp;
    +	const char *cp;
     
     	/*
     	 * Look for, remove, and remember any symbol table specifier.
    @@ -343,8 +343,8 @@ static bool
     db_symbol_is_ambiguous(c_db_sym_t sym)
     {
     	const char	*sym_name;
    -	register int	i;
    -	register bool	found_once = false;
    +	int		i;
    +	bool		found_once = false;
     
     	if (!db_qualify_ambiguous_names)
     		return (false);
    @@ -367,10 +367,9 @@ db_symbol_is_ambiguous(c_db_sym_t sym)
     c_db_sym_t
     db_search_symbol(db_addr_t val, db_strategy_t strategy, db_expr_t *offp)
     {
    -	register
     	unsigned int	diff;
     	size_t		newdiff;
    -	register int	i;
    +	int		i;
     	c_db_sym_t	ret = C_DB_SYM_NULL, sym;
     
     	newdiff = diff = val;
    
    Modified: head/sys/dev/cs/if_cs.c
    ==============================================================================
    --- head/sys/dev/cs/if_cs.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/cs/if_cs.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -1038,7 +1038,7 @@ cs_setmode(struct cs_softc *sc)
     }
     
     static int
    -cs_ioctl(register struct ifnet *ifp, u_long command, caddr_t data)
    +cs_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
     {
     	struct cs_softc *sc=ifp->if_softc;
     	struct ifreq *ifr = (struct ifreq *)data;
    
    Modified: head/sys/dev/ixgb/if_ixgb.c
    ==============================================================================
    --- head/sys/dev/ixgb/if_ixgb.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/ixgb/if_ixgb.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -1777,7 +1777,7 @@ static int
     ixgb_get_buf(int i, struct adapter * adapter,
     	     struct mbuf * nmp)
     {
    -	struct mbuf *mp = nmp;
    +	struct mbuf    *mp = nmp;
     	struct ixgb_buffer *rx_buffer;
     	struct ifnet   *ifp;
     	bus_addr_t      paddr;
    
    Modified: head/sys/dev/lge/if_lge.c
    ==============================================================================
    --- head/sys/dev/lge/if_lge.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/lge/if_lge.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -216,7 +216,7 @@ lge_eeprom_getword(sc, addr, dest)
     	int			addr;
     	u_int16_t		*dest;
     {
    -	register int		i;
    +	int			i;
     	u_int32_t		val;
     
     	CSR_WRITE_4(sc, LGE_EECTL, LGE_EECTL_CMD_READ|
    @@ -413,7 +413,7 @@ static void
     lge_reset(sc)
     	struct lge_softc	*sc;
     {
    -	register int		i;
    +	int			i;
     
     	LGE_SETBIT(sc, LGE_MODE1, LGE_MODE1_SETRST_CTL0|LGE_MODE1_SOFTRST);
     
    @@ -756,7 +756,7 @@ lge_alloc_jumbo_mem(sc)
     	struct lge_softc	*sc;
     {
     	caddr_t			ptr;
    -	register int		i;
    +	int			i;
     	struct lge_jpool_entry   *entry;
     
     	/* Grab a big chunk o' storage. */
    @@ -1524,7 +1524,7 @@ static void
     lge_stop(sc)
     	struct lge_softc	*sc;
     {
    -	register int		i;
    +	int			i;
     	struct ifnet		*ifp;
     
     	LGE_LOCK_ASSERT(sc);
    
    Modified: head/sys/dev/mse/mse_isa.c
    ==============================================================================
    --- head/sys/dev/mse/mse_isa.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/mse/mse_isa.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -309,7 +309,7 @@ mse_disablelogi(struct resource *port)
     static void
     mse_getlogi(struct resource *port, int *dx, int *dy, int *but)
     {
    -	register char x, y;
    +	char x, y;
     
     	bus_write_1(port, MSE_PORTC, MSE_HOLD | MSE_RXLOW);
     	x = bus_read_1(port, MSE_PORTA);
    
    Modified: head/sys/dev/my/if_my.c
    ==============================================================================
    --- head/sys/dev/my/if_my.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/my/if_my.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -751,7 +751,7 @@ my_setcfg(struct my_softc * sc, int bmcr
     static void
     my_reset(struct my_softc * sc)
     {
    -	register int    i;
    +	int    i;
     
     	MY_LOCK_ASSERT(sc);
     	MY_SETBIT(sc, MY_BCR, MY_SWR);
    @@ -1717,7 +1717,7 @@ my_watchdog(void *arg)
     static void
     my_stop(struct my_softc * sc)
     {
    -	register int    i;
    +	int    i;
     	struct ifnet   *ifp;
     
     	MY_LOCK_ASSERT(sc);
    
    Modified: head/sys/dev/pcn/if_pcn.c
    ==============================================================================
    --- head/sys/dev/pcn/if_pcn.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/pcn/if_pcn.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -1453,7 +1453,7 @@ pcn_watchdog(struct pcn_softc *sc)
     static void
     pcn_stop(struct pcn_softc *sc)
     {
    -	register int		i;
    +	int			i;
     	struct ifnet		*ifp;
     
     	PCN_LOCK_ASSERT(sc);
    
    Modified: head/sys/dev/ppbus/immio.c
    ==============================================================================
    --- head/sys/dev/ppbus/immio.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/ppbus/immio.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -674,10 +674,10 @@ imm_do_scsi(struct vpoio_data *vpo, int 
     		int *ret)
     {
     	device_t ppbus = device_get_parent(vpo->vpo_dev);
    -	register char r;
    +	char r;
     	char l, h = 0;
     	int len, error = 0, not_connected = 0;
    -	register int k;
    +	int k;
     	int negociated = 0;
     
     	/*
    
    Modified: head/sys/dev/ppbus/vpoio.c
    ==============================================================================
    --- head/sys/dev/ppbus/vpoio.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/ppbus/vpoio.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -680,10 +680,10 @@ vpoio_do_scsi(struct vpoio_data *vpo, in
     		int *ret)
     {
     	device_t ppbus = device_get_parent(vpo->vpo_dev);
    -	register char r;
    +	char r;
     	char l, h = 0;
     	int len, error = 0;
    -	register int k;
    +	int k;
     
     	/*
     	 * enter disk state, allocate the ppbus
    
    Modified: head/sys/dev/ppc/ppc.c
    ==============================================================================
    --- head/sys/dev/ppc/ppc.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/ppc/ppc.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -285,7 +285,7 @@ ppc_detect_port(struct ppc_data *ppc)
     static void
     ppc_reset_epp_timeout(struct ppc_data *ppc)
     {
    -	register char r;
    +	char r;
     
     	r = r_str(ppc);
     	w_str(ppc, r | 0x1);
    @@ -1321,10 +1321,10 @@ ppc_exec_microseq(device_t dev, struct p
     	int i, iter, len;
     	int error;
     
    -	register int reg;
    -	register char mask;
    -	register int accum = 0;
    -	register char *ptr = NULL;
    +	int reg;
    +	char mask;
    +	int accum = 0;
    +	char *ptr = NULL;
     
     	struct ppb_microseq *stack = NULL;
     
    
    Modified: head/sys/dev/qlxgb/qla_os.c
    ==============================================================================
    --- head/sys/dev/qlxgb/qla_os.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/qlxgb/qla_os.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -1401,7 +1401,7 @@ int
     qla_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp,
     	uint32_t jumbo)
     {
    -	register struct mbuf *mp = nmp;
    +	struct mbuf *mp = nmp;
     	struct ifnet   *ifp;
     	int             ret = 0;
     	uint32_t	offset;
    
    Modified: head/sys/dev/qlxgbe/ql_os.c
    ==============================================================================
    --- head/sys/dev/qlxgbe/ql_os.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/qlxgbe/ql_os.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -1797,7 +1797,7 @@ qla_free_rcv_bufs(qla_host_t *ha)
     int
     ql_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp)
     {
    -	register struct mbuf *mp = nmp;
    +	struct mbuf *mp = nmp;
     	struct ifnet   		*ifp;
     	int            		ret = 0;
     	uint32_t		offset;
    
    Modified: head/sys/dev/qlxge/qls_os.c
    ==============================================================================
    --- head/sys/dev/qlxge/qls_os.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/qlxge/qls_os.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -1396,7 +1396,7 @@ qls_alloc_rcv_bufs(qla_host_t *ha)
     int
     qls_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp)
     {
    -	register struct mbuf *mp = nmp;
    +	struct mbuf *mp = nmp;
     	struct ifnet   		*ifp;
     	int            		ret = 0;
     	uint32_t		offset;
    
    Modified: head/sys/dev/rl/if_rl.c
    ==============================================================================
    --- head/sys/dev/rl/if_rl.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/rl/if_rl.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -276,7 +276,7 @@ DRIVER_MODULE(miibus, rl, miibus_driver,
     static void
     rl_eeprom_putbyte(struct rl_softc *sc, int addr)
     {
    -	register int		d, i;
    +	int			d, i;
     
     	d = addr | sc->rl_eecmd_read;
     
    @@ -303,7 +303,7 @@ rl_eeprom_putbyte(struct rl_softc *sc, i
     static void
     rl_eeprom_getword(struct rl_softc *sc, int addr, uint16_t *dest)
     {
    -	register int		i;
    +	int			i;
     	uint16_t		word = 0;
     
     	/* Enter EEPROM access mode. */
    @@ -561,7 +561,7 @@ rl_rxfilter(struct rl_softc *sc)
     static void
     rl_reset(struct rl_softc *sc)
     {
    -	register int		i;
    +	int			i;
     
     	RL_LOCK_ASSERT(sc);
     
    @@ -1912,7 +1912,7 @@ rl_watchdog(struct rl_softc *sc)
     static void
     rl_stop(struct rl_softc *sc)
     {
    -	register int		i;
    +	int			i;
     	struct ifnet		*ifp = sc->rl_ifp;
     
     	RL_LOCK_ASSERT(sc);
    
    Modified: head/sys/dev/sound/pci/fm801.c
    ==============================================================================
    --- head/sys/dev/sound/pci/fm801.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/sound/pci/fm801.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -394,7 +394,7 @@ fm801ch_setspeed(kobj_t obj, void *data,
     {
     	struct fm801_chinfo *ch = data;
     	struct fm801_info *fm801 = ch->parent;
    -	register int i;
    +	int i;
     
     
     	for (i = 0; i < 10 && fm801_rates[i].limit <= speed; i++) ;
    
    Modified: head/sys/dev/speaker/spkr.c
    ==============================================================================
    --- head/sys/dev/speaker/spkr.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/speaker/spkr.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -201,7 +201,7 @@ playinit()
     static void
     playtone(int pitch, int value, int sustain)
     {
    -	register int sound, silence, snum = 1, sdenom = 1;
    +	int sound, silence, snum = 1, sdenom = 1;
     
     	/* this weirdness avoids floating-point arithmetic */
     	for (; sustain; sustain--) {
    @@ -243,7 +243,7 @@ playstring(char *cp, size_t slen)
     				{v = v * 10 + (*++cp - '0'); slen--;}
     	for (; slen--; cp++) {
     		int sustain, timeval, tempo;
    -		register char c = toupper(*cp);
    +		char c = toupper(*cp);
     
     #ifdef DEBUG
     		(void) printf("playstring: %c (%x)\n", c, c);
    
    Modified: head/sys/dev/tl/if_tl.c
    ==============================================================================
    --- head/sys/dev/tl/if_tl.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/tl/if_tl.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -534,7 +534,7 @@ static u_int8_t tl_eeprom_putbyte(sc, by
     	struct tl_softc		*sc;
     	int			byte;
     {
    -	register int		i, ack = 0;
    +	int			i, ack = 0;
     
     	/*
     	 * Make sure we're in TX mode.
    @@ -579,7 +579,7 @@ static u_int8_t tl_eeprom_getbyte(sc, ad
     	int			addr;
     	u_int8_t		*dest;
     {
    -	register int		i;
    +	int			i;
     	u_int8_t		byte = 0;
     	device_t		tl_dev = sc->tl_dev;
     
    @@ -2199,7 +2199,7 @@ static void
     tl_stop(sc)
     	struct tl_softc		*sc;
     {
    -	register int		i;
    +	int			i;
     	struct ifnet		*ifp;
     
     	TL_LOCK_ASSERT(sc);
    
    Modified: head/sys/dev/usb/usb_busdma.c
    ==============================================================================
    --- head/sys/dev/usb/usb_busdma.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/usb/usb_busdma.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -232,7 +232,7 @@ struct usb_m_copy_in_arg {
     static int
     usbd_m_copy_in_cb(void *arg, void *src, uint32_t count)
     {
    -	register struct usb_m_copy_in_arg *ua = arg;
    +	struct usb_m_copy_in_arg *ua = arg;
     
     	usbd_copy_in(ua->cache, ua->dst_offset, src, count);
     	ua->dst_offset += count;
    
    Modified: head/sys/dev/wb/if_wb.c
    ==============================================================================
    --- head/sys/dev/wb/if_wb.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/wb/if_wb.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -256,7 +256,7 @@ wb_eeprom_putbyte(sc, addr)
     	struct wb_softc		*sc;
     	int			addr;
     {
    -	register int		d, i;
    +	int			d, i;
     
     	d = addr | WB_EECMD_READ;
     
    @@ -286,7 +286,7 @@ wb_eeprom_getword(sc, addr, dest)
     	int			addr;
     	u_int16_t		*dest;
     {
    -	register int		i;
    +	int			i;
     	u_int16_t		word = 0;
     
     	/* Enter EEPROM access mode. */
    @@ -507,7 +507,7 @@ static void
     wb_reset(sc)
     	struct wb_softc		*sc;
     {
    -	register int		i;
    +	int			i;
     	struct mii_data		*mii;
     	struct mii_softc	*miisc;
     
    @@ -1574,7 +1574,7 @@ static void
     wb_stop(sc)
     	struct wb_softc		*sc;
     {
    -	register int		i;
    +	int			i;
     	struct ifnet		*ifp;
     
     	WB_LOCK_ASSERT(sc);
    
    Modified: head/sys/dev/xl/if_xl.c
    ==============================================================================
    --- head/sys/dev/xl/if_xl.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/dev/xl/if_xl.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -353,7 +353,7 @@ xl_dma_map_addr(void *arg, bus_dma_segme
     static void
     xl_wait(struct xl_softc *sc)
     {
    -	register int		i;
    +	int			i;
     
     	for (i = 0; i < XL_TIMEOUT; i++) {
     		if ((CSR_READ_2(sc, XL_STATUS) & XL_STAT_CMDBUSY) == 0)
    @@ -836,7 +836,7 @@ xl_setmode(struct xl_softc *sc, int medi
     static void
     xl_reset(struct xl_softc *sc)
     {
    -	register int		i;
    +	int			i;
     
     	XL_LOCK_ASSERT(sc);
     
    @@ -3153,7 +3153,7 @@ xl_watchdog(struct xl_softc *sc)
     static void
     xl_stop(struct xl_softc *sc)
     {
    -	register int		i;
    +	int			i;
     	struct ifnet		*ifp = sc->xl_ifp;
     
     	XL_LOCK_ASSERT(sc);
    
    Modified: head/sys/fs/fifofs/fifo_vnops.c
    ==============================================================================
    --- head/sys/fs/fifofs/fifo_vnops.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/fs/fifofs/fifo_vnops.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -313,7 +313,7 @@ int
     fifo_printinfo(vp)
     	struct vnode *vp;
     {
    -	register struct fifoinfo *fip = vp->v_fifoinfo;
    +	struct fifoinfo *fip = vp->v_fifoinfo;
     
     	if (fip == NULL){
     		printf(", NULL v_fifoinfo");
    
    Modified: head/sys/fs/nandfs/nandfs_vnops.c
    ==============================================================================
    --- head/sys/fs/nandfs/nandfs_vnops.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/fs/nandfs/nandfs_vnops.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -129,8 +129,8 @@ nandfs_reclaim(struct vop_reclaim_args *
     static int
     nandfs_read(struct vop_read_args *ap)
     {
    -	register struct vnode *vp = ap->a_vp;
    -	register struct nandfs_node *node = VTON(vp);
    +	struct vnode *vp = ap->a_vp;
    +	struct nandfs_node *node = VTON(vp);
     	struct nandfs_device *nandfsdev = node->nn_nandfsdev;
     	struct uio *uio = ap->a_uio;
     	struct buf *bp;
    
    Modified: head/sys/i386/i386/in_cksum.c
    ==============================================================================
    --- head/sys/i386/i386/in_cksum.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/i386/i386/in_cksum.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -263,9 +263,9 @@ in_cksum_skip(m, len, skip)
     	int len;
     	int skip;
     {
    -	register u_short *w;
    -	register unsigned sum = 0;
    -	register int mlen = 0;
    +	u_short *w;
    +	unsigned sum = 0;
    +	int mlen = 0;
     	int byte_swapped = 0;
     	union { char	c[2]; u_short	s; } su;
     
    
    Modified: head/sys/i386/i386/k6_mem.c
    ==============================================================================
    --- head/sys/i386/i386/k6_mem.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/i386/i386/k6_mem.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -78,7 +78,7 @@ static __inline int
     k6_mrmake(struct mem_range_desc *desc, u_int32_t *mtrr)
     {
     	u_int32_t len = 0, wc, uc;
    -	register int bit;
    +	int bit;
     
     	if (desc->mr_base &~ 0xfffe0000)
     		return (EINVAL);
    
    Modified: head/sys/i386/i386/sys_machdep.c
    ==============================================================================
    --- head/sys/i386/i386/sys_machdep.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/i386/i386/sys_machdep.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -98,9 +98,7 @@ struct sysarch_args {
     #endif
     
     int
    -sysarch(td, uap)
    -	struct thread *td;
    -	register struct sysarch_args *uap;
    +sysarch(struct thread *td, struct sysarch_args *uap)
     {
     	int error;
     	union descriptor *lp;
    
    Modified: head/sys/i386/i386/vm_machdep.c
    ==============================================================================
    --- head/sys/i386/i386/vm_machdep.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/i386/i386/vm_machdep.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -166,7 +166,7 @@ alloc_fpusave(int flags)
     void
     cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
     {
    -	register struct proc *p1;
    +	struct proc *p1;
     	struct pcb *pcb2;
     	struct mdproc *mdp2;
     
    
    Modified: head/sys/i386/ibcs2/ibcs2_misc.c
    ==============================================================================
    --- head/sys/i386/ibcs2/ibcs2_misc.c	Tue May 16 23:31:52 2017	(r318388)
    +++ head/sys/i386/ibcs2/ibcs2_misc.c	Wed May 17 00:34:34 2017	(r318389)
    @@ -93,9 +93,7 @@ __FBSDID("$FreeBSD$");
     #include 
     
     int
    -ibcs2_ulimit(td, uap)
    -	struct thread *td;
    -	struct ibcs2_ulimit_args *uap;
    +ibcs2_ulimit(struct thread *td, struct ibcs2_ulimit_args *uap)
     {
     	struct rlimit rl;
     	int error;
    @@ -134,9 +132,7 @@ ibcs2_ulimit(td, uap)
     #define IBCS2_WSTOPPED       0177
     #define IBCS2_STOPCODE(sig)  ((sig) << 8 | IBCS2_WSTOPPED)
     int
    -ibcs2_wait(td, uap)
    -	struct thread *td;
    -	struct ibcs2_wait_args *uap;
    +ibcs2_wait(struct thread *td, struct ibcs2_wait_args *uap)
     {
     	int error, options, status;
     	int *statusp;
    @@ -185,9 +181,7 @@ ibcs2_wait(td, uap)
     }
     
     int
    -ibcs2_execv(td, uap)
    -	struct thread *td;
    -	struct ibcs2_execv_args *uap;
    +ibcs2_execv(struct thread *td, struct ibcs2_execv_args *uap)
     {
     	struct image_args eargs;
     	struct vmspace *oldvmspace;
    @@ -210,9 +204,7 @@ ibcs2_execv(td, uap)
     }
     
     int
    -ibcs2_execve(td, uap) 
    -        struct thread *td;
    -        struct ibcs2_execve_args *uap;
    +ibcs2_execve(struct thread *td, struct ibcs2_execve_args *uap)
     {
     	struct image_args eargs;
     	struct vmspace *oldvmspace;
    @@ -236,9 +228,7 @@ ibcs2_execve(td, uap) 
     }
     
     int
    -ibcs2_umount(td, uap)
    -	struct thread *td;
    -	struct ibcs2_umount_args *uap;
    +ibcs2_umount(struct thread *td, struct ibcs2_umount_args *uap)
     {
     	struct unmount_args um;
     
    @@ -248,9 +238,7 @@ ibcs2_umount(td, uap)
     }
     
     int
    -ibcs2_mount(td, uap)
    -	struct thread *td;
    -	struct ibcs2_mount_args *uap;
    +ibcs2_mount(struct thread *td, struct ibcs2_mount_args *uap)
     {
     #ifdef notyet
     	int oflags = uap->flags, nflags, error;
    @@ -321,15 +309,13 @@ ibcs2_mount(td, uap)
      */
     
     int
    -ibcs2_getdents(td, uap)
    -	struct thread *td;
    -	register struct ibcs2_getdents_args *uap;
    -{
    -	register struct vnode *vp;
    -	register caddr_t inp, buf;	/* BSD-format */
    -	register int len, reclen;	/* BSD-format */
    -	register caddr_t outp;		/* iBCS2-format */
    -	register int resid;		/* iBCS2-format */
    +ibcs2_getdents(struct thread *td, struct ibcs2_getdents_args *uap)
    +{
    +	struct vnode *vp;
    +	caddr_t inp, buf;		/* BSD-format */
    +	int len, reclen;		/* BSD-format */
    +	caddr_t outp;			/* iBCS2-format */
    +	int resid;			/* iBCS2-format */
     	cap_rights_t rights;
     	struct file *fp;
     	struct uio auio;
    @@ -475,15 +461,13 @@ out:
     }
     
     int
    -ibcs2_read(td, uap)
    -	struct thread *td;
    -	struct ibcs2_read_args *uap;
    -{
    -	register struct vnode *vp;
    -	register caddr_t inp, buf;	/* BSD-format */
    -	register int len, reclen;	/* BSD-format */
    -	register caddr_t outp;		/* iBCS2-format */
    -	register int resid;		/* iBCS2-format */
    +ibcs2_read(struct thread *td, struct ibcs2_read_args *uap)
    +{
    +	struct vnode *vp;
    +	caddr_t inp, buf;		/* BSD-format */
    +	int len, reclen;		/* BSD-format */
    +	caddr_t outp;			/* iBCS2-format */
    +	int resid;			/* iBCS2-format */
     	cap_rights_t rights;
     	struct file *fp;
     	struct uio auio;
    @@ -640,9 +624,7 @@ out:
     }
     
     int
    -ibcs2_mknod(td, uap)
    -	struct thread *td;
    -	struct ibcs2_mknod_args *uap;
    +ibcs2_mknod(struct thread *td, struct ibcs2_mknod_args *uap)
     {
     	char *path;
     	int error;
    @@ -660,9 +642,7 @@ ibcs2_mknod(td, uap)
     }
     
     int
    -ibcs2_getgroups(td, uap)
    -	struct thread *td;
    -	struct ibcs2_getgroups_args *uap;
    +ibcs2_getgroups(struct thread *td, struct ibcs2_getgroups_args *uap)
     {
     	struct ucred *cred;
     	ibcs2_gid_t *iset;
    @@ -690,9 +670,7 @@ out:
     }
     
     int
    -ibcs2_setgroups(td, uap)
    -	struct thread *td;
    -	struct ibcs2_setgroups_args *uap;
    +ibcs2_setgroups(struct thread *td, struct ibcs2_setgroups_args *uap)
     {
     	ibcs2_gid_t *iset;
     	gid_t *gp;
    @@ -722,9 +700,7 @@ out:
     }
     
     int
    -ibcs2_setuid(td, uap)
    -	struct thread *td;
    -	struct ibcs2_setuid_args *uap;
    +ibcs2_setuid(struct thread *td, struct ibcs2_setuid_args *uap)
     {
     	struct setuid_args sa;
     
    @@ -733,9 +709,7 @@ ibcs2_setuid(td, uap)
     }
     
     int
    -ibcs2_setgid(td, uap)
    -	struct thread *td;
    -	struct ibcs2_setgid_args *uap;
    +ibcs2_setgid(struct thread *td, struct ibcs2_setgid_args *uap)
     {
     	struct setgid_args sa;
     
    @@ -744,9 +718,7 @@ ibcs2_setgid(td, uap)
     }
     
     int
    -ibcs2_time(td, uap)
    -	struct thread *td;
    -	struct ibcs2_time_args *uap;
    +ibcs2_time(struct thread *td, struct ibcs2_time_args *uap)
     {
     	struct timeval tv;
     
    @@ -760,9 +732,7 @@ ibcs2_time(td, uap)
     }
     
     int
    -ibcs2_pathconf(td, uap)
    -	struct thread *td;
    -	struct ibcs2_pathconf_args *uap;
    +ibcs2_pathconf(struct thread *td, struct ibcs2_pathconf_args *uap)
     {
     	char *path;
     	int error;
    @@ -775,18 +745,14 @@ ibcs2_pathconf(td, uap)
     }
     
     int
    -ibcs2_fpathconf(td, uap)
    -	struct thread *td;
    -	struct ibcs2_fpathconf_args *uap;
    +ibcs2_fpathconf(struct thread *td, struct ibcs2_fpathconf_args *uap)
     {
     	uap->name++;	/* iBCS2 _PC_* defines are offset by one */
             return sys_fpathconf(td, (struct fpathconf_args *)uap);
     }
     
     int
    -ibcs2_sysconf(td, uap)
    -	struct thread *td;
    -	struct ibcs2_sysconf_args *uap;
    +ibcs2_sysconf(struct thread *td, struct ibcs2_sysconf_args *uap)
     {
     	int mib[2], value, len, error;
     
    @@ -845,9 +811,7 @@ ibcs2_sysconf(td, uap)
     }
     
     int
    -ibcs2_alarm(td, uap)
    -	struct thread *td;
    -	struct ibcs2_alarm_args *uap;
    +ibcs2_alarm(struct thread *td, struct ibcs2_alarm_args *uap)
     {
     	struct itimerval itv, oitv;
     	int error;
    @@ -865,9 +829,7 @@ ibcs2_alarm(td, uap)
     }
     
     int
    -ibcs2_times(td, uap)
    -	struct thread *td;
    -	struct ibcs2_times_args *uap;
    +ibcs2_times(struct thread *td, struct ibcs2_times_args *uap)
     {
     	struct rusage ru;
     	struct timeval t;
    @@ -895,9 +857,7 @@ ibcs2_times(td, uap)
     }
     
     int
    -ibcs2_stime(td, uap)
    -	struct thread *td;
    -	struct ibcs2_stime_args *uap;
    +ibcs2_stime(struct thread *td, struct ibcs2_stime_args *uap)
     {
     	struct timeval tv;
     	long secs;
    @@ -915,9 +875,7 @@ ibcs2_stime(td, uap)
     }
     
     int
    -ibcs2_utime(td, uap)
    -	struct thread *td;
    -	struct ibcs2_utime_args *uap;
    +ibcs2_utime(struct thread *td, struct ibcs2_utime_args *uap)
     {
     	struct ibcs2_utimbuf ubuf;
     	struct timeval tbuf[2], *tp;
    @@ -944,9 +902,7 @@ ibcs2_utime(td, uap)
     }
     
     int
    -ibcs2_nice(td, uap)
    -	struct thread *td;
    -	struct ibcs2_nice_args *uap;
    +ibcs2_nice(struct thread *td, struct ibcs2_nice_args *uap)
     {
     	int error;
     	struct setpriority_args sa;
    @@ -965,9 +921,7 @@ ibcs2_nice(td, uap)
      */
     
     int
    -ibcs2_pgrpsys(td, uap)
    -	struct thread *td;
    -	struct ibcs2_pgrpsys_args *uap;
    +ibcs2_pgrpsys(struct thread *td, struct ibcs2_pgrpsys_args *uap)
     {
     	struct proc *p = td->td_proc;
     	switch (uap->type) {
    @@ -1012,9 +966,7 @@ ibcs2_pgrpsys(td, uap)
      */
     
     int
    -ibcs2_plock(td, uap)
    -	struct thread *td;
    -	struct ibcs2_plock_args *uap;
    +ibcs2_plock(struct thread *td, struct ibcs2_plock_args *uap)
     {
     	int error;
     #define IBCS2_UNLOCK	0
    @@ -1044,9 +996,7 @@ ibcs2_plock(td, uap)
     }
     
     int
    -ibcs2_uadmin(td, uap)
    -	struct thread *td;
    -	struct ibcs2_uadmin_args *uap;
    +ibcs2_uadmin(struct thread *td, struct ibcs2_uadmin_args *uap)
     {
     #define SCO_A_REBOOT        1
     #define SCO_A_SHUTDOWN      2
    @@ -1093,9 +1043,7 @@ ibcs2_uadmin(td, uap)
     }
     
     int
    -ibcs2_sysfs(td, uap)
    -	struct thread *td;
    -	struct ibcs2_sysfs_args *uap;
    +ibcs2_sysfs(struct thread *td, struct ibcs2_sysfs_args *uap)
     {
     #define IBCS2_GETFSIND        1
     #define IBCS2_GETFSTYP        2
    @@ -1111,9 +1059,7 @@ ibcs2_sysfs(td, uap)
     }
     
     int
    -ibcs2_unlink(td, uap)
    -	struct thread *td;
    -	struct ibcs2_unlink_args *uap;
    +ibcs2_unlink(struct thread *td, struct ibcs2_unlink_args *uap)
     {
     	char *path;
     	int error;
    @@ -1125,9 +1071,7 @@ ibcs2_unlink(td, uap)
     }
     
     int
    -ibcs2_chdir(td, uap)
    -	struct thread *td;
    -	struct ibcs2_chdir_args *uap;
    +ibcs2_chdir(struct thread *td, struct ibcs2_chdir_args *uap)
     {
     	char *path;
     	int error;
    @@ -1139,9 +1083,7 @@ ibcs2_chdir(td, uap)
     }
     
     int
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Wed May 17 01:17:58 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAD95D7026E;
     Wed, 17 May 2017 01:17:58 +0000 (UTC)
     (envelope-from phil@juniper.net)
    Received: from NAM03-DM3-obe.outbound.protection.outlook.com
     (mail-dm3nam03on0108.outbound.protection.outlook.com [104.47.41.108])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))
     (Client CN "mail.protection.outlook.com",
     Issuer "Microsoft IT SSL SHA2" (verified OK))
     by mx1.freebsd.org (Postfix) with ESMTPS id 61A35909;
     Wed, 17 May 2017 01:17:57 +0000 (UTC)
     (envelope-from phil@juniper.net)
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net;
     s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
     bh=cWPThBL76Qrl6qCnYyEnnMG0GSuQ1gIAAGWIN+RHKmQ=;
     b=d996OfG4U6Rp83WMgzTjeMpldzX/VcC5Tdduskp6I/cbRswDRIAcDZtgAonhVRHIyI2vF5RnDXT8WfxKQXsirjOy1DFJCINeHL+DfoD1eHwNDIzqxYYHQA5sjsoG3YfnPdRgkENoG9yq2O7azU2MHZaXBfmYrEjHr8e9QBHKzCg=
    Received: from BLUPR05CA0072.namprd05.prod.outlook.com (10.141.20.42) by
     CY1PR0501MB1306.namprd05.prod.outlook.com (10.160.226.11) with Microsoft SMTP
     Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id
     15.1.1101.8; Wed, 17 May 2017 01:17:56 +0000
    Received: from BY2NAM05FT009.eop-nam05.prod.protection.outlook.com
     (2a01:111:f400:7e52::209) by BLUPR05CA0072.outlook.office365.com
     (2a01:111:e400:855::42) with Microsoft SMTP Server (version=TLS1_2,
     cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.8 via
     Frontend Transport; Wed, 17 May 2017 01:17:56 +0000
    Authentication-Results: spf=softfail (sender IP is 66.129.239.12)
     smtp.mailfrom=juniper.net; freebsd.org; dkim=none (message not signed)
     header.d=none;freebsd.org; dmarc=fail action=none header.from=juniper.net;
    Received-SPF: SoftFail (protection.outlook.com: domain of transitioning
     juniper.net discourages use of 66.129.239.12 as permitted sender)
    Received: from p-emfe01a-sac.jnpr.net (66.129.239.12) by
     BY2NAM05FT009.mail.protection.outlook.com (10.152.100.146) with Microsoft
     SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P256)
     id 15.1.1075.12 via Frontend Transport; Wed, 17 May 2017 01:17:55 +0000
    Received: from p-mailhub01.juniper.net (10.160.2.17) by p-emfe01a-sac.jnpr.net
     (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3;
     Tue, 16 May 2017 18:17:39 -0700
    Received: from idle.juniper.net (idleski.juniper.net [172.25.4.26])	by
     p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id v4H1HcIF005066; Tue, 16
     May 2017 18:17:38 -0700	(envelope-from phil@juniper.net)
    Received: from idle.juniper.net (localhost [127.0.0.1])	by idle.juniper.net
     (8.14.4/8.14.3) with ESMTP id v4H1HUAm077333; Tue, 16 May 2017 21:17:31 -0400
     (EDT)	(envelope-from phil@idle.juniper.net)
    Message-ID: <201705170117.v4H1HUAm077333@idle.juniper.net>
    To: "Ngie Cooper (yaneurabeya)" 
    CC: Phil Shafer , ,
     , 
    Subject: Re: svn commit: r318364 - in head: contrib/libxo contrib/libxo/doc
     contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved
     contrib/libxo/tests/gettext/saved contrib/libxo/xo lib/lib...
    In-Reply-To: 
    Date: Tue, 16 May 2017 21:17:29 -0400
    From: Phil Shafer 
    MIME-Version: 1.0
    Content-Type: text/plain
    X-EOPAttributedMessage: 0
    X-MS-Office365-Filtering-HT: Tenant
    X-Forefront-Antispam-Report: CIP:66.129.239.12; IPV:NLI; CTRY:US; EFV:NLI;
     SFV:NSPM;
     SFS:(10019020)(6009001)(39850400002)(39840400002)(39860400002)(39400400002)(39450400003)(39410400002)(2980300002)(189002)(199003)(9170700003)(7126002)(105596002)(50986999)(6916009)(5003940100001)(2906002)(2810700001)(54356999)(53416004)(305945005)(7696004)(356003)(478600001)(4326008)(2950100002)(189998001)(229853002)(966005)(5660300001)(6246003)(47776003)(110136004)(38730400002)(77096006)(6306002)(53936002)(8276002)(50466002)(1076002)(48376002)(39060400002)(81166006)(8936002)(76506005)(1411001)(106466001)(8676002)(86362001)(54906002);
     DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0501MB1306; H:p-emfe01a-sac.jnpr.net; FPR:;
     SPF:SoftFail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; 
    X-Microsoft-Exchange-Diagnostics: 1; BY2NAM05FT009;
     1:hg14gyYh8XJH0EpFqLGLwcefAGW3tjqvJZTkxfVSzY3WX9ytAnPlDgZc5QQAs5YjmB5bSFGkZ/QbaXQWc/qh7uSxd920zSaOFQYaSnfV2R3VnwAme4zSxeojO2Sd01u2Lht0JSvNt65mnm6Bp5lUsuQPwVS5pYwDq8tG+v5/ES+pJTN5hQ4PdtDBovBXphTN8P4wiWZN6BM62Yul1NcyDPjDZgG3tNWI8Cu53RMDMa5Ggj9sDjsiuzIttqfE0iatWZgQHp8kT8kcH/L/83sZIY5RQ92ysAA+sym35b2JAXfmjNM/Ii9uapandxc3iRg63TbdgG+6MzEoPIS7QbCVIJbsaxRU6XNI666/4dho8yHH0ZvcUDmB3vOkQbeys2UbX0M7WU/9vai6g/xlvlWEx2F09GE0dn3a0NftzzHpsb/hcI2J7N2NTgaZPiowoSfLnZpREh/fHcWmNFHyYK7k3v2r6qNUBsNOZv2pn0kqN18YIx0kZEpicGTZmYjTkRmxLAfHnKoqAj3axUQTrjJVIIU6lKyTEOBxNf7FUDjKbVEJ9zyNXaWxTePi/MkloU/q2UdyoAOK6sr/A6S/ebsTBIVBu86PXKzi/si20FHpMXs=
    X-MS-PublicTrafficType: Email
    X-MS-TrafficTypeDiagnostic: CY1PR0501MB1306:
    X-MS-Office365-Filtering-Correlation-Id: 914e1373-e202-4c5c-33f7-08d49cc28c5e
    X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0;
     RULEID:(22001)(2017030254075)(201703131423075)(201703031133081);
     SRVR:CY1PR0501MB1306; 
    X-Microsoft-Exchange-Diagnostics: 1; CY1PR0501MB1306;
     3:rkwvgBMHF+gNxyqV46gx83Y9ZNtS7m9WcsXlkxQ7QskSP8ycD2NXHaU2a/P1HvG1pSpWyQf9PFKmZ5W4nwCu3imnziry9TfNFWVu6thuoWc/HRLYd49FcuFozlEyOh1rtXSrC5odwHLRI1xHHsLIHwViX0gZf7mBtFPoRij8n7CQDNnqnDQ9/sWIejv8Fgl447ZiqV2dMdA5ZAZigGmYnL42pUAZP5DIa/6+h4EtBTY88EPSmM8yVNNFCB6ryTCIb0iO36wuOFXB3ET9InsW8XKF88z6QCMhjtR6eb/gxiBHm2nMgB3Bvw/x7MVZYILbJasWNABw+JQLYY+RQXbTBMntkQfYSPUJDGxMV2/98BR4QyHDNYHp5WEjTYupRz0Vk/Vm5E6859ggmOXnKr57FiHI+uJDsffo5UUJT4CPgqB3YN+ZVqzEUfX8azG3C4Bok/w4ymEEgqO/evOBz+dSww==
    X-Microsoft-Exchange-Diagnostics: 1; CY1PR0501MB1306;
     25:ea4hL9LqPAAMb737vpoJoy8Gn8OG2yGFiMgu6NBezAxf36orol+xMyEj3QS51wTs2X+ZmBvUzUYQ4pUn61PfpZtR93ShtFVAtm0TGLMKsw+HbY4FELNwXjXlF1kR3ba6Z/cgVGPd3U3mAo0X0ZaHM87npYg15rxcI+fIFpxLaVEIuiflE/6+wQ8ggKWC+aMQVnXFrEViUryD1pNinXqu5PL7Ydz3zgu7hibawnvOsJjKvj4pKCiPUEhmLN4ZOI1Ars02wCk5OZIZRBkfHwFN4azP7P1MzitH83RyMZGmZg4zNUxj7adBDxfVLuxZiGDyFtK8o1Jh4OzkC8o5dgp61IWzilopNM62ChdKWMGSfa/0MtUxrzRf/o5fvTzjv4SRv4OBGvgecaX2Lzi02Frv9yp8b3SBtCmg+yUqOjwpEO1p2g3VSx4PXS7nY+vVGgBt/xNu3+ir7zul9916ZTs9vz4bATORMwNzcZKxWsyjXtA=;
     31:JHE6KMLuOB7qT7D5EsPbjijoDyDlqovOPLY00MlZGQUh5zfj5StHJnLpphTNiqEzos8Le7aT3eREwnmTe3T8davCeUaPPlvLlc8F35lGagH0EyZBEauH9uJhmamrJSt21cJvXAkz8wxIBndT8Fy84B7aZ+3gZ569vv5DXGLzA6hSxJB9UpJWOyTDWr7wNDu1stNhWVm+VE7MjuCpo1t7M0ZSa6ZxBwRStNrg0GxxSRYL0E8RsgEyZRNACqVyHHlfFre8zjWCLb0BNNUYzMRsEg==
    X-Microsoft-Exchange-Diagnostics: 1; CY1PR0501MB1306;
     20:wUyZeU3kyeYb9ZwIAmNP4RPyrvR1yxjI9Oz+hVL2tIHvEECJhJxGBejkP5FFE1GTS/z2z86VSUyocalx7yLU9DW053UBWZ72PsHrQny+qzvzSLeyOiwN7tLnBzLR4kBuZaeM34R0z+raEvjE12pNWd8G4sm2aDj7uAxaEQQHyNYiEGMO5UDZ86MshxfGnojlkukcJIJJ7HugAEJfoSjcdc4rkgYn0WaVP8skl3M77Dd0lCWeNqhMXSNNkNr2fz7DJgl2gLtE7Pdsi3/MsJjiO6+5VbE1osx3sI7fa3OsdJvfvYnW4Gl+gOqKasFlD82ZQur7aGzfN6hMjMp98aoTyc4SYLyW5LuryCzBWkNwKmztYkoBN9o9uhlu4iofqO5FTJNXvzSIyX88rDRObvxul5Z7Ys1OMVL41DYbvcJPdJ0TkK4ICpI8YlM2y06pWINn/oS65C3dKdff0kGSVmj0q2G3j0sgLcJ4W6NRmHc47ROssBPHSZ8PJ0uuXD93yhOG
    X-Microsoft-Antispam-PRVS: 
    X-Exchange-Antispam-Report-Test: UriScan:(56005881305849);
    X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0;
     RULEID:(6040450)(601004)(2401047)(5005006)(13017025)(8121501046)(13023025)(13024025)(13018025)(13015025)(10201501046)(93006095)(93003095)(3002001)(6055026)(6041248)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(6072148);
     SRVR:CY1PR0501MB1306; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0501MB1306; 
    X-Microsoft-Exchange-Diagnostics: 1; CY1PR0501MB1306;
     4:uiw/UnOqxefS3TUKP5iw1+eCZiltSHsgRxs9Juy6+RLGOv32hswDR80ndq/u/Lcfs6m1tcq9HHFH61x8xxwakNrUlf5Mvq5C8esOpLS+WfUm6CDExULCQJXrb9/dogfZQ5SY+KdLIHJ9W7b2IWVezT+kU1LrSswgygFGPb/xtbbmYyMupAmY7izuA94gdQolJOBX5vUl4GAtJQk6KvXq5fzqvzmDX29/jny6V4sJUru2IEtu3qfhXUWbdhuG6XvuAsxrON+QCt/VLdR4D14UdyIs8ACjXxEmO3X4PGFSyASNsUBRYuBTsCdbHRZhO1S2Xc+rkWkIgfP+slC0w3xYmytWN8bOq5MT6VbYwhTGW4GAix6i38xrW1IlvUW7gxmL5M941ocdHF5pJZsci5hwhkLVCoZYUtz1JLiT08WbO6OVOlxwXLjxyh4RJxQ41jSknh5sd+ZIsG5CIMHKNXouiI/LopmqpI8ZiI1GmkhMVGMQjL/vbtxHBVkdGc+5AVMhFvPffIEyczFw3D7i/kqcmDHhgMhC9Ocu4r4dGuOqem1Ky1pwDM1kPRDMrv1B8Ggt1sDQ61nXVIbQpFjbSyX50GfbcZZkG2pHbYL8Ef7tBwz+LoRjAvY6H4OljAIL/2Z8YYrEgVi666sMiyPBYXm3oDkYhMSJIrSZhjmURlQzEyCbtGUKpqmuNcECw+cq8UwahzQYs+cZ4C2MN2G8jI2JBPPBhqe++KLDUwlpz3CXHcCkQtv32mvqmockc3gHtR6My6gmlhjAr5q2jxaPrB4yXVwvlM1PjK8EQ/7okKIL1eRflnHTDbbWh2v8gRS0Hu620AyXM7j/F8+jWjPPZfWfUcyyuu9VnhPrDRgD7MKXtoNmas41KI/8Y0gum2LICfnbolSU+AR1D9fnwSxkAlZ4CQ5gLJVXelX6woauVA8mJ5SUoF0JXDeuBVI2KBpzLOHD
    X-Forefront-PRVS: 0310C78181
    X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0501MB1306;
     23:O+pilDO5gkiyxdtsHYgMIHg+88D3mitwS6StjHU?=
     =?us-ascii?Q?BXufs7xfs/u1fGRXptGkCE2SjQAF+JJjAbRlfAELtzNm9JfUgK+W59GTYg9O?=
     =?us-ascii?Q?WMacSePHLmvDSNJRJDlirPjGGU6ixnw+BDrI8agvhricOgYxNb4ghuGASRZA?=
     =?us-ascii?Q?+jtz6H9wiQZPFC7u1uyXR8iQxlmWA2P8dL9vay3UsyLzWrLO6A0xVf2SmVyg?=
     =?us-ascii?Q?67f4XOyl7Gomxz7lx6c6JcDWksbGcdosbgAqvQoE7FKn0+6utuACmckUmXbt?=
     =?us-ascii?Q?sU4krj7fxEuNjFj4/CmRsGCIP7E3fM0/mehLWJHVMd9g7DxZrH5B89cBmPsG?=
     =?us-ascii?Q?KFX9fcpoQtYQynyM0luBfytnf5qPRI4WB+9IKPR6tZDU84qo2Nv7TvRI2lBH?=
     =?us-ascii?Q?DK/E+4p9MJFKy8WG2c+isVwPOxVJ6RL6nB5p/EIbpv8Hiq2S1JC3/CeFZ3iA?=
     =?us-ascii?Q?IX2Kp/FByIKcwRHNllPVv1Ly8TkligfVOAEV+PGKIDkjYHs1jEukrsH8uD30?=
     =?us-ascii?Q?0+chfTOFYEhyWmAk9tr1zWAOqhSeRLyE4J/3DDQ6IujTYY6lGazGHvHVOgBQ?=
     =?us-ascii?Q?Q7g81KdlqC4Kgj3kNMGkOULzkgAw/nUupEC0VdMYjrpqJnMWWYvzLCcxX6mi?=
     =?us-ascii?Q?AGMWkYOh1+Lv7aymqAXImriTkvROm5erSqp6F70lervN1AbX/0Khf5w27Osr?=
     =?us-ascii?Q?nccJJaQa4A4sSHfKw8uGbPALndFCL25oHwJ0x3C4F8Ei+YxVsNzKS7vj7twl?=
     =?us-ascii?Q?HXRF+ZPT6j//qnV/IFBLXfYaEhZw0WSlphUU//Cfl+qlkK+YVY0A16mL6kGR?=
     =?us-ascii?Q?XlaI1jjAIo4jkV1KfIQfFrr9DJT7kuBxHKF8WJeuR9oumBpfmu5wTObD2+oZ?=
     =?us-ascii?Q?BKxPooEGkM1T/6MPBJmpMU6GsRFjia0vAFSGRAFTpK+sKqmExIU/bDA1voId?=
     =?us-ascii?Q?m3ZVnovztb/obGdvSiatBBbLte5Acla8PX+VUHAQuZkp/j8Vdj68HmR/MRXo?=
     =?us-ascii?Q?TeeWErq+lojiMOv8FOKjmspqDW4mB1g8fll24yFV0S2pEBxVBjlNUdFPkQPN?=
     =?us-ascii?Q?GS43PUo5NRJJOw7cTkexwPuonVOJuttJUfxIv/Z6Tb4f/w5rFdkZp7HdmXz6?=
     =?us-ascii?Q?KbmMKfm8cEcqyHGB6q80likPp9Y22IgP7L0atdl7wQLECn1AoIvBgP/S2ZwT?=
     =?us-ascii?Q?SPK2QG2Zu427FPyK8EhUEVbUH16xevYo5lRv+Syy0rdRQa5THH3Cf4sfvkQ?=
     =?us-ascii?Q?=3D=3D?=
    X-Microsoft-Exchange-Diagnostics: 1; CY1PR0501MB1306;
     6:zQRACGzaunwzImwotO336gwz2nmqAiVn0wGUTUcrNxuPuV0VvE5PO0BzqzRvKnyTXsl1g3sFgmpyxDe3AgiCUAN1xmgwOfaR9OFISAow0hhQ82VyA1Xgj5YVCglnuuB1xblXXN4FmRGlZXCbYh2RZOYyScVK1he0+UMS2JG0Gwb6r0hwdA7jXQ07fkreJWHfmtybzpC7+RfbE/4dywFPYJ42jJSEdqLmZpGFvu1cC/2N+UB25fRspCf/rAHY81k8qaWqExMa0w9yfNBrxmffvUC99QQ3yXQCZcb/ac2DwRCrikR1xZHlHYinzKE5Sn305yZnuSZ+8XWLdDzdoHnRfnIWbuGjVZZpeeZ4LCa7bAnJIzXOLxsgaikPQtJLBV6CBKpyoDK6lj+1IPF3VY2uzF8avbMUkKHszBcvWK4/1/LQnZkRJTuwOcl2kqA+uFc1Z6rJnF3yCqLHncHSeAuRnnBJ23Ne6rdPRtm63MveCbjIdK+QV+NONBCJIFZCb+pLWKiwhQxyNo0uR9TN7Q5qp5Lk5z0+vYT3lM+zgQy7u80=;
     5:Oq2/gBUFFUlHgGee+NrTeoq8pQL/xbxVpdoR0KrxBIA+JOy2tjTYmvDWvNhaQA8GPRrh+TIxxwb633bqtxpag8xtGBHZCtpUzAlHaT5dFgUdnSiIA6w4QXSWnw1Zgdf6z3bbG0cEp3WZUbun+2OQ9w==;
     24:7nkn2aEcVgd4h6Z5s9qF+EWQJVzRARu7jdQg5bGjXBiTgbGkJToN9uY7rfQEwAe2y4gMTmyQRRqbXGWdHqEPI1vrxpexnPMm95JBSsOR3PM=
    SpamDiagnosticOutput: 1:99
    SpamDiagnosticMetadata: NSPM
    X-Microsoft-Exchange-Diagnostics: 1; CY1PR0501MB1306;
     7:EKR9tG8hHth2YSfuNC7XnuHL9hJWUxr20UEcqJsQYFTwt7ka9U02RX+qa9MYfaNwgtCoUMQYxD069DCuc35/CKdq1ztF6McrO8RLEkClGgmj6GbSwuBs+ykJHqN7MMUdpfuIm0nmyT5OXJUuDIq9N24RAXpSMcFMJrhyWNPCL8nt6EvOkj/EN/zn/1VGzNCOx8TsdKwwCaVAjbwASdwnV57nq7GevGOrN+zeBC1iucZbxWAUVXExxxBFQVtPdU1WGmCS3PLAYqAomtYiLj6uTArCQMGVLeF12Aa94Nh0jwkSk+XlcXMYiUBz6i4gIm43Ic/RJnmxWpFq1dRzTGEZ/A==
    X-OriginatorOrg: juniper.net
    X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2017 01:17:55.7153 (UTC)
    X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4
    X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12];
     Helo=[p-emfe01a-sac.jnpr.net]
    X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
    X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0501MB1306
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 01:17:58 -0000
    
    "Ngie Cooper (yaneurabeya)" writes:
    >> URL: https://svnweb.freebsd.org/changeset/base/318364
    >Relnotes: yes
    >Also, what does this upgrade entail, in terms of new features/risk?
    
    It's all documentation and minor fixes (213478, 204651).  There is
    also a fix for using "int"s to keep buffer offsets (#55 on github).
    No user-visible changes.
    
    Thanks,
     Phil
    
    From owner-svn-src-all@freebsd.org  Wed May 17 01:38:33 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CABBD707B2;
     Wed, 17 May 2017 01:38:33 +0000 (UTC) (envelope-from cy@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 6C3671263;
     Wed, 17 May 2017 01:38:33 +0000 (UTC) (envelope-from cy@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H1cWvQ044538;
     Wed, 17 May 2017 01:38:32 GMT (envelope-from cy@FreeBSD.org)
    Received: (from cy@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H1cWtC044537;
     Wed, 17 May 2017 01:38:32 GMT (envelope-from cy@FreeBSD.org)
    Message-Id: <201705170138.v4H1cWtC044537@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org
     using -f
    From: Cy Schubert 
    Date: Wed, 17 May 2017 01:38:32 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318390 - in stable: 10/contrib/ipfilter/lib
     11/contrib/ipfilter/lib
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 01:38:33 -0000
    
    Author: cy
    Date: Wed May 17 01:38:32 2017
    New Revision: 318390
    URL: https://svnweb.freebsd.org/changeset/base/318390
    
    Log:
      MFC r318281:
      
      Separate the ipfilter function/static string from the error with a
      colon (:) in error messages to assist the user in parsing out the error
      from where or which object the error message refers to.
    
    Modified:
      stable/11/contrib/ipfilter/lib/ipf_perror.c
    Directory Properties:
      stable/11/   (props changed)
    
    Changes in other areas also in this revision:
    Modified:
      stable/10/contrib/ipfilter/lib/ipf_perror.c
    Directory Properties:
      stable/10/   (props changed)
    
    Modified: stable/11/contrib/ipfilter/lib/ipf_perror.c
    ==============================================================================
    --- stable/11/contrib/ipfilter/lib/ipf_perror.c	Wed May 17 00:34:34 2017	(r318389)
    +++ stable/11/contrib/ipfilter/lib/ipf_perror.c	Wed May 17 01:38:32 2017	(r318390)
    @@ -10,7 +10,7 @@ ipf_perror(err, string)
     	if (err == 0)
     		fprintf(stderr, "%s\n", string);
     	else
    -		fprintf(stderr, "%s %s\n", string, ipf_strerror(err));
    +		fprintf(stderr, "%s: %s\n", string, ipf_strerror(err));
     }
     
     int
    
    From owner-svn-src-all@freebsd.org  Wed May 17 01:38:33 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7092D707B7;
     Wed, 17 May 2017 01:38:33 +0000 (UTC) (envelope-from cy@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id B36C91266;
     Wed, 17 May 2017 01:38:33 +0000 (UTC) (envelope-from cy@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H1cWbO044544;
     Wed, 17 May 2017 01:38:32 GMT (envelope-from cy@FreeBSD.org)
    Received: (from cy@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H1cWEd044543;
     Wed, 17 May 2017 01:38:32 GMT (envelope-from cy@FreeBSD.org)
    Message-Id: <201705170138.v4H1cWEd044543@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org
     using -f
    From: Cy Schubert 
    Date: Wed, 17 May 2017 01:38:32 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
    Subject: svn commit: r318390 - in stable: 10/contrib/ipfilter/lib
     11/contrib/ipfilter/lib
    X-SVN-Group: stable-10
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 01:38:34 -0000
    
    Author: cy
    Date: Wed May 17 01:38:32 2017
    New Revision: 318390
    URL: https://svnweb.freebsd.org/changeset/base/318390
    
    Log:
      MFC r318281:
      
      Separate the ipfilter function/static string from the error with a
      colon (:) in error messages to assist the user in parsing out the error
      from where or which object the error message refers to.
    
    Modified:
      stable/10/contrib/ipfilter/lib/ipf_perror.c
    Directory Properties:
      stable/10/   (props changed)
    
    Changes in other areas also in this revision:
    Modified:
      stable/11/contrib/ipfilter/lib/ipf_perror.c
    Directory Properties:
      stable/11/   (props changed)
    
    Modified: stable/10/contrib/ipfilter/lib/ipf_perror.c
    ==============================================================================
    --- stable/10/contrib/ipfilter/lib/ipf_perror.c	Wed May 17 00:34:34 2017	(r318389)
    +++ stable/10/contrib/ipfilter/lib/ipf_perror.c	Wed May 17 01:38:32 2017	(r318390)
    @@ -10,7 +10,7 @@ ipf_perror(err, string)
     	if (err == 0)
     		fprintf(stderr, "%s\n", string);
     	else
    -		fprintf(stderr, "%s %s\n", string, ipf_strerror(err));
    +		fprintf(stderr, "%s: %s\n", string, ipf_strerror(err));
     }
     
     int
    
    From owner-svn-src-all@freebsd.org  Wed May 17 01:45:28 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93803D70AD6;
     Wed, 17 May 2017 01:45:28 +0000 (UTC) (envelope-from cy@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 632E61939;
     Wed, 17 May 2017 01:45:28 +0000 (UTC) (envelope-from cy@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H1jRqq049312;
     Wed, 17 May 2017 01:45:27 GMT (envelope-from cy@FreeBSD.org)
    Received: (from cy@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H1jR8R049311;
     Wed, 17 May 2017 01:45:27 GMT (envelope-from cy@FreeBSD.org)
    Message-Id: <201705170145.v4H1jR8R049311@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org
     using -f
    From: Cy Schubert 
    Date: Wed, 17 May 2017 01:45:27 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
    Subject: svn commit: r318391 - in stable: 10/contrib/ipfilter/lib
     11/contrib/ipfilter/lib
    X-SVN-Group: stable-10
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 01:45:28 -0000
    
    Author: cy
    Date: Wed May 17 01:45:26 2017
    New Revision: 318391
    URL: https://svnweb.freebsd.org/changeset/base/318391
    
    Log:
      MFC r318283:
      
      As of r318281 in HEAD (r318390 [in stable/10 & stable/11]), there is no
      need to put a colon (:) in the message string.
    
    Modified:
      stable/10/contrib/ipfilter/lib/printhash_live.c
    Directory Properties:
      stable/10/   (props changed)
    
    Changes in other areas also in this revision:
    Modified:
      stable/11/contrib/ipfilter/lib/printhash_live.c
    Directory Properties:
      stable/11/   (props changed)
    
    Modified: stable/10/contrib/ipfilter/lib/printhash_live.c
    ==============================================================================
    --- stable/10/contrib/ipfilter/lib/printhash_live.c	Wed May 17 01:38:32 2017	(r318390)
    +++ stable/10/contrib/ipfilter/lib/printhash_live.c	Wed May 17 01:45:26 2017	(r318391)
    @@ -59,7 +59,7 @@ printhash_live(hp, fd, name, opts, field
     		printed++;
     	}
     	if (last == 0)
    -		ipferror(fd, "walking hash nodes:");
    +		ipferror(fd, "walking hash nodes");
     
     	if (printed == 0)
     		putchar(';');
    
    From owner-svn-src-all@freebsd.org  Wed May 17 01:45:28 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59F2FD70AD2;
     Wed, 17 May 2017 01:45:28 +0000 (UTC) (envelope-from cy@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 29A2B1938;
     Wed, 17 May 2017 01:45:28 +0000 (UTC) (envelope-from cy@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H1jR9Z049306;
     Wed, 17 May 2017 01:45:27 GMT (envelope-from cy@FreeBSD.org)
    Received: (from cy@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H1jRYd049305;
     Wed, 17 May 2017 01:45:27 GMT (envelope-from cy@FreeBSD.org)
    Message-Id: <201705170145.v4H1jRYd049305@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org
     using -f
    From: Cy Schubert 
    Date: Wed, 17 May 2017 01:45:27 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318391 - in stable: 10/contrib/ipfilter/lib
     11/contrib/ipfilter/lib
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 01:45:28 -0000
    
    Author: cy
    Date: Wed May 17 01:45:26 2017
    New Revision: 318391
    URL: https://svnweb.freebsd.org/changeset/base/318391
    
    Log:
      MFC r318283:
      
      As of r318281 in HEAD (r318390 [in stable/10 & stable/11]), there is no
      need to put a colon (:) in the message string.
    
    Modified:
      stable/11/contrib/ipfilter/lib/printhash_live.c
    Directory Properties:
      stable/11/   (props changed)
    
    Changes in other areas also in this revision:
    Modified:
      stable/10/contrib/ipfilter/lib/printhash_live.c
    Directory Properties:
      stable/10/   (props changed)
    
    Modified: stable/11/contrib/ipfilter/lib/printhash_live.c
    ==============================================================================
    --- stable/11/contrib/ipfilter/lib/printhash_live.c	Wed May 17 01:38:32 2017	(r318390)
    +++ stable/11/contrib/ipfilter/lib/printhash_live.c	Wed May 17 01:45:26 2017	(r318391)
    @@ -59,7 +59,7 @@ printhash_live(hp, fd, name, opts, field
     		printed++;
     	}
     	if (last == 0)
    -		ipferror(fd, "walking hash nodes:");
    +		ipferror(fd, "walking hash nodes");
     
     	if (printed == 0)
     		putchar(';');
    
    From owner-svn-src-all@freebsd.org  Wed May 17 01:48:46 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D6F5D70BDC;
     Wed, 17 May 2017 01:48:46 +0000 (UTC)
     (envelope-from sephe@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 61C401C06;
     Wed, 17 May 2017 01:48:46 +0000 (UTC)
     (envelope-from sephe@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H1mjD4049999;
     Wed, 17 May 2017 01:48:45 GMT (envelope-from sephe@FreeBSD.org)
    Received: (from sephe@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H1mien049988;
     Wed, 17 May 2017 01:48:44 GMT (envelope-from sephe@FreeBSD.org)
    Message-Id: <201705170148.v4H1mien049988@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: sephe set sender to
     sephe@FreeBSD.org using -f
    From: Sepherosa Ziehau 
    Date: Wed, 17 May 2017 01:48:44 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318392 - in stable/11/sys: conf dev/acpica
     dev/hyperv/vmbus modules/hyperv/vmbus
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 01:48:46 -0000
    
    Author: sephe
    Date: Wed May 17 01:48:44 2017
    New Revision: 318392
    URL: https://svnweb.freebsd.org/changeset/base/318392
    
    Log:
      MFC 318136
      
          hyperv/vmbus: Reorganize vmbus device tree
      
          For GEN1 Hyper-V, vmbus is attached to pcib0, which contains the
          resources for PCI passthrough and SR-IOV.  There is no
          acpi_syscontainer0 on GEN1 Hyper-V.
      
          For GEN2 Hyper-V, vmbus is attached to acpi_syscontainer0, which
          contains the resources for PCI passthrough and SR-IOV.  There is
          no pcib0 on GEN2 Hyper-V.
      
          The ACPI VMBUS device now only holds its _CRS, which is empty as
          of this commit; its existence is mainly for upward compatibility.
      
          Device tree structure is suggested by jhb@.
      
          Tested-by:	dexuan@
          Collabrated-wth:	dexuan@
          Sponsored by:	Microsoft
          Differential Revision:	https://reviews.freebsd.org/D10565
    
    Added:
      stable/11/sys/dev/acpica/acpi_container.c
         - copied unchanged from r318136, head/sys/dev/acpica/acpi_container.c
      stable/11/sys/dev/hyperv/vmbus/vmbus_res.c
         - copied unchanged from r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c
    Modified:
      stable/11/sys/conf/files
      stable/11/sys/conf/files.amd64
      stable/11/sys/conf/files.i386
      stable/11/sys/dev/acpica/acpi_pcib_acpi.c
      stable/11/sys/dev/hyperv/vmbus/vmbus.c
      stable/11/sys/modules/hyperv/vmbus/Makefile
    Directory Properties:
      stable/11/   (props changed)
    
    Modified: stable/11/sys/conf/files
    ==============================================================================
    --- stable/11/sys/conf/files	Wed May 17 01:45:26 2017	(r318391)
    +++ stable/11/sys/conf/files	Wed May 17 01:48:44 2017	(r318392)
    @@ -664,6 +664,7 @@ dev/acpica/acpi_perf.c		optional acpi
     dev/acpica/acpi_powerres.c	optional acpi
     dev/acpica/acpi_quirk.c		optional acpi
     dev/acpica/acpi_resource.c	optional acpi
    +dev/acpica/acpi_container.c	optional acpi
     dev/acpica/acpi_smbat.c		optional acpi
     dev/acpica/acpi_thermal.c	optional acpi
     dev/acpica/acpi_throttle.c	optional acpi
    
    Modified: stable/11/sys/conf/files.amd64
    ==============================================================================
    --- stable/11/sys/conf/files.amd64	Wed May 17 01:45:26 2017	(r318391)
    +++ stable/11/sys/conf/files.amd64	Wed May 17 01:48:44 2017	(r318392)
    @@ -317,6 +317,7 @@ dev/hyperv/vmbus/vmbus_br.c				optional	
     dev/hyperv/vmbus/vmbus_chan.c				optional	hyperv
     dev/hyperv/vmbus/vmbus_et.c				optional	hyperv
     dev/hyperv/vmbus/vmbus_if.m				optional	hyperv
    +dev/hyperv/vmbus/vmbus_res.c				optional	hyperv
     dev/hyperv/vmbus/vmbus_xact.c				optional	hyperv
     dev/hyperv/vmbus/amd64/hyperv_machdep.c			optional	hyperv
     dev/hyperv/vmbus/amd64/vmbus_vector.S			optional	hyperv
    
    Modified: stable/11/sys/conf/files.i386
    ==============================================================================
    --- stable/11/sys/conf/files.i386	Wed May 17 01:45:26 2017	(r318391)
    +++ stable/11/sys/conf/files.i386	Wed May 17 01:48:44 2017	(r318392)
    @@ -267,6 +267,7 @@ dev/hyperv/vmbus/vmbus_br.c				optional	
     dev/hyperv/vmbus/vmbus_chan.c				optional	hyperv
     dev/hyperv/vmbus/vmbus_et.c				optional	hyperv
     dev/hyperv/vmbus/vmbus_if.m				optional	hyperv
    +dev/hyperv/vmbus/vmbus_res.c				optional	hyperv
     dev/hyperv/vmbus/vmbus_xact.c				optional	hyperv
     dev/hyperv/vmbus/i386/hyperv_machdep.c			optional	hyperv
     dev/hyperv/vmbus/i386/vmbus_vector.S			optional	hyperv
    
    Copied: stable/11/sys/dev/acpica/acpi_container.c (from r318136, head/sys/dev/acpica/acpi_container.c)
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ stable/11/sys/dev/acpica/acpi_container.c	Wed May 17 01:48:44 2017	(r318392, copy of r318136, head/sys/dev/acpica/acpi_container.c)
    @@ -0,0 +1,166 @@
    +/*-
    + * Copyright (c) 2017 Microsoft Corp.
    + * 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 unmodified, 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 ``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 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 "pcib_if.h"
    +
    +ACPI_MODULE_NAME("CONTAINER")
    +
    +static int			acpi_syscont_probe(device_t);
    +static int			acpi_syscont_attach(device_t);
    +static int			acpi_syscont_detach(device_t);
    +static int			acpi_syscont_alloc_msi(device_t, device_t,
    +				    int count, int maxcount, int *irqs);
    +static int			acpi_syscont_release_msi(device_t bus, device_t dev,
    +				    int count, int *irqs);
    +static int			acpi_syscont_alloc_msix(device_t bus, device_t dev,
    +				    int *irq);
    +static int			acpi_syscont_release_msix(device_t bus, device_t dev,
    +				    int irq);
    +static int			acpi_syscont_map_msi(device_t bus, device_t dev,
    +				    int irq, uint64_t *addr, uint32_t *data);
    +
    +static device_method_t acpi_syscont_methods[] = {
    +    /* Device interface */
    +    DEVMETHOD(device_probe,		acpi_syscont_probe),
    +    DEVMETHOD(device_attach,		acpi_syscont_attach),
    +    DEVMETHOD(device_detach,		acpi_syscont_detach),
    +
    +    /* Bus interface */
    +    DEVMETHOD(bus_add_child,		bus_generic_add_child),
    +    DEVMETHOD(bus_print_child,		bus_generic_print_child),
    +    DEVMETHOD(bus_alloc_resource,	bus_generic_alloc_resource),
    +    DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
    +    DEVMETHOD(bus_activate_resource,	bus_generic_activate_resource),
    +    DEVMETHOD(bus_deactivate_resource,	bus_generic_deactivate_resource),
    +    DEVMETHOD(bus_setup_intr,		bus_generic_setup_intr),
    +    DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
    +#if __FreeBSD_version >= 1100000
    +    DEVMETHOD(bus_get_cpus,		bus_generic_get_cpus),
    +#endif
    +
    +    /* pcib interface */
    +    DEVMETHOD(pcib_alloc_msi,		acpi_syscont_alloc_msi),
    +    DEVMETHOD(pcib_release_msi,		acpi_syscont_release_msi),
    +    DEVMETHOD(pcib_alloc_msix,		acpi_syscont_alloc_msix),
    +    DEVMETHOD(pcib_release_msix,	acpi_syscont_release_msix),
    +    DEVMETHOD(pcib_map_msi,		acpi_syscont_map_msi),
    +
    +    DEVMETHOD_END
    +};
    +
    +static driver_t acpi_syscont_driver = {
    +    "acpi_syscontainer",
    +    acpi_syscont_methods,
    +    0,
    +};
    +
    +static devclass_t acpi_syscont_devclass;
    +
    +DRIVER_MODULE(acpi_syscontainer, acpi, acpi_syscont_driver,
    +    acpi_syscont_devclass, NULL, NULL);
    +MODULE_DEPEND(acpi_syscontainer, acpi, 1, 1, 1);
    +
    +static int
    +acpi_syscont_probe(device_t dev)
    +{
    +    static char *syscont_ids[] = { "ACPI0004", "PNP0A05", "PNP0A06", NULL };
    +
    +    if (acpi_disabled("syscontainer") ||
    +	ACPI_ID_PROBE(device_get_parent(dev), dev, syscont_ids) == NULL)
    +	return (ENXIO);
    +
    +    device_set_desc(dev, "System Container");
    +    return (BUS_PROBE_DEFAULT);
    +}
    +
    +static int
    +acpi_syscont_attach(device_t dev)
    +{
    +
    +    bus_generic_probe(dev);
    +    return (bus_generic_attach(dev));
    +}
    +
    +static int
    +acpi_syscont_detach(device_t dev)
    +{
    +
    +    return (bus_generic_detach(dev));
    +}
    +
    +static int
    +acpi_syscont_alloc_msi(device_t bus, device_t dev, int count, int maxcount,
    +    int *irqs)
    +{
    +    device_t parent = device_get_parent(bus);
    +
    +    return (PCIB_ALLOC_MSI(device_get_parent(parent), dev, count, maxcount,
    +	irqs));
    +}
    +
    +static int
    +acpi_syscont_release_msi(device_t bus, device_t dev, int count, int *irqs)
    +{
    +    device_t parent = device_get_parent(bus);
    +
    +    return (PCIB_RELEASE_MSI(device_get_parent(parent), dev, count, irqs));
    +}
    +
    +static int
    +acpi_syscont_alloc_msix(device_t bus, device_t dev, int *irq)
    +{
    +    device_t parent = device_get_parent(bus);
    +
    +    return (PCIB_ALLOC_MSIX(device_get_parent(parent), dev, irq));
    +}
    +
    +static int
    +acpi_syscont_release_msix(device_t bus, device_t dev, int irq)
    +{
    +    device_t parent = device_get_parent(bus);
    +
    +    return (PCIB_RELEASE_MSIX(device_get_parent(parent), dev, irq));
    +}
    +
    +static int
    +acpi_syscont_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr,
    +    uint32_t *data)
    +{
    +    device_t parent = device_get_parent(bus);
    +
    +    return (PCIB_MAP_MSI(device_get_parent(parent), dev, irq, addr, data));
    +}
    
    Modified: stable/11/sys/dev/acpica/acpi_pcib_acpi.c
    ==============================================================================
    --- stable/11/sys/dev/acpica/acpi_pcib_acpi.c	Wed May 17 01:45:26 2017	(r318391)
    +++ stable/11/sys/dev/acpica/acpi_pcib_acpi.c	Wed May 17 01:48:44 2017	(r318392)
    @@ -519,6 +519,7 @@ acpi_pcib_acpi_attach(device_t dev)
     
         acpi_pcib_fetch_prt(dev, &sc->ap_prt);
     
    +    bus_generic_probe(dev);
         if (device_add_child(dev, "pci", -1) == NULL) {
     	device_printf(device_get_parent(dev), "couldn't attach pci bus\n");
     #if defined(NEW_PCIB) && defined(PCI_RES_BUS)
    
    Modified: stable/11/sys/dev/hyperv/vmbus/vmbus.c
    ==============================================================================
    --- stable/11/sys/dev/hyperv/vmbus/vmbus.c	Wed May 17 01:45:26 2017	(r318391)
    +++ stable/11/sys/dev/hyperv/vmbus/vmbus.c	Wed May 17 01:48:44 2017	(r318392)
    @@ -71,6 +71,7 @@ struct vmbus_msghc {
     	struct hypercall_postmsg_in	mh_inprm_save;
     };
     
    +static void			vmbus_identify(driver_t *, device_t);
     static int			vmbus_probe(device_t);
     static int			vmbus_attach(device_t);
     static int			vmbus_detach(device_t);
    @@ -144,6 +145,7 @@ vmbus_chanmsg_handlers[VMBUS_CHANMSG_TYP
     
     static device_method_t vmbus_methods[] = {
     	/* Device interface */
    +	DEVMETHOD(device_identify,		vmbus_identify),
     	DEVMETHOD(device_probe,			vmbus_probe),
     	DEVMETHOD(device_attach,		vmbus_attach),
     	DEVMETHOD(device_detach,		vmbus_detach),
    @@ -190,7 +192,10 @@ static driver_t vmbus_driver = {
     
     static devclass_t vmbus_devclass;
     
    -DRIVER_MODULE(vmbus, acpi, vmbus_driver, vmbus_devclass, NULL, NULL);
    +DRIVER_MODULE(vmbus, pcib, vmbus_driver, vmbus_devclass, NULL, NULL);
    +DRIVER_MODULE(vmbus, acpi_syscontainer, vmbus_driver, vmbus_devclass,
    +    NULL, NULL);
    +
     MODULE_DEPEND(vmbus, acpi, 1, 1, 1);
     MODULE_DEPEND(vmbus, pci, 1, 1, 1);
     MODULE_VERSION(vmbus, 1);
    @@ -1066,43 +1071,41 @@ vmbus_alloc_resource(device_t dev, devic
     	return (res);
     }
     
    -static device_t
    -get_nexus(device_t vmbus)
    -{
    -	device_t acpi = device_get_parent(vmbus);
    -	device_t nexus = device_get_parent(acpi);
    -	return (nexus);
    -}
    -
     static int
     vmbus_alloc_msi(device_t bus, device_t dev, int count, int maxcount, int *irqs)
     {
    -	return (PCIB_ALLOC_MSI(get_nexus(bus), dev, count, maxcount, irqs));
    +
    +	return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount,
    +	    irqs));
     }
     
     static int
     vmbus_release_msi(device_t bus, device_t dev, int count, int *irqs)
     {
    -	return (PCIB_RELEASE_MSI(get_nexus(bus), dev, count, irqs));
    +
    +	return (PCIB_RELEASE_MSI(device_get_parent(bus), dev, count, irqs));
     }
     
     static int
     vmbus_alloc_msix(device_t bus, device_t dev, int *irq)
     {
    -	return (PCIB_ALLOC_MSIX(get_nexus(bus), dev, irq));
    +
    +	return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq));
     }
     
     static int
     vmbus_release_msix(device_t bus, device_t dev, int irq)
     {
    -	return (PCIB_RELEASE_MSIX(get_nexus(bus), dev, irq));
    +
    +	return (PCIB_RELEASE_MSIX(device_get_parent(bus), dev, irq));
     }
     
     static int
     vmbus_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr,
     	uint32_t *data)
     {
    -	return (PCIB_MAP_MSI(get_nexus(bus), dev, irq, addr, data));
    +
    +	return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data));
     }
     
     static uint32_t
    @@ -1216,36 +1219,44 @@ vmbus_get_crs(device_t dev, device_t vmb
     static void
     vmbus_get_mmio_res_pass(device_t dev, enum parse_pass pass)
     {
    -	device_t acpi0, pcib0 = NULL;
    -	device_t *children;
    -	int i, count;
    -
    -	/* Try to find _CRS on VMBus device */
    -	vmbus_get_crs(dev, dev, pass);
    -
    -	/* Try to find _CRS on VMBus device's parent */
    -	acpi0 = device_get_parent(dev);
    -	vmbus_get_crs(acpi0, dev, pass);
    +	device_t acpi0, parent;
     
    -	/* Try to locate pcib0 and find _CRS on it */
    -	if (device_get_children(acpi0, &children, &count) != 0)
    -		return;
    +	parent = device_get_parent(dev);
     
    -	for (i = 0; i < count; i++) {
    -		if (!device_is_attached(children[i]))
    -			continue;
    +	acpi0 = device_get_parent(parent);
    +	if (strcmp("acpi0", device_get_nameunit(acpi0)) == 0) {
    +		device_t *children;
    +		int count;
     
    -		if (strcmp("pcib0", device_get_nameunit(children[i])))
    -			continue;
    +		/*
    +		 * Try to locate VMBUS resources and find _CRS on them.
    +		 */
    +		if (device_get_children(acpi0, &children, &count) == 0) {
    +			int i;
     
    -		pcib0 = children[i];
    -		break;
    -	}
    +			for (i = 0; i < count; ++i) {
    +				if (!device_is_attached(children[i]))
    +					continue;
    +
    +				if (strcmp("vmbus_res",
    +				    device_get_name(children[i])) == 0)
    +					vmbus_get_crs(children[i], dev, pass);
    +			}
    +			free(children, M_TEMP);
    +		}
     
    -	if (pcib0)
    -		vmbus_get_crs(pcib0, dev, pass);
    +		/*
    +		 * Try to find _CRS on acpi.
    +		 */
    +		vmbus_get_crs(acpi0, dev, pass);
    +	} else {
    +		device_printf(dev, "not grandchild of acpi\n");
    +	}
     
    -	free(children, M_TEMP);
    +	/*
    +	 * Try to find _CRS on parent.
    +	 */
    +	vmbus_get_crs(parent, dev, pass);
     }
     
     static void
    @@ -1275,18 +1286,25 @@ vmbus_free_mmio_res(device_t dev)
     }
     #endif	/* NEW_PCIB */
     
    +static void
    +vmbus_identify(driver_t *driver, device_t parent)
    +{
    +
    +	if (device_get_unit(parent) != 0 || vm_guest != VM_GUEST_HV ||
    +	    (hyperv_features & CPUID_HV_MSR_SYNIC) == 0)
    +		return;
    +	device_add_child(parent, "vmbus", -1);
    +}
    +
     static int
     vmbus_probe(device_t dev)
     {
    -	char *id[] = { "VMBUS", NULL };
     
    -	if (ACPI_ID_PROBE(device_get_parent(dev), dev, id) == NULL ||
    -	    device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV ||
    +	if (device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV ||
     	    (hyperv_features & CPUID_HV_MSR_SYNIC) == 0)
     		return (ENXIO);
     
     	device_set_desc(dev, "Hyper-V Vmbus");
    -
     	return (BUS_PROBE_DEFAULT);
     }
     
    
    Copied: stable/11/sys/dev/hyperv/vmbus/vmbus_res.c (from r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c)
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ stable/11/sys/dev/hyperv/vmbus/vmbus_res.c	Wed May 17 01:48:44 2017	(r318392, copy of r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c)
    @@ -0,0 +1,98 @@
    +/*-
    + * Copyright (c) 2017 Microsoft Corp.
    + * 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 unmodified, 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 ``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 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 "acpi_if.h"
    +#include "bus_if.h"
    +
    +static int		vmbus_res_probe(device_t);
    +static int		vmbus_res_attach(device_t);
    +static int		vmbus_res_detach(device_t);
    +
    +static device_method_t vmbus_res_methods[] = {
    +	/* Device interface */
    +	DEVMETHOD(device_probe,			vmbus_res_probe),
    +	DEVMETHOD(device_attach,		vmbus_res_attach),
    +	DEVMETHOD(device_detach,		vmbus_res_detach),
    +	DEVMETHOD(device_shutdown,		bus_generic_shutdown),
    +	DEVMETHOD(device_suspend,		bus_generic_suspend),
    +	DEVMETHOD(device_resume,		bus_generic_resume),
    +
    +	DEVMETHOD_END
    +};
    +
    +static driver_t vmbus_res_driver = {
    +	"vmbus_res",
    +	vmbus_res_methods,
    +	1
    +};
    +
    +static devclass_t vmbus_res_devclass;
    +
    +DRIVER_MODULE(vmbus_res, acpi, vmbus_res_driver, vmbus_res_devclass,
    +    NULL, NULL);
    +MODULE_DEPEND(vmbus_res, acpi, 1, 1, 1);
    +MODULE_VERSION(vmbus_res, 1);
    +
    +static int
    +vmbus_res_probe(device_t dev)
    +{
    +	char *id[] = { "VMBUS", NULL };
    +
    +	if (ACPI_ID_PROBE(device_get_parent(dev), dev, id) == NULL ||
    +	    device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV ||
    +	    (hyperv_features & CPUID_HV_MSR_SYNIC) == 0)
    +		return (ENXIO);
    +
    +	device_set_desc(dev, "Hyper-V Vmbus Resource");
    +	return (BUS_PROBE_DEFAULT);
    +}
    +
    +static int
    +vmbus_res_attach(device_t dev __unused)
    +{
    +
    +	return (0);
    +}
    +
    +static int
    +vmbus_res_detach(device_t dev __unused)
    +{
    +
    +	return (0);
    +}
    
    Modified: stable/11/sys/modules/hyperv/vmbus/Makefile
    ==============================================================================
    --- stable/11/sys/modules/hyperv/vmbus/Makefile	Wed May 17 01:45:26 2017	(r318391)
    +++ stable/11/sys/modules/hyperv/vmbus/Makefile	Wed May 17 01:48:44 2017	(r318392)
    @@ -12,6 +12,7 @@ SRCS=	hyperv.c \
     	vmbus_chan.c \
     	vmbus_et.c \
     	vmbus_if.c \
    +	vmbus_res.c \
     	vmbus_xact.c
     SRCS+=	acpi_if.h bus_if.h device_if.h opt_acpi.h pci_if.h pcib_if.h vmbus_if.h
     
    
    From owner-svn-src-all@freebsd.org  Wed May 17 02:40:08 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47FA0D6DBBD;
     Wed, 17 May 2017 02:40:08 +0000 (UTC)
     (envelope-from sephe@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 117FB16BB;
     Wed, 17 May 2017 02:40:07 +0000 (UTC)
     (envelope-from sephe@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H2e7Aq073395;
     Wed, 17 May 2017 02:40:07 GMT (envelope-from sephe@FreeBSD.org)
    Received: (from sephe@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H2e6Ce073386;
     Wed, 17 May 2017 02:40:06 GMT (envelope-from sephe@FreeBSD.org)
    Message-Id: <201705170240.v4H2e6Ce073386@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: sephe set sender to
     sephe@FreeBSD.org using -f
    From: Sepherosa Ziehau 
    Date: Wed, 17 May 2017 02:40:06 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
    Subject: svn commit: r318393 - in stable/10/sys: conf dev/acpica
     dev/hyperv/vmbus modules/hyperv/vmbus
    X-SVN-Group: stable-10
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 02:40:08 -0000
    
    Author: sephe
    Date: Wed May 17 02:40:06 2017
    New Revision: 318393
    URL: https://svnweb.freebsd.org/changeset/base/318393
    
    Log:
      MFC 318136
      
          hyperv/vmbus: Reorganize vmbus device tree
      
          For GEN1 Hyper-V, vmbus is attached to pcib0, which contains the
          resources for PCI passthrough and SR-IOV.  There is no
          acpi_syscontainer0 on GEN1 Hyper-V.
      
          For GEN2 Hyper-V, vmbus is attached to acpi_syscontainer0, which
          contains the resources for PCI passthrough and SR-IOV.  There is
          no pcib0 on GEN2 Hyper-V.
      
          The ACPI VMBUS device now only holds its _CRS, which is empty as
          of this commit; its existence is mainly for upward compatibility.
      
          Device tree structure is suggested by jhb@.
      
          Tested-by:	dexuan@
          Collabrated-wth:	dexuan@
          Sponsored by:	Microsoft
          Differential Revision:	https://reviews.freebsd.org/D10565
    
    Added:
      stable/10/sys/dev/acpica/acpi_container.c
         - copied unchanged from r318136, head/sys/dev/acpica/acpi_container.c
      stable/10/sys/dev/hyperv/vmbus/vmbus_res.c
         - copied unchanged from r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c
    Modified:
      stable/10/sys/conf/files
      stable/10/sys/conf/files.amd64
      stable/10/sys/conf/files.i386
      stable/10/sys/dev/acpica/acpi_pcib_acpi.c
      stable/10/sys/dev/hyperv/vmbus/vmbus.c
      stable/10/sys/modules/hyperv/vmbus/Makefile
    Directory Properties:
      stable/10/   (props changed)
    
    Modified: stable/10/sys/conf/files
    ==============================================================================
    --- stable/10/sys/conf/files	Wed May 17 01:48:44 2017	(r318392)
    +++ stable/10/sys/conf/files	Wed May 17 02:40:06 2017	(r318393)
    @@ -617,6 +617,7 @@ dev/acpica/acpi_perf.c		optional acpi
     dev/acpica/acpi_powerres.c	optional acpi
     dev/acpica/acpi_quirk.c		optional acpi
     dev/acpica/acpi_resource.c	optional acpi
    +dev/acpica/acpi_container.c	optional acpi
     dev/acpica/acpi_smbat.c		optional acpi
     dev/acpica/acpi_thermal.c	optional acpi
     dev/acpica/acpi_throttle.c	optional acpi
    
    Modified: stable/10/sys/conf/files.amd64
    ==============================================================================
    --- stable/10/sys/conf/files.amd64	Wed May 17 01:48:44 2017	(r318392)
    +++ stable/10/sys/conf/files.amd64	Wed May 17 02:40:06 2017	(r318393)
    @@ -281,6 +281,7 @@ dev/hyperv/vmbus/vmbus_br.c				optional	
     dev/hyperv/vmbus/vmbus_chan.c				optional	hyperv
     dev/hyperv/vmbus/vmbus_et.c				optional	hyperv
     dev/hyperv/vmbus/vmbus_if.m				optional	hyperv
    +dev/hyperv/vmbus/vmbus_res.c				optional	hyperv
     dev/hyperv/vmbus/vmbus_xact.c				optional	hyperv
     dev/hyperv/vmbus/amd64/hyperv_machdep.c			optional	hyperv
     dev/hyperv/vmbus/amd64/vmbus_vector.S			optional	hyperv
    
    Modified: stable/10/sys/conf/files.i386
    ==============================================================================
    --- stable/10/sys/conf/files.i386	Wed May 17 01:48:44 2017	(r318392)
    +++ stable/10/sys/conf/files.i386	Wed May 17 02:40:06 2017	(r318393)
    @@ -256,6 +256,7 @@ dev/hyperv/vmbus/vmbus_br.c				optional	
     dev/hyperv/vmbus/vmbus_chan.c				optional	hyperv
     dev/hyperv/vmbus/vmbus_et.c				optional	hyperv
     dev/hyperv/vmbus/vmbus_if.m				optional	hyperv
    +dev/hyperv/vmbus/vmbus_res.c				optional	hyperv
     dev/hyperv/vmbus/vmbus_xact.c				optional	hyperv
     dev/hyperv/vmbus/i386/hyperv_machdep.c			optional	hyperv
     dev/hyperv/vmbus/i386/vmbus_vector.S			optional	hyperv
    
    Copied: stable/10/sys/dev/acpica/acpi_container.c (from r318136, head/sys/dev/acpica/acpi_container.c)
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ stable/10/sys/dev/acpica/acpi_container.c	Wed May 17 02:40:06 2017	(r318393, copy of r318136, head/sys/dev/acpica/acpi_container.c)
    @@ -0,0 +1,166 @@
    +/*-
    + * Copyright (c) 2017 Microsoft Corp.
    + * 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 unmodified, 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 ``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 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 "pcib_if.h"
    +
    +ACPI_MODULE_NAME("CONTAINER")
    +
    +static int			acpi_syscont_probe(device_t);
    +static int			acpi_syscont_attach(device_t);
    +static int			acpi_syscont_detach(device_t);
    +static int			acpi_syscont_alloc_msi(device_t, device_t,
    +				    int count, int maxcount, int *irqs);
    +static int			acpi_syscont_release_msi(device_t bus, device_t dev,
    +				    int count, int *irqs);
    +static int			acpi_syscont_alloc_msix(device_t bus, device_t dev,
    +				    int *irq);
    +static int			acpi_syscont_release_msix(device_t bus, device_t dev,
    +				    int irq);
    +static int			acpi_syscont_map_msi(device_t bus, device_t dev,
    +				    int irq, uint64_t *addr, uint32_t *data);
    +
    +static device_method_t acpi_syscont_methods[] = {
    +    /* Device interface */
    +    DEVMETHOD(device_probe,		acpi_syscont_probe),
    +    DEVMETHOD(device_attach,		acpi_syscont_attach),
    +    DEVMETHOD(device_detach,		acpi_syscont_detach),
    +
    +    /* Bus interface */
    +    DEVMETHOD(bus_add_child,		bus_generic_add_child),
    +    DEVMETHOD(bus_print_child,		bus_generic_print_child),
    +    DEVMETHOD(bus_alloc_resource,	bus_generic_alloc_resource),
    +    DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
    +    DEVMETHOD(bus_activate_resource,	bus_generic_activate_resource),
    +    DEVMETHOD(bus_deactivate_resource,	bus_generic_deactivate_resource),
    +    DEVMETHOD(bus_setup_intr,		bus_generic_setup_intr),
    +    DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
    +#if __FreeBSD_version >= 1100000
    +    DEVMETHOD(bus_get_cpus,		bus_generic_get_cpus),
    +#endif
    +
    +    /* pcib interface */
    +    DEVMETHOD(pcib_alloc_msi,		acpi_syscont_alloc_msi),
    +    DEVMETHOD(pcib_release_msi,		acpi_syscont_release_msi),
    +    DEVMETHOD(pcib_alloc_msix,		acpi_syscont_alloc_msix),
    +    DEVMETHOD(pcib_release_msix,	acpi_syscont_release_msix),
    +    DEVMETHOD(pcib_map_msi,		acpi_syscont_map_msi),
    +
    +    DEVMETHOD_END
    +};
    +
    +static driver_t acpi_syscont_driver = {
    +    "acpi_syscontainer",
    +    acpi_syscont_methods,
    +    0,
    +};
    +
    +static devclass_t acpi_syscont_devclass;
    +
    +DRIVER_MODULE(acpi_syscontainer, acpi, acpi_syscont_driver,
    +    acpi_syscont_devclass, NULL, NULL);
    +MODULE_DEPEND(acpi_syscontainer, acpi, 1, 1, 1);
    +
    +static int
    +acpi_syscont_probe(device_t dev)
    +{
    +    static char *syscont_ids[] = { "ACPI0004", "PNP0A05", "PNP0A06", NULL };
    +
    +    if (acpi_disabled("syscontainer") ||
    +	ACPI_ID_PROBE(device_get_parent(dev), dev, syscont_ids) == NULL)
    +	return (ENXIO);
    +
    +    device_set_desc(dev, "System Container");
    +    return (BUS_PROBE_DEFAULT);
    +}
    +
    +static int
    +acpi_syscont_attach(device_t dev)
    +{
    +
    +    bus_generic_probe(dev);
    +    return (bus_generic_attach(dev));
    +}
    +
    +static int
    +acpi_syscont_detach(device_t dev)
    +{
    +
    +    return (bus_generic_detach(dev));
    +}
    +
    +static int
    +acpi_syscont_alloc_msi(device_t bus, device_t dev, int count, int maxcount,
    +    int *irqs)
    +{
    +    device_t parent = device_get_parent(bus);
    +
    +    return (PCIB_ALLOC_MSI(device_get_parent(parent), dev, count, maxcount,
    +	irqs));
    +}
    +
    +static int
    +acpi_syscont_release_msi(device_t bus, device_t dev, int count, int *irqs)
    +{
    +    device_t parent = device_get_parent(bus);
    +
    +    return (PCIB_RELEASE_MSI(device_get_parent(parent), dev, count, irqs));
    +}
    +
    +static int
    +acpi_syscont_alloc_msix(device_t bus, device_t dev, int *irq)
    +{
    +    device_t parent = device_get_parent(bus);
    +
    +    return (PCIB_ALLOC_MSIX(device_get_parent(parent), dev, irq));
    +}
    +
    +static int
    +acpi_syscont_release_msix(device_t bus, device_t dev, int irq)
    +{
    +    device_t parent = device_get_parent(bus);
    +
    +    return (PCIB_RELEASE_MSIX(device_get_parent(parent), dev, irq));
    +}
    +
    +static int
    +acpi_syscont_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr,
    +    uint32_t *data)
    +{
    +    device_t parent = device_get_parent(bus);
    +
    +    return (PCIB_MAP_MSI(device_get_parent(parent), dev, irq, addr, data));
    +}
    
    Modified: stable/10/sys/dev/acpica/acpi_pcib_acpi.c
    ==============================================================================
    --- stable/10/sys/dev/acpica/acpi_pcib_acpi.c	Wed May 17 01:48:44 2017	(r318392)
    +++ stable/10/sys/dev/acpica/acpi_pcib_acpi.c	Wed May 17 02:40:06 2017	(r318393)
    @@ -509,6 +509,7 @@ acpi_pcib_acpi_attach(device_t dev)
         if (sc->ap_segment == 0 && sc->ap_bus == 0)
     	    bus0_seen = 1;
     
    +    bus_generic_probe(dev);
         return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_bus));
     }
     
    
    Modified: stable/10/sys/dev/hyperv/vmbus/vmbus.c
    ==============================================================================
    --- stable/10/sys/dev/hyperv/vmbus/vmbus.c	Wed May 17 01:48:44 2017	(r318392)
    +++ stable/10/sys/dev/hyperv/vmbus/vmbus.c	Wed May 17 02:40:06 2017	(r318393)
    @@ -73,6 +73,7 @@ struct vmbus_msghc {
     	struct hypercall_postmsg_in	mh_inprm_save;
     };
     
    +static void			vmbus_identify(driver_t *, device_t);
     static int			vmbus_probe(device_t);
     static int			vmbus_attach(device_t);
     static int			vmbus_detach(device_t);
    @@ -143,6 +144,7 @@ vmbus_chanmsg_handlers[VMBUS_CHANMSG_TYP
     
     static device_method_t vmbus_methods[] = {
     	/* Device interface */
    +	DEVMETHOD(device_identify,		vmbus_identify),
     	DEVMETHOD(device_probe,			vmbus_probe),
     	DEVMETHOD(device_attach,		vmbus_attach),
     	DEVMETHOD(device_detach,		vmbus_detach),
    @@ -189,7 +191,10 @@ static driver_t vmbus_driver = {
     
     static devclass_t vmbus_devclass;
     
    -DRIVER_MODULE(vmbus, acpi, vmbus_driver, vmbus_devclass, NULL, NULL);
    +DRIVER_MODULE(vmbus, pcib, vmbus_driver, vmbus_devclass, NULL, NULL);
    +DRIVER_MODULE(vmbus, acpi_syscontainer, vmbus_driver, vmbus_devclass,
    +    NULL, NULL);
    +
     MODULE_DEPEND(vmbus, acpi, 1, 1, 1);
     MODULE_DEPEND(vmbus, pci, 1, 1, 1);
     MODULE_VERSION(vmbus, 1);
    @@ -1145,43 +1150,41 @@ vmbus_alloc_resource(device_t dev, devic
     	return (res);
     }
     
    -static device_t
    -get_nexus(device_t vmbus)
    -{
    -	device_t acpi = device_get_parent(vmbus);
    -	device_t nexus = device_get_parent(acpi);
    -	return (nexus);
    -}
    -
     static int
     vmbus_alloc_msi(device_t bus, device_t dev, int count, int maxcount, int *irqs)
     {
    -	return (PCIB_ALLOC_MSI(get_nexus(bus), dev, count, maxcount, irqs));
    +
    +	return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount,
    +	    irqs));
     }
     
     static int
     vmbus_release_msi(device_t bus, device_t dev, int count, int *irqs)
     {
    -	return (PCIB_RELEASE_MSI(get_nexus(bus), dev, count, irqs));
    +
    +	return (PCIB_RELEASE_MSI(device_get_parent(bus), dev, count, irqs));
     }
     
     static int
     vmbus_alloc_msix(device_t bus, device_t dev, int *irq)
     {
    -	return (PCIB_ALLOC_MSIX(get_nexus(bus), dev, irq));
    +
    +	return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq));
     }
     
     static int
     vmbus_release_msix(device_t bus, device_t dev, int irq)
     {
    -	return (PCIB_RELEASE_MSIX(get_nexus(bus), dev, irq));
    +
    +	return (PCIB_RELEASE_MSIX(device_get_parent(bus), dev, irq));
     }
     
     static int
     vmbus_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr,
     	uint32_t *data)
     {
    -	return (PCIB_MAP_MSI(get_nexus(bus), dev, irq, addr, data));
    +
    +	return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data));
     }
     
     static uint32_t
    @@ -1295,36 +1298,44 @@ vmbus_get_crs(device_t dev, device_t vmb
     static void
     vmbus_get_mmio_res_pass(device_t dev, enum parse_pass pass)
     {
    -	device_t acpi0, pcib0 = NULL;
    -	device_t *children;
    -	int i, count;
    -
    -	/* Try to find _CRS on VMBus device */
    -	vmbus_get_crs(dev, dev, pass);
    -
    -	/* Try to find _CRS on VMBus device's parent */
    -	acpi0 = device_get_parent(dev);
    -	vmbus_get_crs(acpi0, dev, pass);
    +	device_t acpi0, parent;
     
    -	/* Try to locate pcib0 and find _CRS on it */
    -	if (device_get_children(acpi0, &children, &count) != 0)
    -		return;
    +	parent = device_get_parent(dev);
     
    -	for (i = 0; i < count; i++) {
    -		if (!device_is_attached(children[i]))
    -			continue;
    +	acpi0 = device_get_parent(parent);
    +	if (strcmp("acpi0", device_get_nameunit(acpi0)) == 0) {
    +		device_t *children;
    +		int count;
     
    -		if (strcmp("pcib0", device_get_nameunit(children[i])))
    -			continue;
    +		/*
    +		 * Try to locate VMBUS resources and find _CRS on them.
    +		 */
    +		if (device_get_children(acpi0, &children, &count) == 0) {
    +			int i;
     
    -		pcib0 = children[i];
    -		break;
    -	}
    +			for (i = 0; i < count; ++i) {
    +				if (!device_is_attached(children[i]))
    +					continue;
    +
    +				if (strcmp("vmbus_res",
    +				    device_get_name(children[i])) == 0)
    +					vmbus_get_crs(children[i], dev, pass);
    +			}
    +			free(children, M_TEMP);
    +		}
     
    -	if (pcib0)
    -		vmbus_get_crs(pcib0, dev, pass);
    +		/*
    +		 * Try to find _CRS on acpi.
    +		 */
    +		vmbus_get_crs(acpi0, dev, pass);
    +	} else {
    +		device_printf(dev, "not grandchild of acpi\n");
    +	}
     
    -	free(children, M_TEMP);
    +	/*
    +	 * Try to find _CRS on parent.
    +	 */
    +	vmbus_get_crs(parent, dev, pass);
     }
     
     static void
    @@ -1354,18 +1365,25 @@ vmbus_free_mmio_res(device_t dev)
     }
     #endif	/* NEW_PCIB */
     
    +static void
    +vmbus_identify(driver_t *driver, device_t parent)
    +{
    +
    +	if (device_get_unit(parent) != 0 || vm_guest != VM_GUEST_HV ||
    +	    (hyperv_features & CPUID_HV_MSR_SYNIC) == 0)
    +		return;
    +	device_add_child(parent, "vmbus", -1);
    +}
    +
     static int
     vmbus_probe(device_t dev)
     {
    -	char *id[] = { "VMBUS", NULL };
     
    -	if (ACPI_ID_PROBE(device_get_parent(dev), dev, id) == NULL ||
    -	    device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV ||
    +	if (device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV ||
     	    (hyperv_features & CPUID_HV_MSR_SYNIC) == 0)
     		return (ENXIO);
     
     	device_set_desc(dev, "Hyper-V Vmbus");
    -
     	return (BUS_PROBE_DEFAULT);
     }
     
    
    Copied: stable/10/sys/dev/hyperv/vmbus/vmbus_res.c (from r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c)
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ stable/10/sys/dev/hyperv/vmbus/vmbus_res.c	Wed May 17 02:40:06 2017	(r318393, copy of r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c)
    @@ -0,0 +1,98 @@
    +/*-
    + * Copyright (c) 2017 Microsoft Corp.
    + * 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 unmodified, 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 ``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 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 "acpi_if.h"
    +#include "bus_if.h"
    +
    +static int		vmbus_res_probe(device_t);
    +static int		vmbus_res_attach(device_t);
    +static int		vmbus_res_detach(device_t);
    +
    +static device_method_t vmbus_res_methods[] = {
    +	/* Device interface */
    +	DEVMETHOD(device_probe,			vmbus_res_probe),
    +	DEVMETHOD(device_attach,		vmbus_res_attach),
    +	DEVMETHOD(device_detach,		vmbus_res_detach),
    +	DEVMETHOD(device_shutdown,		bus_generic_shutdown),
    +	DEVMETHOD(device_suspend,		bus_generic_suspend),
    +	DEVMETHOD(device_resume,		bus_generic_resume),
    +
    +	DEVMETHOD_END
    +};
    +
    +static driver_t vmbus_res_driver = {
    +	"vmbus_res",
    +	vmbus_res_methods,
    +	1
    +};
    +
    +static devclass_t vmbus_res_devclass;
    +
    +DRIVER_MODULE(vmbus_res, acpi, vmbus_res_driver, vmbus_res_devclass,
    +    NULL, NULL);
    +MODULE_DEPEND(vmbus_res, acpi, 1, 1, 1);
    +MODULE_VERSION(vmbus_res, 1);
    +
    +static int
    +vmbus_res_probe(device_t dev)
    +{
    +	char *id[] = { "VMBUS", NULL };
    +
    +	if (ACPI_ID_PROBE(device_get_parent(dev), dev, id) == NULL ||
    +	    device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV ||
    +	    (hyperv_features & CPUID_HV_MSR_SYNIC) == 0)
    +		return (ENXIO);
    +
    +	device_set_desc(dev, "Hyper-V Vmbus Resource");
    +	return (BUS_PROBE_DEFAULT);
    +}
    +
    +static int
    +vmbus_res_attach(device_t dev __unused)
    +{
    +
    +	return (0);
    +}
    +
    +static int
    +vmbus_res_detach(device_t dev __unused)
    +{
    +
    +	return (0);
    +}
    
    Modified: stable/10/sys/modules/hyperv/vmbus/Makefile
    ==============================================================================
    --- stable/10/sys/modules/hyperv/vmbus/Makefile	Wed May 17 01:48:44 2017	(r318392)
    +++ stable/10/sys/modules/hyperv/vmbus/Makefile	Wed May 17 02:40:06 2017	(r318393)
    @@ -12,6 +12,7 @@ SRCS=	hyperv.c \
     	vmbus_chan.c \
     	vmbus_et.c \
     	vmbus_if.c \
    +	vmbus_res.c \
     	vmbus_xact.c
     SRCS+=	acpi_if.h bus_if.h device_if.h opt_acpi.h pci_if.h pcib_if.h vmbus_if.h
     
    
    From owner-svn-src-all@freebsd.org  Wed May 17 04:32:48 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D416D70D5E;
     Wed, 17 May 2017 04:32:48 +0000 (UTC)
     (envelope-from melounmichal@gmail.com)
    Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com
     [IPv6:2a00:1450:400c:c09::244])
     (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
     (Client CN "smtp.gmail.com",
     Issuer "Google Internet Authority G2" (verified OK))
     by mx1.freebsd.org (Postfix) with ESMTPS id C690F1738;
     Wed, 17 May 2017 04:32:47 +0000 (UTC)
     (envelope-from melounmichal@gmail.com)
    Received: by mail-wm0-x244.google.com with SMTP id v4so685386wmb.2;
     Tue, 16 May 2017 21:32:47 -0700 (PDT)
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
     h=from:reply-to:subject:to:references:message-id:date:user-agent
     :mime-version:in-reply-to:content-language:content-transfer-encoding;
     bh=ZENQJIlgHoB2u6+W8TE+cBpqarNK+KU8/4M0GBa7bu8=;
     b=pMiLyn5nrSVK8FMyIOf1EF14NmYfCl+Dmhi1sqFyqMR3CnYT/jgOI5otBp+0n/ceQM
     ronz+4FVUX7UZHjnQ+My0Mc6w+ZFXiTLksR1kqqwgz47BLHpQ22WKD/Teyia60upZT83
     cDI68hOBQDfT5+JLOaZpk6JJU3H3tnLqgBBHP3tUVOBjy9v4bGftXtzpOlTKSHXK3M/O
     eDr+QiwCY5TIY+ENoGU8aBdEjCK/DDUeiirZCrpILZ9UDsiCzAYytYn59FjHUoOeIyls
     wCjP9Yq/iIGXTnN/RQxlJyWePpVaaZ7YDrBFXMjiLLFIgle9FcgZCwMxWsxRuGVGFsdq
     l2LQ==
    X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
     d=1e100.net; s=20161025;
     h=x-gm-message-state:from:reply-to:subject:to:references:message-id
     :date:user-agent:mime-version:in-reply-to:content-language
     :content-transfer-encoding;
     bh=ZENQJIlgHoB2u6+W8TE+cBpqarNK+KU8/4M0GBa7bu8=;
     b=RF3W3o0Y9ysnmHPv6hnLHPgW63f3CLHjgtOToKjZk2/iXcgc+9PB38eu/OP1fYGARX
     gdEHKd5eiLmInKBHmfokl3jvxYVQP6MuROoNv6RoOu/K/6NCrgbvi5SM9lNGtiig+En2
     e56LyQfXuB5IRG82G53bM6X/tbc6Xpyn6cRZq38oyM91M7+O3BEJzwOxMn6fZBrsjL7I
     Iwil2LIELDID1NPdenToz1r5XOZZTrHWMtanUB17yGmZAWLPN68w123i86aXG6FJnIjN
     KXpqA78VmQRLa23vbSm5nZm1CeOQp3s8hUIAeN7TRTo7SRyoWyTFjyIhu32+EuHUONoy
     MJww==
    X-Gm-Message-State: AODbwcB5uan31rZheSM5juqPHc7K/4qbCbUD5aCUQUR02i5UPDF8IuQc
     znBYk6/L/pggZMwbzKE=
    X-Received: by 10.28.154.86 with SMTP id c83mr9605806wme.94.1494995565761;
     Tue, 16 May 2017 21:32:45 -0700 (PDT)
    Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100])
     by smtp.gmail.com with ESMTPSA id j126sm1538374wmd.29.2017.05.16.21.32.44
     (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
     Tue, 16 May 2017 21:32:45 -0700 (PDT)
    From: Michal Meloun 
    X-Google-Original-From: Michal Meloun 
    Reply-To: mmel@freebsd.org
    Subject: Re: svn commit: r318336 - head/sys/arm/mv
    To: Luiz Otavio O Souza , src-committers@freebsd.org,
     svn-src-all@freebsd.org, svn-src-head@freebsd.org
    References: <201705160447.v4G4lpJd018173@repo.freebsd.org>
    Message-ID: 
    Date: Wed, 17 May 2017 06:32:48 +0200
    User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
     Thunderbird/52.1.0
    MIME-Version: 1.0
    In-Reply-To: <201705160447.v4G4lpJd018173@repo.freebsd.org>
    Content-Type: text/plain; charset=utf-8
    Content-Language: en-US
    Content-Transfer-Encoding: 7bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 04:32:48 -0000
    
    
    
    On 16.05.2017 6:47, Luiz Otavio O Souza wrote:
    > Author: loos
    > Date: Tue May 16 04:47:50 2017
    > New Revision: 318336
    > URL: https://svnweb.freebsd.org/changeset/base/318336
    > 
    > Log:
    >   Add the SDHCI Address Decoder registers and routines for ARMADA 38X.
    >   
    >   Tested on:	ClearFog Pro
    >   Reviewed by:	Marcin Wojtas 
    >   Sponsored by:	Rubicon Communications, LLC (Netgate)
    >   Differential Revision:	https://reviews.freebsd.org/D10601
    > 
    This commit breaks many of ARMv6 kernels. ARMADAXP, DB-78XXX,
    DB-88F5XXX, DB-88F6XXX, TS7800, LINT.
    
    Michal
    
    
    > Modified:
    >   head/sys/arm/mv/mv_common.c
    >   head/sys/arm/mv/mvwin.h
    > 
    > Modified: head/sys/arm/mv/mv_common.c
    > ==============================================================================
    > --- head/sys/arm/mv/mv_common.c	Tue May 16 03:31:49 2017	(r318335)
    > +++ head/sys/arm/mv/mv_common.c	Tue May 16 04:47:50 2017	(r318336)
    > @@ -82,6 +82,7 @@ static int decode_win_usb3_valid(void);
    >  static int decode_win_eth_valid(void);
    >  static int decode_win_pcie_valid(void);
    >  static int decode_win_sata_valid(void);
    > +static int decode_win_sdhci_valid(void);
    >  
    >  static int decode_win_idma_valid(void);
    >  static int decode_win_xor_valid(void);
    > @@ -95,6 +96,7 @@ static void decode_win_usb3_setup(u_long
    >  static void decode_win_eth_setup(u_long);
    >  static void decode_win_sata_setup(u_long);
    >  static void decode_win_ahci_setup(u_long);
    > +static void decode_win_sdhci_setup(u_long);
    >  
    >  static void decode_win_idma_setup(u_long);
    >  static void decode_win_xor_setup(u_long);
    > @@ -105,6 +107,7 @@ static void decode_win_eth_dump(u_long b
    >  static void decode_win_idma_dump(u_long base);
    >  static void decode_win_xor_dump(u_long base);
    >  static void decode_win_ahci_dump(u_long base);
    > +static void decode_win_sdhci_dump(u_long);
    >  
    >  static int fdt_get_ranges(const char *, void *, int, int *, int *);
    >  #ifdef SOC_MV_ARMADA38X
    > @@ -138,6 +141,7 @@ static struct soc_node_spec soc_nodes[] 
    >  	{ "mrvl,usb-ehci", &decode_win_usb_setup, &decode_win_usb_dump },
    >  	{ "marvell,armada-380-xhci", &decode_win_usb3_setup, &decode_win_usb3_dump },
    >  	{ "marvell,armada-380-ahci", &decode_win_ahci_setup, &decode_win_ahci_dump },
    > +	{ "marvell,armada-380-sdhci", &decode_win_sdhci_setup, &decode_win_sdhci_dump },
    >  	{ "mrvl,sata", &decode_win_sata_setup, NULL },
    >  	{ "mrvl,xor", &decode_win_xor_setup, &decode_win_xor_dump },
    >  	{ "mrvl,idma", &decode_win_idma_setup, &decode_win_idma_dump },
    > @@ -568,7 +572,8 @@ soc_decode_win(void)
    >  	if (!decode_win_cpu_valid() || !decode_win_usb_valid() ||
    >  	    !decode_win_eth_valid() || !decode_win_idma_valid() ||
    >  	    !decode_win_pcie_valid() || !decode_win_sata_valid() ||
    > -	    !decode_win_xor_valid() || !decode_win_usb3_valid())
    > +	    !decode_win_xor_valid() || !decode_win_usb3_valid() ||
    > +	    !decode_win_sdhci_valid())
    >  		return (EINVAL);
    >  
    >  	decode_win_cpu_setup();
    > @@ -659,6 +664,11 @@ WIN_REG_BASE_IDX_RD(win_sata, sz, MV_WIN
    >  WIN_REG_BASE_IDX_WR(win_sata, sz, MV_WIN_SATA_SIZE);
    >  #endif
    >  
    > +WIN_REG_BASE_IDX_RD(win_sdhci, cr, MV_WIN_SDHCI_CTRL);
    > +WIN_REG_BASE_IDX_RD(win_sdhci, br, MV_WIN_SDHCI_BASE);
    > +WIN_REG_BASE_IDX_WR(win_sdhci, cr, MV_WIN_SDHCI_CTRL);
    > +WIN_REG_BASE_IDX_WR(win_sdhci, br, MV_WIN_SDHCI_BASE);
    > +
    >  #ifndef SOC_MV_DOVE
    >  WIN_REG_IDX_RD(ddr, br, MV_WIN_DDR_BASE, MV_DDR_CADR_BASE)
    >  WIN_REG_IDX_RD(ddr, sz, MV_WIN_DDR_SIZE, MV_DDR_CADR_BASE)
    > @@ -2073,6 +2083,60 @@ decode_win_sata_valid(void)
    >  	return (decode_win_can_cover_ddr(MV_WIN_SATA_MAX));
    >  }
    >  
    > +static void
    > +decode_win_sdhci_setup(u_long base)
    > +{
    > +	uint32_t cr, br;
    > +	int i, j;
    > +
    > +	for (i = 0; i < MV_WIN_SDHCI_MAX; i++) {
    > +		win_sdhci_cr_write(base, i, 0);
    > +		win_sdhci_br_write(base, i, 0);
    > +	}
    > +
    > +	for (i = 0; i < MV_WIN_DDR_MAX; i++)
    > +		if (ddr_is_active(i)) {
    > +			br = ddr_base(i);
    > +			cr = (((ddr_size(i) - 1) &
    > +			    (IO_WIN_SIZE_MASK << IO_WIN_SIZE_SHIFT)) |
    > +			    (ddr_attr(i) << IO_WIN_ATTR_SHIFT) |
    > +			    (ddr_target(i) << IO_WIN_TGT_SHIFT) |
    > +			    IO_WIN_ENA_MASK);
    > +
    > +			/* Use the first available SDHCI window */
    > +			for (j = 0; j < MV_WIN_SDHCI_MAX; j++) {
    > +				if (win_sdhci_cr_read(base, j) & IO_WIN_ENA_MASK)
    > +					continue;
    > +
    > +				win_sdhci_cr_write(base, j, cr);
    > +				win_sdhci_br_write(base, j, br);
    > +				break;
    > +			}
    > +		}
    > +}
    > +
    > +static void
    > +decode_win_sdhci_dump(u_long base)
    > +{
    > +	int i;
    > +
    > +	for (i = 0; i < MV_WIN_SDHCI_MAX; i++)
    > +		printf("SDHCI window#%d: c 0x%08x, b 0x%08x\n", i,
    > +		    win_sdhci_cr_read(base, i), win_sdhci_br_read(base, i));
    > +}
    > +
    > +static int
    > +decode_win_sdhci_valid(void)
    > +{
    > +
    > +#ifdef SOC_MV_ARMADA38X
    > +	return (decode_win_can_cover_ddr(MV_WIN_SDHCI_MAX));
    > +#endif
    > +
    > +	/* Satisfy platforms not equipped with this controller. */
    > +	return (1);
    > +}
    > +
    >  /**************************************************************************
    >   * FDT parsing routines.
    >   **************************************************************************/
    > 
    > Modified: head/sys/arm/mv/mvwin.h
    > ==============================================================================
    > --- head/sys/arm/mv/mvwin.h	Tue May 16 03:31:49 2017	(r318335)
    > +++ head/sys/arm/mv/mvwin.h	Tue May 16 04:47:50 2017	(r318336)
    > @@ -296,6 +296,10 @@
    >  #define	MV_WIN_SATA_MAX			4
    >  #endif
    >  
    > +#define	MV_WIN_SDHCI_CTRL(n)		(0x8 * (n) + 0x4080)
    > +#define	MV_WIN_SDHCI_BASE(n)		(0x8 * (n) + 0x4084)
    > +#define	MV_WIN_SDHCI_MAX		8
    > +
    >  #if defined(SOC_MV_ARMADA38X)
    >  #define	MV_BOOTROM_MEM_ADDR	0xFFF00000
    >  #define	MV_BOOTROM_WIN_SIZE	0xF
    > 
    
    From owner-svn-src-all@freebsd.org  Wed May 17 05:21:05 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BB28D7095C;
     Wed, 17 May 2017 05:21:05 +0000 (UTC)
     (envelope-from araujo@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 06E21980;
     Wed, 17 May 2017 05:21:04 +0000 (UTC)
     (envelope-from araujo@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H5L4Ad039034;
     Wed, 17 May 2017 05:21:04 GMT (envelope-from araujo@FreeBSD.org)
    Received: (from araujo@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H5L34Y039031;
     Wed, 17 May 2017 05:21:03 GMT (envelope-from araujo@FreeBSD.org)
    Message-Id: <201705170521.v4H5L34Y039031@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: araujo set sender to
     araujo@FreeBSD.org using -f
    From: Marcelo Araujo 
    Date: Wed, 17 May 2017 05:21:03 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318394 - in stable/11: sbin/geom/class/label
     sys/geom/part
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 05:21:05 -0000
    
    Author: araujo
    Date: Wed May 17 05:21:03 2017
    New Revision: 318394
    URL: https://svnweb.freebsd.org/changeset/base/318394
    
    Log:
      MFC r315112, r315196
      
      r315112:
      Add the capability to refresh the gpart(8) label without need a reboot.
      
      gpart(8) has functionality to change the label of an GPT partition.
      This functionality works like it should, however, after a label change
      the /dev/gpt/ entries remain unchanged. glabel(8) status output remains
      unchanged. The change only takes effect after a reboot.
      
      PR:		162690
      Submitted by:	sub.mesa@gmail, Ben RUBSON , ae
      Reviewed by:	allanjude, bapt, bcr
      Differential Revision:	https://reviews.freebsd.org/D9935
      
      r315196:
      After r315112 I broke the tests with eli, instead to pass 0, I should pass
      M_NOWAIT to g_media_changed() that will call g_post_event() with this flag.
      
      Reported by:	lwhsu, ngie and ae
    
    Modified:
      stable/11/sbin/geom/class/label/geom_label.c
      stable/11/sbin/geom/class/label/glabel.8
      stable/11/sys/geom/part/g_part.c
    Directory Properties:
      stable/11/   (props changed)
    
    Modified: stable/11/sbin/geom/class/label/geom_label.c
    ==============================================================================
    --- stable/11/sbin/geom/class/label/geom_label.c	Wed May 17 02:40:06 2017	(r318393)
    +++ stable/11/sbin/geom/class/label/geom_label.c	Wed May 17 05:21:03 2017	(r318394)
    @@ -53,6 +53,7 @@ static void label_main(struct gctl_req *
     static void label_clear(struct gctl_req *req);
     static void label_dump(struct gctl_req *req);
     static void label_label(struct gctl_req *req);
    +static void label_refresh(struct gctl_req *req);
     
     struct g_command PUBSYM(class_commands)[] = {
     	{ "clear", G_FLAG_VERBOSE, label_main, G_NULL_OPTS,
    @@ -74,6 +75,9 @@ struct g_command PUBSYM(class_commands)[
     	{ "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, label_main, G_NULL_OPTS,
     	    "[-v] name dev"
     	},
    +	{ "refresh", 0, label_main, G_NULL_OPTS,
    +	    "dev ..."
    +	},
     	{ "stop", G_FLAG_VERBOSE, NULL,
     	    {
     		{ 'f', "force", NULL, G_TYPE_BOOL },
    @@ -105,6 +109,8 @@ label_main(struct gctl_req *req, unsigne
     		label_clear(req);
     	else if (strcmp(name, "dump") == 0)
     		label_dump(req);
    +	else if (strcmp(name, "refresh") == 0)
    +		label_refresh(req);
     	else
     		gctl_error(req, "Unknown command: %s.", name);
     }
    @@ -223,3 +229,28 @@ label_dump(struct gctl_req *req)
     		printf("\n");
     	}
     }
    +
    +static void
    +label_refresh(struct gctl_req *req)
    +{
    +	const char *name;
    +	int i, nargs, fd;
    +
    +	nargs = gctl_get_int(req, "nargs");
    +	if (nargs < 1) {
    +		gctl_error(req, "Too few arguments.");
    +		return;
    +	}
    +
    +	for (i = 0; i < nargs; i++) {
    +		name = gctl_get_ascii(req, "arg%d", i);
    +		fd = g_open(name, 1);
    +		if (fd == -1) {
    +			printf("Can't refresh metadata from %s: %s.\n",
    +			    name, strerror(errno));
    +		} else {
    +			printf("Metadata from %s refreshed.\n", name);
    +			(void)g_close(fd);
    +		}
    +	}
    +}
    
    Modified: stable/11/sbin/geom/class/label/glabel.8
    ==============================================================================
    --- stable/11/sbin/geom/class/label/glabel.8	Wed May 17 02:40:06 2017	(r318393)
    +++ stable/11/sbin/geom/class/label/glabel.8	Wed May 17 05:21:03 2017	(r318394)
    @@ -24,7 +24,7 @@
     .\"
     .\" $FreeBSD$
     .\"
    -.Dd April 22, 2013
    +.Dd March 12, 2017
     .Dt GLABEL 8
     .Os
     .Sh NAME
    @@ -57,6 +57,9 @@
     .Cm dump
     .Ar dev ...
     .Nm
    +.Cm refresh
    +.Ar dev ...
    +.Nm
     .Cm list
     .Nm
     .Cm status
    @@ -186,6 +189,8 @@ Same as
     Clear metadata on the given devices.
     .It Cm dump
     Dump metadata stored on the given devices.
    +.It Cm refresh
    +Refresh / rediscover metadata from the given devices.
     .It Cm list
     See
     .Xr geom 8 .
    
    Modified: stable/11/sys/geom/part/g_part.c
    ==============================================================================
    --- stable/11/sys/geom/part/g_part.c	Wed May 17 02:40:06 2017	(r318393)
    +++ stable/11/sys/geom/part/g_part.c	Wed May 17 05:21:03 2017	(r318394)
    @@ -884,6 +884,10 @@ g_part_ctl_commit(struct gctl_req *req, 
     
     	LIST_FOREACH_SAFE(entry, &table->gpt_entry, gpe_entry, tmp) {
     		if (!entry->gpe_deleted) {
    +			/* Notify consumers that provider might be changed. */
    +			if (entry->gpe_modified && (
    +			    entry->gpe_pp->acw + entry->gpe_pp->ace) == 0)
    +				g_media_changed(entry->gpe_pp, M_NOWAIT);
     			entry->gpe_created = 0;
     			entry->gpe_modified = 0;
     			continue;
    
    From owner-svn-src-all@freebsd.org  Wed May 17 05:28:18 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82B76D70A11;
     Wed, 17 May 2017 05:28:18 +0000 (UTC)
     (envelope-from araujo@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 41D3AD40;
     Wed, 17 May 2017 05:28:18 +0000 (UTC)
     (envelope-from araujo@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H5SHm3042943;
     Wed, 17 May 2017 05:28:17 GMT (envelope-from araujo@FreeBSD.org)
    Received: (from araujo@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H5SHRl042942;
     Wed, 17 May 2017 05:28:17 GMT (envelope-from araujo@FreeBSD.org)
    Message-Id: <201705170528.v4H5SHRl042942@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: araujo set sender to
     araujo@FreeBSD.org using -f
    From: Marcelo Araujo 
    Date: Wed, 17 May 2017 05:28:17 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318395 - stable/11/usr.sbin/fdread
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 05:28:18 -0000
    
    Author: araujo
    Date: Wed May 17 05:28:16 2017
    New Revision: 318395
    URL: https://svnweb.freebsd.org/changeset/base/318395
    
    Log:
      MFC r317742:
      
      Free the memory allocated to trackbuf before exiting, it might fix a potential
      memory leak.
      
      Submitted by:	trix@juniper.net
      Differential Revision:	https://reviews.freebsd.org/D9856
    
    Modified:
      stable/11/usr.sbin/fdread/fdread.c
    Directory Properties:
      stable/11/   (props changed)
    
    Modified: stable/11/usr.sbin/fdread/fdread.c
    ==============================================================================
    --- stable/11/usr.sbin/fdread/fdread.c	Wed May 17 05:21:03 2017	(r318394)
    +++ stable/11/usr.sbin/fdread/fdread.c	Wed May 17 05:28:16 2017	(r318395)
    @@ -184,6 +184,7 @@ doread(int fd, FILE *of, const char *_de
     		if (rv == 0) {
     			/* EOF? */
     			warnx("premature EOF after %u bytes", nbytes);
    +			free(trackbuf);
     			return (EX_OK);
     		}
     		if ((unsigned)rv == tracksize) {
    @@ -215,6 +216,7 @@ doread(int fd, FILE *of, const char *_de
     						if (!quiet)
     							putc('\n', stderr);
     						perror("non-IO error");
    +						free(trackbuf);
     						return (EX_OSERR);
     					}
     					if (ioctl(fd, FD_GSTAT, &fdcs) == -1)
    @@ -233,6 +235,7 @@ doread(int fd, FILE *of, const char *_de
     					if (!recover) {
     						if (!quiet)
     							putc('\n', stderr);
    +						free(trackbuf);
     						return (EX_IOERR);
     					}
     					memset(trackbuf, fillbyte, secsize);
    @@ -284,6 +287,7 @@ doread(int fd, FILE *of, const char *_de
     			continue;
     		}
     	}
    +	free(trackbuf);
     	if (!quiet) {
     		putc('\n', stderr);
     		if (nerrs)
    
    From owner-svn-src-all@freebsd.org  Wed May 17 05:47:32 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52E99D6E054;
     Wed, 17 May 2017 05:47:32 +0000 (UTC)
     (envelope-from araujo@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 2FF071650;
     Wed, 17 May 2017 05:47:32 +0000 (UTC)
     (envelope-from araujo@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H5lVQm051165;
     Wed, 17 May 2017 05:47:31 GMT (envelope-from araujo@FreeBSD.org)
    Received: (from araujo@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H5lVw2051164;
     Wed, 17 May 2017 05:47:31 GMT (envelope-from araujo@FreeBSD.org)
    Message-Id: <201705170547.v4H5lVw2051164@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: araujo set sender to
     araujo@FreeBSD.org using -f
    From: Marcelo Araujo 
    Date: Wed, 17 May 2017 05:47:31 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318396 - stable/11/usr.sbin/bsdinstall/partedit
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 05:47:32 -0000
    
    Author: araujo
    Date: Wed May 17 05:47:31 2017
    New Revision: 318396
    URL: https://svnweb.freebsd.org/changeset/base/318396
    
    Log:
      MFC r317743:
      
      Use nitems() from sys/param.h.
      
      Reviewed by:	ngie
      Differential Revision:	https://reviews.freebsd.org/D9942
    
    Modified:
      stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c
    Directory Properties:
      stable/11/   (props changed)
    
    Modified: stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c
    ==============================================================================
    --- stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c	Wed May 17 05:28:16 2017	(r318395)
    +++ stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c	Wed May 17 05:47:31 2017	(r318396)
    @@ -101,14 +101,14 @@ newfs_command(const char *fstype, char *
     		if (!use_default) {
     			int choice;
     			choice = dlg_checklist("UFS Options", "", 0, 0, 0,
    -			    sizeof(items)/sizeof(items[0]), items, NULL,
    +			    nitems(items), items, NULL,
     			    FLAG_CHECK, &i);
     			if (choice == 1) /* Cancel */
     				return;
     		}
     
     		strcpy(command, "newfs ");
    -		for (i = 0; i < (int)(sizeof(items)/sizeof(items[0])); i++) {
    +		for (i = 0; i < (int)nitems(items); i++) {
     			if (items[i].state == 0)
     				continue;
     			if (strcmp(items[i].name, "UFS1") == 0)
    @@ -139,7 +139,7 @@ newfs_command(const char *fstype, char *
     		if (!use_default) {
     			int choice;
     			choice = dlg_checklist("ZFS Options", "", 0, 0, 0,
    -			    sizeof(items)/sizeof(items[0]), items, NULL,
    +			    nitems(items), items, NULL,
     			    FLAG_CHECK, &i);
     			if (choice == 1) /* Cancel */
     				return;
    @@ -155,7 +155,7 @@ newfs_command(const char *fstype, char *
     			sprintf(command, "%s -o cachefile=%s/zpool.cache ",
     			    command, zfsboot_path);
     		}
    -		for (i = 0; i < (int)(sizeof(items)/sizeof(items[0])); i++) {
    +		for (i = 0; i < (int)nitems(items); i++) {
     			if (items[i].state == 0)
     				continue;
     			if (strcmp(items[i].name, "fletcher4") == 0)
    @@ -181,14 +181,14 @@ newfs_command(const char *fstype, char *
     		if (!use_default) {
     			int choice;
     			choice = dlg_checklist("FAT Options", "", 0, 0, 0,
    -			    sizeof(items)/sizeof(items[0]), items, NULL,
    +			    nitems(items), items, NULL,
     			    FLAG_RADIO, &i);
     			if (choice == 1) /* Cancel */
     				return;
     		}
     
     		strcpy(command, "newfs_msdos ");
    -		for (i = 0; i < (int)(sizeof(items)/sizeof(items[0])); i++) {
    +		for (i = 0; i < (int)nitems(items); i++) {
     			if (items[i].state == 0)
     				continue;
     			if (strcmp(items[i].name, "FAT32") == 0)
    @@ -231,7 +231,7 @@ parttypemenu:
     	dialog_vars.default_item = __DECONST(char *, def_scheme);
     	cancel = dlg_menu("Partition Scheme",
     	    "Select a partition scheme for this volume:", 0, 0, 0,
    -	    sizeof(items) / sizeof(items[0]), items, &choice, NULL);
    +	    nitems(items), items, &choice, NULL);
     	dialog_vars.default_item = NULL;
     
     	if (cancel)
    @@ -653,7 +653,7 @@ endedit:
     	    "freebsd") == 0)
     		gpart_partition(pp->lg_name, "BSD");
     
    -	for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++)
    +	for (i = 0; i < nitems(items); i++)
     		if (items[i].text_free)
     			free(items[i].text);
     }
    @@ -1191,7 +1191,7 @@ addpartform:
     		set_default_part_metadata(newpartname, scheme,
     		    items[0].text, items[2].text, newfs);
     
    -	for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++)
    +	for (i = 0; i < nitems(items); i++)
     		if (items[i].text_free)
     			free(items[i].text);
     
    
    From owner-svn-src-all@freebsd.org  Wed May 17 05:53:27 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 147E1D6E2CB;
     Wed, 17 May 2017 05:53:27 +0000 (UTC)
     (envelope-from rpokala@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id BD2621A94;
     Wed, 17 May 2017 05:53:26 +0000 (UTC)
     (envelope-from rpokala@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H5rPcx054909;
     Wed, 17 May 2017 05:53:25 GMT (envelope-from rpokala@FreeBSD.org)
    Received: (from rpokala@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H5rPbN054904;
     Wed, 17 May 2017 05:53:25 GMT (envelope-from rpokala@FreeBSD.org)
    Message-Id: <201705170553.v4H5rPbN054904@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: rpokala set sender to
     rpokala@FreeBSD.org using -f
    From: Ravi Pokala 
    Date: Wed, 17 May 2017 05:53:25 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318397 - in stable/11: sbin/ifconfig sys/net sys/sys
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 05:53:27 -0000
    
    Author: rpokala
    Date: Wed May 17 05:53:25 2017
    New Revision: 318397
    URL: https://svnweb.freebsd.org/changeset/base/318397
    
    Log:
      MFC r318160, 318176: Persistently store NIC's hardware MAC address, and add
      a way to retrive it
      
      The MAC address reported by `ifconfig ${nic} ether' does not always match
      the address in the hardware, as reported by the driver during attach. In
      particular, NICs which are components of a lagg(4) interface all report the
      same MAC.
      
      When attaching, the NIC driver passes the MAC address it read from the
      hardware as an argument to ether_ifattach(). Keep a second copy of it, and
      create ioctl(SIOCGHWADDR) to return it. Teach `ifconfig' to report it along
      with the active MAC address.
      
      PR:		194386
    
    Modified:
      stable/11/sbin/ifconfig/af_link.c
      stable/11/sys/net/if.c
      stable/11/sys/net/if_ethersubr.c
      stable/11/sys/net/if_var.h
      stable/11/sys/sys/sockio.h
    Directory Properties:
      stable/11/   (props changed)
    
    Modified: stable/11/sbin/ifconfig/af_link.c
    ==============================================================================
    --- stable/11/sbin/ifconfig/af_link.c	Wed May 17 05:47:31 2017	(r318396)
    +++ stable/11/sbin/ifconfig/af_link.c	Wed May 17 05:53:25 2017	(r318397)
    @@ -42,6 +42,7 @@ static const char rcsid[] =
     #include 
     #include 
     #include 
    +#include 
     
     #include 
     #include 
    @@ -67,7 +68,7 @@ link_status(int s __unused, const struct
     		    sdl->sdl_alen == ETHER_ADDR_LEN) {
     			ether_format = ether_ntoa((struct ether_addr *)LLADDR(sdl));
     			if (f_ether != NULL && strcmp(f_ether, "dash") == 0) {
    -				for (format_char = strchr(ether_format, ':'); 
    +				for (format_char = strchr(ether_format, ':');
     				    format_char != NULL; 
     				    format_char = strchr(ether_format, ':'))
     					*format_char = '-';
    @@ -78,6 +79,48 @@ link_status(int s __unused, const struct
     
     			printf("\tlladdr %s\n", link_ntoa(sdl) + n);
     		}
    +		/* Best-effort (i.e. failures are silent) to get original
    +		 * hardware address, as read by NIC driver at attach time. Only
    +		 * applies to Ethernet NICs (IFT_ETHER). However, laggX
    +		 * interfaces claim to be IFT_ETHER, and re-type their component
    +		 * Ethernet NICs as IFT_IEEE8023ADLAG. So, check for both. If
    +		 * the MAC is zeroed, then it's actually a lagg.
    +		 */
    +		if ((sdl->sdl_type == IFT_ETHER ||
    +		    sdl->sdl_type == IFT_IEEE8023ADLAG) &&
    +		    sdl->sdl_alen == ETHER_ADDR_LEN) {
    +			struct ifreq ifr;
    +			int sock_hw;
    +			int rc;
    +			static const u_char laggaddr[6] = {0};
    +
    +			strncpy(ifr.ifr_name, ifa->ifa_name,
    +			    sizeof(ifr.ifr_name));
    +			memcpy(&ifr.ifr_addr, ifa->ifa_addr,
    +			    sizeof(ifa->ifa_addr->sa_len));
    +			ifr.ifr_addr.sa_family = AF_LOCAL;
    +			if ((sock_hw = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) {
    +				warn("socket(AF_LOCAL,SOCK_DGRAM)");
    +				return;
    +			}
    +			rc = ioctl(sock_hw, SIOCGHWADDR, &ifr);
    +			close(sock_hw);
    +			if (rc != 0) {
    +				return;
    +			}
    +			if (memcmp(ifr.ifr_addr.sa_data, laggaddr, sdl->sdl_alen) == 0) {
    +				return;
    +			}
    +			ether_format = ether_ntoa((const struct ether_addr *)
    +			    &ifr.ifr_addr.sa_data);
    +			if (f_ether != NULL && strcmp(f_ether, "dash") == 0) {
    +				for (format_char = strchr(ether_format, ':');
    +				    format_char != NULL; 
    +				    format_char = strchr(ether_format, ':'))
    +					*format_char = '-';
    +			}
    +			printf("\thwaddr %s\n", ether_format);
    +		}
     	}
     }
     
    
    Modified: stable/11/sys/net/if.c
    ==============================================================================
    --- stable/11/sys/net/if.c	Wed May 17 05:47:31 2017	(r318396)
    +++ stable/11/sys/net/if.c	Wed May 17 05:53:25 2017	(r318397)
    @@ -744,6 +744,11 @@ if_attach_internal(struct ifnet *ifp, in
     		/* Reliably crash if used uninitialized. */
     		ifp->if_broadcastaddr = NULL;
     
    +		if (ifp->if_type == IFT_ETHER) {
    +			ifp->if_hw_addr = malloc(ifp->if_addrlen, M_IFADDR,
    +			    M_WAITOK | M_ZERO);
    +		}
    +
     #if defined(INET) || defined(INET6)
     		/* Use defaults for TSO, if nothing is set */
     		if (ifp->if_hw_tsomax == 0 &&
    @@ -1059,6 +1064,8 @@ if_detach_internal(struct ifnet *ifp, in
     		 * Remove link ifaddr pointer and maybe decrement if_index.
     		 * Clean up all addresses.
     		 */
    +		free(ifp->if_hw_addr, M_IFADDR);
    +		ifp->if_hw_addr = NULL;
     		ifp->if_addr = NULL;
     
     		/* We can now free link ifaddr. */
    @@ -2667,6 +2674,10 @@ ifhwioctl(u_long cmd, struct ifnet *ifp,
     		    ifr->ifr_addr.sa_data, ifr->ifr_addr.sa_len);
     		break;
     
    +	case SIOCGHWADDR:
    +		error = if_gethwaddr(ifp, ifr);
    +		break;
    +
     	case SIOCAIFGROUP:
     	{
     		struct ifgroupreq *ifgr = (struct ifgroupreq *)ifr;
    @@ -3598,6 +3609,29 @@ if_requestencap_default(struct ifnet *if
     }
     
     /*
    + * Get the link layer address that was read from the hardware at attach.
    + *
    + * This is only set by Ethernet NICs (IFT_ETHER), but laggX interfaces re-type
    + * their component interfaces as IFT_IEEE8023ADLAG.
    + */
    +int
    +if_gethwaddr(struct ifnet *ifp, struct ifreq *ifr)
    +{
    +
    +	if (ifp->if_hw_addr == NULL)
    +		return (ENODEV);
    +
    +	switch (ifp->if_type) {
    +	case IFT_ETHER:
    +	case IFT_IEEE8023ADLAG:
    +		bcopy(ifp->if_hw_addr, ifr->ifr_addr.sa_data, ifp->if_addrlen);
    +		return (0);
    +	default:
    +		return (ENODEV);
    +	}
    +}
    +
    +/*
      * The name argument must be a pointer to storage which will last as
      * long as the interface does.  For physical devices, the result of
      * device_get_name(dev) is a good choice and for pseudo-devices a
    
    Modified: stable/11/sys/net/if_ethersubr.c
    ==============================================================================
    --- stable/11/sys/net/if_ethersubr.c	Wed May 17 05:47:31 2017	(r318396)
    +++ stable/11/sys/net/if_ethersubr.c	Wed May 17 05:53:25 2017	(r318397)
    @@ -918,6 +918,9 @@ ether_ifattach(struct ifnet *ifp, const 
     	sdl->sdl_alen = ifp->if_addrlen;
     	bcopy(lla, LLADDR(sdl), ifp->if_addrlen);
     
    +	if (ifp->if_hw_addr != NULL)
    +		bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen);
    +
     	bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN);
     	if (ng_ether_attach_p != NULL)
     		(*ng_ether_attach_p)(ifp);
    
    Modified: stable/11/sys/net/if_var.h
    ==============================================================================
    --- stable/11/sys/net/if_var.h	Wed May 17 05:47:31 2017	(r318396)
    +++ stable/11/sys/net/if_var.h	Wed May 17 05:53:25 2017	(r318397)
    @@ -241,6 +241,7 @@ struct ifnet {
     	struct	ifmultihead if_multiaddrs; /* multicast addresses configured */
     	int	if_amcount;		/* number of all-multicast requests */
     	struct	ifaddr	*if_addr;	/* pointer to link-level address */
    +	void	*if_hw_addr;		/* hardware link-level address */
     	const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */
     	struct	rwlock if_afdata_lock;
     	void	*if_afdata[AF_MAX];
    @@ -608,6 +609,7 @@ int if_gethwassist(if_t ifp);
     int if_setsoftc(if_t ifp, void *softc);
     void *if_getsoftc(if_t ifp);
     int if_setflags(if_t ifp, int flags);
    +int if_gethwaddr(if_t ifp, struct ifreq *);
     int if_setmtu(if_t ifp, int mtu);
     int if_getmtu(if_t ifp);
     int if_getmtu_family(if_t ifp, int family);
    
    Modified: stable/11/sys/sys/sockio.h
    ==============================================================================
    --- stable/11/sys/sys/sockio.h	Wed May 17 05:47:31 2017	(r318396)
    +++ stable/11/sys/sys/sockio.h	Wed May 17 05:53:25 2017	(r318397)
    @@ -97,6 +97,7 @@
     #define	SIOCGIFSTATUS	_IOWR('i', 59, struct ifstat)	/* get IF status */
     #define	SIOCSIFLLADDR	 _IOW('i', 60, struct ifreq)	/* set linklevel addr */
     #define	SIOCGI2C	_IOWR('i', 61, struct ifreq)	/* get I2C data  */
    +#define	SIOCGHWADDR	_IOWR('i', 62, struct ifreq)	/* get hardware lladdr */
     
     #define	SIOCSIFPHYADDR	 _IOW('i', 70, struct ifaliasreq) /* set gif address */
     #define	SIOCGIFPSRCADDR	_IOWR('i', 71, struct ifreq)	/* get gif psrc addr */
    
    From owner-svn-src-all@freebsd.org  Wed May 17 08:38:42 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id D44A9D71AC2;
     Wed, 17 May 2017 08:38:42 +0000 (UTC)
     (envelope-from trasz@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 9B7EC251;
     Wed, 17 May 2017 08:38:42 +0000 (UTC)
     (envelope-from trasz@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H8cf0a019574;
     Wed, 17 May 2017 08:38:41 GMT (envelope-from trasz@FreeBSD.org)
    Received: (from trasz@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H8cfZU019573;
     Wed, 17 May 2017 08:38:41 GMT (envelope-from trasz@FreeBSD.org)
    Message-Id: <201705170838.v4H8cfZU019573@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: trasz set sender to
     trasz@FreeBSD.org using -f
    From: Edward Tomasz Napierala 
    Date: Wed, 17 May 2017 08:38:41 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318398 - head/sys/amd64/include
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 08:38:42 -0000
    
    Author: trasz
    Date: Wed May 17 08:38:41 2017
    New Revision: 318398
    URL: https://svnweb.freebsd.org/changeset/base/318398
    
    Log:
      Bump default MAXTSIZ (kern.maxtsiz) from 128MB to 32GB. The old limit
      prevents one from running eg clang built with debug; the new one is
      arbitrary (equal to MAXDSIZ) and... well, should be quite future-proof.
      
      Same fix might be applicable to other 64 bit architectures; I'll ask
      their respective maintainers to make sure it won't break anything.
      
      Reviewed by:	kib
      MFC after:	2 weeks
      Sponsored by:	DARPA, AFRL
      Differential Revision:	https://reviews.freebsd.org/D10758
    
    Modified:
      head/sys/amd64/include/vmparam.h
    
    Modified: head/sys/amd64/include/vmparam.h
    ==============================================================================
    --- head/sys/amd64/include/vmparam.h	Wed May 17 05:53:25 2017	(r318397)
    +++ head/sys/amd64/include/vmparam.h	Wed May 17 08:38:41 2017	(r318398)
    @@ -52,7 +52,7 @@
     /*
      * Virtual memory related constants, all in bytes
      */
    -#define	MAXTSIZ		(128UL*1024*1024)	/* max text size */
    +#define	MAXTSIZ		(32768UL*1024*1024)	/* max text size */
     #ifndef DFLDSIZ
     #define	DFLDSIZ		(32768UL*1024*1024)	/* initial data size limit */
     #endif
    
    From owner-svn-src-all@freebsd.org  Wed May 17 09:04:10 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B3FDD703B9;
     Wed, 17 May 2017 09:04:10 +0000 (UTC) (envelope-from ae@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 3D55212CF;
     Wed, 17 May 2017 09:04:10 +0000 (UTC) (envelope-from ae@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H949jF032896;
     Wed, 17 May 2017 09:04:09 GMT (envelope-from ae@FreeBSD.org)
    Received: (from ae@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H949lY032895;
     Wed, 17 May 2017 09:04:09 GMT (envelope-from ae@FreeBSD.org)
    Message-Id: <201705170904.v4H949lY032895@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org
     using -f
    From: "Andrey V. Elsukov" 
    Date: Wed, 17 May 2017 09:04:09 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318399 - head/sys/netinet
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 09:04:10 -0000
    
    Author: ae
    Date: Wed May 17 09:04:09 2017
    New Revision: 318399
    URL: https://svnweb.freebsd.org/changeset/base/318399
    
    Log:
      Set M_BCAST and M_MCAST flags on mbuf sent via divert socket.
      
      r290383 has changed how mbufs sent by divert socket are handled.
      Previously they are always handled by slow path processing in ip_input().
      Now ip_tryforward() is invoked from ip_input() before in_broadcast() check.
      Since diverted packet lost all mbuf flags, it passes the broadcast check
      in ip_tryforward() due to missing M_BCAST flag. In the result the broadcast
      packet is forwarded to the wire instead of be consumed by network stack.
      
      Add in_broadcast() check to the div_output() function. And restore the
      M_BCAST flag if destination address is broadcast for the given network
      interface.
      
      PR:		209491
      MFC after:	1 week
    
    Modified:
      head/sys/netinet/ip_divert.c
    
    Modified: head/sys/netinet/ip_divert.c
    ==============================================================================
    --- head/sys/netinet/ip_divert.c	Wed May 17 08:38:41 2017	(r318398)
    +++ head/sys/netinet/ip_divert.c	Wed May 17 09:04:09 2017	(r318399)
    @@ -481,6 +481,14 @@ div_output(struct socket *so, struct mbu
     		/* Send packet to input processing via netisr */
     		switch (ip->ip_v) {
     		case IPVERSION:
    +			/*
    +			 * Restore M_BCAST flag when destination address is
    +			 * broadcast. It is expected by ip_tryforward().
    +			 */
    +			if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)))
    +				m->m_flags |= M_MCAST;
    +			else if (in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif))
    +				m->m_flags |= M_BCAST;
     			netisr_queue_src(NETISR_IP, (uintptr_t)so, m);
     			break;
     #ifdef INET6
    
    From owner-svn-src-all@freebsd.org  Wed May 17 10:56:23 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2F9BD71349;
     Wed, 17 May 2017 10:56:23 +0000 (UTC) (envelope-from ae@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id A53BFE14;
     Wed, 17 May 2017 10:56:23 +0000 (UTC) (envelope-from ae@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HAuMjg078813;
     Wed, 17 May 2017 10:56:22 GMT (envelope-from ae@FreeBSD.org)
    Received: (from ae@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HAuMOV078812;
     Wed, 17 May 2017 10:56:22 GMT (envelope-from ae@FreeBSD.org)
    Message-Id: <201705171056.v4HAuMOV078812@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org
     using -f
    From: "Andrey V. Elsukov" 
    Date: Wed, 17 May 2017 10:56:22 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318400 - head/sbin/ipfw
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 10:56:23 -0000
    
    Author: ae
    Date: Wed May 17 10:56:22 2017
    New Revision: 318400
    URL: https://svnweb.freebsd.org/changeset/base/318400
    
    Log:
      Allow zero port specification in table entries with type flow.
      
      PR:		217620
      MFC after:	1 week
    
    Modified:
      head/sbin/ipfw/tables.c
    
    Modified: head/sbin/ipfw/tables.c
    ==============================================================================
    --- head/sbin/ipfw/tables.c	Wed May 17 09:04:09 2017	(r318399)
    +++ head/sbin/ipfw/tables.c	Wed May 17 10:56:22 2017	(r318400)
    @@ -1260,16 +1260,14 @@ tentry_fill_key_type(char *arg, ipfw_obj
     			if ((p = strchr(arg, ',')) != NULL)
     				*p++ = '\0';
     
    -			if ((port = htons(strtol(arg, NULL, 10))) == 0) {
    +			port = htons(strtol(arg, &pp, 10));
    +			if (*pp != '\0') {
     				if ((sent = getservbyname(arg, NULL)) == NULL)
     					errx(EX_DATAERR, "Unknown service: %s",
     					    arg);
    -				else
    -					key = sent->s_port;
    +				port = sent->s_port;
     			}
    -			
     			tfe->sport = port;
    -
     			arg = p;
     		}
     
    @@ -1304,16 +1302,14 @@ tentry_fill_key_type(char *arg, ipfw_obj
     			if ((p = strchr(arg, ',')) != NULL)
     				*p++ = '\0';
     
    -			if ((port = htons(strtol(arg, NULL, 10))) == 0) {
    +			port = htons(strtol(arg, &pp, 10));
    +			if (*pp != '\0') {
     				if ((sent = getservbyname(arg, NULL)) == NULL)
     					errx(EX_DATAERR, "Unknown service: %s",
     					    arg);
    -				else
    -					key = sent->s_port;
    +				port = sent->s_port;
     			}
    -			
     			tfe->dport = port;
    -
     			arg = p;
     		}
     
    
    From owner-svn-src-all@freebsd.org  Wed May 17 13:22:14 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7796D70B41;
     Wed, 17 May 2017 13:22:14 +0000 (UTC)
     (envelope-from jpaetzel@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id B4A12155;
     Wed, 17 May 2017 13:22:14 +0000 (UTC)
     (envelope-from jpaetzel@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HDMDtL039016;
     Wed, 17 May 2017 13:22:13 GMT (envelope-from jpaetzel@FreeBSD.org)
    Received: (from jpaetzel@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HDMDCx039015;
     Wed, 17 May 2017 13:22:13 GMT (envelope-from jpaetzel@FreeBSD.org)
    Message-Id: <201705171322.v4HDMDCx039015@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to
     jpaetzel@FreeBSD.org using -f
    From: Josh Paetzel 
    Date: Wed, 17 May 2017 13:22:13 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318401 - head/sys/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-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 13:22:15 -0000
    
    Author: jpaetzel
    Date: Wed May 17 13:22:13 2017
    New Revision: 318401
    URL: https://svnweb.freebsd.org/changeset/base/318401
    
    Log:
      Increase the number of LUNs this hardware can support.
      
      Experimentally we know this value works, but the hardware
      may support an even higher value.
      
      PR:	213876
      Reported by:	J.Catrysse@proximedia.be
      MFC after:	1 week
    
    Modified:
      head/sys/dev/tws/tws.h
    
    Modified: head/sys/dev/tws/tws.h
    ==============================================================================
    --- head/sys/dev/tws/tws.h	Wed May 17 10:56:22 2017	(r318400)
    +++ head/sys/dev/tws/tws.h	Wed May 17 13:22:13 2017	(r318401)
    @@ -67,7 +67,7 @@ extern int tws_queue_depth;
     
     #define TWS_DRIVER_VERSION_STRING "10.80.00.005"
     #define TWS_MAX_NUM_UNITS             65 
    -#define TWS_MAX_NUM_LUNS              16
    +#define TWS_MAX_NUM_LUNS              32
     #define TWS_MAX_IRQS                  2
     #define TWS_SCSI_INITIATOR_ID         66
     #define TWS_MAX_IO_SIZE               0x20000 /* 128kB */
    
    From owner-svn-src-all@freebsd.org  Wed May 17 14:28:03 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9209FD70A7A;
     Wed, 17 May 2017 14:28:03 +0000 (UTC)
     (envelope-from lidl@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 4BDCA300;
     Wed, 17 May 2017 14:28:03 +0000 (UTC)
     (envelope-from lidl@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HES2Vj064591;
     Wed, 17 May 2017 14:28:02 GMT (envelope-from lidl@FreeBSD.org)
    Received: (from lidl@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HES1gZ064583;
     Wed, 17 May 2017 14:28:01 GMT (envelope-from lidl@FreeBSD.org)
    Message-Id: <201705171428.v4HES1gZ064583@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: lidl set sender to
     lidl@FreeBSD.org using -f
    From: Kurt Lidl 
    Date: Wed, 17 May 2017 14:28:01 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318402 - stable/11/crypto/openssh
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 14:28:03 -0000
    
    Author: lidl
    Date: Wed May 17 14:28:01 2017
    New Revision: 318402
    URL: https://svnweb.freebsd.org/changeset/base/318402
    
    Log:
      MFC r318242: Refine and update blacklist support in sshd
      
      Adjust notification points slightly to catch all auth failures, rather
      than just the ones caused by bad usernames.  Modify notification point
      for bad usernames to send new type of BLACKLIST_BAD_USER.  (Support in
      libblacklist will be forthcoming soon.)  Add guards to allow library
      headers to expose the enum of action values.
      
      Reviewed by:	des
      Relnotes:	yes
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/crypto/openssh/auth-pam.c
      stable/11/crypto/openssh/auth.c
      stable/11/crypto/openssh/auth1.c
      stable/11/crypto/openssh/auth2.c
      stable/11/crypto/openssh/blacklist.c
      stable/11/crypto/openssh/blacklist_client.h
      stable/11/crypto/openssh/packet.c
      stable/11/crypto/openssh/sshd.c
    Directory Properties:
      stable/11/   (props changed)
    
    Modified: stable/11/crypto/openssh/auth-pam.c
    ==============================================================================
    --- stable/11/crypto/openssh/auth-pam.c	Wed May 17 13:22:13 2017	(r318401)
    +++ stable/11/crypto/openssh/auth-pam.c	Wed May 17 14:28:01 2017	(r318402)
    @@ -795,7 +795,8 @@ sshpam_query(void *ctx, char **name, cha
     				free(msg);
     				return (0);
     			}
    -			BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL);
    +			BLACKLIST_NOTIFY(BLACKLIST_BAD_USER,
    +			    sshpam_authctxt->user);
     			error("PAM: %s for %s%.100s from %.100s", msg,
     			    sshpam_authctxt->valid ? "" : "illegal user ",
     			    sshpam_authctxt->user,
    
    Modified: stable/11/crypto/openssh/auth.c
    ==============================================================================
    --- stable/11/crypto/openssh/auth.c	Wed May 17 13:22:13 2017	(r318401)
    +++ stable/11/crypto/openssh/auth.c	Wed May 17 14:28:01 2017	(r318402)
    @@ -296,7 +296,7 @@ auth_log(Authctxt *authctxt, int authent
     	else {
     		authmsg = authenticated ? "Accepted" : "Failed";
     		if (authenticated)
    -			BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK);
    +			BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK, "ssh");
     	}
     
     	authlog("%s %s%s%s for %s%.100s from %.200s port %d %s%s%s",
    @@ -644,7 +644,7 @@ getpwnamallow(const char *user)
     	}
     #endif
     	if (pw == NULL) {
    -		BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL);
    +		BLACKLIST_NOTIFY(BLACKLIST_BAD_USER, user);
     		logit("Invalid user %.100s from %.100s",
     		    user, get_remote_ipaddr());
     #ifdef CUSTOM_FAILED_LOGIN
    
    Modified: stable/11/crypto/openssh/auth1.c
    ==============================================================================
    --- stable/11/crypto/openssh/auth1.c	Wed May 17 13:22:13 2017	(r318401)
    +++ stable/11/crypto/openssh/auth1.c	Wed May 17 14:28:01 2017	(r318402)
    @@ -338,7 +338,7 @@ do_authloop(Authctxt *authctxt)
     			char *msg;
     			size_t len;
     
    -			BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL);
    +			BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh");
     			error("Access denied for user %s by PAM account "
     			    "configuration", authctxt->user);
     			len = buffer_len(&loginmsg);
    @@ -364,6 +364,7 @@ do_authloop(Authctxt *authctxt)
     		if (authenticated)
     			return;
     
    +		BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh");
     		if (++authctxt->failures >= options.max_authtries) {
     #ifdef SSH_AUDIT_EVENTS
     			PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES));
    @@ -406,7 +407,7 @@ do_authentication(Authctxt *authctxt)
     	else {
     		debug("do_authentication: invalid user %s", user);
     		authctxt->pw = fakepw();
    -		BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL);
    +		BLACKLIST_NOTIFY(BLACKLIST_BAD_USER, user);
     	}
     
     	/* Configuration may have changed as a result of Match */
    
    Modified: stable/11/crypto/openssh/auth2.c
    ==============================================================================
    --- stable/11/crypto/openssh/auth2.c	Wed May 17 13:22:13 2017	(r318401)
    +++ stable/11/crypto/openssh/auth2.c	Wed May 17 14:28:01 2017	(r318402)
    @@ -249,7 +249,6 @@ input_userauth_request(int type, u_int32
     		} else {
     			logit("input_userauth_request: invalid user %s", user);
     			authctxt->pw = fakepw();
    -			BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL);
     #ifdef SSH_AUDIT_EVENTS
     			PRIVSEP(audit_event(SSH_INVALID_USER));
     #endif
    @@ -389,8 +388,10 @@ userauth_finish(Authctxt *authctxt, int 
     
     		/* Allow initial try of "none" auth without failure penalty */
     		if (!partial && !authctxt->server_caused_failure &&
    -		    (authctxt->attempt > 1 || strcmp(method, "none") != 0))
    +		    (authctxt->attempt > 1 || strcmp(method, "none") != 0)) {
     			authctxt->failures++;
    +			BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh");
    +		}
     		if (authctxt->failures >= options.max_authtries) {
     #ifdef SSH_AUDIT_EVENTS
     			PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES));
    
    Modified: stable/11/crypto/openssh/blacklist.c
    ==============================================================================
    --- stable/11/crypto/openssh/blacklist.c	Wed May 17 13:22:13 2017	(r318401)
    +++ stable/11/crypto/openssh/blacklist.c	Wed May 17 14:28:01 2017	(r318402)
    @@ -46,8 +46,8 @@
     #include "log.h"
     #include "misc.h"
     #include "servconf.h"
    -#include "blacklist_client.h"
     #include 
    +#include "blacklist_client.h"
     
     static struct blacklist *blstate = NULL;
     
    @@ -88,10 +88,10 @@ blacklist_init(void)
     }
     
     void
    -blacklist_notify(int action)
    +blacklist_notify(int action, const char *msg)
     {
     
     	if (blstate != NULL && packet_connection_is_on_socket())
     		(void)blacklist_r(blstate, action,
    -		packet_get_connection_in(), "ssh");
    +		packet_get_connection_in(), msg);
     }
    
    Modified: stable/11/crypto/openssh/blacklist_client.h
    ==============================================================================
    --- stable/11/crypto/openssh/blacklist_client.h	Wed May 17 13:22:13 2017	(r318401)
    +++ stable/11/crypto/openssh/blacklist_client.h	Wed May 17 14:28:01 2017	(r318402)
    @@ -34,22 +34,26 @@
     #ifndef BLACKLIST_CLIENT_H
     #define BLACKLIST_CLIENT_H
     
    +#ifndef BLACKLIST_API_ENUM
     enum {
     	BLACKLIST_AUTH_OK = 0,
    -	BLACKLIST_AUTH_FAIL
    +	BLACKLIST_AUTH_FAIL,
    +	BLACKLIST_ABUSIVE_BEHAVIOR,
    +	BLACKLIST_BAD_USER
     };
    +#endif
     
     #ifdef USE_BLACKLIST
     void blacklist_init(void);
    -void blacklist_notify(int);
    +void blacklist_notify(int, const char *);
     
     #define BLACKLIST_INIT() blacklist_init()
    -#define BLACKLIST_NOTIFY(x) blacklist_notify(x)
    +#define BLACKLIST_NOTIFY(x,msg) blacklist_notify(x,msg)
     
     #else
     
     #define BLACKLIST_INIT()
    -#define BLACKLIST_NOTIFY(x)
    +#define BLACKLIST_NOTIFY(x,msg)
     
     #endif
     
    
    Modified: stable/11/crypto/openssh/packet.c
    ==============================================================================
    --- stable/11/crypto/openssh/packet.c	Wed May 17 13:22:13 2017	(r318401)
    +++ stable/11/crypto/openssh/packet.c	Wed May 17 14:28:01 2017	(r318402)
    @@ -2072,7 +2072,7 @@ sshpkt_fatal(struct ssh *ssh, const char
     	case SSH_ERR_NO_KEX_ALG_MATCH:
     	case SSH_ERR_NO_HOSTKEY_ALG_MATCH:
     		if (ssh && ssh->kex && ssh->kex->failed_choice) {
    -			BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL);
    +			BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh");
     			fatal("Unable to negotiate with %.200s port %d: %s. "
     			    "Their offer: %s", ssh_remote_ipaddr(ssh),
     			    ssh_remote_port(ssh), ssh_err(r),
    
    Modified: stable/11/crypto/openssh/sshd.c
    ==============================================================================
    --- stable/11/crypto/openssh/sshd.c	Wed May 17 13:22:13 2017	(r318401)
    +++ stable/11/crypto/openssh/sshd.c	Wed May 17 14:28:01 2017	(r318402)
    @@ -389,7 +389,7 @@ grace_alarm_handler(int sig)
     		kill(0, SIGTERM);
     	}
     
    -	BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL);
    +	BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh");
     
     	/* Log error and exit. */
     	sigdie("Timeout before authentication for %s", get_remote_ipaddr());
    
    From owner-svn-src-all@freebsd.org  Wed May 17 14:35:22 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3D95D70CFE;
     Wed, 17 May 2017 14:35:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id A8D0DA18;
     Wed, 17 May 2017 14:35:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HEZLBA068451;
     Wed, 17 May 2017 14:35:21 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HEZLtb068450;
     Wed, 17 May 2017 14:35:21 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705171435.v4HEZLtb068450@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Wed, 17 May 2017 14:35:21 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318403 - stable/11/release/doc/en_US.ISO8859-1/relnotes
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 14:35:23 -0000
    
    Author: gjb
    Date: Wed May 17 14:35:21 2017
    New Revision: 318403
    URL: https://svnweb.freebsd.org/changeset/base/318403
    
    Log:
      Document r318402, blacklistd refinement for OpenSSH.
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Wed May 17 14:28:01 2017	(r318402)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Wed May 17 14:35:21 2017	(r318403)
    @@ -302,6 +302,13 @@
           &man.blacklistd.8; has been updated to the
     	20170503 snapshot.
    +
    +      &man.blacklistd.8; support for
    +	OpenSSH has been refined to adjust
    +	notification points to catch all authentication failures
    +	rather than authentication failures caused by invalid
    +	login usernames.
         
     
         
    
    From owner-svn-src-all@freebsd.org  Wed May 17 15:13:02 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB64CD5CA65;
     Wed, 17 May 2017 15:13:02 +0000 (UTC)
     (envelope-from loos@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 78570266;
     Wed, 17 May 2017 15:13:02 +0000 (UTC)
     (envelope-from loos@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HFD16E084703;
     Wed, 17 May 2017 15:13:01 GMT (envelope-from loos@FreeBSD.org)
    Received: (from loos@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HFD1A3084702;
     Wed, 17 May 2017 15:13:01 GMT (envelope-from loos@FreeBSD.org)
    Message-Id: <201705171513.v4HFD1A3084702@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: loos set sender to
     loos@FreeBSD.org using -f
    From: Luiz Otavio O Souza 
    Date: Wed, 17 May 2017 15:13:01 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318404 - head/sys/arm/mv
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 15:13:02 -0000
    
    Author: loos
    Date: Wed May 17 15:13:01 2017
    New Revision: 318404
    URL: https://svnweb.freebsd.org/changeset/base/318404
    
    Log:
      Move the IO Window Control Register defines out of the ARMADA38X ifdef.
      
      Fixes the build of Marvell kernels (other than ARMADA38X) after r318336.
      
      Reported by:	mmel
    
    Modified:
      head/sys/arm/mv/mvwin.h
    
    Modified: head/sys/arm/mv/mvwin.h
    ==============================================================================
    --- head/sys/arm/mv/mvwin.h	Wed May 17 14:35:21 2017	(r318403)
    +++ head/sys/arm/mv/mvwin.h	Wed May 17 15:13:01 2017	(r318404)
    @@ -305,18 +305,6 @@
     #define	MV_BOOTROM_WIN_SIZE	0xF
     #define	MV_CPU_SUBSYS_REGS_LEN	0x100
     
    -/* IO Window Control Register fields */
    -#define	IO_WIN_SIZE_SHIFT	16
    -#define	IO_WIN_SIZE_MASK	0xFFFF
    -#define	IO_WIN_ATTR_SHIFT	8
    -#define	IO_WIN_ATTR_MASK	0xFF
    -#define	IO_WIN_TGT_SHIFT	4
    -#define	IO_WIN_TGT_MASK		0xF
    -#define	IO_WIN_SYNC_SHIFT	1
    -#define	IO_WIN_SYNC_MASK	0x1
    -#define	IO_WIN_ENA_SHIFT	0
    -#define	IO_WIN_ENA_MASK		0x1
    -
     #define	IO_WIN_9_CTRL_OFFSET	0x98
     #define	IO_WIN_9_BASE_OFFSET	0x9C
     
    @@ -329,6 +317,18 @@
     #define	MV_SYNC_BARRIER_CTRL_ALL	0xFFFF
     #endif
     
    +/* IO Window Control Register fields */
    +#define	IO_WIN_SIZE_SHIFT	16
    +#define	IO_WIN_SIZE_MASK	0xFFFF
    +#define	IO_WIN_ATTR_SHIFT	8
    +#define	IO_WIN_ATTR_MASK	0xFF
    +#define	IO_WIN_TGT_SHIFT	4
    +#define	IO_WIN_TGT_MASK		0xF
    +#define	IO_WIN_SYNC_SHIFT	1
    +#define	IO_WIN_SYNC_MASK	0x1
    +#define	IO_WIN_ENA_SHIFT	0
    +#define	IO_WIN_ENA_MASK		0x1
    +
     #define WIN_REG_IDX_RD(pre,reg,off,base)					\
     	static __inline uint32_t						\
     	pre ## _ ## reg ## _read(int i)						\
    
    From owner-svn-src-all@freebsd.org  Wed May 17 15:52:06 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 502F2D7060A;
     Wed, 17 May 2017 15:52:06 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id BCFAA1A20;
     Wed, 17 May 2017 15:52:05 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HFq4BR098954;
     Wed, 17 May 2017 15:52:04 GMT (envelope-from zbb@FreeBSD.org)
    Received: (from zbb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HFq4AI098952;
     Wed, 17 May 2017 15:52:04 GMT (envelope-from zbb@FreeBSD.org)
    Message-Id: <201705171552.v4HFq4AI098952@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
     using -f
    From: Zbigniew Bodek 
    Date: Wed, 17 May 2017 15:52:04 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318405 - head/sys/arm/mv
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 15:52:06 -0000
    
    Author: zbb
    Date: Wed May 17 15:52:04 2017
    New Revision: 318405
    URL: https://svnweb.freebsd.org/changeset/base/318405
    
    Log:
      Fix USB3.0 decoding windows on Armada38x
      
      Set correct offset for MBUS windows configuration in
      USB3.0 interface.
      
      Submitted by: Marcin Wojtas 
      Obtained from: Semihalf
      Sponsored by: Stormshield
      Reviewed by: loos
      Differential revision: https://reviews.freebsd.org/D10721
    
    Modified:
      head/sys/arm/mv/mvwin.h
    
    Modified: head/sys/arm/mv/mvwin.h
    ==============================================================================
    --- head/sys/arm/mv/mvwin.h	Wed May 17 15:13:01 2017	(r318404)
    +++ head/sys/arm/mv/mvwin.h	Wed May 17 15:52:04 2017	(r318405)
    @@ -220,8 +220,8 @@
     #define MV_WIN_USB_BASE(n)		(0x10 * (n) + 0x324)
     #define MV_WIN_USB_MAX			4
     
    -#define	MV_WIN_USB3_CTRL(n)		(0x8 * (n))
    -#define	MV_WIN_USB3_BASE(n)		(0x8 * (n) + 0x4)
    +#define	MV_WIN_USB3_CTRL(n)		(0x8 * (n) + 0x4000)
    +#define	MV_WIN_USB3_BASE(n)		(0x8 * (n) + 0x4004)
     #define	MV_WIN_USB3_MAX			8
     
     #define MV_WIN_ETH_BASE(n)		(0x8 * (n) + 0x200)
    
    From owner-svn-src-all@freebsd.org  Wed May 17 15:53:15 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23214D707D7;
     Wed, 17 May 2017 15:53:15 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id E7D951C18;
     Wed, 17 May 2017 15:53:14 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HFrDNx001243;
     Wed, 17 May 2017 15:53:13 GMT (envelope-from zbb@FreeBSD.org)
    Received: (from zbb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HFrDU9001242;
     Wed, 17 May 2017 15:53:13 GMT (envelope-from zbb@FreeBSD.org)
    Message-Id: <201705171553.v4HFrDU9001242@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
     using -f
    From: Zbigniew Bodek 
    Date: Wed, 17 May 2017 15:53:13 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318406 - head/sys/arm/mv
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 15:53:15 -0000
    
    Author: zbb
    Date: Wed May 17 15:53:13 2017
    New Revision: 318406
    URL: https://svnweb.freebsd.org/changeset/base/318406
    
    Log:
      Parse EHCI windows on Marvell platforms
      
      Add missing compatibility string to allow proper
      window configuration for EHCI devices.
      
      Submitted by: Wojciech Macek 
      Obtained from: Semihalf
      Sponsored by: Stormshield
      Reviewed by: loos
      Differential revision: https://reviews.freebsd.org/D10722
    
    Modified:
      head/sys/arm/mv/mv_common.c
    
    Modified: head/sys/arm/mv/mv_common.c
    ==============================================================================
    --- head/sys/arm/mv/mv_common.c	Wed May 17 15:52:04 2017	(r318405)
    +++ head/sys/arm/mv/mv_common.c	Wed May 17 15:53:13 2017	(r318406)
    @@ -139,6 +139,7 @@ struct soc_node_spec {
     static struct soc_node_spec soc_nodes[] = {
     	{ "mrvl,ge", &decode_win_eth_setup, &decode_win_eth_dump },
     	{ "mrvl,usb-ehci", &decode_win_usb_setup, &decode_win_usb_dump },
    +	{ "marvell,orion-ehci", &decode_win_usb_setup, &decode_win_usb_dump },
     	{ "marvell,armada-380-xhci", &decode_win_usb3_setup, &decode_win_usb3_dump },
     	{ "marvell,armada-380-ahci", &decode_win_ahci_setup, &decode_win_ahci_dump },
     	{ "marvell,armada-380-sdhci", &decode_win_sdhci_setup, &decode_win_sdhci_dump },
    
    From owner-svn-src-all@freebsd.org  Wed May 17 15:54:34 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 759D0D7085C;
     Wed, 17 May 2017 15:54:34 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 47D121D98;
     Wed, 17 May 2017 15:54:34 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HFsXde001327;
     Wed, 17 May 2017 15:54:33 GMT (envelope-from zbb@FreeBSD.org)
    Received: (from zbb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HFsXEG001326;
     Wed, 17 May 2017 15:54:33 GMT (envelope-from zbb@FreeBSD.org)
    Message-Id: <201705171554.v4HFsXEG001326@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
     using -f
    From: Zbigniew Bodek 
    Date: Wed, 17 May 2017 15:54:33 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318407 - head/sys/arm/mv
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 15:54:34 -0000
    
    Author: zbb
    Date: Wed May 17 15:54:33 2017
    New Revision: 318407
    URL: https://svnweb.freebsd.org/changeset/base/318407
    
    Log:
      Enable proper parsing of nested simlpe-buses on Marvell platforms
      
      OF_finddevice doesn't find the "simple-bus" node, which is problematic
      for Marvell platforms, using nested buses in Device Tree, like
      Armada 38x SoC.
      
      Submitted by: Arnaud Ysmal 
      Obtained from: Stormshield
      Sponsored by: Stormshield
      Reviewed by: loos
      Differential revision: https://reviews.freebsd.org/D10719
    
    Modified:
      head/sys/arm/mv/mv_common.c
    
    Modified: head/sys/arm/mv/mv_common.c
    ==============================================================================
    --- head/sys/arm/mv/mv_common.c	Wed May 17 15:53:13 2017	(r318406)
    +++ head/sys/arm/mv/mv_common.c	Wed May 17 15:54:33 2017	(r318407)
    @@ -2280,11 +2280,12 @@ moveon:
     static int
     fdt_win_setup(void)
     {
    -	phandle_t node, child;
    +	phandle_t node, child, sb;
     	struct soc_node_spec *soc_node;
     	u_long size, base;
     	int err, i;
     
    +	sb = 0;
     	node = OF_finddevice("/");
     	if (node == -1)
     		panic("fdt_win_setup: no root node");
    @@ -2326,7 +2327,7 @@ fdt_win_setup(void)
     		 */
     		child = OF_peer(child);
     		if ((child == 0) && (node == OF_finddevice("/"))) {
    -			node = fdt_find_compatible(node, "simple-bus", 0);
    +			sb = node = fdt_find_compatible(node, "simple-bus", 0);
     			if (node == 0)
     				return (ENXIO);
     			child = OF_child(node);
    @@ -2336,7 +2337,7 @@ fdt_win_setup(void)
     		 * it is present) and its children. This node also have
     		 * "simple-bus" compatible.
     		 */
    -		if ((child == 0) && (node == OF_finddevice("simple-bus"))) {
    +		if ((child == 0) && (node == sb)) {
     			node = fdt_find_compatible(node, "simple-bus", 0);
     			if (node == 0)
     				return (0);
    
    From owner-svn-src-all@freebsd.org  Wed May 17 15:56:11 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 464A8D7090B;
     Wed, 17 May 2017 15:56:11 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 134C11F32;
     Wed, 17 May 2017 15:56:10 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HFuAfO001445;
     Wed, 17 May 2017 15:56:10 GMT (envelope-from zbb@FreeBSD.org)
    Received: (from zbb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HFuAHg001444;
     Wed, 17 May 2017 15:56:10 GMT (envelope-from zbb@FreeBSD.org)
    Message-Id: <201705171556.v4HFuAHg001444@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
     using -f
    From: Zbigniew Bodek 
    Date: Wed, 17 May 2017 15:56:10 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318408 - head/sys/arm/mv
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 15:56:11 -0000
    
    Author: zbb
    Date: Wed May 17 15:56:09 2017
    New Revision: 318408
    URL: https://svnweb.freebsd.org/changeset/base/318408
    
    Log:
      Correct MPIC order of attachment
      
      If MPIC happens to be a slave interrupt controller (as on Armada38x),
      it should be attached after primary interrupt controller.
      Thus BUS_PASS_ORDER_LATE was added to default BUS_PASS_INTERRUPT.
      
      This change doesn't affect the cases when MPIC is standalone IC.
      
      Submitted by:  Bartosz Szczepanek 
      Obtained from: Semihalf
      Sponsored by:  Stormshield, Netgate
      Reviewed by: loos
      Differential revision: https://reviews.freebsd.org/D10715
    
    Modified:
      head/sys/arm/mv/mpic.c
    
    Modified: head/sys/arm/mv/mpic.c
    ==============================================================================
    --- head/sys/arm/mv/mpic.c	Wed May 17 15:54:33 2017	(r318407)
    +++ head/sys/arm/mv/mpic.c	Wed May 17 15:56:09 2017	(r318408)
    @@ -398,7 +398,7 @@ static driver_t mv_mpic_driver = {
     static devclass_t mv_mpic_devclass;
     
     EARLY_DRIVER_MODULE(mpic, simplebus, mv_mpic_driver, mv_mpic_devclass, 0, 0,
    -    BUS_PASS_INTERRUPT);
    +    BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE);
     
     #ifndef INTRNG
     int
    
    From owner-svn-src-all@freebsd.org  Wed May 17 15:57:16 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3325BD70990;
     Wed, 17 May 2017 15:57:16 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 001D8F6;
     Wed, 17 May 2017 15:57:15 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HFvE7D001531;
     Wed, 17 May 2017 15:57:14 GMT (envelope-from zbb@FreeBSD.org)
    Received: (from zbb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HFvEoS001530;
     Wed, 17 May 2017 15:57:14 GMT (envelope-from zbb@FreeBSD.org)
    Message-Id: <201705171557.v4HFvEoS001530@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
     using -f
    From: Zbigniew Bodek 
    Date: Wed, 17 May 2017 15:57:14 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318409 - head/sys/arm/mv
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 15:57:16 -0000
    
    Author: zbb
    Date: Wed May 17 15:57:14 2017
    New Revision: 318409
    URL: https://svnweb.freebsd.org/changeset/base/318409
    
    Log:
      Fix registration of MPIC driver
      
      Submitted by:  Michal Mazur 
      Obtained from: Semihalf
      Sponsored by:  Netgate
      Reviewed by: loos
      Differential revision: https://reviews.freebsd.org/D10717
    
    Modified:
      head/sys/arm/mv/mpic.c
    
    Modified: head/sys/arm/mv/mpic.c
    ==============================================================================
    --- head/sys/arm/mv/mpic.c	Wed May 17 15:56:09 2017	(r318408)
    +++ head/sys/arm/mv/mpic.c	Wed May 17 15:57:14 2017	(r318409)
    @@ -273,6 +273,9 @@ mv_mpic_attach(device_t dev)
     		bus_release_resources(dev, mv_mpic_spec, sc->mpic_res);
     		return (ENXIO);
     	}
    +
    +	OF_device_register_xref(OF_xref_from_node(ofw_bus_get_node(dev)), dev);
    +
     	if (intr_pic_register(dev, OF_xref_from_device(dev)) == NULL) {
     		device_printf(dev, "could not register PIC\n");
     		bus_release_resources(dev, mv_mpic_spec, sc->mpic_res);
    
    From owner-svn-src-all@freebsd.org  Wed May 17 15:58:40 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0B9CD70A66;
     Wed, 17 May 2017 15:58:40 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 7DAE42F1;
     Wed, 17 May 2017 15:58:40 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HFwd9O001622;
     Wed, 17 May 2017 15:58:39 GMT (envelope-from zbb@FreeBSD.org)
    Received: (from zbb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HFwde0001621;
     Wed, 17 May 2017 15:58:39 GMT (envelope-from zbb@FreeBSD.org)
    Message-Id: <201705171558.v4HFwde0001621@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
     using -f
    From: Zbigniew Bodek 
    Date: Wed, 17 May 2017 15:58:39 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318410 - head/sys/dev/etherswitch/e6000sw
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 15:58:40 -0000
    
    Author: zbb
    Date: Wed May 17 15:58:39 2017
    New Revision: 318410
    URL: https://svnweb.freebsd.org/changeset/base/318410
    
    Log:
      Fix broken malloc in e6000sw
      
      Malloc should always return something when M_WAITOK flag is used,
      but keep this code and change flag to M_NOWAIT as it is under a lock
      (allows for possible future change). Free ifnet structure to avoid
      memory leak on failure.
      
      Submitted by:  Zbigniew Bodek 
      Obtained from: Semihalf
      Sponsored by:  Stormshield
      Reviewed by: loos
      Differential revision: https://reviews.freebsd.org/D10711
    
    Modified:
      head/sys/dev/etherswitch/e6000sw/e6000sw.c
    
    Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c
    ==============================================================================
    --- head/sys/dev/etherswitch/e6000sw/e6000sw.c	Wed May 17 15:57:14 2017	(r318409)
    +++ head/sys/dev/etherswitch/e6000sw/e6000sw.c	Wed May 17 15:58:39 2017	(r318410)
    @@ -321,9 +321,11 @@ e6000sw_init_interface(e6000sw_softc_t *
     	sc->ifp[port]->if_softc = sc;
     	sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST |
     	    IFF_DRV_RUNNING | IFF_SIMPLEX;
    -	sc->ifname[port] = malloc(strlen(name) + 1, M_E6000SW, M_WAITOK);
    -	if (sc->ifname[port] == NULL)
    +	sc->ifname[port] = malloc(strlen(name) + 1, M_E6000SW, M_NOWAIT);
    +	if (sc->ifname[port] == NULL) {
    +		if_free(sc->ifp[port]);
     		return (ENOMEM);
    +	}
     	memcpy(sc->ifname[port], name, strlen(name) + 1);
     	if_initname(sc->ifp[port], sc->ifname[port], port);
     
    
    From owner-svn-src-all@freebsd.org  Wed May 17 15:59:46 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFC85D70AF9;
     Wed, 17 May 2017 15:59:46 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 9CD4C69C;
     Wed, 17 May 2017 15:59:46 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HFxjnT001702;
     Wed, 17 May 2017 15:59:45 GMT (envelope-from zbb@FreeBSD.org)
    Received: (from zbb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HFxjWq001701;
     Wed, 17 May 2017 15:59:45 GMT (envelope-from zbb@FreeBSD.org)
    Message-Id: <201705171559.v4HFxjWq001701@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
     using -f
    From: Zbigniew Bodek 
    Date: Wed, 17 May 2017 15:59:45 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318411 - head/sys/dev/etherswitch/e6000sw
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 15:59:46 -0000
    
    Author: zbb
    Date: Wed May 17 15:59:45 2017
    New Revision: 318411
    URL: https://svnweb.freebsd.org/changeset/base/318411
    
    Log:
      Add missing unlock in e6000sw driver
      
      This patch adds missing unlock on attach failure.
      
      Submitted by:  Zbigniew Bodek 
      Obtained from: Semihalf
      Sponsored by:  Stormshield
      Reviewed by: loos
      Differential revision: https://reviews.freebsd.org/D10712
    
    Modified:
      head/sys/dev/etherswitch/e6000sw/e6000sw.c
    
    Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c
    ==============================================================================
    --- head/sys/dev/etherswitch/e6000sw/e6000sw.c	Wed May 17 15:58:39 2017	(r318410)
    +++ head/sys/dev/etherswitch/e6000sw/e6000sw.c	Wed May 17 15:59:45 2017	(r318411)
    @@ -425,6 +425,7 @@ e6000sw_attach(device_t dev)
     	return (0);
     
     out_fail:
    +	E6000SW_UNLOCK(sc);
     	e6000sw_detach(dev);
     
     	return (err);
    
    From owner-svn-src-all@freebsd.org  Wed May 17 16:32:25 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA0B2D71541;
     Wed, 17 May 2017 16:32:25 +0000 (UTC)
     (envelope-from emaste@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id AC0431A85;
     Wed, 17 May 2017 16:32:25 +0000 (UTC)
     (envelope-from emaste@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HGWOdV016964;
     Wed, 17 May 2017 16:32:24 GMT (envelope-from emaste@FreeBSD.org)
    Received: (from emaste@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HGWO8Y016963;
     Wed, 17 May 2017 16:32:24 GMT (envelope-from emaste@FreeBSD.org)
    Message-Id: <201705171632.v4HGWO8Y016963@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: emaste set sender to
     emaste@FreeBSD.org using -f
    From: Ed Maste 
    Date: Wed, 17 May 2017 16:32:24 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318412 - head/sys/sparc64/include
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 16:32:26 -0000
    
    Author: emaste
    Date: Wed May 17 16:32:24 2017
    New Revision: 318412
    URL: https://svnweb.freebsd.org/changeset/base/318412
    
    Log:
      fix sparc64 build by restoring 'register' in pcpu.h
      
      Reported by:	jhb
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      head/sys/sparc64/include/pcpu.h
    
    Modified: head/sys/sparc64/include/pcpu.h
    ==============================================================================
    --- head/sys/sparc64/include/pcpu.h	Wed May 17 15:59:45 2017	(r318411)
    +++ head/sys/sparc64/include/pcpu.h	Wed May 17 16:32:24 2017	(r318412)
    @@ -71,8 +71,8 @@ extern void *dpcpu0;
     struct pcb;
     struct pcpu;
     
    -struct pcb *curpcb __asm__(__XSTRING(PCB_REG));
    -struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG));
    +register struct pcb *curpcb __asm__(__XSTRING(PCB_REG));
    +register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG));
     
     #define	get_pcpu()		(pcpup)
     #define	PCPU_GET(member)	(pcpup->pc_ ## member)
    
    From owner-svn-src-all@freebsd.org  Wed May 17 16:44:23 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A099D718E5
     for ;
     Wed, 17 May 2017 16:44:23 +0000 (UTC)
     (envelope-from stacey.lloyd@regencycrowd.com)
    Received: from mail-vk0-x247.google.com (mail-vk0-x247.google.com
     [IPv6:2607:f8b0:400c:c05::247])
     (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
     (Client CN "smtp.gmail.com",
     Issuer "Google Internet Authority G2" (verified OK))
     by mx1.freebsd.org (Postfix) with ESMTPS id 56B7F3BA
     for ; Wed, 17 May 2017 16:44:23 +0000 (UTC)
     (envelope-from stacey.lloyd@regencycrowd.com)
    Received: by mail-vk0-x247.google.com with SMTP id c12so4432658vke.11
     for ; Wed, 17 May 2017 09:44:23 -0700 (PDT)
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
     d=regencycrowd-com.20150623.gappssmtp.com; s=20150623;
     h=mime-version:message-id:date:subject:from:to;
     bh=rUA2PqiaizIddqB1kOjXo5MPOHSK4tg9TmMR8nKxP24=;
     b=F1YWWWNil8kgk4T+rZuV+dkwCHM+1+wHjYUUc2fcnGjyc6VeI4xCiDYJIJdiLIyBdB
     JqHvw/iaEKx5QB3BkRbW7JJmbQtwfXwMYUXE8PgIHqfw6i3eNJB2iw8fJyvTUMeTqz2F
     XbXw05s0rCsFB4nRl3BBR/Txsl9aCdJ7zZxZHdtNNLvoSXsoR8WuSbeMnB4HT0d1ngJ+
     XNW0MDBMjRkYnO1pCbvto6xLeVJiUYEzG6Oz7baQKjMROQ5alwEm+gLrYP9xmNRjhREJ
     79aiAy/hG1lZQmGPuJi80nEVxSWBVst2toiNSK7KcH9JU1kqRkhY6n5I+t41PR0URun1
     7mnw==
    X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
     d=1e100.net; s=20161025;
     h=x-gm-message-state:mime-version:message-id:date:subject:from:to;
     bh=rUA2PqiaizIddqB1kOjXo5MPOHSK4tg9TmMR8nKxP24=;
     b=svhlqeRD2LjQv75cLrbfzWc155w1c9F2ELZ1yIVvRRh+7Nb7B/sQJVZyc0TwNyvPcu
     SB4VQRnKY73x0ZA7Axt2FnvJsA4/FEI7n5F5iXWXNapf5s35HHB8a9HOBUDTxlpE+Feu
     /D49v3Z4wZ8cq/RM1IvSa0JmERDVBEZ1OqGwekOETOmkESZg+dZzXD6Ex5PDdSlLezHs
     R7UZwPxg7Aua0SIqxj41n1RyCmQnCb7HZ20tgieNJy9NJE7uxeziNIwpwojLXBeX5Oht
     NDPB5Xu79UqBTQT6K0dY8AQQf3VMv+WRq7rQ2OgpJrDVLxX528NkzmCuXzGjgaGZr8j6
     /n8w==
    X-Gm-Message-State: AODbwcCgCniuj1M1IPPP1QV4y7U99Ltk07f2ag9ldtKBOotnot1BQvJG
     WazN4Y7sWXaiZj+nTazdW7qQjshtnM7Z
    MIME-Version: 1.0
    X-Received: by 10.31.155.82 with SMTP id d79mr1279155vke.39.1495039462180;
     Wed, 17 May 2017 09:44:22 -0700 (PDT)
    Message-ID: <001a11425afa11d403054fbb00d0@google.com>
    Date: Wed, 17 May 2017 16:44:22 +0000
    Subject: Qualcomm Updated Directory
    From: stacey.lloyd@regencycrowd.com
    To: svn-src-all@freebsd.org
    Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes
    Content-Transfer-Encoding: base64
    X-Content-Filtered-By: Mailman/MimeDel 2.1.23
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 16:44:23 -0000
    
    PGRpdiBkaXI9Imx0ciI+PHAgY2xhc3M9Ik1zb05vcm1hbCIgIA0Kc3R5bGU9Im1hcmdpbi1ib3R0
    b206MC4wMDAxcHQ7dGV4dC1hbGlnbjpqdXN0aWZ5O2xpbmUtaGVpZ2h0Om5vcm1hbCI+PHNwYW4g
    IA0Kc3R5bGU9ImNvbG9yOnJnYigwLDMyLDk2KSI+SGkNCjxzcGFuPjwvc3Bhbj48L3NwYW4+PC9w
    Pg0KDQo8cCBjbGFzcz0iTXNvTm9ybWFsIiAgDQpzdHlsZT0ibWFyZ2luLWJvdHRvbTowLjAwMDFw
    dDt0ZXh0LWFsaWduOmp1c3RpZnk7bGluZS1oZWlnaHQ6bm9ybWFsIj48c3BhbiAgDQpzdHlsZT0i
    Y29sb3I6cmdiKDAsMzIsOTYpIj7CoDwvc3Bhbj48L3A+DQoNCjxwIGNsYXNzPSJNc29Ob3JtYWwi
    IHN0eWxlPSJ0ZXh0LWFsaWduOmp1c3RpZnkiPjxzcGFuICANCnN0eWxlPSJjb2xvcjpyZ2IoMCwz
    Miw5NikiPldvdWxkIHlvdSBiZSBpbnRlcmVzdGVkDQppbiBhY3F1aXJpbmcgUXVhbGNvbW0gPHNw
    YW4gIA0Kc3R5bGU9ImJhY2tncm91bmQtaW1hZ2U6aW5pdGlhbDtiYWNrZ3JvdW5kLXBvc2l0aW9u
    OmluaXRpYWw7YmFja2dyb3VuZC1zaXplOmluaXRpYWw7YmFja2dyb3VuZC1yZXBlYXQ6aW5pdGlh
    bDtiYWNrZ3JvdW5kLW9yaWdpbjppbml0aWFsO2JhY2tncm91bmQtY2xpcDppbml0aWFsIj5Db250
    YWN0ICANCmxpc3QgPC9zcGFuPmZvcg0KbWFya2V0aW5nIG9yIGVtYWlsIGNhbXBhaWduPzwvc3Bh
    bj48c3BhbiAgDQpzdHlsZT0iY29sb3I6YmxhY2siPjxzcGFuPjwvc3Bhbj48L3NwYW4+PC9wPg0K
    DQo8cCBjbGFzcz0iTXNvTm9ybWFsIiAgDQpzdHlsZT0ibWFyZ2luLWJvdHRvbTowLjAwMDFwdDt0
    ZXh0LWFsaWduOmp1c3RpZnk7bGluZS1oZWlnaHQ6bm9ybWFsIj48c3BhbiAgDQpzdHlsZT0iY29s
    b3I6cmdiKDAsMzIsOTYpIj7CoDwvc3Bhbj48L3A+DQoNCjxwIGNsYXNzPSJNc29Ob3JtYWwiICAN
    CnN0eWxlPSJtYXJnaW4tYm90dG9tOjAuMDAwMXB0O3RleHQtYWxpZ246anVzdGlmeTtsaW5lLWhl
    aWdodDpub3JtYWwiPjxzcGFuICANCnN0eWxlPSJjb2xvcjpyZ2IoMCwzMiw5NikiPldlDQpjYW4g
    c2VnbWVudCBJbmR1c3RyeSBMaXN0ICZhbXA7IFRlY2hub2xvZ3kgVXNlcnMgTGlzdCBieSBDLWxl
    dmVsLCBWUC1sZXZlbCwNCkRpcmVjdG9yLUxldmVsIGFuZCBNYW5hZ2VyIExldmVsIGFzIHBlciB5
    b3VyICANCnJlcXVpcmVtZW50cy48c3Bhbj48L3NwYW4+PC9zcGFuPjwvcD4NCg0KPHAgY2xhc3M9
    Ik1zb05vcm1hbCIgIA0Kc3R5bGU9Im1hcmdpbi1ib3R0b206MC4wMDAxcHQ7dGV4dC1hbGlnbjpq
    dXN0aWZ5O2xpbmUtaGVpZ2h0Om5vcm1hbCI+PHNwYW4gIA0Kc3R5bGU9ImNvbG9yOnJnYigwLDMy
    LDk2KSI+wqA8L3NwYW4+PC9wPg0KDQo8cCBjbGFzcz0iTXNvTm9ybWFsIiAgDQpzdHlsZT0ibWFy
    Z2luLWJvdHRvbTowLjAwMDFwdDt0ZXh0LWFsaWduOmp1c3RpZnk7bGluZS1oZWlnaHQ6bm9ybWFs
    Ij48c3BhbiAgDQpzdHlsZT0iY29sb3I6cmdiKDAsMzIsOTYpIj5XZQ0KYWxzbyBoYXZlIGFsdGVy
    bmF0aXZlIFRlY2hub2xvZ3kgc3VjaCBhcyBJbnRlbCwgTWVkaWF0ZWssIEJyb2FkY29tLCAgDQpT
    a3l3b3JrcywNCk1pY3JvY2hpcCwgVGV4YXMgSW5zdHJ1bWVudHMsIE1pY3JvbiwgVG9zaGliYSBh
    bmQgbWFueSAgDQptb3JlLjxzcGFuPjwvc3Bhbj48L3NwYW4+PC9wPg0KDQo8cCBjbGFzcz0iTXNv
    Tm9ybWFsIiAgDQpzdHlsZT0ibWFyZ2luLWJvdHRvbTowLjAwMDFwdDt0ZXh0LWFsaWduOmp1c3Rp
    Znk7bGluZS1oZWlnaHQ6bm9ybWFsIj48c3BhbiAgDQpzdHlsZT0iY29sb3I6cmdiKDAsMzIsOTYp
    Ij7CoDwvc3Bhbj48L3A+DQoNCjxwIGNsYXNzPSJNc29Ob3JtYWwiICANCnN0eWxlPSJtYXJnaW4t
    Ym90dG9tOjAuMDAwMXB0O3RleHQtYWxpZ246anVzdGlmeTtsaW5lLWhlaWdodDpub3JtYWwiPjxz
    cGFuICANCnN0eWxlPSJjb2xvcjpyZ2IoMCwzMiw5NikiPktpbmRseQ0KcmV2aWV3IGFuZCBhZHZp
    Y2Ugb3IgZm9yd2FyZCB0aGlzIGVtYWlsIHRvIHRoZSBtYXJrZXRpbmcgaGVhZCBpbiB5b3VyICAN
    CmNvbXBhbnkNCndobyBhcmUgY3VycmVudGx5IHdvcmtpbmcgb24gc29tZSByZXF1aXJlbWVudHMu
    PHNwYW4+PC9zcGFuPjwvc3Bhbj48L3A+DQoNCjxwIGNsYXNzPSJNc29Ob3JtYWwiICANCnN0eWxl
    PSJtYXJnaW4tYm90dG9tOjAuMDAwMXB0O3RleHQtYWxpZ246anVzdGlmeTtsaW5lLWhlaWdodDpu
    b3JtYWwiPjxzcGFuICANCnN0eWxlPSJjb2xvcjpyZ2IoMCwzMiw5NikiPsKgPC9zcGFuPjwvcD4N
    Cg0KPHAgY2xhc3M9Ik1zb05vcm1hbCIgIA0Kc3R5bGU9Im1hcmdpbi1ib3R0b206MC4wMDAxcHQ7
    dGV4dC1hbGlnbjpqdXN0aWZ5O2xpbmUtaGVpZ2h0Om5vcm1hbCI+PHNwYW4gIA0Kc3R5bGU9ImNv
    bG9yOnJnYigwLDMyLDk2KSI+QXdhaXQNCnlvdXIgcmVzcG9uc2UuPHNwYW4+PC9zcGFuPjwvc3Bh
    bj48L3A+DQoNCjxwIGNsYXNzPSJNc29Ob3JtYWwiICANCnN0eWxlPSJtYXJnaW4tYm90dG9tOjAu
    MDAwMXB0O3RleHQtYWxpZ246anVzdGlmeTtsaW5lLWhlaWdodDpub3JtYWwiPjxzcGFuICANCnN0
    eWxlPSJjb2xvcjpyZ2IoMCwzMiw5NikiPsKgPC9zcGFuPjwvcD4NCg0KPHAgY2xhc3M9Ik1zb05v
    cm1hbCIgIA0Kc3R5bGU9Im1hcmdpbi1ib3R0b206MC4wMDAxcHQ7dGV4dC1hbGlnbjpqdXN0aWZ5
    O2xpbmUtaGVpZ2h0Om5vcm1hbCI+PHNwYW4gIA0Kc3R5bGU9ImNvbG9yOnJnYigwLDMyLDk2KSI+
    UmVnYXJkczxzcGFuPjwvc3Bhbj48L3NwYW4+PC9wPg0KDQo8cCBjbGFzcz0iTXNvTm9ybWFsIiAg
    DQpzdHlsZT0ibWFyZ2luLWJvdHRvbTowLjAwMDFwdDt0ZXh0LWFsaWduOmp1c3RpZnk7bGluZS1o
    ZWlnaHQ6bm9ybWFsIj48c3BhbiAgDQpzdHlsZT0iY29sb3I6cmdiKDAsMzIsOTYpIj5TdGFjZXkg
    TGxveWQgfCBEYXRhICANClNwZWNpYWxpc3Q8c3Bhbj48L3NwYW4+PC9zcGFuPjwvcD4NCg0KPHAg
    Y2xhc3M9Ik1zb05vcm1hbCIgIA0Kc3R5bGU9Im1hcmdpbi1ib3R0b206MC4wMDAxcHQ7dGV4dC1h
    bGlnbjpqdXN0aWZ5O2xpbmUtaGVpZ2h0Om5vcm1hbCI+PHNwYW4gIA0Kc3R5bGU9ImNvbG9yOnJn
    YigwLDMyLDk2KSI+wqA8L3NwYW4+PC9wPg0KDQo8cCBjbGFzcz0iTXNvTm9ybWFsIiAgDQpzdHls
    ZT0ibWFyZ2luLWJvdHRvbTowLjAwMDFwdDt0ZXh0LWFsaWduOmp1c3RpZnk7bGluZS1oZWlnaHQ6
    bm9ybWFsIj48c3BhbiAgDQpzdHlsZT0iY29sb3I6cmdiKDAsMzIsOTYpIj7CoMKgwqDCoMKgwqDC
    oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg
    wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgDQpUbyBvcHQtb3V0IHJlcGxheSBpbiBzdWJqZWN0IGxp
    bmUuPHNwYW4+PC9zcGFuPjwvc3Bhbj48L3A+PC9kaXY+DQo8cD4mbmJzcDs8L3A+PGEgc3R5bGU9
    J2Rpc3BsYXk6IGJsb2NrOyBtYXJnaW46IDMycHggMCA0MHB4IDA7IHBhZGRpbmc6ICANCjEwcHg7
    IGZvbnQtc2l6ZTogMWVtOyB0ZXh0LWFsaWduOiBjZW50ZXI7IGJvcmRlcjogMDsgYm9yZGVyLXRv
    cDogMXB4IHNvbGlkICANCmdyYXk7ICcgaHJlZj0naHR0cHM6Ly9nb28uZ2wvMmtzZFJ2Jz5wb3dl
    cmVkIGJ5IEdTTS4gRnJlZSBtYWlsIG1lcmdlIGFuZCAgDQplbWFpbCBtYXJrZXRpbmcgc29mdHdh
    cmUgZm9yIEdtYWlsLjwvYT4NCg==
    From owner-svn-src-all@freebsd.org  Wed May 17 19:34:37 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB32AD71759;
     Wed, 17 May 2017 19:34:37 +0000 (UTC)
     (envelope-from adrian@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id C6792D4;
     Wed, 17 May 2017 19:34:37 +0000 (UTC)
     (envelope-from adrian@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HJYadh094805;
     Wed, 17 May 2017 19:34:36 GMT (envelope-from adrian@FreeBSD.org)
    Received: (from adrian@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HJYaBj094804;
     Wed, 17 May 2017 19:34:36 GMT (envelope-from adrian@FreeBSD.org)
    Message-Id: <201705171934.v4HJYaBj094804@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: adrian set sender to
     adrian@FreeBSD.org using -f
    From: Adrian Chadd 
    Date: Wed, 17 May 2017 19:34:36 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318413 - head/sys/net80211
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 19:34:38 -0000
    
    Author: adrian
    Date: Wed May 17 19:34:36 2017
    New Revision: 318413
    URL: https://svnweb.freebsd.org/changeset/base/318413
    
    Log:
      [net80211] initial VHT radiotap implementation defines from upstream radiotap.
    
    Modified:
      head/sys/net80211/ieee80211_radiotap.h
    
    Modified: head/sys/net80211/ieee80211_radiotap.h
    ==============================================================================
    --- head/sys/net80211/ieee80211_radiotap.h	Wed May 17 16:32:24 2017	(r318412)
    +++ head/sys/net80211/ieee80211_radiotap.h	Wed May 17 19:34:36 2017	(r318413)
    @@ -178,6 +178,30 @@ struct ieee80211_radiotap_header {
      *      finally the maximum regulatory transmit power cap in .5 dBm
      *      units.  This property supersedes IEEE80211_RADIOTAP_CHANNEL
      *      and only one of the two should be present.
    + * IEEE80211_RADIOTAP_RX_FLAGS          guint16       bitmap
    + *
    + *     Properties of received frames. See flags defined below.
    + *
    + * IEEE80211_RADIOTAP_TX_FLAGS          guint16       bitmap
    + *
    + *     Properties of transmitted frames. See flags defined below.
    + *
    + * IEEE80211_RADIOTAP_RTS_RETRIES       u8           data
    + *
    + *     Number of rts retries a transmitted frame used.
    + *
    + * IEEE80211_RADIOTAP_DATA_RETRIES      u8           data
    + *
    + *     Number of unicast retries a transmitted frame used.
    + *
    + * IEEE80211_RADIOTAP_MCS       u8, u8, u8              unitless
    + *
    + *     Contains a bitmap of known fields/flags, the flags, and
    + *     the MCS index.
    + *
    + * IEEE80211_RADIOTAP_AMPDU_STATUS      u32, u16, u8, u8        unitlesss
    + *
    + *      Contains the AMPDU information for the subframe.
      */
     enum ieee80211_radiotap_type {
     	IEEE80211_RADIOTAP_TSFT = 0,
    @@ -206,6 +230,7 @@ enum ieee80211_radiotap_type {
     	IEEE80211_RADIOTAP_XCHANNEL = 18,
     	IEEE80211_RADIOTAP_MCS = 19,
     	IEEE80211_RADIOTAP_AMPDU_STATUS = 20,
    +	IEEE80211_RADIOTAP_VHT = 21,
     
             IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE = 29,
     	IEEE80211_RADIOTAP_VENDOREXT = 30,
    @@ -250,4 +275,95 @@ enum ieee80211_radiotap_type {
     #define	IEEE80211_RADIOTAP_F_BADFCS	0x40	/* does not pass FCS check */
     #define	IEEE80211_RADIOTAP_F_SHORTGI	0x80	/* HT short GI */
     
    +/* For IEEE80211_RADIOTAP_RX_FLAGS */
    +#define	IEEE80211_RADIOTAP_F_RX_BADPLCP	0x0002	/* bad PLCP */
    +
    +/* For IEEE80211_RADIOTAP_TX_FLAGS */
    +#define	IEEE80211_RADIOTAP_F_TX_FAIL	0x0001	/* failed due to excessive
    +						 * retries */
    +#define	IEEE80211_RADIOTAP_F_TX_CTS	0x0002	/* used cts 'protection' */
    +#define	IEEE80211_RADIOTAP_F_TX_RTS	0x0004	/* used rts/cts handshake */
    +
    +
    +/* For IEEE80211_RADIOTAP_MCS */
    +#define	IEEE80211_RADIOTAP_MCS_HAVE_BW		0x01
    +#define	IEEE80211_RADIOTAP_MCS_HAVE_MCS		0x02
    +#define	IEEE80211_RADIOTAP_MCS_HAVE_GI		0x04
    +#define	IEEE80211_RADIOTAP_MCS_HAVE_FMT		0x08
    +#define	IEEE80211_RADIOTAP_MCS_HAVE_FEC		0x10
    +#define	IEEE80211_RADIOTAP_MCS_HAVE_STBC	0x20
    +#define	IEEE80211_RADIOTAP_MCS_HAVE_NESS	0x40
    +#define	IEEE80211_RADIOTAP_MCS_NESS_BIT1	0x80
    +
    +#define	IEEE80211_RADIOTAP_MCS_BW_MASK		0x03
    +#define	    IEEE80211_RADIOTAP_MCS_BW_20	0
    +#define	    IEEE80211_RADIOTAP_MCS_BW_40	1
    +#define	 IEEE80211_RADIOTAP_MCS_BW_20L		2
    +#define	    IEEE80211_RADIOTAP_MCS_BW_20U	3
    +#define	IEEE80211_RADIOTAP_MCS_SGI		0x04
    +#define	IEEE80211_RADIOTAP_MCS_FMT_GF		0x08
    +#define	IEEE80211_RADIOTAP_MCS_FEC_LDPC		0x10
    +#define	IEEE80211_RADIOTAP_MCS_STBC_MASK	0x60
    +#define	IEEE80211_RADIOTAP_MCS_STBC_SHIFT	5
    +#define	    IEEE80211_RADIOTAP_MCS_STBC_1	1
    +#define	    IEEE80211_RADIOTAP_MCS_STBC_2	2
    +#define	    IEEE80211_RADIOTAP_MCS_STBC_3	3
    +#define	IEEE80211_RADIOTAP_MCS_NESS_BIT0	0x80
    +
    +/* For IEEE80211_RADIOTAP_AMPDU_STATUS */
    +#define	IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN		0x0001
    +#define	IEEE80211_RADIOTAP_AMPDU_IS_ZEROLEN		0x0002
    +#define	IEEE80211_RADIOTAP_AMPDU_LAST_KNOWN		0x0004
    +#define	IEEE80211_RADIOTAP_AMPDU_IS_LAST		0x0008
    +#define	IEEE80211_RADIOTAP_AMPDU_DELIM_CRC_ERR		0x0010
    +#define	IEEE80211_RADIOTAP_AMPDU_DELIM_CRC_KNOWN	0x0020
    +
    +/* For IEEE80211_RADIOTAP_VHT */
    +#define	IEEE80211_RADIOTAP_VHT_HAVE_STBC	0x0001
    +#define	IEEE80211_RADIOTAP_VHT_HAVE_TXOP_PS	0x0002
    +#define	IEEE80211_RADIOTAP_VHT_HAVE_GI		0x0004
    +#define	IEEE80211_RADIOTAP_VHT_HAVE_SGI_NSYM_DA	0x0008
    +#define	IEEE80211_RADIOTAP_VHT_HAVE_LDPC_EXTRA	0x0010
    +#define	IEEE80211_RADIOTAP_VHT_HAVE_BF		0x0020
    +#define	IEEE80211_RADIOTAP_VHT_HAVE_BW		0x0040
    +#define	IEEE80211_RADIOTAP_VHT_HAVE_GID		0x0080
    +#define	IEEE80211_RADIOTAP_VHT_HAVE_PAID	0x0100
    +#define	IEEE80211_RADIOTAP_VHT_STBC		0x01
    +#define	IEEE80211_RADIOTAP_VHT_TXOP_PS		0x02
    +#define	IEEE80211_RADIOTAP_VHT_SGI		0x04
    +#define	IEEE80211_RADIOTAP_VHT_SGI_NSYM_DA	0x08
    +#define	IEEE80211_RADIOTAP_VHT_LDPC_EXTRA	0x10
    +#define	IEEE80211_RADIOTAP_VHT_BF		0x20
    +#define	IEEE80211_RADIOTAP_VHT_NSS		0x0f
    +#define	IEEE80211_RADIOTAP_VHT_MCS		0xf0
    +#define	IEEE80211_RADIOTAP_VHT_CODING_LDPC	0x01
    +
    +#define	IEEE80211_RADIOTAP_VHT_BW_MASK		0x1f
    +#define	IEEE80211_RADIOTAP_VHT_BW_20		IEEE80211_RADIOTAP_MCS_BW_20
    +#define	IEEE80211_RADIOTAP_VHT_BW_40		IEEE80211_RADIOTAP_MCS_BW_40
    +#define	IEEE80211_RADIOTAP_VHT_BW_20L		IEEE80211_RADIOTAP_MCS_BW_20L
    +#define	IEEE80211_RADIOTAP_VHT_BW_20U		IEEE80211_RADIOTAP_MCS_BW_20U
    +#define	IEEE80211_RADIOTAP_VHT_BW_80		4
    +#define	IEEE80211_RADIOTAP_VHT_BW_40L		5
    +#define	IEEE80211_RADIOTAP_VHT_BW_40U		6
    +#define	IEEE80211_RADIOTAP_VHT_BW_20LL		7
    +#define	IEEE80211_RADIOTAP_VHT_BW_20LU		8
    +#define	IEEE80211_RADIOTAP_VHT_BW_20UL		9
    +#define	IEEE80211_RADIOTAP_VHT_BW_20UU		10
    +#define	IEEE80211_RADIOTAP_VHT_BW_160		11
    +#define	IEEE80211_RADIOTAP_VHT_BW_80L		12
    +#define	IEEE80211_RADIOTAP_VHT_BW_80U		13
    +#define	IEEE80211_RADIOTAP_VHT_BW_40LL		14
    +#define	IEEE80211_RADIOTAP_VHT_BW_40LU		15
    +#define	IEEE80211_RADIOTAP_VHT_BW_40UL		16
    +#define	IEEE80211_RADIOTAP_VHT_BW_40UU		17
    +#define	IEEE80211_RADIOTAP_VHT_BW_20LLL		18
    +#define	IEEE80211_RADIOTAP_VHT_BW_20LLU		19
    +#define	IEEE80211_RADIOTAP_VHT_BW_20LUL		20
    +#define	IEEE80211_RADIOTAP_VHT_BW_20LUU		21
    +#define	IEEE80211_RADIOTAP_VHT_BW_20ULL		22
    +#define	IEEE80211_RADIOTAP_VHT_BW_20ULU		23
    +#define	IEEE80211_RADIOTAP_VHT_BW_20UUL		24
    +#define	IEEE80211_RADIOTAP_VHT_BW_20UUU		25
    +
     #endif /* !_NET80211_IEEE80211_RADIOTAP_H_ */
    
    From owner-svn-src-all@freebsd.org  Wed May 17 20:22:43 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id F24CCD714A3;
     Wed, 17 May 2017 20:22:42 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id A7CA61BF2;
     Wed, 17 May 2017 20:22:42 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HKMfhW015248;
     Wed, 17 May 2017 20:22:41 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HKMeJf015232;
     Wed, 17 May 2017 20:22:40 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705172022.v4HKMeJf015232@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Wed, 17 May 2017 20:22:40 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318414 - in vendor/llvm/dist: include/llvm/ADT
     include/llvm/Analysis include/llvm/DebugInfo/CodeView
     include/llvm/DebugInfo/DWARF include/llvm/DebugInfo/PDB/Native
     include/llvm/IR incl...
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 20:22:43 -0000
    
    Author: dim
    Date: Wed May 17 20:22:39 2017
    New Revision: 318414
    URL: https://svnweb.freebsd.org/changeset/base/318414
    
    Log:
      Vendor import of llvm trunk r303291:
      https://llvm.org/svn/llvm-project/llvm/trunk@303291
    
    Added:
      vendor/llvm/dist/test/Analysis/CostModel/SystemZ/div-pow2.ll
      vendor/llvm/dist/test/Analysis/CostModel/X86/ctlz.ll
      vendor/llvm/dist/test/Analysis/CostModel/X86/ctpop.ll
      vendor/llvm/dist/test/Analysis/CostModel/X86/cttz.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/packed-op-sel.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/save-bp.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/save-cr-ppc32svr4.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/save-crbp-ppc32svr4.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-X32.mir
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add-x32.mir
      vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/X86/ELF_x86-64_debug_frame.s   (contents, props changed)
      vendor/llvm/dist/test/Transforms/Coroutines/coro-catchswitch.ll
      vendor/llvm/dist/test/Transforms/InstCombine/debuginfo-skip.ll
      vendor/llvm/dist/test/Transforms/LoopVectorize/AArch64/pr33053.ll
      vendor/llvm/dist/unittests/Support/CrashRecoveryTest.cpp   (contents, props changed)
    Deleted:
      vendor/llvm/dist/test/Analysis/CostModel/X86/ctbits-cost.ll
      vendor/llvm/dist/test/CodeGen/X86/leaFixup32.mir
      vendor/llvm/dist/test/CodeGen/X86/leaFixup64.mir
    Modified:
      vendor/llvm/dist/include/llvm/ADT/APInt.h
      vendor/llvm/dist/include/llvm/ADT/BitVector.h
      vendor/llvm/dist/include/llvm/ADT/PostOrderIterator.h
      vendor/llvm/dist/include/llvm/ADT/PriorityWorklist.h
      vendor/llvm/dist/include/llvm/ADT/SCCIterator.h
      vendor/llvm/dist/include/llvm/ADT/Sequence.h
      vendor/llvm/dist/include/llvm/ADT/SetVector.h
      vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h
      vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h
      vendor/llvm/dist/include/llvm/ADT/SmallVector.h
      vendor/llvm/dist/include/llvm/ADT/SparseBitVector.h
      vendor/llvm/dist/include/llvm/ADT/SparseMultiSet.h
      vendor/llvm/dist/include/llvm/ADT/SparseSet.h
      vendor/llvm/dist/include/llvm/ADT/StringExtras.h
      vendor/llvm/dist/include/llvm/ADT/StringMap.h
      vendor/llvm/dist/include/llvm/ADT/StringRef.h
      vendor/llvm/dist/include/llvm/ADT/StringSet.h
      vendor/llvm/dist/include/llvm/ADT/TinyPtrVector.h
      vendor/llvm/dist/include/llvm/ADT/UniqueVector.h
      vendor/llvm/dist/include/llvm/Analysis/ProfileSummaryInfo.h
      vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h
      vendor/llvm/dist/include/llvm/DebugInfo/CodeView/RandomAccessTypeVisitor.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAttribute.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDie.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFGdbIndex.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFRelocMap.h
      vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h
      vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/TpiStream.h
      vendor/llvm/dist/include/llvm/IR/IntrinsicsPowerPC.td
      vendor/llvm/dist/include/llvm/Target/GlobalISel/SelectionDAGCompat.td
      vendor/llvm/dist/lib/Analysis/DependenceAnalysis.cpp
      vendor/llvm/dist/lib/Analysis/InlineCost.cpp
      vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp
      vendor/llvm/dist/lib/Analysis/ProfileSummaryInfo.cpp
      vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp
      vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp
      vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
      vendor/llvm/dist/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp
      vendor/llvm/dist/lib/CodeGen/GlobalISel/IRTranslator.cpp
      vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp
      vendor/llvm/dist/lib/CodeGen/RegAllocGreedy.cpp
      vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
      vendor/llvm/dist/lib/CodeGen/SpillPlacement.cpp
      vendor/llvm/dist/lib/CodeGen/StackColoring.cpp
      vendor/llvm/dist/lib/CodeGen/TargetLoweringBase.cpp
      vendor/llvm/dist/lib/CodeGen/TargetPassConfig.cpp
      vendor/llvm/dist/lib/CodeGen/TargetRegisterInfo.cpp
      vendor/llvm/dist/lib/DebugInfo/CodeView/CVTypeDumper.cpp
      vendor/llvm/dist/lib/DebugInfo/CodeView/CVTypeVisitor.cpp
      vendor/llvm/dist/lib/DebugInfo/CodeView/RandomAccessTypeVisitor.cpp
      vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
      vendor/llvm/dist/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
      vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp
      vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBTypeServerHandler.cpp
      vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
      vendor/llvm/dist/lib/Support/CrashRecoveryContext.cpp
      vendor/llvm/dist/lib/Support/Unix/Path.inc
      vendor/llvm/dist/lib/Target/AArch64/AArch64FrameLowering.cpp
      vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp
      vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.h
      vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
      vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.h
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h
      vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/SIRegisterInfo.cpp
      vendor/llvm/dist/lib/Target/AMDGPU/VOP3Instructions.td
      vendor/llvm/dist/lib/Target/ARM/ARMInstructionSelector.cpp
      vendor/llvm/dist/lib/Target/ARM/Thumb1FrameLowering.cpp
      vendor/llvm/dist/lib/Target/Mips/MipsDelaySlotFiller.cpp
      vendor/llvm/dist/lib/Target/PowerPC/PPCFrameLowering.cpp
      vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp
      vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h
      vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td
      vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp
      vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td
      vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
      vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp
      vendor/llvm/dist/lib/Target/WebAssembly/known_gcc_test_failures.txt
      vendor/llvm/dist/lib/Target/X86/X86.td
      vendor/llvm/dist/lib/Target/X86/X86FixupLEAs.cpp
      vendor/llvm/dist/lib/Target/X86/X86InstructionSelector.cpp
      vendor/llvm/dist/lib/Target/X86/X86LegalizerInfo.cpp
      vendor/llvm/dist/lib/Target/X86/X86Subtarget.h
      vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp
      vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.cpp
      vendor/llvm/dist/lib/Transforms/Coroutines/CoroFrame.cpp
      vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineInternal.h
      vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp
      vendor/llvm/dist/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
      vendor/llvm/dist/test/Analysis/CostModel/X86/bitreverse.ll
      vendor/llvm/dist/test/CodeGen/AArch64/aarch64-addv.ll
      vendor/llvm/dist/test/CodeGen/AArch64/aarch64-minmaxv.ll
      vendor/llvm/dist/test/CodeGen/AArch64/arm64-vabs.ll
      vendor/llvm/dist/test/CodeGen/AArch64/ldst-zero.ll
      vendor/llvm/dist/test/CodeGen/AArch64/misched-stp.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/fmax3.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/fmin3.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/global-constant.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/immv216.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/max3.ll
      vendor/llvm/dist/test/CodeGen/AMDGPU/min3.ll
      vendor/llvm/dist/test/CodeGen/ARM/2011-02-04-AntidepMultidef.ll
      vendor/llvm/dist/test/CodeGen/ARM/2012-10-04-AAPCS-byval-align8.ll
      vendor/llvm/dist/test/CodeGen/ARM/dag-combine-ldst.ll
      vendor/llvm/dist/test/CodeGen/MSP430/vararg.ll
      vendor/llvm/dist/test/CodeGen/Mips/msa/bmzi_bmnzi.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/atomic-2.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/atomics-indexed.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/atomics-regression.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/atomics.ll
      vendor/llvm/dist/test/CodeGen/PowerPC/ppcf128sf.ll
      vendor/llvm/dist/test/CodeGen/SPARC/32abi.ll
      vendor/llvm/dist/test/CodeGen/SPARC/64abi.ll
      vendor/llvm/dist/test/CodeGen/SystemZ/swift-return.ll
      vendor/llvm/dist/test/CodeGen/Thumb/stack-access.ll
      vendor/llvm/dist/test/CodeGen/Thumb2/ldr-str-imm12.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/add-scalar.ll
      vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-add.mir
      vendor/llvm/dist/test/CodeGen/X86/arg-copy-elide.ll
      vendor/llvm/dist/test/CodeGen/X86/nontemporal.ll
      vendor/llvm/dist/test/CodeGen/X86/psubus.ll
      vendor/llvm/dist/test/CodeGen/X86/store-narrow.ll
      vendor/llvm/dist/test/CodeGen/X86/swift-return.ll
      vendor/llvm/dist/test/CodeGen/X86/win32-spill-xmm.ll
      vendor/llvm/dist/test/CodeGen/X86/win64_sibcall.ll
      vendor/llvm/dist/test/CodeGen/X86/win64_vararg.ll
      vendor/llvm/dist/test/CodeGen/X86/x86-64-ms_abi-vararg.ll
      vendor/llvm/dist/test/Feature/optnone-llc.ll
      vendor/llvm/dist/test/MC/AMDGPU/vop3-gfx9.s
      vendor/llvm/dist/test/TableGen/GlobalISelEmitter.td
      vendor/llvm/dist/test/Transforms/Inline/inline-hot-callee.ll
      vendor/llvm/dist/test/Transforms/InstCombine/canonicalize_branch.ll
      vendor/llvm/dist/test/Transforms/InstSimplify/AndOrXor.ll
      vendor/llvm/dist/test/Transforms/LoopVectorize/AArch64/reduction-small-size.ll
      vendor/llvm/dist/test/Transforms/NewGVN/pr32934.ll
      vendor/llvm/dist/test/Transforms/SLPVectorizer/AArch64/gather-root.ll
      vendor/llvm/dist/tools/llvm-pdbdump/Analyze.cpp
      vendor/llvm/dist/tools/llvm-pdbdump/LLVMOutputStyle.cpp
      vendor/llvm/dist/tools/llvm-pdbdump/PdbYaml.cpp
      vendor/llvm/dist/tools/llvm-pdbdump/YamlTypeDumper.cpp
      vendor/llvm/dist/unittests/ADT/BitVectorTest.cpp
      vendor/llvm/dist/unittests/Analysis/ProfileSummaryInfoTest.cpp
      vendor/llvm/dist/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
      vendor/llvm/dist/unittests/DebugInfo/PDB/TypeServerHandlerTest.cpp
      vendor/llvm/dist/unittests/Support/BinaryStreamTest.cpp
      vendor/llvm/dist/unittests/Support/CMakeLists.txt
      vendor/llvm/dist/utils/TableGen/AsmMatcherEmitter.cpp
      vendor/llvm/dist/utils/TableGen/GlobalISelEmitter.cpp
      vendor/llvm/dist/utils/lit/lit/main.py
      vendor/llvm/dist/utils/lit/lit/run.py
    
    Modified: vendor/llvm/dist/include/llvm/ADT/APInt.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/APInt.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/APInt.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -1067,9 +1067,7 @@ public:
       /// \returns the bit value at bitPosition
       bool operator[](unsigned bitPosition) const {
         assert(bitPosition < getBitWidth() && "Bit position out of bounds!");
    -    return (maskBit(bitPosition) &
    -            (isSingleWord() ? U.VAL : U.pVal[whichWord(bitPosition)])) !=
    -           0;
    +    return (maskBit(bitPosition) & getWord(bitPosition)) != 0;
       }
     
       /// @}
    
    Modified: vendor/llvm/dist/include/llvm/ADT/BitVector.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/BitVector.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/BitVector.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -15,6 +15,7 @@
     #define LLVM_ADT_BITVECTOR_H
     
     #include "llvm/ADT/ArrayRef.h"
    +#include "llvm/ADT/iterator_range.h"
     #include "llvm/Support/MathExtras.h"
     #include 
     #include 
    @@ -26,6 +27,50 @@
     
     namespace llvm {
     
    +/// ForwardIterator for the bits that are set.
    +/// Iterators get invalidated when resize / reserve is called.
    +template  class const_set_bits_iterator_impl {
    +  const BitVectorT &Parent;
    +  int Current = 0;
    +
    +  void advance() {
    +    assert(Current != -1 && "Trying to advance past end.");
    +    Current = Parent.find_next(Current);
    +  }
    +
    +public:
    +  const_set_bits_iterator_impl(const BitVectorT &Parent, int Current)
    +      : Parent(Parent), Current(Current) {}
    +  explicit const_set_bits_iterator_impl(const BitVectorT &Parent)
    +      : const_set_bits_iterator_impl(Parent, Parent.find_first()) {}
    +  const_set_bits_iterator_impl(const const_set_bits_iterator_impl &) = default;
    +
    +  const_set_bits_iterator_impl operator++(int) {
    +    auto Prev = *this;
    +    advance();
    +    return Prev;
    +  }
    +
    +  const_set_bits_iterator_impl &operator++() {
    +    advance();
    +    return *this;
    +  }
    +
    +  unsigned operator*() const { return Current; }
    +
    +  bool operator==(const const_set_bits_iterator_impl &Other) const {
    +    assert(&Parent == &Other.Parent &&
    +           "Comparing iterators from different BitVectors");
    +    return Current == Other.Current;
    +  }
    +
    +  bool operator!=(const const_set_bits_iterator_impl &Other) const {
    +    assert(&Parent == &Other.Parent &&
    +           "Comparing iterators from different BitVectors");
    +    return Current != Other.Current;
    +  }
    +};
    +
     class BitVector {
       typedef unsigned long BitWord;
     
    @@ -73,6 +118,18 @@ public:
         }
       };
     
    +  typedef const_set_bits_iterator_impl const_set_bits_iterator;
    +  typedef const_set_bits_iterator set_iterator;
    +
    +  const_set_bits_iterator set_bits_begin() const {
    +    return const_set_bits_iterator(*this);
    +  }
    +  const_set_bits_iterator set_bits_end() const {
    +    return const_set_bits_iterator(*this, -1);
    +  }
    +  iterator_range set_bits() const {
    +    return make_range(set_bits_begin(), set_bits_end());
    +  }
     
       /// BitVector default ctor - Creates an empty bitvector.
       BitVector() : Size(0) {}
    @@ -146,138 +203,164 @@ public:
         return !any();
       }
     
    -  /// find_first - Returns the index of the first set bit, -1 if none
    -  /// of the bits are set.
    -  int find_first() const {
    -    for (unsigned i = 0; i < NumBitWords(size()); ++i)
    -      if (Bits[i] != 0)
    -        return i * BITWORD_SIZE + countTrailingZeros(Bits[i]);
    -    return -1;
    -  }
    -
    -  /// find_last - Returns the index of the last set bit, -1 if none of the bits
    -  /// are set.
    -  int find_last() const {
    -    if (Size == 0)
    +  /// find_first_in - Returns the index of the first set bit in the range
    +  /// [Begin, End).  Returns -1 if all bits in the range are unset.
    +  int find_first_in(unsigned Begin, unsigned End) const {
    +    assert(Begin <= End && End <= Size);
    +    if (Begin == End)
           return -1;
     
    -    unsigned N = NumBitWords(size());
    -    assert(N > 0);
    +    unsigned FirstWord = Begin / BITWORD_SIZE;
    +    unsigned LastWord = (End - 1) / BITWORD_SIZE;
     
    -    unsigned i = N - 1;
    -    while (i > 0 && Bits[i] == BitWord(0))
    -      --i;
    +    // Check subsequent words.
    +    for (unsigned i = FirstWord; i <= LastWord; ++i) {
    +      BitWord Copy = Bits[i];
     
    -    return int((i + 1) * BITWORD_SIZE - countLeadingZeros(Bits[i])) - 1;
    -  }
    +      if (i == FirstWord) {
    +        unsigned FirstBit = Begin % BITWORD_SIZE;
    +        Copy &= maskTrailingZeros(FirstBit);
    +      }
     
    -  /// find_first_unset - Returns the index of the first unset bit, -1 if all
    -  /// of the bits are set.
    -  int find_first_unset() const {
    -    for (unsigned i = 0; i < NumBitWords(size()); ++i)
    -      if (Bits[i] != ~0UL) {
    -        unsigned Result = i * BITWORD_SIZE + countTrailingOnes(Bits[i]);
    -        return Result < size() ? Result : -1;
    +      if (i == LastWord) {
    +        unsigned LastBit = (End - 1) % BITWORD_SIZE;
    +        Copy &= maskTrailingOnes(LastBit + 1);
           }
    +      if (Copy != 0)
    +        return i * BITWORD_SIZE + countTrailingZeros(Copy);
    +    }
         return -1;
       }
     
    -  /// find_last_unset - Returns the index of the last unset bit, -1 if all of
    -  /// the bits are set.
    -  int find_last_unset() const {
    -    if (Size == 0)
    +  /// find_last_in - Returns the index of the last set bit in the range
    +  /// [Begin, End).  Returns -1 if all bits in the range are unset.
    +  int find_last_in(unsigned Begin, unsigned End) const {
    +    assert(Begin <= End && End <= Size);
    +    if (Begin == End)
           return -1;
     
    -    const unsigned N = NumBitWords(size());
    -    assert(N > 0);
    +    unsigned LastWord = (End - 1) / BITWORD_SIZE;
    +    unsigned FirstWord = Begin / BITWORD_SIZE;
     
    -    unsigned i = N - 1;
    -    BitWord W = Bits[i];
    +    for (unsigned i = LastWord + 1; i >= FirstWord + 1; --i) {
    +      unsigned CurrentWord = i - 1;
     
    -    // The last word in the BitVector has some unused bits, so we need to set
    -    // them all to 1 first.  Set them all to 1 so they don't get treated as
    -    // valid unset bits.
    -    unsigned UnusedCount = BITWORD_SIZE - size() % BITWORD_SIZE;
    -    W |= maskLeadingOnes(UnusedCount);
    +      BitWord Copy = Bits[CurrentWord];
    +      if (CurrentWord == LastWord) {
    +        unsigned LastBit = (End - 1) % BITWORD_SIZE;
    +        Copy &= maskTrailingOnes(LastBit + 1);
    +      }
     
    -    while (W == ~BitWord(0) && --i > 0)
    -      W = Bits[i];
    +      if (CurrentWord == FirstWord) {
    +        unsigned FirstBit = Begin % BITWORD_SIZE;
    +        Copy &= maskTrailingZeros(FirstBit);
    +      }
    +
    +      if (Copy != 0)
    +        return (CurrentWord + 1) * BITWORD_SIZE - countLeadingZeros(Copy) - 1;
    +    }
     
    -    return int((i + 1) * BITWORD_SIZE - countLeadingOnes(W)) - 1;
    +    return -1;
       }
     
    -  /// find_next - Returns the index of the next set bit following the
    -  /// "Prev" bit. Returns -1 if the next set bit is not found.
    -  int find_next(unsigned Prev) const {
    -    ++Prev;
    -    if (Prev >= Size)
    +  /// find_first_unset_in - Returns the index of the first unset bit in the
    +  /// range [Begin, End).  Returns -1 if all bits in the range are set.
    +  int find_first_unset_in(unsigned Begin, unsigned End) const {
    +    assert(Begin <= End && End <= Size);
    +    if (Begin == End)
           return -1;
     
    -    unsigned WordPos = Prev / BITWORD_SIZE;
    -    unsigned BitPos = Prev % BITWORD_SIZE;
    -    BitWord Copy = Bits[WordPos];
    -    // Mask off previous bits.
    -    Copy &= maskTrailingZeros(BitPos);
    -
    -    if (Copy != 0)
    -      return WordPos * BITWORD_SIZE + countTrailingZeros(Copy);
    +    unsigned FirstWord = Begin / BITWORD_SIZE;
    +    unsigned LastWord = (End - 1) / BITWORD_SIZE;
     
         // Check subsequent words.
    -    for (unsigned i = WordPos+1; i < NumBitWords(size()); ++i)
    -      if (Bits[i] != 0)
    -        return i * BITWORD_SIZE + countTrailingZeros(Bits[i]);
    +    for (unsigned i = FirstWord; i <= LastWord; ++i) {
    +      BitWord Copy = Bits[i];
    +
    +      if (i == FirstWord) {
    +        unsigned FirstBit = Begin % BITWORD_SIZE;
    +        Copy |= maskTrailingOnes(FirstBit);
    +      }
    +
    +      if (i == LastWord) {
    +        unsigned LastBit = (End - 1) % BITWORD_SIZE;
    +        Copy |= maskTrailingZeros(LastBit + 1);
    +      }
    +      if (Copy != ~0UL) {
    +        unsigned Result = i * BITWORD_SIZE + countTrailingOnes(Copy);
    +        return Result < size() ? Result : -1;
    +      }
    +    }
         return -1;
       }
     
    -  /// find_next_unset - Returns the index of the next unset bit following the
    -  /// "Prev" bit.  Returns -1 if all remaining bits are set.
    -  int find_next_unset(unsigned Prev) const {
    -    ++Prev;
    -    if (Prev >= Size)
    +  /// find_last_unset_in - Returns the index of the last unset bit in the
    +  /// range [Begin, End).  Returns -1 if all bits in the range are set.
    +  int find_last_unset_in(unsigned Begin, unsigned End) const {
    +    assert(Begin <= End && End <= Size);
    +    if (Begin == End)
           return -1;
     
    -    unsigned WordPos = Prev / BITWORD_SIZE;
    -    unsigned BitPos = Prev % BITWORD_SIZE;
    -    BitWord Copy = Bits[WordPos];
    -    // Mask in previous bits.
    -    BitWord Mask = (1 << BitPos) - 1;
    -    Copy |= Mask;
    +    unsigned LastWord = (End - 1) / BITWORD_SIZE;
    +    unsigned FirstWord = Begin / BITWORD_SIZE;
     
    -    if (Copy != ~0UL)
    -      return next_unset_in_word(WordPos, Copy);
    +    for (unsigned i = LastWord + 1; i >= FirstWord + 1; --i) {
    +      unsigned CurrentWord = i - 1;
     
    -    // Check subsequent words.
    -    for (unsigned i = WordPos + 1; i < NumBitWords(size()); ++i)
    -      if (Bits[i] != ~0UL)
    -        return next_unset_in_word(i, Bits[i]);
    +      BitWord Copy = Bits[CurrentWord];
    +      if (CurrentWord == LastWord) {
    +        unsigned LastBit = (End - 1) % BITWORD_SIZE;
    +        Copy |= maskTrailingZeros(LastBit + 1);
    +      }
    +
    +      if (CurrentWord == FirstWord) {
    +        unsigned FirstBit = Begin % BITWORD_SIZE;
    +        Copy |= maskTrailingOnes(FirstBit);
    +      }
    +
    +      if (Copy != ~0UL) {
    +        unsigned Result =
    +            (CurrentWord + 1) * BITWORD_SIZE - countLeadingOnes(Copy) - 1;
    +        return Result < Size ? Result : -1;
    +      }
    +    }
         return -1;
       }
     
    +  /// find_first - Returns the index of the first set bit, -1 if none
    +  /// of the bits are set.
    +  int find_first() const { return find_first_in(0, Size); }
    +
    +  /// find_last - Returns the index of the last set bit, -1 if none of the bits
    +  /// are set.
    +  int find_last() const { return find_last_in(0, Size); }
    +
    +  /// find_next - Returns the index of the next set bit following the
    +  /// "Prev" bit. Returns -1 if the next set bit is not found.
    +  int find_next(unsigned Prev) const { return find_first_in(Prev + 1, Size); }
    +
       /// find_prev - Returns the index of the first set bit that precedes the
       /// the bit at \p PriorTo.  Returns -1 if all previous bits are unset.
    -  int find_prev(unsigned PriorTo) const {
    -    if (PriorTo == 0)
    -      return -1;
    +  int find_prev(unsigned PriorTo) const { return find_last_in(0, PriorTo); }
     
    -    --PriorTo;
    +  /// find_first_unset - Returns the index of the first unset bit, -1 if all
    +  /// of the bits are set.
    +  int find_first_unset() const { return find_first_unset_in(0, Size); }
     
    -    unsigned WordPos = PriorTo / BITWORD_SIZE;
    -    unsigned BitPos = PriorTo % BITWORD_SIZE;
    -    BitWord Copy = Bits[WordPos];
    -    // Mask off next bits.
    -    Copy &= maskTrailingOnes(BitPos + 1);
    -
    -    if (Copy != 0)
    -      return (WordPos + 1) * BITWORD_SIZE - countLeadingZeros(Copy) - 1;
    -
    -    // Check previous words.
    -    for (unsigned i = 1; i <= WordPos; ++i) {
    -      unsigned Index = WordPos - i;
    -      if (Bits[Index] == 0)
    -        continue;
    -      return (Index + 1) * BITWORD_SIZE - countLeadingZeros(Bits[Index]) - 1;
    -    }
    -    return -1;
    +  /// find_next_unset - Returns the index of the next unset bit following the
    +  /// "Prev" bit.  Returns -1 if all remaining bits are set.
    +  int find_next_unset(unsigned Prev) const {
    +    return find_first_unset_in(Prev + 1, Size);
    +  }
    +
    +  /// find_last_unset - Returns the index of the last unset bit, -1 if all of
    +  /// the bits are set.
    +  int find_last_unset() const { return find_last_unset_in(0, Size); }
    +
    +  /// find_prev_unset - Returns the index of the first unset bit that precedes
    +  /// the bit at \p PriorTo.  Returns -1 if all previous bits are set.
    +  int find_prev_unset(unsigned PriorTo) {
    +    return find_last_unset_in(0, PriorTo);
       }
     
       /// clear - Removes all bits from the bitvector. Does not change capacity.
    
    Modified: vendor/llvm/dist/include/llvm/ADT/PostOrderIterator.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/PostOrderIterator.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/PostOrderIterator.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -96,24 +96,14 @@ template ,
           public po_iterator_storage {
    -  typedef std::iterator super;
    -  typedef typename GT::NodeRef NodeRef;
    -  typedef typename GT::ChildIteratorType ChildItTy;
    +  using super = std::iterator;
    +  using NodeRef = typename GT::NodeRef;
    +  using ChildItTy = typename GT::ChildIteratorType;
     
       // VisitStack - Used to maintain the ordering.  Top = current block
       // First element is basic block pointer, second is the 'next child' to visit
       std::vector> VisitStack;
     
    -  void traverseChild() {
    -    while (VisitStack.back().second != GT::child_end(VisitStack.back().first)) {
    -      NodeRef BB = *VisitStack.back().second++;
    -      if (this->insertEdge(Optional(VisitStack.back().first), BB)) {
    -        // If the block is not visited...
    -        VisitStack.push_back(std::make_pair(BB, GT::child_begin(BB)));
    -      }
    -    }
    -  }
    -
       po_iterator(NodeRef BB) {
         this->insertEdge(Optional(), BB);
         VisitStack.push_back(std::make_pair(BB, GT::child_begin(BB)));
    @@ -134,8 +124,18 @@ class po_iterator
           : po_iterator_storage(S) {
       } // End is when stack is empty.
     
    +  void traverseChild() {
    +    while (VisitStack.back().second != GT::child_end(VisitStack.back().first)) {
    +      NodeRef BB = *VisitStack.back().second++;
    +      if (this->insertEdge(Optional(VisitStack.back().first), BB)) {
    +        // If the block is not visited...
    +        VisitStack.push_back(std::make_pair(BB, GT::child_begin(BB)));
    +      }
    +    }
    +  }
    +
     public:
    -  typedef typename super::pointer pointer;
    +  using pointer = typename super::pointer;
     
       // Provide static "constructors"...
       static po_iterator begin(GraphT G) {
    @@ -286,7 +286,8 @@ inverse_post_order_ext(const T &G, SetTy
     
     template>
     class ReversePostOrderTraversal {
    -  typedef typename GT::NodeRef NodeRef;
    +  using NodeRef = typename GT::NodeRef;
    +
       std::vector Blocks; // Block list in normal PO order
     
       void Initialize(NodeRef BB) {
    @@ -294,7 +295,7 @@ class ReversePostOrderTraversal {
       }
     
     public:
    -  typedef typename std::vector::reverse_iterator rpo_iterator;
    +  using rpo_iterator = typename std::vector::reverse_iterator;
     
       ReversePostOrderTraversal(GraphT G) { Initialize(GT::getEntryNode(G)); }
     
    
    Modified: vendor/llvm/dist/include/llvm/ADT/PriorityWorklist.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/PriorityWorklist.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/PriorityWorklist.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -17,13 +17,14 @@
     #define LLVM_ADT_PRIORITYWORKLIST_H
     
     #include "llvm/ADT/DenseMap.h"
    -#include "llvm/ADT/STLExtras.h"
    -#include "llvm/ADT/Sequence.h"
     #include "llvm/ADT/SmallVector.h"
    +#include "llvm/ADT/STLExtras.h"
     #include "llvm/Support/Compiler.h"
     #include 
     #include 
     #include 
    +#include 
    +#include 
     #include 
     
     namespace llvm {
    @@ -55,11 +56,11 @@ template >
     class PriorityWorklist {
     public:
    -  typedef T value_type;
    -  typedef T key_type;
    -  typedef T& reference;
    -  typedef const T& const_reference;
    -  typedef typename MapT::size_type size_type;
    +  using value_type = T;
    +  using key_type = T;
    +  using reference = T&;
    +  using const_reference = const T&;
    +  using size_type = typename MapT::size_type;
     
       /// Construct an empty PriorityWorklist
       PriorityWorklist() = default;
    
    Modified: vendor/llvm/dist/include/llvm/ADT/SCCIterator.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/SCCIterator.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/SCCIterator.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -1,4 +1,4 @@
    -//===---- ADT/SCCIterator.h - Strongly Connected Comp. Iter. ----*- C++ -*-===//
    +//===- ADT/SCCIterator.h - Strongly Connected Comp. Iter. -------*- C++ -*-===//
     //
     //                     The LLVM Compiler Infrastructure
     //
    @@ -43,10 +43,10 @@ template , std::forward_iterator_tag,
                              const std::vector, ptrdiff_t> {
    -  typedef typename GT::NodeRef NodeRef;
    -  typedef typename GT::ChildIteratorType ChildItTy;
    -  typedef std::vector SccTy;
    -  typedef typename scc_iterator::reference reference;
    +  using NodeRef = typename GT::NodeRef;
    +  using ChildItTy = typename GT::ChildIteratorType;
    +  using SccTy = std::vector;
    +  using reference = typename scc_iterator::reference;
     
       /// Element of VisitStack during DFS.
       struct StackElement {
    
    Modified: vendor/llvm/dist/include/llvm/ADT/Sequence.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/Sequence.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/Sequence.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -13,27 +13,31 @@
     ///
     //===----------------------------------------------------------------------===//
     
    -#ifndef LLVM_ADT_SEQ_H
    -#define LLVM_ADT_SEQ_H
    +#ifndef LLVM_ADT_SEQUENCE_H
    +#define LLVM_ADT_SEQUENCE_H
     
     #include "llvm/ADT/iterator.h"
     #include "llvm/ADT/iterator_range.h"
    +#include 
    +#include 
    +#include 
     
     namespace llvm {
     
     namespace detail {
    +
     template 
     class value_sequence_iterator
         : public iterator_facade_base,
                                       std::random_access_iterator_tag,
                                       const ValueT> {
    -  typedef typename value_sequence_iterator::iterator_facade_base BaseT;
    +  using BaseT = typename value_sequence_iterator::iterator_facade_base;
     
       ValueT Value;
     
     public:
    -  typedef typename BaseT::difference_type difference_type;
    -  typedef typename BaseT::reference reference;
    +  using difference_type = typename BaseT::difference_type;
    +  using reference = typename BaseT::reference;
     
       value_sequence_iterator() = default;
       value_sequence_iterator(const value_sequence_iterator &) = default;
    @@ -65,7 +69,8 @@ public:
     
       reference operator*() const { return Value; }
     };
    -} // End detail namespace.
    +
    +} // end namespace detail
     
     template 
     iterator_range> seq(ValueT Begin,
    @@ -74,6 +79,6 @@ iterator_range(End));
     }
     
    -}
    +} // end namespace llvm
     
    -#endif
    +#endif // LLVM_ADT_SEQUENCE_H
    
    Modified: vendor/llvm/dist/include/llvm/ADT/SetVector.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/SetVector.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/SetVector.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -40,17 +40,17 @@ template >
     class SetVector {
     public:
    -  typedef T value_type;
    -  typedef T key_type;
    -  typedef T& reference;
    -  typedef const T& const_reference;
    -  typedef Set set_type;
    -  typedef Vector vector_type;
    -  typedef typename vector_type::const_iterator iterator;
    -  typedef typename vector_type::const_iterator const_iterator;
    -  typedef typename vector_type::const_reverse_iterator reverse_iterator;
    -  typedef typename vector_type::const_reverse_iterator const_reverse_iterator;
    -  typedef typename vector_type::size_type size_type;
    +  using value_type = T;
    +  using key_type = T;
    +  using reference = T&;
    +  using const_reference = const T&;
    +  using set_type = Set;
    +  using vector_type = Vector;
    +  using iterator = typename vector_type::const_iterator;
    +  using const_iterator = typename vector_type::const_iterator;
    +  using reverse_iterator = typename vector_type::const_reverse_iterator;
    +  using const_reverse_iterator = typename vector_type::const_reverse_iterator;
    +  using size_type = typename vector_type::size_type;
     
       /// \brief Construct an empty SetVector
       SetVector() = default;
    
    Modified: vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -134,6 +134,19 @@ private:
       }
     
     public:
    +  typedef const_set_bits_iterator_impl const_set_bits_iterator;
    +  typedef const_set_bits_iterator set_iterator;
    +
    +  const_set_bits_iterator set_bits_begin() const {
    +    return const_set_bits_iterator(*this);
    +  }
    +  const_set_bits_iterator set_bits_end() const {
    +    return const_set_bits_iterator(*this, -1);
    +  }
    +  iterator_range set_bits() const {
    +    return make_range(set_bits_begin(), set_bits_end());
    +  }
    +
       /// Creates an empty bitvector.
       SmallBitVector() : X(1) {}
     
    
    Modified: vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -27,15 +27,13 @@
     #include 
     #include 
     
    -#if LLVM_ENABLE_ABI_BREAKING_CHECKS
     namespace llvm {
    +
    +#if LLVM_ENABLE_ABI_BREAKING_CHECKS
     template  struct ReverseIterate { static bool value; };
     template  bool ReverseIterate::value = false;
    -}
     #endif
     
    -namespace llvm {
    -
     /// SmallPtrSetImplBase - This is the common code shared among all the
     /// SmallPtrSet<>'s, which is almost everything.  SmallPtrSet has two modes, one
     /// for small and one for large sets.
    @@ -92,7 +90,7 @@ protected:
       }
     
     public:
    -  typedef unsigned size_type;
    +  using size_type = unsigned;
     
       SmallPtrSetImplBase &operator=(const SmallPtrSetImplBase &) = delete;
     
    @@ -273,14 +271,14 @@ protected:
     /// SmallPtrSetIterator - This implements a const_iterator for SmallPtrSet.
     template
     class SmallPtrSetIterator : public SmallPtrSetIteratorImpl {
    -  typedef PointerLikeTypeTraits PtrTraits;
    +  using PtrTraits = PointerLikeTypeTraits;
     
     public:
    -  typedef PtrTy                     value_type;
    -  typedef PtrTy                     reference;
    -  typedef PtrTy                     pointer;
    -  typedef std::ptrdiff_t            difference_type;
    -  typedef std::forward_iterator_tag iterator_category;
    +  using value_type = PtrTy;
    +  using reference = PtrTy;
    +  using pointer = PtrTy;
    +  using difference_type = std::ptrdiff_t;
    +  using iterator_category = std::forward_iterator_tag;
     
       explicit SmallPtrSetIterator(const void *const *BP, const void *const *E)
         : SmallPtrSetIteratorImpl(BP, E) {}
    @@ -351,8 +349,8 @@ struct RoundUpToPowerOfTwo {
     template 
     class SmallPtrSetImpl : public SmallPtrSetImplBase {
       using ConstPtrType = typename add_const_past_pointer::type;
    -  typedef PointerLikeTypeTraits PtrTraits;
    -  typedef PointerLikeTypeTraits ConstPtrTraits;
    +  using PtrTraits = PointerLikeTypeTraits;
    +  using ConstPtrTraits = PointerLikeTypeTraits;
     
     protected:
       // Constructors that forward to the base.
    @@ -365,8 +363,8 @@ protected:
           : SmallPtrSetImplBase(SmallStorage, SmallSize) {}
     
     public:
    -  typedef SmallPtrSetIterator iterator;
    -  typedef SmallPtrSetIterator const_iterator;
    +  using iterator = SmallPtrSetIterator;
    +  using const_iterator = SmallPtrSetIterator;
     
       SmallPtrSetImpl(const SmallPtrSetImpl &) = delete;
     
    @@ -431,7 +429,7 @@ class SmallPtrSet : public SmallPtrSetIm
       // DenseSet<> instead if you expect many elements in the set.
       static_assert(SmallSize <= 32, "SmallSize should be small");
     
    -  typedef SmallPtrSetImpl BaseT;
    +  using BaseT = SmallPtrSetImpl;
     
       // Make sure that SmallSize is a power of two, round up if not.
       enum { SmallSizePowTwo = RoundUpToPowerOfTwo::Val };
    
    Modified: vendor/llvm/dist/include/llvm/ADT/SmallVector.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/SmallVector.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/SmallVector.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -71,7 +71,7 @@ private:
       // Allocate raw space for N elements of type T.  If T has a ctor or dtor, we
       // don't want it to be automatically run, so we need to represent the space as
       // something else.  Use an array of char of sufficient alignment.
    -  typedef AlignedCharArrayUnion U;
    +  using U = AlignedCharArrayUnion;
       U FirstEl;
       // Space after 'FirstEl' is clobbered, do not add any instance vars after it.
     
    @@ -96,19 +96,19 @@ protected:
       void setEnd(T *P) { this->EndX = P; }
     
     public:
    -  typedef size_t size_type;
    -  typedef ptrdiff_t difference_type;
    -  typedef T value_type;
    -  typedef T *iterator;
    -  typedef const T *const_iterator;
    -
    -  typedef std::reverse_iterator const_reverse_iterator;
    -  typedef std::reverse_iterator reverse_iterator;
    -
    -  typedef T &reference;
    -  typedef const T &const_reference;
    -  typedef T *pointer;
    -  typedef const T *const_pointer;
    +  using size_type = size_t;
    +  using difference_type = ptrdiff_t;
    +  using value_type = T;
    +  using iterator = T *;
    +  using const_iterator = const T *;
    +
    +  using const_reverse_iterator = std::reverse_iterator;
    +  using reverse_iterator = std::reverse_iterator;
    +
    +  using reference = T &;
    +  using const_reference = const T &;
    +  using pointer = T *;
    +  using const_pointer = const T *;
     
       // forward iterator creation methods.
       LLVM_ATTRIBUTE_ALWAYS_INLINE
    @@ -319,12 +319,12 @@ public:
     /// reduce code duplication based on the SmallVector 'N' template parameter.
     template 
     class SmallVectorImpl : public SmallVectorTemplateBase::value> {
    -  typedef SmallVectorTemplateBase::value > SuperClass;
    +  using SuperClass = SmallVectorTemplateBase::value>;
     
     public:
    -  typedef typename SuperClass::iterator iterator;
    -  typedef typename SuperClass::const_iterator const_iterator;
    -  typedef typename SuperClass::size_type size_type;
    +  using iterator = typename SuperClass::iterator;
    +  using const_iterator = typename SuperClass::const_iterator;
    +  using size_type = typename SuperClass::size_type;
     
     protected:
       // Default ctor - Initialize to empty.
    @@ -845,8 +845,7 @@ class SmallVector : public SmallVectorIm
       SmallVectorStorage Storage;
     
     public:
    -  SmallVector() : SmallVectorImpl(N) {
    -  }
    +  SmallVector() : SmallVectorImpl(N) {}
     
       explicit SmallVector(size_t Size, const T &Value = T())
         : SmallVectorImpl(N) {
    @@ -883,16 +882,16 @@ public:
           SmallVectorImpl::operator=(::std::move(RHS));
       }
     
    -  const SmallVector &operator=(SmallVector &&RHS) {
    -    SmallVectorImpl::operator=(::std::move(RHS));
    -    return *this;
    -  }
    -
       SmallVector(SmallVectorImpl &&RHS) : SmallVectorImpl(N) {
         if (!RHS.empty())
           SmallVectorImpl::operator=(::std::move(RHS));
       }
     
    +  const SmallVector &operator=(SmallVector &&RHS) {
    +    SmallVectorImpl::operator=(::std::move(RHS));
    +    return *this;
    +  }
    +
       const SmallVector &operator=(SmallVectorImpl &&RHS) {
         SmallVectorImpl::operator=(::std::move(RHS));
         return *this;
    
    Modified: vendor/llvm/dist/include/llvm/ADT/SparseBitVector.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/SparseBitVector.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/SparseBitVector.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -1,4 +1,4 @@
    -//===- llvm/ADT/SparseBitVector.h - Efficient Sparse BitVector -*- C++ -*- ===//
    +//===- llvm/ADT/SparseBitVector.h - Efficient Sparse BitVector --*- C++ -*-===//
     //
     //                     The LLVM Compiler Infrastructure
     //
    @@ -41,8 +41,8 @@ namespace llvm {
     
     template  struct SparseBitVectorElement {
     public:
    -  typedef unsigned long BitWord;
    -  typedef unsigned size_type;
    +  using BitWord = unsigned long;
    +  using size_type = unsigned;
       enum {
         BITWORD_SIZE = sizeof(BitWord) * CHAR_BIT,
         BITWORDS_PER_ELEMENT = (ElementSize + BITWORD_SIZE - 1) / BITWORD_SIZE,
    @@ -100,7 +100,7 @@ public:
         Bits[Idx / BITWORD_SIZE] |= 1L << (Idx % BITWORD_SIZE);
       }
     
    -  bool test_and_set (unsigned Idx) {
    +  bool test_and_set(unsigned Idx) {
         bool old = test(Idx);
         if (!old) {
           set(Idx);
    @@ -254,9 +254,9 @@ public:
     
     template 
     class SparseBitVector {
    -  typedef std::list> ElementList;
    -  typedef typename ElementList::iterator ElementListIter;
    -  typedef typename ElementList::const_iterator ElementListConstIter;
    +  using ElementList = std::list>;
    +  using ElementListIter = typename ElementList::iterator;
    +  using ElementListConstIter = typename ElementList::const_iterator;
       enum {
         BITWORD_SIZE = SparseBitVectorElement::BITWORD_SIZE
       };
    @@ -421,14 +421,12 @@ class SparseBitVector {
       };
     
     public:
    -  typedef SparseBitVectorIterator iterator;
    +  using iterator = SparseBitVectorIterator;
     
       SparseBitVector() {
         CurrElementIter = Elements.begin();
       }
     
    -  ~SparseBitVector() = default;
    -
       // SparseBitVector copy ctor.
       SparseBitVector(const SparseBitVector &RHS) {
         ElementListConstIter ElementIter = RHS.Elements.begin();
    @@ -440,6 +438,8 @@ public:
         CurrElementIter = Elements.begin ();
       }
     
    +  ~SparseBitVector() = default;
    +
       // Clear.
       void clear() {
         Elements.clear();
    
    Modified: vendor/llvm/dist/include/llvm/ADT/SparseMultiSet.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/SparseMultiSet.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/SparseMultiSet.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -1,4 +1,4 @@
    -//===--- llvm/ADT/SparseMultiSet.h - Sparse multiset ------------*- C++ -*-===//
    +//===- llvm/ADT/SparseMultiSet.h - Sparse multiset --------------*- C++ -*-===//
     //
     //                     The LLVM Compiler Infrastructure
     //
    @@ -101,7 +101,7 @@ class SparseMultiSet {
         unsigned Prev;
         unsigned Next;
     
    -    SMSNode(ValueT D, unsigned P, unsigned N) : Data(D), Prev(P), Next(N) { }
    +    SMSNode(ValueT D, unsigned P, unsigned N) : Data(D), Prev(P), Next(N) {}
     
         /// List tails have invalid Nexts.
         bool isTail() const {
    @@ -118,8 +118,8 @@ class SparseMultiSet {
         bool isValid() const { return Prev != INVALID; }
       };
     
    -  typedef typename KeyFunctorT::argument_type KeyT;
    -  typedef SmallVector DenseT;
    +  using KeyT = typename KeyFunctorT::argument_type;
    +  using DenseT = SmallVector;
       DenseT Dense;
       SparseT *Sparse = nullptr;
       unsigned Universe = 0;
    @@ -183,12 +183,12 @@ class SparseMultiSet {
       }
     
     public:
    -  typedef ValueT value_type;
    -  typedef ValueT &reference;
    -  typedef const ValueT &const_reference;
    -  typedef ValueT *pointer;
    -  typedef const ValueT *const_pointer;
    -  typedef unsigned size_type;
    +  using value_type = ValueT;
    +  using reference = ValueT &;
    +  using const_reference = const ValueT &;
    +  using pointer = ValueT *;
    +  using const_pointer = const ValueT *;
    +  using size_type = unsigned;
     
       SparseMultiSet() = default;
       SparseMultiSet(const SparseMultiSet &) = delete;
    @@ -227,7 +227,7 @@ public:
         unsigned SparseIdx;
     
         iterator_base(SMSPtrTy P, unsigned I, unsigned SI)
    -      : SMS(P), Idx(I), SparseIdx(SI) { }
    +      : SMS(P), Idx(I), SparseIdx(SI) {}
     
         /// Whether our iterator has fallen outside our dense vector.
         bool isEnd() const {
    @@ -248,11 +248,11 @@ public:
         void setNext(unsigned N) { SMS->Dense[Idx].Next = N; }
     
       public:
    -    typedef std::iterator super;
    -    typedef typename super::value_type value_type;
    -    typedef typename super::difference_type difference_type;
    -    typedef typename super::pointer pointer;
    -    typedef typename super::reference reference;
    +    using super = std::iterator;
    +    using value_type = typename super::value_type;
    +    using difference_type = typename super::difference_type;
    +    using pointer = typename super::pointer;
    +    using reference = typename super::reference;
     
         reference operator*() const {
           assert(isKeyed() && SMS->sparseIndex(SMS->Dense[Idx].Data) == SparseIdx &&
    @@ -308,11 +308,12 @@ public:
           return I;
         }
       };
    -  typedef iterator_base iterator;
    -  typedef iterator_base const_iterator;
    +
    +  using iterator = iterator_base;
    +  using const_iterator = iterator_base;
     
       // Convenience types
    -  typedef std::pair RangePair;
    +  using RangePair = std::pair;
     
       /// Returns an iterator past this container. Note that such an iterator cannot
       /// be decremented, but will compare equal to other end iterators.
    
    Modified: vendor/llvm/dist/include/llvm/ADT/SparseSet.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/SparseSet.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/SparseSet.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -1,4 +1,4 @@
    -//===--- llvm/ADT/SparseSet.h - Sparse set ----------------------*- C++ -*-===//
    +//===- llvm/ADT/SparseSet.h - Sparse set ------------------------*- C++ -*-===//
     //
     //                     The LLVM Compiler Infrastructure
     //
    @@ -125,9 +125,9 @@ class SparseSet {
                     !std::numeric_limits::is_signed,
                     "SparseT must be an unsigned integer type");
     
    -  typedef typename KeyFunctorT::argument_type KeyT;
    -  typedef SmallVector DenseT;
    -  typedef unsigned size_type;
    +  using KeyT = typename KeyFunctorT::argument_type;
    +  using DenseT = SmallVector;
    +  using size_type = unsigned;
       DenseT Dense;
       SparseT *Sparse = nullptr;
       unsigned Universe = 0;
    @@ -135,11 +135,11 @@ class SparseSet {
       SparseSetValFunctor ValIndexOf;
     
     public:
    -  typedef ValueT value_type;
    -  typedef ValueT &reference;
    -  typedef const ValueT &const_reference;
    -  typedef ValueT *pointer;
    -  typedef const ValueT *const_pointer;
    +  using value_type = ValueT;
    +  using reference = ValueT &;
    +  using const_reference = const ValueT &;
    +  using pointer = ValueT *;
    +  using const_pointer = const ValueT *;
     
       SparseSet() = default;
       SparseSet(const SparseSet &) = delete;
    @@ -168,8 +168,8 @@ public:
       }
     
       // Import trivial vector stuff from DenseT.
    -  typedef typename DenseT::iterator iterator;
    -  typedef typename DenseT::const_iterator const_iterator;
    +  using iterator = typename DenseT::iterator;
    +  using const_iterator = typename DenseT::const_iterator;
     
       const_iterator begin() const { return Dense.begin(); }
       const_iterator end() const { return Dense.end(); }
    
    Modified: vendor/llvm/dist/include/llvm/ADT/StringExtras.h
    ==============================================================================
    --- vendor/llvm/dist/include/llvm/ADT/StringExtras.h	Wed May 17 19:34:36 2017	(r318413)
    +++ vendor/llvm/dist/include/llvm/ADT/StringExtras.h	Wed May 17 20:22:39 2017	(r318414)
    @@ -1,4 +1,4 @@
    -//===-- llvm/ADT/StringExtras.h - Useful string functions -------*- C++ -*-===//
    +//===- llvm/ADT/StringExtras.h - Useful string functions --------*- C++ -*-===//
     //
     //                     The LLVM Compiler Infrastructure
     //
    @@ -15,12 +15,18 @@
     #define LLVM_ADT_STRINGEXTRAS_H
     
     #include "llvm/ADT/StringRef.h"
    -#include "llvm/Support/DataTypes.h"
     #include 
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
     
     namespace llvm {
    -class raw_ostream;
    +
     template class SmallVectorImpl;
    +class raw_ostream;
     
     /// hexdigit - Return the hexadecimal character for the
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Wed May 17 20:22:46 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDA7FD714AD;
     Wed, 17 May 2017 20:22:46 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id A462E1BF4;
     Wed, 17 May 2017 20:22:46 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HKMjpJ015294;
     Wed, 17 May 2017 20:22:45 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HKMjbD015293;
     Wed, 17 May 2017 20:22:45 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705172022.v4HKMjbD015293@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Wed, 17 May 2017 20:22:45 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318415 - vendor/llvm/llvm-trunk-r303291
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 20:22:47 -0000
    
    Author: dim
    Date: Wed May 17 20:22:45 2017
    New Revision: 318415
    URL: https://svnweb.freebsd.org/changeset/base/318415
    
    Log:
      Tag llvm trunk r303291.
    
    Added:
      vendor/llvm/llvm-trunk-r303291/
         - copied from r318414, vendor/llvm/dist/
    
    From owner-svn-src-all@freebsd.org  Wed May 17 20:22:57 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id C359DD7151F;
     Wed, 17 May 2017 20:22:57 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 7D4051CC4;
     Wed, 17 May 2017 20:22:57 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HKMuim015420;
     Wed, 17 May 2017 20:22:56 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HKMuL4015419;
     Wed, 17 May 2017 20:22:56 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705172022.v4HKMuL4015419@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Wed, 17 May 2017 20:22:56 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318417 - vendor/clang/clang-trunk-r303291
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 20:22:57 -0000
    
    Author: dim
    Date: Wed May 17 20:22:56 2017
    New Revision: 318417
    URL: https://svnweb.freebsd.org/changeset/base/318417
    
    Log:
      Tag clang trunk r303291.
    
    Added:
      vendor/clang/clang-trunk-r303291/
         - copied from r318416, vendor/clang/dist/
    
    From owner-svn-src-all@freebsd.org  Wed May 17 20:22:53 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5EA6D7150A;
     Wed, 17 May 2017 20:22:53 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 88F5F1C6E;
     Wed, 17 May 2017 20:22:53 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HKMqOU015373;
     Wed, 17 May 2017 20:22:52 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HKMnbE015346;
     Wed, 17 May 2017 20:22:49 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705172022.v4HKMnbE015346@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Wed, 17 May 2017 20:22:49 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318416 - in vendor/clang/dist: include/clang/AST
     include/clang/Basic include/clang/Frontend include/clang/Sema lib/AST
     lib/CodeGen lib/Driver/ToolChains lib/Frontend lib/Headers lib/Le...
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 20:22:54 -0000
    
    Author: dim
    Date: Wed May 17 20:22:49 2017
    New Revision: 318416
    URL: https://svnweb.freebsd.org/changeset/base/318416
    
    Log:
      Vendor import of clang trunk r303291:
      https://llvm.org/svn/llvm-project/cfe/trunk@303291
    
    Added:
      vendor/clang/dist/test/Modules/Inputs/objcAtKeywordMissingEnd.h   (contents, props changed)
      vendor/clang/dist/test/Modules/objc-at-keyword.m
    Modified:
      vendor/clang/dist/include/clang/AST/Decl.h
      vendor/clang/dist/include/clang/AST/DeclBase.h
      vendor/clang/dist/include/clang/Basic/LangOptions.h
      vendor/clang/dist/include/clang/Basic/SourceManager.h
      vendor/clang/dist/include/clang/Frontend/ASTUnit.h
      vendor/clang/dist/include/clang/Sema/Sema.h
      vendor/clang/dist/lib/AST/ASTDumper.cpp
      vendor/clang/dist/lib/AST/Decl.cpp
      vendor/clang/dist/lib/AST/DeclBase.cpp
      vendor/clang/dist/lib/AST/ODRHash.cpp
      vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp
      vendor/clang/dist/lib/Driver/ToolChains/MSVC.cpp
      vendor/clang/dist/lib/Frontend/ASTUnit.cpp
      vendor/clang/dist/lib/Headers/xmmintrin.h
      vendor/clang/dist/lib/Lex/Lexer.cpp
      vendor/clang/dist/lib/Sema/Sema.cpp
      vendor/clang/dist/lib/Sema/SemaDecl.cpp
      vendor/clang/dist/lib/Sema/SemaLookup.cpp
      vendor/clang/dist/lib/Serialization/ASTReader.cpp
      vendor/clang/dist/test/CodeGenCXX/debug-info-namespace.cpp
      vendor/clang/dist/test/Modules/Inputs/module.map
      vendor/clang/dist/test/Modules/Inputs/submodule-visibility/b.h
      vendor/clang/dist/test/Modules/Inputs/submodule-visibility/other.h
      vendor/clang/dist/test/Modules/odr_hash.cpp
      vendor/clang/dist/test/Modules/submodule-visibility.cpp
    
    Modified: vendor/clang/dist/include/clang/AST/Decl.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/AST/Decl.h	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/include/clang/AST/Decl.h	Wed May 17 20:22:49 2017	(r318416)
    @@ -301,16 +301,6 @@ public:
       using Decl::isModulePrivate;
       using Decl::setModulePrivate;
     
    -  /// \brief Determine whether this declaration is hidden from name lookup.
    -  bool isHidden() const { return Hidden; }
    -
    -  /// \brief Set whether this declaration is hidden from name lookup.
    -  void setHidden(bool Hide) {
    -    assert((!Hide || isFromASTFile() || hasLocalOwningModuleStorage()) &&
    -           "declaration with no owning module can't be hidden");
    -    Hidden = Hide;
    -  }
    -
       /// \brief Determine whether this declaration is a C++ class member.
       bool isCXXClassMember() const {
         const DeclContext *DC = getDeclContext();
    
    Modified: vendor/clang/dist/include/clang/AST/DeclBase.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/AST/DeclBase.h	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/include/clang/AST/DeclBase.h	Wed May 17 20:22:49 2017	(r318416)
    @@ -706,6 +706,20 @@ public:
         reinterpret_cast(this)[-1] = M;
       }
     
    +  Module *getOwningModule() const {
    +    return isFromASTFile() ? getImportedOwningModule() : getLocalOwningModule();
    +  }
    +
    +  /// \brief Determine whether this declaration is hidden from name lookup.
    +  bool isHidden() const { return Hidden; }
    +
    +  /// \brief Set whether this declaration is hidden from name lookup.
    +  void setHidden(bool Hide) {
    +    assert((!Hide || isFromASTFile() || hasLocalOwningModuleStorage()) &&
    +           "declaration with no owning module can't be hidden");
    +    Hidden = Hide;
    +  }
    +
       unsigned getIdentifierNamespace() const {
         return IdentifierNamespace;
       }
    
    Modified: vendor/clang/dist/include/clang/Basic/LangOptions.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/Basic/LangOptions.h	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/include/clang/Basic/LangOptions.h	Wed May 17 20:22:49 2017	(r318416)
    @@ -166,6 +166,11 @@ public:
         return getCompilingModule() != CMK_None;
       }
     
    +  /// Do we need to track the owning module for a local declaration?
    +  bool trackLocalOwningModule() const {
    +    return ModulesLocalVisibility;
    +  }
    +
       bool isSignedOverflowDefined() const {
         return getSignedOverflowBehavior() == SOB_Defined;
       }
    
    Modified: vendor/clang/dist/include/clang/Basic/SourceManager.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/Basic/SourceManager.h	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/include/clang/Basic/SourceManager.h	Wed May 17 20:22:49 2017	(r318416)
    @@ -865,7 +865,7 @@ public:
                                 const FileEntry *NewFile);
     
       /// \brief Returns true if the file contents have been overridden.
    -  bool isFileOverridden(const FileEntry *File) {
    +  bool isFileOverridden(const FileEntry *File) const {
         if (OverriddenFilesInfo) {
           if (OverriddenFilesInfo->OverriddenFilesWithBuffer.count(File))
             return true;
    
    Modified: vendor/clang/dist/include/clang/Frontend/ASTUnit.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/Frontend/ASTUnit.h	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/include/clang/Frontend/ASTUnit.h	Wed May 17 20:22:49 2017	(r318416)
    @@ -419,7 +419,6 @@ private:
       
       explicit ASTUnit(bool MainFileIsAST);
     
    -  void CleanTemporaryFiles();
       bool Parse(std::shared_ptr PCHContainerOps,
                  std::unique_ptr OverrideMainBuffer);
     
    @@ -530,11 +529,6 @@ public:
       ASTMutationListener *getASTMutationListener();
       ASTDeserializationListener *getDeserializationListener();
     
    -  /// \brief Add a temporary file that the ASTUnit depends on.
    -  ///
    -  /// This file will be erased when the ASTUnit is destroyed.
    -  void addTemporaryFile(StringRef TempFile);
    -
       bool getOnlyLocalDecls() const { return OnlyLocalDecls; }
     
       bool getOwnsRemappedFileBuffers() const { return OwnsRemappedFileBuffers; }
    
    Modified: vendor/clang/dist/include/clang/Sema/Sema.h
    ==============================================================================
    --- vendor/clang/dist/include/clang/Sema/Sema.h	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/include/clang/Sema/Sema.h	Wed May 17 20:22:49 2017	(r318416)
    @@ -1467,11 +1467,9 @@ private:
     
       VisibleModuleSet VisibleModules;
     
    -  Module *CachedFakeTopLevelModule;
    -
     public:
       /// \brief Get the module owning an entity.
    -  Module *getOwningModule(Decl *Entity);
    +  Module *getOwningModule(Decl *Entity) { return Entity->getOwningModule(); }
     
       /// \brief Make a merged definition of an existing hidden definition \p ND
       /// visible at the specified location.
    
    Modified: vendor/clang/dist/lib/AST/ASTDumper.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/AST/ASTDumper.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/lib/AST/ASTDumper.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -1038,10 +1038,10 @@ void ASTDumper::dumpDecl(const Decl *D) 
         dumpSourceRange(D->getSourceRange());
         OS << ' ';
         dumpLocation(D->getLocation());
    -    if (Module *M = D->getImportedOwningModule())
    +    if (D->isFromASTFile())
    +      OS << " imported";
    +    if (Module *M = D->getOwningModule())
           OS << " in " << M->getFullModuleName();
    -    else if (Module *M = D->getLocalOwningModule())
    -      OS << " in (local) " << M->getFullModuleName();
         if (auto *ND = dyn_cast(D))
           for (Module *M : D->getASTContext().getModulesWithMergedDefinition(
                    const_cast(ND)))
    
    Modified: vendor/clang/dist/lib/AST/Decl.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/AST/Decl.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/lib/AST/Decl.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -47,9 +47,7 @@ bool Decl::isOutOfLine() const {
     
     TranslationUnitDecl::TranslationUnitDecl(ASTContext &ctx)
         : Decl(TranslationUnit, nullptr, SourceLocation()),
    -      DeclContext(TranslationUnit), Ctx(ctx), AnonymousNamespace(nullptr) {
    -  Hidden = Ctx.getLangOpts().ModulesLocalVisibility;
    -}
    +      DeclContext(TranslationUnit), Ctx(ctx), AnonymousNamespace(nullptr) {}
     
     //===----------------------------------------------------------------------===//
     // NamedDecl Implementation
    
    Modified: vendor/clang/dist/lib/AST/DeclBase.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/AST/DeclBase.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/lib/AST/DeclBase.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -75,7 +75,7 @@ void *Decl::operator new(std::size_t Siz
       assert(!Parent || &Parent->getParentASTContext() == &Ctx);
       // With local visibility enabled, we track the owning module even for local
       // declarations.
    -  if (Ctx.getLangOpts().ModulesLocalVisibility) {
    +  if (Ctx.getLangOpts().trackLocalOwningModule()) {
         // Ensure required alignment of the resulting object by adding extra
         // padding at the start if required.
         size_t ExtraAlign =
    @@ -83,7 +83,9 @@ void *Decl::operator new(std::size_t Siz
         char *Buffer = reinterpret_cast(
             ::operator new(ExtraAlign + sizeof(Module *) + Size + Extra, Ctx));
         Buffer += ExtraAlign;
    -    return new (Buffer) Module*(nullptr) + 1;
    +    auto *ParentModule =
    +        Parent ? cast(Parent)->getOwningModule() : nullptr;
    +    return new (Buffer) Module*(ParentModule) + 1;
       }
       return ::operator new(Size + Extra, Ctx);
     }
    @@ -94,7 +96,7 @@ Module *Decl::getOwningModuleSlow() cons
     }
     
     bool Decl::hasLocalOwningModuleStorage() const {
    -  return getASTContext().getLangOpts().ModulesLocalVisibility;
    +  return getASTContext().getLangOpts().trackLocalOwningModule();
     }
     
     const char *Decl::getDeclKindName() const {
    @@ -273,6 +275,8 @@ void Decl::setLexicalDeclContext(DeclCon
         getMultipleDC()->LexicalDC = DC;
       }
       Hidden = cast(DC)->Hidden;
    +  if (Hidden && !isFromASTFile() && hasLocalOwningModuleStorage())
    +    setLocalOwningModule(cast(DC)->getOwningModule());
     }
     
     void Decl::setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC,
    
    Modified: vendor/clang/dist/lib/AST/ODRHash.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/AST/ODRHash.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/lib/AST/ODRHash.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -81,7 +81,35 @@ void ODRHash::AddDeclarationName(Declara
       }
     }
     
    -void ODRHash::AddNestedNameSpecifier(const NestedNameSpecifier *NNS) {}
    +void ODRHash::AddNestedNameSpecifier(const NestedNameSpecifier *NNS) {
    +  assert(NNS && "Expecting non-null pointer.");
    +  const auto *Prefix = NNS->getPrefix();
    +  AddBoolean(Prefix);
    +  if (Prefix) {
    +    AddNestedNameSpecifier(Prefix);
    +  }
    +  auto Kind = NNS->getKind();
    +  ID.AddInteger(Kind);
    +  switch (Kind) {
    +  case NestedNameSpecifier::Identifier:
    +    AddIdentifierInfo(NNS->getAsIdentifier());
    +    break;
    +  case NestedNameSpecifier::Namespace:
    +    AddDecl(NNS->getAsNamespace());
    +    break;
    +  case NestedNameSpecifier::NamespaceAlias:
    +    AddDecl(NNS->getAsNamespaceAlias());
    +    break;
    +  case NestedNameSpecifier::TypeSpec:
    +  case NestedNameSpecifier::TypeSpecWithTemplate:
    +    AddType(NNS->getAsType());
    +    break;
    +  case NestedNameSpecifier::Global:
    +  case NestedNameSpecifier::Super:
    +    break;
    +  }
    +}
    +
     void ODRHash::AddTemplateName(TemplateName Name) {}
     void ODRHash::AddTemplateArgument(TemplateArgument TA) {}
     void ODRHash::AddTemplateParameterList(const TemplateParameterList *TPL) {}
    @@ -335,6 +363,20 @@ public:
         Hash.AddQualType(T);
       }
     
    +  void AddNestedNameSpecifier(const NestedNameSpecifier *NNS) {
    +    Hash.AddBoolean(NNS);
    +    if (NNS) {
    +      Hash.AddNestedNameSpecifier(NNS);
    +    }
    +  }
    +
    +  void AddIdentifierInfo(const IdentifierInfo *II) {
    +    Hash.AddBoolean(II);
    +    if (II) {
    +      Hash.AddIdentifierInfo(II);
    +    }
    +  }
    +
       void VisitQualifiers(Qualifiers Quals) {
         ID.AddInteger(Quals.getAsOpaqueValue());
       }
    @@ -414,6 +456,42 @@ public:
         AddQualType(T->getDecl()->getUnderlyingType().getCanonicalType());
         VisitType(T);
       }
    +
    +  void VisitTagType(const TagType *T) {
    +    AddDecl(T->getDecl());
    +    VisitType(T);
    +  }
    +
    +  void VisitRecordType(const RecordType *T) { VisitTagType(T); }
    +  void VisitEnumType(const EnumType *T) { VisitTagType(T); }
    +
    +  void VisitTypeWithKeyword(const TypeWithKeyword *T) {
    +    ID.AddInteger(T->getKeyword());
    +    VisitType(T);
    +  };
    +
    +  void VisitDependentNameType(const DependentNameType *T) {
    +    AddNestedNameSpecifier(T->getQualifier());
    +    AddIdentifierInfo(T->getIdentifier());
    +    VisitTypeWithKeyword(T);
    +  }
    +
    +  void VisitDependentTemplateSpecializationType(
    +      const DependentTemplateSpecializationType *T) {
    +    AddIdentifierInfo(T->getIdentifier());
    +    AddNestedNameSpecifier(T->getQualifier());
    +    ID.AddInteger(T->getNumArgs());
    +    for (const auto &TA : T->template_arguments()) {
    +      Hash.AddTemplateArgument(TA);
    +    }
    +    VisitTypeWithKeyword(T);
    +  }
    +
    +  void VisitElaboratedType(const ElaboratedType *T) {
    +    AddNestedNameSpecifier(T->getQualifier());
    +    AddQualType(T->getNamedType());
    +    VisitTypeWithKeyword(T);
    +  }
     };
     
     void ODRHash::AddType(const Type *T) {
    
    Modified: vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -2860,7 +2860,7 @@ void CGDebugInfo::collectFunctionDeclPro
     
       if (DebugKind >= codegenoptions::LimitedDebugInfo) {
         if (const NamespaceDecl *NSDecl =
    -        dyn_cast_or_null(FD->getLexicalDeclContext()))
    +        dyn_cast_or_null(FD->getDeclContext()))
           FDContext = getOrCreateNamespace(NSDecl);
         else if (const RecordDecl *RDecl =
                  dyn_cast_or_null(FD->getDeclContext())) {
    
    Modified: vendor/clang/dist/lib/Driver/ToolChains/MSVC.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/Driver/ToolChains/MSVC.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/lib/Driver/ToolChains/MSVC.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -125,8 +125,15 @@ static bool findVCToolChainViaEnvironmen
             continue;
     
           // whatever/VC/bin --> old toolchain, VC dir is toolchain dir.
    -      if (llvm::sys::path::filename(PathEntry) == "bin") {
    -        llvm::StringRef ParentPath = llvm::sys::path::parent_path(PathEntry);
    +      llvm::StringRef TestPath = PathEntry;
    +      bool IsBin = llvm::sys::path::filename(TestPath).equals_lower("bin");
    +      if (!IsBin) {
    +        // Strip any architecture subdir like "amd64".
    +        TestPath = llvm::sys::path::parent_path(TestPath);
    +        IsBin = llvm::sys::path::filename(TestPath).equals_lower("bin");
    +      }
    +      if (IsBin) {
    +        llvm::StringRef ParentPath = llvm::sys::path::parent_path(TestPath);
             if (llvm::sys::path::filename(ParentPath) == "VC") {
               Path = ParentPath;
               IsVS2017OrNewer = false;
    
    Modified: vendor/clang/dist/lib/Frontend/ASTUnit.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/Frontend/ASTUnit.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/lib/Frontend/ASTUnit.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -84,13 +84,6 @@ namespace {
         /// \brief The file in which the precompiled preamble is stored.
         std::string PreambleFile;
     
    -    /// \brief Temporary files that should be removed when the ASTUnit is
    -    /// destroyed.
    -    SmallVector TemporaryFiles;
    -
    -    /// \brief Erase temporary files.
    -    void CleanTemporaryFiles();
    -
         /// \brief Erase the preamble file.
         void CleanPreambleFile();
     
    @@ -163,12 +156,6 @@ static const std::string &getPreambleFil
       return getOnDiskData(AU).PreambleFile;  
     }
     
    -void OnDiskData::CleanTemporaryFiles() {
    -  for (StringRef File : TemporaryFiles)
    -    llvm::sys::fs::remove(File);
    -  TemporaryFiles.clear();
    -}
    -
     void OnDiskData::CleanPreambleFile() {
       if (!PreambleFile.empty()) {
         llvm::sys::fs::remove(PreambleFile);
    @@ -177,7 +164,6 @@ void OnDiskData::CleanPreambleFile() {
     }
     
     void OnDiskData::Cleanup() {
    -  CleanTemporaryFiles();
       CleanPreambleFile();
     }
     
    @@ -194,14 +180,6 @@ void ASTUnit::clearFileLevelDecls() {
       llvm::DeleteContainerSeconds(FileDecls);
     }
     
    -void ASTUnit::CleanTemporaryFiles() {
    -  getOnDiskData(this).CleanTemporaryFiles();
    -}
    -
    -void ASTUnit::addTemporaryFile(StringRef TempFile) {
    -  getOnDiskData(this).TemporaryFiles.push_back(TempFile);
    -}
    -
     /// \brief After failing to build a precompiled preamble (due to
     /// errors in the source that occurs in the preamble), the number of
     /// reparses during which we'll skip even trying to precompile the
    @@ -1100,7 +1078,6 @@ bool ASTUnit::Parse(std::shared_ptr
     ///
     /// \code
    -/// void _mm_extract_pi(__m64 a, int n);
    +/// int _mm_extract_pi16(__m64 a, int n);
     /// \endcode
     ///
     /// This intrinsic corresponds to the  VPEXTRW / PEXTRW  instruction.
    @@ -2157,7 +2157,7 @@ void _mm_sfence(void);
     /// \headerfile 
     ///
     /// \code
    -/// void _mm_insert_pi(__m64 a, int d, int n);
    +/// __m64 _mm_insert_pi16(__m64 a, int d, int n);
     /// \endcode
     ///
     /// This intrinsic corresponds to the  VPINSRW / PINSRW  instruction.
    @@ -2680,8 +2680,7 @@ _mm_movelh_ps(__m128 __a, __m128 __b)
     ///
     /// \headerfile 
     ///
    -/// This intrinsic corresponds to the  CVTPI2PS + \c COMPOSITE 
    -///   instruction.
    +/// This intrinsic corresponds to the  CVTPI2PS + COMPOSITE  instruction.
     ///
     /// \param __a
     ///    A 64-bit vector of [4 x i16]. The elements of the destination are copied
    @@ -2711,8 +2710,7 @@ _mm_cvtpi16_ps(__m64 __a)
     ///
     /// \headerfile 
     ///
    -/// This intrinsic corresponds to the  CVTPI2PS + \c COMPOSITE 
    -///   instruction.
    +/// This intrinsic corresponds to the  CVTPI2PS + COMPOSITE  instruction.
     ///
     /// \param __a
     ///    A 64-bit vector of 16-bit unsigned integer values. The elements of the
    @@ -2741,8 +2739,7 @@ _mm_cvtpu16_ps(__m64 __a)
     ///
     /// \headerfile 
     ///
    -/// This intrinsic corresponds to the  CVTPI2PS + \c COMPOSITE 
    -///   instruction.
    +/// This intrinsic corresponds to the  CVTPI2PS + COMPOSITE  instruction.
     ///
     /// \param __a
     ///    A 64-bit vector of [8 x i8]. The elements of the destination are copied
    @@ -2766,8 +2763,7 @@ _mm_cvtpi8_ps(__m64 __a)
     ///
     /// \headerfile 
     ///
    -/// This intrinsic corresponds to the  CVTPI2PS + \c COMPOSITE 
    -///   instruction.
    +/// This intrinsic corresponds to the  CVTPI2PS + COMPOSITE  instruction.
     ///
     /// \param __a
     ///    A 64-bit vector of unsigned 8-bit integer values. The elements of the
    @@ -2791,8 +2787,7 @@ _mm_cvtpu8_ps(__m64 __a)
     ///
     /// \headerfile 
     ///
    -/// This intrinsic corresponds to the  CVTPI2PS + \c COMPOSITE 
    -///   instruction.
    +/// This intrinsic corresponds to the  CVTPI2PS + COMPOSITE  instruction.
     ///
     /// \param __a
     ///    A 64-bit vector of [2 x i32]. The lower elements of the destination are
    @@ -2826,8 +2821,7 @@ _mm_cvtpi32x2_ps(__m64 __a, __m64 __b)
     ///
     /// \headerfile 
     ///
    -/// This intrinsic corresponds to the  CVTPS2PI + \c COMPOSITE 
    -///   instruction.
    +/// This intrinsic corresponds to the  CVTPS2PI + COMPOSITE  instruction.
     ///
     /// \param __a
     ///    A 128-bit floating-point vector of [4 x float].
    @@ -2857,8 +2851,7 @@ _mm_cvtps_pi16(__m128 __a)
     ///
     /// \headerfile 
     ///
    -/// This intrinsic corresponds to the  CVTPS2PI + \c COMPOSITE 
    -///   instruction.
    +/// This intrinsic corresponds to the  CVTPS2PI + COMPOSITE  instruction.
     ///
     /// \param __a
     ///    128-bit floating-point vector of [4 x float].
    
    Modified: vendor/clang/dist/lib/Lex/Lexer.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/Lex/Lexer.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/lib/Lex/Lexer.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -43,6 +43,8 @@ using namespace clang;
     
     /// isObjCAtKeyword - Return true if we have an ObjC keyword identifier.
     bool Token::isObjCAtKeyword(tok::ObjCKeywordKind objcKey) const {
    +  if (isAnnotation())
    +    return false;
       if (IdentifierInfo *II = getIdentifierInfo())
         return II->getObjCKeywordID() == objcKey;
       return false;
    @@ -50,6 +52,8 @@ bool Token::isObjCAtKeyword(tok::ObjCKey
     
     /// getObjCKeywordID - Return the ObjC keyword kind.
     tok::ObjCKeywordKind Token::getObjCKeywordID() const {
    +  if (isAnnotation())
    +    return tok::objc_not_keyword;
       IdentifierInfo *specId = getIdentifierInfo();
       return specId ? specId->getObjCKeywordID() : tok::objc_not_keyword;
     }
    
    Modified: vendor/clang/dist/lib/Sema/Sema.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/Sema/Sema.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/lib/Sema/Sema.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -93,11 +93,10 @@ Sema::Sema(Preprocessor &pp, ASTContext 
           ValueWithBytesObjCTypeMethod(nullptr), NSArrayDecl(nullptr),
           ArrayWithObjectsMethod(nullptr), NSDictionaryDecl(nullptr),
           DictionaryWithObjectsMethod(nullptr), GlobalNewDeleteDeclared(false),
    -      TUKind(TUKind), NumSFINAEErrors(0), CachedFakeTopLevelModule(nullptr),
    -      AccessCheckingSFINAE(false), InNonInstantiationSFINAEContext(false),
    -      NonInstantiationEntries(0), ArgumentPackSubstitutionIndex(-1),
    -      CurrentInstantiationScope(nullptr), DisableTypoCorrection(false),
    -      TyposCorrected(0), AnalysisWarnings(*this),
    +      TUKind(TUKind), NumSFINAEErrors(0), AccessCheckingSFINAE(false),
    +      InNonInstantiationSFINAEContext(false), NonInstantiationEntries(0),
    +      ArgumentPackSubstitutionIndex(-1), CurrentInstantiationScope(nullptr),
    +      DisableTypoCorrection(false), TyposCorrected(0), AnalysisWarnings(*this),
           ThreadSafetyDeclCache(nullptr), VarDataSharingAttributesStack(nullptr),
           CurScope(nullptr), Ident_super(nullptr), Ident___float128(nullptr) {
       TUScope = nullptr;
    
    Modified: vendor/clang/dist/lib/Sema/SemaDecl.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/Sema/SemaDecl.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/lib/Sema/SemaDecl.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -16047,6 +16047,14 @@ void Sema::ActOnModuleBegin(SourceLocati
         ModuleScopes.back().OuterVisibleModules = std::move(VisibleModules);
     
       VisibleModules.setVisible(Mod, DirectiveLoc);
    +
    +  // The enclosing context is now part of this module.
    +  // FIXME: Consider creating a child DeclContext to hold the entities
    +  // lexically within the module.
    +  if (getLangOpts().trackLocalOwningModule()) {
    +    cast(CurContext)->setHidden(true);
    +    cast(CurContext)->setLocalOwningModule(Mod);
    +  }
     }
     
     void Sema::ActOnModuleEnd(SourceLocation EomLoc, Module *Mod) {
    @@ -16075,6 +16083,13 @@ void Sema::ActOnModuleEnd(SourceLocation
         DirectiveLoc = EomLoc;
       }
       BuildModuleInclude(DirectiveLoc, Mod);
    +
    +  // Any further declarations are in whatever module we returned to.
    +  if (getLangOpts().trackLocalOwningModule()) {
    +    cast(CurContext)->setLocalOwningModule(getCurrentModule());
    +    if (!getCurrentModule())
    +      cast(CurContext)->setHidden(false);
    +  }
     }
     
     void Sema::createImplicitModuleImportForErrorRecovery(SourceLocation Loc,
    
    Modified: vendor/clang/dist/lib/Sema/SemaLookup.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/Sema/SemaLookup.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/lib/Sema/SemaLookup.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -1326,62 +1326,6 @@ bool Sema::CppLookupName(LookupResult &R
       return !R.empty();
     }
     
    -Module *Sema::getOwningModule(Decl *Entity) {
    -  // If it's imported, grab its owning module.
    -  Module *M = Entity->getImportedOwningModule();
    -  if (M || !isa(Entity) || !cast(Entity)->isHidden())
    -    return M;
    -  assert(!Entity->isFromASTFile() &&
    -         "hidden entity from AST file has no owning module");
    -
    -  if (!getLangOpts().ModulesLocalVisibility) {
    -    // If we're not tracking visibility locally, the only way a declaration
    -    // can be hidden and local is if it's hidden because it's parent is (for
    -    // instance, maybe this is a lazily-declared special member of an imported
    -    // class).
    -    auto *Parent = cast(Entity->getDeclContext());
    -    assert(Parent->isHidden() && "unexpectedly hidden decl");
    -    return getOwningModule(Parent);
    -  }
    -
    -  // It's local and hidden; grab or compute its owning module.
    -  M = Entity->getLocalOwningModule();
    -  if (M)
    -    return M;
    -
    -  if (auto *Containing =
    -          PP.getModuleContainingLocation(Entity->getLocation())) {
    -    M = Containing;
    -  } else if (Entity->isInvalidDecl() || Entity->getLocation().isInvalid()) {
    -    // Don't bother tracking visibility for invalid declarations with broken
    -    // locations.
    -    cast(Entity)->setHidden(false);
    -  } else {
    -    // We need to assign a module to an entity that exists outside of any
    -    // module, so that we can hide it from modules that we textually enter.
    -    // Invent a fake module for all such entities.
    -    if (!CachedFakeTopLevelModule) {
    -      CachedFakeTopLevelModule =
    -          PP.getHeaderSearchInfo().getModuleMap().findOrCreateModule(
    -              "", nullptr, false, false).first;
    -
    -      auto &SrcMgr = PP.getSourceManager();
    -      SourceLocation StartLoc =
    -          SrcMgr.getLocForStartOfFile(SrcMgr.getMainFileID());
    -      auto &TopLevel = ModuleScopes.empty()
    -                           ? VisibleModules
    -                           : ModuleScopes[0].OuterVisibleModules;
    -      TopLevel.setVisible(CachedFakeTopLevelModule, StartLoc);
    -    }
    -
    -    M = CachedFakeTopLevelModule;
    -  }
    -
    -  if (M)
    -    Entity->setLocalOwningModule(M);
    -  return M;
    -}
    -
     void Sema::makeMergedDefinitionVisible(NamedDecl *ND) {
       if (auto *M = getCurrentModule())
         Context.mergeDefinitionIntoModule(ND, M);
    @@ -1520,7 +1464,6 @@ bool LookupResult::isVisibleSlow(Sema &S
       if (SemaRef.getLangOpts().ModulesLocalVisibility) {
         DeclModule = SemaRef.getOwningModule(D);
         if (!DeclModule) {
    -      // getOwningModule() may have decided the declaration should not be hidden.
           assert(!D->isHidden() && "hidden decl not from a module");
           return true;
         }
    
    Modified: vendor/clang/dist/lib/Serialization/ASTReader.cpp
    ==============================================================================
    --- vendor/clang/dist/lib/Serialization/ASTReader.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/lib/Serialization/ASTReader.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -9348,12 +9348,6 @@ void ASTReader::diagnoseOdrViolations() 
             return Hash.CalculateHash();
           };
     
    -      auto ComputeDeclNameODRHash = [&Hash](const DeclarationName Name) {
    -        Hash.clear();
    -        Hash.AddDeclarationName(Name);
    -        return Hash.CalculateHash();
    -      };
    -
           auto ComputeQualTypeODRHash = [&Hash](QualType Ty) {
             Hash.clear();
             Hash.AddQualType(Ty);
    @@ -9446,11 +9440,8 @@ void ASTReader::diagnoseOdrViolations() 
     
             QualType FirstType = FirstField->getType();
             QualType SecondType = SecondField->getType();
    -        const TypedefType *FirstTypedef = dyn_cast(FirstType);
    -        const TypedefType *SecondTypedef = dyn_cast(SecondType);
    -
    -        if ((FirstTypedef && !SecondTypedef) ||
    -            (!FirstTypedef && SecondTypedef)) {
    +        if (ComputeQualTypeODRHash(FirstType) !=
    +            ComputeQualTypeODRHash(SecondType)) {
               ODRDiagError(FirstField->getLocation(), FirstField->getSourceRange(),
                            FieldTypeName)
                   << FirstII << FirstType;
    @@ -9462,24 +9453,6 @@ void ASTReader::diagnoseOdrViolations() 
               break;
             }
     
    -        if (FirstTypedef && SecondTypedef) {
    -          unsigned FirstHash = ComputeDeclNameODRHash(
    -              FirstTypedef->getDecl()->getDeclName());
    -          unsigned SecondHash = ComputeDeclNameODRHash(
    -              SecondTypedef->getDecl()->getDeclName());
    -          if (FirstHash != SecondHash) {
    -            ODRDiagError(FirstField->getLocation(),
    -                         FirstField->getSourceRange(), FieldTypeName)
    -                << FirstII << FirstType;
    -            ODRDiagNote(SecondField->getLocation(),
    -                        SecondField->getSourceRange(), FieldTypeName)
    -                << SecondII << SecondType;
    -
    -            Diagnosed = true;
    -            break;
    -          }
    -        }
    -
             const bool IsFirstBitField = FirstField->isBitField();
             const bool IsSecondBitField = SecondField->isBitField();
             if (IsFirstBitField != IsSecondBitField) {
    
    Modified: vendor/clang/dist/test/CodeGenCXX/debug-info-namespace.cpp
    ==============================================================================
    --- vendor/clang/dist/test/CodeGenCXX/debug-info-namespace.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/test/CodeGenCXX/debug-info-namespace.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -60,6 +60,10 @@ void B::func_fwd() {
       anonymous = 0;
     }
     
    +namespace C {
    +  void c();
    +}
    +void C::c() {}
     
     // This should work even if 'i' and 'func' were declarations & not definitions,
     // but it doesn't yet.
    @@ -114,6 +118,8 @@ void B::func_fwd() {
     // CHECK: [[M16]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FUNC_FWD:![0-9]+]]
     // CHECK: [[FUNC_FWD]] = distinct !DISubprogram(name: "func_fwd",{{.*}} line: 53,{{.*}} isDefinition: true
     // CHECK: [[M17]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[CTXT]], entity: [[I]]
    +// CHECK: distinct !DISubprogram(name: "c",{{.*}}, scope: ![[C:[0-9]+]],{{.*}}, line: 60,{{.*}} isDefinition: true
    +// CHECK: ![[C]] = !DINamespace(name: "C",
     
     // CHECK-GMLT: [[CU:![0-9]+]] = distinct !DICompileUnit(
     // CHECK-GMLT-SAME:                            emissionKind: LineTablesOnly,
    
    Modified: vendor/clang/dist/test/Modules/Inputs/module.map
    ==============================================================================
    --- vendor/clang/dist/test/Modules/Inputs/module.map	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/test/Modules/Inputs/module.map	Wed May 17 20:22:49 2017	(r318416)
    @@ -441,3 +441,7 @@ module DebugNestedB {
       header "DebugNestedB.h"
       export *
     }
    +
    +module objcAtKeywordMissingEnd {
    +  header "objcAtKeywordMissingEnd.h"
    +}
    
    Added: vendor/clang/dist/test/Modules/Inputs/objcAtKeywordMissingEnd.h
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/clang/dist/test/Modules/Inputs/objcAtKeywordMissingEnd.h	Wed May 17 20:22:49 2017	(r318416)
    @@ -0,0 +1,3 @@
    +@interface MissingEnd // expected-note {{class started here}}
    +
    +@ // expected-error {{expected an Objective-C directive after '@'}} expected-error {{missing '@end'}}
    
    Modified: vendor/clang/dist/test/Modules/Inputs/submodule-visibility/b.h
    ==============================================================================
    --- vendor/clang/dist/test/Modules/Inputs/submodule-visibility/b.h	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/test/Modules/Inputs/submodule-visibility/b.h	Wed May 17 20:22:49 2017	(r318416)
    @@ -4,7 +4,11 @@ int m = n;
     #include "c.h"
     
     #if defined(A) && !defined(ALLOW_NAME_LEAKAGE)
    -#error A is defined
    +#warning A is defined
     #endif
     
     #define B
    +
    +template void b_template() {
    +  N::C::f(0);
    +}
    
    Modified: vendor/clang/dist/test/Modules/Inputs/submodule-visibility/other.h
    ==============================================================================
    --- vendor/clang/dist/test/Modules/Inputs/submodule-visibility/other.h	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/test/Modules/Inputs/submodule-visibility/other.h	Wed May 17 20:22:49 2017	(r318416)
    @@ -1 +1,10 @@
     #include "c.h"
    +
    +#ifndef OTHER_H
    +#define OTHER_H
    +namespace N {
    +  struct C {
    +    template static void f(U) {}
    +  };
    +}
    +#endif
    
    Added: vendor/clang/dist/test/Modules/objc-at-keyword.m
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/clang/dist/test/Modules/objc-at-keyword.m	Wed May 17 20:22:49 2017	(r318416)
    @@ -0,0 +1,7 @@
    +// RUN: rm -rf %t
    +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -verify -x objective-c -fmodule-name=objcAtKeywordMissingEnd -emit-module %S/Inputs/module.map
    +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=Empty -emit-module %S/Inputs/module.map
    +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -verify -I %S/Inputs %s
    +
    +@interface X // expected-note {{class started here}}
    +#pragma clang module import Empty // expected-error {{missing '@end'}}
    
    Modified: vendor/clang/dist/test/Modules/odr_hash.cpp
    ==============================================================================
    --- vendor/clang/dist/test/Modules/odr_hash.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/test/Modules/odr_hash.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -634,6 +634,237 @@ S3 s3;
     #endif
     }  // namespace Using
     
    +namespace RecordType {
    +#if defined(FIRST)
    +struct B1 {};
    +struct S1 {
    +  B1 x;
    +};
    +#elif defined(SECOND)
    +struct A1 {};
    +struct S1 {
    +  A1 x;
    +};
    +#else
    +S1 s1;
    +// expected-error@first.h:* {{'RecordType::S1::x' from module 'FirstModule' is not present in definition of 'RecordType::S1' in module 'SecondModule'}}
    +// expected-note@second.h:* {{declaration of 'x' does not match}}
    +#endif
    +}
    +
    +namespace DependentType {
    +#if defined(FIRST)
    +template 
    +class S1 {
    +  typename T::typeA x;
    +};
    +#elif defined(SECOND)
    +template 
    +class S1 {
    +  typename T::typeB x;
    +};
    +#else
    +template
    +using U1 = S1;
    +// expected-error@first.h:* {{'DependentType::S1::x' from module 'FirstModule' is not present in definition of 'S1' in module 'SecondModule'}}
    +// expected-note@second.h:* {{declaration of 'x' does not match}}
    +#endif
    +}
    +
    +namespace ElaboratedType {
    +#if defined(FIRST)
    +namespace N1 { using type = double; }
    +struct S1 {
    +  N1::type x;
    +};
    +#elif defined(SECOND)
    +namespace N1 { using type = int; }
    +struct S1 {
    +  N1::type x;
    +};
    +#else
    +S1 s1;
    +// expected-error@first.h:* {{'ElaboratedType::S1::x' from module 'FirstModule' is not present in definition of 'ElaboratedType::S1' in module 'SecondModule'}}
    +// expected-note@second.h:* {{declaration of 'x' does not match}}
    +#endif
    +}
    +
    +namespace Enum {
    +#if defined(FIRST)
    +enum A1 {};
    +struct S1 {
    +  A1 x;
    +};
    +#elif defined(SECOND)
    +enum A2 {};
    +struct S1 {
    +  A2 x;
    +};
    +#else
    +S1 s1;
    +// expected-error@first.h:* {{'Enum::S1::x' from module 'FirstModule' is not present in definition of 'Enum::S1' in module 'SecondModule'}}
    +// expected-note@second.h:* {{declaration of 'x' does not match}}
    +#endif
    +}
    +
    +namespace NestedNamespaceSpecifier {
    +#if defined(FIRST)
    +namespace LevelA1 {
    +using Type = int;
    +}
    +
    +struct S1 {
    +  LevelA1::Type x;
    +};
    +# elif defined(SECOND)
    +namespace LevelB1 {
    +namespace LevelC1 {
    +using Type = int;
    +}
    +}
    +
    +struct S1 {
    +  LevelB1::LevelC1::Type x;
    +};
    +#else
    +S1 s1;
    +// expected-error@second.h:* {{'NestedNamespaceSpecifier::S1' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type 'LevelB1::LevelC1::Type' (aka 'int')}}
    +// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type 'LevelA1::Type' (aka 'int')}}
    +#endif
    +
    +#if defined(FIRST)
    +namespace LevelA2 { using Type = int; }
    +struct S2 {
    +  LevelA2::Type x;
    +};
    +# elif defined(SECOND)
    +struct S2 {
    +  int x;
    +};
    +#else
    +S2 s2;
    +// expected-error@second.h:* {{'NestedNamespaceSpecifier::S2' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type 'int'}}
    +// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type 'LevelA2::Type' (aka 'int')}}
    +#endif
    +
    +namespace LevelA3 { using Type = int; }
    +namespace LevelB3 { using Type = int; }
    +#if defined(FIRST)
    +struct S3 {
    +  LevelA3::Type x;
    +};
    +# elif defined(SECOND)
    +struct S3 {
    +  LevelB3::Type x;
    +};
    +#else
    +S3 s3;
    +// expected-error@second.h:* {{'NestedNamespaceSpecifier::S3' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type 'LevelB3::Type' (aka 'int')}}
    +// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type 'LevelA3::Type' (aka 'int')}}
    +#endif
    +
    +#if defined(FIRST)
    +struct TA4 { using Type = int; };
    +struct S4 {
    +  TA4::Type x;
    +};
    +# elif defined(SECOND)
    +struct TB4 { using Type = int; };
    +struct S4 {
    +  TB4::Type x;
    +};
    +#else
    +S4 s4;
    +// expected-error@second.h:* {{'NestedNamespaceSpecifier::S4' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type 'TB4::Type' (aka 'int')}}
    +// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type 'TA4::Type' (aka 'int')}}
    +#endif
    +
    +#if defined(FIRST)
    +struct T5 { using Type = int; };
    +struct S5 {
    +  T5::Type x;
    +};
    +# elif defined(SECOND)
    +namespace T5 { using Type = int; };
    +struct S5 {
    +  T5::Type x;
    +};
    +#else
    +S5 s5;
    +// expected-error@second.h:* {{'NestedNamespaceSpecifier::S5' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type 'T5::Type' (aka 'int')}}
    +// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type 'T5::Type' (aka 'int')}}
    +#endif
    +
    +#if defined(FIRST)
    +namespace N6 {using I = int;}
    +struct S6 {
    +  NestedNamespaceSpecifier::N6::I x;
    +};
    +# elif defined(SECOND)
    +using I = int;
    +struct S6 {
    +  ::NestedNamespaceSpecifier::I x;
    +};
    +#else
    +S6 s6;
    +// expected-error@second.h:* {{'NestedNamespaceSpecifier::S6' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type '::NestedNamespaceSpecifier::I' (aka 'int')}}
    +// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type 'NestedNamespaceSpecifier::N6::I' (aka 'int')}}
    +#endif
    +
    +#if defined(FIRST)
    +template 
    +class S7 {
    +  typename T::type *x = {};
    +  int z = x->T::foo();
    +};
    +#elif defined(SECOND)
    +template 
    +class S7 {
    +  typename T::type *x = {};
    +  int z = x->U::foo();
    +};
    +#else
    +template 
    +using U7 = S7;
    +// expected-error@second.h:* {{'NestedNamespaceSpecifier::S7' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'z' with an initializer}}
    +// expected-note@first.h:* {{but in 'FirstModule' found field 'z' with a different initializer}}
    +#endif
    +
    +#if defined(FIRST)
    +template 
    +class S8 {
    +  int x = T::template X::value;
    +};
    +#elif defined(SECOND)
    +template 
    +class S8 {
    +  int x = T::template Y::value;
    +};
    +#else
    +template 
    +using U8 = S8;
    +// expected-error@second.h:* {{'NestedNamespaceSpecifier::S8' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with an initializer}}
    +// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with a different initializer}}
    +#endif
    +
    +#if defined(FIRST)
    +namespace N9 { using I = int; }
    +namespace O9 = N9;
    +struct S9 {
    +  O9::I x;
    +};
    +#elif defined(SECOND)
    +namespace N9 { using I = int; }
    +namespace P9 = N9;
    +struct S9 {
    +  P9::I x;
    +};
    +#else
    +S9 s9;
    +// expected-error@second.h:* {{'NestedNamespaceSpecifier::S9' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type 'P9::I' (aka 'int')}}
    +// expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type 'O9::I' (aka 'int')}}
    +#endif
    +}
     
     // Interesting cases that should not cause errors.  struct S should not error
     // while struct T should error at the access specifier mismatch at the end.
    
    Modified: vendor/clang/dist/test/Modules/submodule-visibility.cpp
    ==============================================================================
    --- vendor/clang/dist/test/Modules/submodule-visibility.cpp	Wed May 17 20:22:45 2017	(r318415)
    +++ vendor/clang/dist/test/Modules/submodule-visibility.cpp	Wed May 17 20:22:49 2017	(r318416)
    @@ -3,6 +3,11 @@
     // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-local-submodule-visibility -fmodules-cache-path=%t -I%S/Inputs/submodule-visibility -verify %s -DIMPORT
     // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-local-submodule-visibility -fmodules-cache-path=%t -fmodule-name=x -I%S/Inputs/submodule-visibility -verify %s
     // RUN: %clang_cc1 -fimplicit-module-maps -fmodules-local-submodule-visibility -fmodules-cache-path=%t -I%S/Inputs/submodule-visibility -verify %s
    +//
    +// Explicit module builds.
    +// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -emit-module -x c++-module-map %S/Inputs/submodule-visibility/module.modulemap -fmodule-name=other -o %t/other.pcm
    +// RUN: %clang_cc1 -fmodules -fmodule-map-file=%S/Inputs/submodule-visibility/module.modulemap -fmodules-local-submodule-visibility -fmodule-file=%t/other.pcm -verify -fmodule-name=x -I%S/Inputs/submodule-visibility %s
    +// RUN: %clang_cc1 -fmodules -fmodule-map-file=%S/Inputs/submodule-visibility/module.modulemap -fmodule-file=%t/other.pcm -verify -fmodule-name=x -I%S/Inputs/submodule-visibility %s -DALLOW_TEXTUAL_NAME_LEAKAGE
     
     #include "a.h"
     #include "b.h"
    @@ -11,6 +16,8 @@
     // expected-no-diagnostics
     #elif IMPORT
     // expected-error@-6 {{could not build module 'x'}}
    +#elif ALLOW_TEXTUAL_NAME_LEAKAGE
    +// expected-warning@b.h:7 {{A is defined}}
     #else
     // The use of -fmodule-name=x causes us to textually include the above headers.
     // The submodule visibility rules are still applied in this case.
    @@ -35,3 +42,5 @@ typedef struct {
       int p;                 
       void (*f)(int p);                                                                       
     } name_for_linkage;
    +
    +void g() { b_template(); }
    
    From owner-svn-src-all@freebsd.org  Wed May 17 20:23:00 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CB20D7154C;
     Wed, 17 May 2017 20:23:00 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 0F5BC1CF7;
     Wed, 17 May 2017 20:22:59 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HKMx76015469;
     Wed, 17 May 2017 20:22:59 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HKMwLg015466;
     Wed, 17 May 2017 20:22:58 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705172022.v4HKMwLg015466@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Wed, 17 May 2017 20:22:58 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318418 - in vendor/compiler-rt/dist/lib: asan/tests
     builtins ubsan
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 20:23:00 -0000
    
    Author: dim
    Date: Wed May 17 20:22:58 2017
    New Revision: 318418
    URL: https://svnweb.freebsd.org/changeset/base/318418
    
    Log:
      Vendor import of compiler-rt trunk r303291:
      https://llvm.org/svn/llvm-project/compiler-rt/trunk@303291
    
    Modified:
      vendor/compiler-rt/dist/lib/asan/tests/asan_test_utils.h
      vendor/compiler-rt/dist/lib/builtins/floatdidf.c
      vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt
    
    Modified: vendor/compiler-rt/dist/lib/asan/tests/asan_test_utils.h
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/asan/tests/asan_test_utils.h	Wed May 17 20:22:56 2017	(r318417)
    +++ vendor/compiler-rt/dist/lib/asan/tests/asan_test_utils.h	Wed May 17 20:22:58 2017	(r318418)
    @@ -30,11 +30,11 @@
     #include 
     #include 
     #include 
    +#include 
     
     #if !defined(_WIN32)
     # include 
     # include 
    -# include 
     #endif
     
     #ifdef __linux__
    
    Modified: vendor/compiler-rt/dist/lib/builtins/floatdidf.c
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/builtins/floatdidf.c	Wed May 17 20:22:56 2017	(r318417)
    +++ vendor/compiler-rt/dist/lib/builtins/floatdidf.c	Wed May 17 20:22:58 2017	(r318418)
    @@ -104,7 +104,7 @@ __floatdidf(di_int a)
     }
     #endif
     
    -#if defined(__AEABI__)
    +#if defined(__ARM_EABI__)
     AEABI_RTABI double __aeabi_l2d(di_int a) {
       return __floatdidf(a);
     }
    
    Modified: vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt
    ==============================================================================
    --- vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt	Wed May 17 20:22:56 2017	(r318417)
    +++ vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt	Wed May 17 20:22:58 2017	(r318418)
    @@ -34,6 +34,10 @@ set(UBSAN_CXXFLAGS ${SANITIZER_COMMON_CF
     append_rtti_flag(ON UBSAN_CXXFLAGS)
     append_list_if(SANITIZER_CAN_USE_CXXABI -DUBSAN_CAN_USE_CXXABI UBSAN_CXXFLAGS)
     
    +append_list_if(COMPILER_RT_HAS_LIBDL dl UBSAN_DYNAMIC_LIBS)
    +append_list_if(COMPILER_RT_HAS_LIBRT rt UBSAN_DYNAMIC_LIBS)
    +append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread UBSAN_DYNAMIC_LIBS)
    +
     add_compiler_rt_component(ubsan)
     
     if(APPLE)
    @@ -144,6 +148,27 @@ else()
           CFLAGS ${UBSAN_CXXFLAGS}
           PARENT_TARGET ubsan)
     
    +    add_compiler_rt_runtime(clang_rt.ubsan_standalone
    +      SHARED
    +      ARCHS ${UBSAN_SUPPORTED_ARCH}
    +      OBJECT_LIBS RTSanitizerCommon
    +              RTSanitizerCommonLibc
    +              RTUbsan
    +      CFLAGS ${UBSAN_CFLAGS}
    +      LINK_LIBS ${UBSAN_DYNAMIC_LIBS}
    +      PARENT_TARGET ubsan)
    +
    +    add_compiler_rt_runtime(clang_rt.ubsan_standalone_cxx
    +      SHARED
    +      ARCHS ${UBSAN_SUPPORTED_ARCH}
    +      OBJECT_LIBS RTSanitizerCommon
    +              RTSanitizerCommonLibc
    +              RTUbsan
    +              RTUbsan_cxx
    +      CFLAGS ${UBSAN_CXXFLAGS}
    +      LINK_LIBS ${UBSAN_DYNAMIC_LIBS}
    +      PARENT_TARGET ubsan)
    +
         if (UNIX)
           set(ARCHS_FOR_SYMBOLS ${UBSAN_SUPPORTED_ARCH})
           list(REMOVE_ITEM ARCHS_FOR_SYMBOLS i386 i686)
    
    From owner-svn-src-all@freebsd.org  Wed May 17 20:23:05 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27B7FD715A1;
     Wed, 17 May 2017 20:23:05 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id CF8731D9B;
     Wed, 17 May 2017 20:23:04 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HKN3uV015521;
     Wed, 17 May 2017 20:23:03 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HKN34I015520;
     Wed, 17 May 2017 20:23:03 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705172023.v4HKN34I015520@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Wed, 17 May 2017 20:23:03 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318419 - vendor/compiler-rt/compiler-rt-trunk-r303291
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 20:23:05 -0000
    
    Author: dim
    Date: Wed May 17 20:23:03 2017
    New Revision: 318419
    URL: https://svnweb.freebsd.org/changeset/base/318419
    
    Log:
      Tag compiler-rt trunk r303291.
    
    Added:
      vendor/compiler-rt/compiler-rt-trunk-r303291/
         - copied from r318418, vendor/compiler-rt/dist/
    
    From owner-svn-src-all@freebsd.org  Wed May 17 20:23:08 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1DA2D715E0;
     Wed, 17 May 2017 20:23:08 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 82BB51E0A;
     Wed, 17 May 2017 20:23:08 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HKN7TV015578;
     Wed, 17 May 2017 20:23:07 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HKN6eg015568;
     Wed, 17 May 2017 20:23:06 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705172023.v4HKN6eg015568@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Wed, 17 May 2017 20:23:06 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318420 - in vendor/libc++/dist: include
     test/std/iterators/iterator.primitives/iterator.operations
     test/std/utilities/optional/optional.object/optional.object.ctor test/support
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 20:23:09 -0000
    
    Author: dim
    Date: Wed May 17 20:23:06 2017
    New Revision: 318420
    URL: https://svnweb.freebsd.org/changeset/base/318420
    
    Log:
      Vendor import of libc++ trunk r303291:
      https://llvm.org/svn/llvm-project/libcxx/trunk@303291
    
    Modified:
      vendor/libc++/dist/include/iterator
      vendor/libc++/dist/include/optional
      vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp
      vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/distance.pass.cpp
      vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/next.pass.cpp
      vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp
      vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp
      vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp
      vendor/libc++/dist/test/support/test_iterators.h
    
    Modified: vendor/libc++/dist/include/iterator
    ==============================================================================
    --- vendor/libc++/dist/include/iterator	Wed May 17 20:23:03 2017	(r318419)
    +++ vendor/libc++/dist/include/iterator	Wed May 17 20:23:06 2017	(r318420)
    @@ -64,14 +64,23 @@ struct forward_iterator_tag       : publ
     struct bidirectional_iterator_tag : public forward_iterator_tag       {};
     struct random_access_iterator_tag : public bidirectional_iterator_tag {};
     
    +// 27.4.3, iterator operations
     // extension: second argument not conforming to C++03
    -template 
    -void advance(InputIterator& i,
    +template   // constexpr in C++17
    +  constexpr void advance(InputIterator& i,
                  typename iterator_traits::difference_type n);
     
    -template 
    -typename iterator_traits::difference_type
    -distance(InputIterator first, InputIterator last);
    +template   // constexpr in C++17
    +  constexpr typename iterator_traits::difference_type
    +    distance(InputIterator first, InputIterator last);
    +
    +template   // constexpr in C++17
    +  constexpr InputIterator next(InputIterator x,
    +typename iterator_traits::difference_type n = 1);
    +
    +template   // constexpr in C++17
    +  constexpr BidirectionalIterator prev(BidirectionalIterator x,
    +    typename iterator_traits::difference_type n = 1);    
     
     template 
     class reverse_iterator
    @@ -529,7 +538,7 @@ struct _LIBCPP_TEMPLATE_VIS iterator
     };
     
     template 
    -inline _LIBCPP_INLINE_VISIBILITY
    +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     void __advance(_InputIter& __i,
                  typename iterator_traits<_InputIter>::difference_type __n, input_iterator_tag)
     {
    @@ -538,7 +547,7 @@ void __advance(_InputIter& __i,
     }
     
     template 
    -inline _LIBCPP_INLINE_VISIBILITY
    +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     void __advance(_BiDirIter& __i,
                  typename iterator_traits<_BiDirIter>::difference_type __n, bidirectional_iterator_tag)
     {
    @@ -551,7 +560,7 @@ void __advance(_BiDirIter& __i,
     }
     
     template 
    -inline _LIBCPP_INLINE_VISIBILITY
    +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     void __advance(_RandIter& __i,
                  typename iterator_traits<_RandIter>::difference_type __n, random_access_iterator_tag)
     {
    @@ -559,7 +568,7 @@ void __advance(_RandIter& __i,
     }
     
     template 
    -inline _LIBCPP_INLINE_VISIBILITY
    +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     void advance(_InputIter& __i,
                  typename iterator_traits<_InputIter>::difference_type __n)
     {
    @@ -567,7 +576,7 @@ void advance(_InputIter& __i,
     }
     
     template 
    -inline _LIBCPP_INLINE_VISIBILITY
    +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     typename iterator_traits<_InputIter>::difference_type
     __distance(_InputIter __first, _InputIter __last, input_iterator_tag)
     {
    @@ -578,7 +587,7 @@ __distance(_InputIter __first, _InputIte
     }
     
     template 
    -inline _LIBCPP_INLINE_VISIBILITY
    +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     typename iterator_traits<_RandIter>::difference_type
     __distance(_RandIter __first, _RandIter __last, random_access_iterator_tag)
     {
    @@ -586,7 +595,7 @@ __distance(_RandIter __first, _RandIter 
     }
     
     template 
    -inline _LIBCPP_INLINE_VISIBILITY
    +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     typename iterator_traits<_InputIter>::difference_type
     distance(_InputIter __first, _InputIter __last)
     {
    @@ -594,7 +603,7 @@ distance(_InputIter __first, _InputIter 
     }
     
     template 
    -inline _LIBCPP_INLINE_VISIBILITY
    +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     _InputIter
     next(_InputIter __x,
          typename iterator_traits<_InputIter>::difference_type __n = 1,
    @@ -605,7 +614,7 @@ next(_InputIter __x,
     }
     
     template 
    -inline _LIBCPP_INLINE_VISIBILITY
    +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     _BidiretionalIter
     prev(_BidiretionalIter __x,
          typename iterator_traits<_BidiretionalIter>::difference_type __n = 1,
    
    Modified: vendor/libc++/dist/include/optional
    ==============================================================================
    --- vendor/libc++/dist/include/optional	Wed May 17 20:23:03 2017	(r318419)
    +++ vendor/libc++/dist/include/optional	Wed May 17 20:23:06 2017	(r318420)
    @@ -599,8 +599,8 @@ private:
     public:
     
         _LIBCPP_INLINE_VISIBILITY constexpr optional() noexcept {}
    -    _LIBCPP_INLINE_VISIBILITY optional(const optional&) = default;
    -    _LIBCPP_INLINE_VISIBILITY optional(optional&&) = default;
    +    _LIBCPP_INLINE_VISIBILITY constexpr optional(const optional&) = default;
    +    _LIBCPP_INLINE_VISIBILITY constexpr optional(optional&&) = default;
         _LIBCPP_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {}
     
         template 
     
    +//   All of these became constexpr in C++17
    +//
     // template 
    -//   void advance(Iter& i, Iter::difference_type n);
    +//   constexpr void advance(Iter& i, Iter::difference_type n);
     //
     // template 
    -//   void advance(Iter& i, Iter::difference_type n);
    +//   constexpr void advance(Iter& i, Iter::difference_type n);
     //
     // template 
    -//   void advance(Iter& i, Iter::difference_type n);
    +//   constexpr void advance(Iter& i, Iter::difference_type n);
     
     #include 
     #include 
    @@ -31,8 +33,19 @@ test(It i, typename std::iterator_traits
         assert(i == x);
     }
     
    +#if TEST_STD_VER > 14
    +template 
    +constexpr bool 
    +constepxr_test(It i, typename std::iterator_traits::difference_type n, It x)
    +{
    +    std::advance(i, n);
    +    return i == x;
    +}
    +#endif
    +
     int main()
     {
    +    {
         const char* s = "1234567890";
         test(input_iterator(s), 10, input_iterator(s+10));
         test(forward_iterator(s), 10, forward_iterator(s+10));
    @@ -42,4 +55,18 @@ int main()
         test(random_access_iterator(s+5), -5, random_access_iterator(s));
         test(s+5, 5, s+10);
         test(s+5, -5, s);
    +    }
    +#if TEST_STD_VER > 14
    +    {
    +    constexpr const char* s = "1234567890";
    +    static_assert( constepxr_test(input_iterator(s), 10, input_iterator(s+10)), "" );
    +    static_assert( constepxr_test(forward_iterator(s), 10, forward_iterator(s+10)), "" );
    +    static_assert( constepxr_test(bidirectional_iterator(s+5), 5, bidirectional_iterator(s+10)), "" );
    +    static_assert( constepxr_test(bidirectional_iterator(s+5), -5, bidirectional_iterator(s)), "" );
    +    static_assert( constepxr_test(random_access_iterator(s+5), 5, random_access_iterator(s+10)), "" );
    +    static_assert( constepxr_test(random_access_iterator(s+5), -5, random_access_iterator(s)), "" );
    +    static_assert( constepxr_test(s+5, 5, s+10), "" );
    +    static_assert( constepxr_test(s+5, -5, s), "" );
    +    }
    +#endif
     }
    
    Modified: vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/distance.pass.cpp
    ==============================================================================
    --- vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/distance.pass.cpp	Wed May 17 20:23:03 2017	(r318419)
    +++ vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/distance.pass.cpp	Wed May 17 20:23:06 2017	(r318420)
    @@ -29,12 +29,33 @@ test(It first, It last, typename std::it
         assert(std::distance(first, last) == x);
     }
     
    +#if TEST_STD_VER > 14
    +template 
    +constexpr bool
    +constexpr_test(It first, It last, typename std::iterator_traits::difference_type x)
    +{
    +    return std::distance(first, last) == x;
    +}
    +#endif
    +
     int main()
     {
    +    {
         const char* s = "1234567890";
         test(input_iterator(s), input_iterator(s+10), 10);
         test(forward_iterator(s), forward_iterator(s+10), 10);
         test(bidirectional_iterator(s), bidirectional_iterator(s+10), 10);
         test(random_access_iterator(s), random_access_iterator(s+10), 10);
         test(s, s+10, 10);
    +    }
    +#if TEST_STD_VER > 14
    +    {
    +    constexpr const char* s = "1234567890";
    +    static_assert( constexpr_test(input_iterator(s), input_iterator(s+10), 10), "");
    +    static_assert( constexpr_test(forward_iterator(s), forward_iterator(s+10), 10), "");
    +    static_assert( constexpr_test(bidirectional_iterator(s), bidirectional_iterator(s+10), 10), "");
    +    static_assert( constexpr_test(random_access_iterator(s), random_access_iterator(s+10), 10), "");
    +    static_assert( constexpr_test(s, s+10, 10), "");
    +    }
    +#endif
     }
    
    Modified: vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/next.pass.cpp
    ==============================================================================
    --- vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/next.pass.cpp	Wed May 17 20:23:03 2017	(r318419)
    +++ vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/next.pass.cpp	Wed May 17 20:23:06 2017	(r318420)
    @@ -33,8 +33,25 @@ test(It i, It x)
         assert(std::next(i) == x);
     }
     
    +#if TEST_STD_VER > 14
    +template 
    +constexpr bool
    +constexpr_test(It i, typename std::iterator_traits::difference_type n, It x)
    +{
    +    return std::next(i, n) == x;
    +}
    +
    +template 
    +constexpr bool
    +constexpr_test(It i, It x)
    +{
    +    return std::next(i) == x;
    +}
    +#endif
    +
     int main()
     {
    +    {
         const char* s = "1234567890";
         test(input_iterator(s), 10, input_iterator(s+10));
         test(forward_iterator(s), 10, forward_iterator(s+10));
    @@ -47,4 +64,21 @@ int main()
         test(bidirectional_iterator(s), bidirectional_iterator(s+1));
         test(random_access_iterator(s), random_access_iterator(s+1));
         test(s, s+1);
    +    }
    +#if TEST_STD_VER > 14
    +    {
    +    constexpr const char* s = "1234567890";
    +    static_assert( constexpr_test(input_iterator(s), 10, input_iterator(s+10)), "" );
    +    static_assert( constexpr_test(forward_iterator(s), 10, forward_iterator(s+10)), "" );
    +    static_assert( constexpr_test(bidirectional_iterator(s), 10, bidirectional_iterator(s+10)), "" );
    +    static_assert( constexpr_test(random_access_iterator(s), 10, random_access_iterator(s+10)), "" );
    +    static_assert( constexpr_test(s, 10, s+10), "" );
    +
    +    static_assert( constexpr_test(input_iterator(s), input_iterator(s+1)), "" );
    +    static_assert( constexpr_test(forward_iterator(s), forward_iterator(s+1)), "" );
    +    static_assert( constexpr_test(bidirectional_iterator(s), bidirectional_iterator(s+1)), "" );
    +    static_assert( constexpr_test(random_access_iterator(s), random_access_iterator(s+1)), "" );
    +    static_assert( constexpr_test(s, s+1), "" );
    +    }
    +#endif
     }
    
    Modified: vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp
    ==============================================================================
    --- vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp	Wed May 17 20:23:03 2017	(r318419)
    +++ vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp	Wed May 17 20:23:06 2017	(r318420)
    @@ -31,8 +31,25 @@ test(It i, It x)
         assert(std::prev(i) == x);
     }
     
    +#if TEST_STD_VER > 14
    +template 
    +constexpr bool
    +constexpr_test(It i, typename std::iterator_traits::difference_type n, It x)
    +{
    +    return std::prev(i, n) == x;
    +}
    +
    +template 
    +constexpr bool
    +constexpr_test(It i, It x)
    +{
    +    return std::prev(i) == x;
    +}
    +#endif
    +
     int main()
     {
    +    {
         const char* s = "1234567890";
         test(bidirectional_iterator(s+10), 10, bidirectional_iterator(s));
         test(random_access_iterator(s+10), 10, random_access_iterator(s));
    @@ -41,4 +58,18 @@ int main()
         test(bidirectional_iterator(s+1), bidirectional_iterator(s));
         test(random_access_iterator(s+1), random_access_iterator(s));
         test(s+1, s);
    +    }
    +#if TEST_STD_VER > 14
    +    {
    +    constexpr const char* s = "1234567890";
    +    static_assert( constexpr_test(bidirectional_iterator(s+10), 10, bidirectional_iterator(s)), "" );
    +    static_assert( constexpr_test(random_access_iterator(s+10), 10, random_access_iterator(s)), "" );
    +    static_assert( constexpr_test(s+10, 10, s), "" );
    +
    +    static_assert( constexpr_test(bidirectional_iterator(s+1), bidirectional_iterator(s)), "" );
    +    static_assert( constexpr_test(random_access_iterator(s+1), random_access_iterator(s)), "" );
    +    static_assert( constexpr_test(s+1, s), "" );
    +    }
    +#endif
    +    
     }
    
    Modified: vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp
    ==============================================================================
    --- vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp	Wed May 17 20:23:03 2017	(r318419)
    +++ vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp	Wed May 17 20:23:06 2017	(r318420)
    @@ -10,7 +10,7 @@
     // UNSUPPORTED: c++98, c++03, c++11, c++14
     // 
     
    -// optional(const optional& rhs);
    +// constexpr optional(const optional& rhs);
     
     #include 
     #include 
    @@ -152,4 +152,9 @@ int main()
         {
             test_reference_extension();
         }
    +    {
    +    constexpr std::optional o1{4};
    +    constexpr std::optional o2 = o1;
    +    static_assert( *o2 == 4, "" );
    +    }
     }
    
    Modified: vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp
    ==============================================================================
    --- vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp	Wed May 17 20:23:03 2017	(r318419)
    +++ vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp	Wed May 17 20:23:06 2017	(r318420)
    @@ -18,7 +18,7 @@
     
     // 
     
    -// optional(optional&& rhs);
    +// constexpr optional(optional&& rhs);
     
     #include 
     #include 
    @@ -206,4 +206,9 @@ int main()
         {
             test_reference_extension();
         }
    +    {
    +    constexpr std::optional o1{4};
    +    constexpr std::optional o2 = std::move(o1);
    +    static_assert( *o2 == 4, "" );
    +    }
     }
    
    Modified: vendor/libc++/dist/test/support/test_iterators.h
    ==============================================================================
    --- vendor/libc++/dist/test/support/test_iterators.h	Wed May 17 20:23:03 2017	(r318419)
    +++ vendor/libc++/dist/test/support/test_iterators.h	Wed May 17 20:23:06 2017	(r318420)
    @@ -68,23 +68,23 @@ public:
         typedef It                                                 pointer;
         typedef typename Traits::reference                         reference;
     
    -    It base() const {return it_;}
    +    TEST_CONSTEXPR_CXX14 It base() const {return it_;}
     
    -    input_iterator() : it_() {}
    -    explicit input_iterator(It it) : it_(it) {}
    +    TEST_CONSTEXPR_CXX14 input_iterator() : it_() {}
    +    explicit TEST_CONSTEXPR_CXX14 input_iterator(It it) : it_(it) {}
         template 
    -        input_iterator(const input_iterator& u) :it_(u.it_) {}
    +        TEST_CONSTEXPR_CXX14 input_iterator(const input_iterator& u) :it_(u.it_) {}
     
    -    reference operator*() const {return *it_;}
    -    pointer operator->() const {return it_;}
    +    TEST_CONSTEXPR_CXX14 reference operator*() const {return *it_;}
    +    TEST_CONSTEXPR_CXX14 pointer operator->() const {return it_;}
     
    -    input_iterator& operator++() {++it_; return *this;}
    -    input_iterator operator++(int)
    +    TEST_CONSTEXPR_CXX14 input_iterator& operator++() {++it_; return *this;}
    +    TEST_CONSTEXPR_CXX14 input_iterator operator++(int)
             {input_iterator tmp(*this); ++(*this); return tmp;}
     
    -    friend bool operator==(const input_iterator& x, const input_iterator& y)
    +    friend TEST_CONSTEXPR_CXX14 bool operator==(const input_iterator& x, const input_iterator& y)
             {return x.it_ == y.it_;}
    -    friend bool operator!=(const input_iterator& x, const input_iterator& y)
    +    friend TEST_CONSTEXPR_CXX14 bool operator!=(const input_iterator& x, const input_iterator& y)
             {return !(x == y);}
     
         template 
    @@ -120,23 +120,23 @@ public:
         typedef It                                                 pointer;
         typedef typename std::iterator_traits::reference       reference;
     
    -    It base() const {return it_;}
    +    TEST_CONSTEXPR_CXX14 It base() const {return it_;}
     
    -    forward_iterator() : it_() {}
    -    explicit forward_iterator(It it) : it_(it) {}
    +    TEST_CONSTEXPR_CXX14 forward_iterator() : it_() {}
    +    explicit TEST_CONSTEXPR_CXX14 forward_iterator(It it) : it_(it) {}
         template 
    -        forward_iterator(const forward_iterator& u) :it_(u.it_) {}
    +        TEST_CONSTEXPR_CXX14 forward_iterator(const forward_iterator& u) :it_(u.it_) {}
     
    -    reference operator*() const {return *it_;}
    -    pointer operator->() const {return it_;}
    +    TEST_CONSTEXPR_CXX14 reference operator*() const {return *it_;}
    +    TEST_CONSTEXPR_CXX14 pointer operator->() const {return it_;}
     
    -    forward_iterator& operator++() {++it_; return *this;}
    -    forward_iterator operator++(int)
    +    TEST_CONSTEXPR_CXX14 forward_iterator& operator++() {++it_; return *this;}
    +    TEST_CONSTEXPR_CXX14 forward_iterator operator++(int)
             {forward_iterator tmp(*this); ++(*this); return tmp;}
     
    -    friend bool operator==(const forward_iterator& x, const forward_iterator& y)
    +    friend TEST_CONSTEXPR_CXX14 bool operator==(const forward_iterator& x, const forward_iterator& y)
             {return x.it_ == y.it_;}
    -    friend bool operator!=(const forward_iterator& x, const forward_iterator& y)
    +    friend TEST_CONSTEXPR_CXX14 bool operator!=(const forward_iterator& x, const forward_iterator& y)
             {return !(x == y);}
     
         template 
    @@ -145,7 +145,7 @@ public:
     
     template 
     inline
    -bool
    +bool TEST_CONSTEXPR_CXX14
     operator==(const forward_iterator& x, const forward_iterator& y)
     {
         return x.base() == y.base();
    @@ -153,7 +153,7 @@ operator==(const forward_iterator& x,
     
     template 
     inline
    -bool
    +bool TEST_CONSTEXPR_CXX14
     operator!=(const forward_iterator& x, const forward_iterator& y)
     {
         return !(x == y);
    @@ -172,22 +172,22 @@ public:
         typedef It                                                 pointer;
         typedef typename std::iterator_traits::reference       reference;
     
    -    It base() const {return it_;}
    +    TEST_CONSTEXPR_CXX14 It base() const {return it_;}
     
    -    bidirectional_iterator() : it_() {}
    -    explicit bidirectional_iterator(It it) : it_(it) {}
    +    TEST_CONSTEXPR_CXX14 bidirectional_iterator() : it_() {}
    +    explicit TEST_CONSTEXPR_CXX14 bidirectional_iterator(It it) : it_(it) {}
         template 
    -        bidirectional_iterator(const bidirectional_iterator& u) :it_(u.it_) {}
    +        TEST_CONSTEXPR_CXX14 bidirectional_iterator(const bidirectional_iterator& u) :it_(u.it_) {}
     
    -    reference operator*() const {return *it_;}
    -    pointer operator->() const {return it_;}
    +    TEST_CONSTEXPR_CXX14 reference operator*() const {return *it_;}
    +    TEST_CONSTEXPR_CXX14 pointer operator->() const {return it_;}
     
    -    bidirectional_iterator& operator++() {++it_; return *this;}
    -    bidirectional_iterator operator++(int)
    +    TEST_CONSTEXPR_CXX14 bidirectional_iterator& operator++() {++it_; return *this;}
    +    TEST_CONSTEXPR_CXX14 bidirectional_iterator operator++(int)
             {bidirectional_iterator tmp(*this); ++(*this); return tmp;}
     
    -    bidirectional_iterator& operator--() {--it_; return *this;}
    -    bidirectional_iterator operator--(int)
    +    TEST_CONSTEXPR_CXX14 bidirectional_iterator& operator--() {--it_; return *this;}
    +    TEST_CONSTEXPR_CXX14 bidirectional_iterator operator--(int)
             {bidirectional_iterator tmp(*this); --(*this); return tmp;}
     
         template 
    @@ -196,7 +196,7 @@ public:
     
     template 
     inline
    -bool
    +bool TEST_CONSTEXPR_CXX14
     operator==(const bidirectional_iterator& x, const bidirectional_iterator& y)
     {
         return x.base() == y.base();
    @@ -204,7 +204,7 @@ operator==(const bidirectional_iterator<
     
     template 
     inline
    -bool
    +bool TEST_CONSTEXPR_CXX14
     operator!=(const bidirectional_iterator& x, const bidirectional_iterator& y)
     {
         return !(x == y);
    @@ -223,34 +223,34 @@ public:
         typedef It                                                 pointer;
         typedef typename std::iterator_traits::reference       reference;
     
    -    It base() const {return it_;}
    +    TEST_CONSTEXPR_CXX14 It base() const {return it_;}
     
    -    random_access_iterator() : it_() {}
    -    explicit random_access_iterator(It it) : it_(it) {}
    -   template 
    -        random_access_iterator(const random_access_iterator& u) :it_(u.it_) {}
    +    TEST_CONSTEXPR_CXX14 random_access_iterator() : it_() {}
    +    explicit TEST_CONSTEXPR_CXX14 random_access_iterator(It it) : it_(it) {}
    +    template 
    +        TEST_CONSTEXPR_CXX14 random_access_iterator(const random_access_iterator& u) :it_(u.it_) {}
     
    -    reference operator*() const {return *it_;}
    -    pointer operator->() const {return it_;}
    +    TEST_CONSTEXPR_CXX14 reference operator*() const {return *it_;}
    +    TEST_CONSTEXPR_CXX14 pointer operator->() const {return it_;}
     
    -    random_access_iterator& operator++() {++it_; return *this;}
    -    random_access_iterator operator++(int)
    +    TEST_CONSTEXPR_CXX14 random_access_iterator& operator++() {++it_; return *this;}
    +    TEST_CONSTEXPR_CXX14 random_access_iterator operator++(int)
             {random_access_iterator tmp(*this); ++(*this); return tmp;}
     
    -    random_access_iterator& operator--() {--it_; return *this;}
    -    random_access_iterator operator--(int)
    +    TEST_CONSTEXPR_CXX14 random_access_iterator& operator--() {--it_; return *this;}
    +    TEST_CONSTEXPR_CXX14 random_access_iterator operator--(int)
             {random_access_iterator tmp(*this); --(*this); return tmp;}
     
    -    random_access_iterator& operator+=(difference_type n) {it_ += n; return *this;}
    -    random_access_iterator operator+(difference_type n) const
    +    TEST_CONSTEXPR_CXX14 random_access_iterator& operator+=(difference_type n) {it_ += n; return *this;}
    +    TEST_CONSTEXPR_CXX14 random_access_iterator operator+(difference_type n) const
             {random_access_iterator tmp(*this); tmp += n; return tmp;}
    -    friend random_access_iterator operator+(difference_type n, random_access_iterator x)
    +    friend TEST_CONSTEXPR_CXX14 random_access_iterator operator+(difference_type n, random_access_iterator x)
             {x += n; return x;}
    -    random_access_iterator& operator-=(difference_type n) {return *this += -n;}
    -    random_access_iterator operator-(difference_type n) const
    +    TEST_CONSTEXPR_CXX14 random_access_iterator& operator-=(difference_type n) {return *this += -n;}
    +    TEST_CONSTEXPR_CXX14 random_access_iterator operator-(difference_type n) const
             {random_access_iterator tmp(*this); tmp -= n; return tmp;}
     
    -    reference operator[](difference_type n) const {return it_[n];}
    +    TEST_CONSTEXPR_CXX14 reference operator[](difference_type n) const {return it_[n];}
     
         template 
         void operator,(T const &) DELETE_FUNCTION;
    @@ -258,7 +258,7 @@ public:
     
     template 
     inline
    -bool
    +bool TEST_CONSTEXPR_CXX14
     operator==(const random_access_iterator& x, const random_access_iterator& y)
     {
         return x.base() == y.base();
    @@ -266,7 +266,7 @@ operator==(const random_access_iterator<
     
     template 
     inline
    -bool
    +bool TEST_CONSTEXPR_CXX14
     operator!=(const random_access_iterator& x, const random_access_iterator& y)
     {
         return !(x == y);
    @@ -274,7 +274,7 @@ operator!=(const random_access_iterator<
     
     template 
     inline
    -bool
    +bool TEST_CONSTEXPR_CXX14
     operator<(const random_access_iterator& x, const random_access_iterator& y)
     {
         return x.base() < y.base();
    @@ -282,7 +282,7 @@ operator<(const random_access_iterator
     inline
    -bool
    +bool TEST_CONSTEXPR_CXX14
     operator<=(const random_access_iterator& x, const random_access_iterator& y)
     {
         return !(y < x);
    @@ -290,7 +290,7 @@ operator<=(const random_access_iterator<
     
     template 
     inline
    -bool
    +bool TEST_CONSTEXPR_CXX14
     operator>(const random_access_iterator& x, const random_access_iterator& y)
     {
         return y < x;
    @@ -298,14 +298,14 @@ operator>(const random_access_iterator
     inline
    -bool
    +bool TEST_CONSTEXPR_CXX14
     operator>=(const random_access_iterator& x, const random_access_iterator& y)
     {
         return !(x < y);
     }
     
     template 
    -inline
    +inline TEST_CONSTEXPR_CXX14
     typename std::iterator_traits::difference_type
     operator-(const random_access_iterator& x, const random_access_iterator& y)
     {
    @@ -313,22 +313,22 @@ operator-(const random_access_iterator
    -inline Iter base(output_iterator i) { return i.base(); }
    +inline TEST_CONSTEXPR_CXX14 Iter base(output_iterator i) { return i.base(); }
     
     template 
    -inline Iter base(input_iterator i) { return i.base(); }
    +inline TEST_CONSTEXPR_CXX14 Iter base(input_iterator i) { return i.base(); }
     
     template 
    -inline Iter base(forward_iterator i) { return i.base(); }
    +inline TEST_CONSTEXPR_CXX14 Iter base(forward_iterator i) { return i.base(); }
     
     template 
    -inline Iter base(bidirectional_iterator i) { return i.base(); }
    +inline TEST_CONSTEXPR_CXX14 Iter base(bidirectional_iterator i) { return i.base(); }
     
     template 
    -inline Iter base(random_access_iterator i) { return i.base(); }
    +inline TEST_CONSTEXPR_CXX14 Iter base(random_access_iterator i) { return i.base(); }
     
     template     // everything else
    -inline Iter base(Iter i) { return i; }
    +inline TEST_CONSTEXPR_CXX14 Iter base(Iter i) { return i; }
     
     template 
     struct ThrowingIterator {
    
    From owner-svn-src-all@freebsd.org  Wed May 17 20:23:15 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DCD5D7163C;
     Wed, 17 May 2017 20:23:15 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 29D061ED2;
     Wed, 17 May 2017 20:23:15 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HKNEE4015679;
     Wed, 17 May 2017 20:23:14 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HKNDNd015674;
     Wed, 17 May 2017 20:23:13 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705172023.v4HKNDNd015674@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Wed, 17 May 2017 20:23:13 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318422 - vendor/lld/dist/ELF
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 20:23:15 -0000
    
    Author: dim
    Date: Wed May 17 20:23:13 2017
    New Revision: 318422
    URL: https://svnweb.freebsd.org/changeset/base/318422
    
    Log:
      Vendor import of lld trunk r303291:
      https://llvm.org/svn/llvm-project/lld/trunk@303291
    
    Modified:
      vendor/lld/dist/ELF/Relocations.cpp
      vendor/lld/dist/ELF/Relocations.h
      vendor/lld/dist/ELF/Thunks.cpp
      vendor/lld/dist/ELF/Thunks.h
      vendor/lld/dist/ELF/Writer.cpp
    
    Modified: vendor/lld/dist/ELF/Relocations.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/Relocations.cpp	Wed May 17 20:23:11 2017	(r318421)
    +++ vendor/lld/dist/ELF/Relocations.cpp	Wed May 17 20:23:13 2017	(r318422)
    @@ -963,9 +963,8 @@ template  void elf::scanRelo
     // in the Sections vector, and recalculate the InputSection output section
     // offsets.
     // This may invalidate any output section offsets stored outside of InputSection
    -template 
    -void ThunkCreator::mergeThunks(OutputSection *OS,
    -                                     std::vector &Thunks) {
    +void ThunkCreator::mergeThunks(OutputSection *OS,
    +                               std::vector &Thunks) {
       // Order Thunks in ascending OutSecOff
       auto ThunkCmp = [](const ThunkSection *A, const ThunkSection *B) {
         return A->OutSecOff < B->OutSecOff;
    @@ -993,9 +992,8 @@ void ThunkCreator::mergeThunks(Out
       OS->assignOffsets();
     }
     
    -template 
    -ThunkSection *ThunkCreator::getOSThunkSec(ThunkSection *&TS,
    -                                                OutputSection *OS) {
    +ThunkSection *ThunkCreator::getOSThunkSec(ThunkSection *&TS,
    +                                          OutputSection *OS) {
       if (TS == nullptr) {
         uint32_t Off = 0;
         for (auto *IS : OS->Sections) {
    @@ -1009,9 +1007,7 @@ ThunkSection *ThunkCreator::getOST
       return TS;
     }
     
    -template 
    -ThunkSection *ThunkCreator::getISThunkSec(InputSection *IS,
    -                                                OutputSection *OS) {
    +ThunkSection *ThunkCreator::getISThunkSec(InputSection *IS, OutputSection *OS) {
       ThunkSection *TS = ThunkedSections.lookup(IS);
       if (TS)
         return TS;
    @@ -1022,12 +1018,11 @@ ThunkSection *ThunkCreator::getIST
       return TS;
     }
     
    -template 
    -std::pair ThunkCreator::getThunk(SymbolBody &Body,
    -                                                      uint32_t Type) {
    +std::pair ThunkCreator::getThunk(SymbolBody &Body,
    +                                                uint32_t Type) {
       auto res = ThunkedSymbols.insert({&Body, nullptr});
       if (res.second)
    -    res.first->second = addThunk(Type, Body);
    +    res.first->second = addThunk(Type, Body);
       return std::make_pair(res.first->second, res.second);
     }
     
    @@ -1041,9 +1036,7 @@ std::pair ThunkCreator
    -bool ThunkCreator::createThunks(
    -    ArrayRef OutputSections) {
    +bool ThunkCreator::createThunks(ArrayRef OutputSections) {
       // Create all the Thunks and insert them into synthetic ThunkSections. The
       // ThunkSections are later inserted back into the OutputSection.
     
    @@ -1086,8 +1079,3 @@ template void elf::scanRelocations(InputSectionBase &);
     template void elf::scanRelocations(InputSectionBase &);
     template void elf::scanRelocations(InputSectionBase &);
    -
    -template class elf::ThunkCreator;
    -template class elf::ThunkCreator;
    -template class elf::ThunkCreator;
    -template class elf::ThunkCreator;
    
    Modified: vendor/lld/dist/ELF/Relocations.h
    ==============================================================================
    --- vendor/lld/dist/ELF/Relocations.h	Wed May 17 20:23:11 2017	(r318421)
    +++ vendor/lld/dist/ELF/Relocations.h	Wed May 17 20:23:13 2017	(r318422)
    @@ -119,7 +119,7 @@ template  void scanRelocatio
     class ThunkSection;
     class Thunk;
     
    -template  class ThunkCreator {
    +class ThunkCreator {
     public:
       // Return true if Thunks have been added to OutputSections
       bool createThunks(ArrayRef OutputSections);
    
    Modified: vendor/lld/dist/ELF/Thunks.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/Thunks.cpp	Wed May 17 20:23:11 2017	(r318421)
    +++ vendor/lld/dist/ELF/Thunks.cpp	Wed May 17 20:23:13 2017	(r318422)
    @@ -50,7 +50,7 @@ namespace {
     
     // Specific ARM Thunk implementations. The naming convention is:
     // Source State, TargetState, Target Requirement, ABS or PI, Range
    -template  class ARMV7ABSLongThunk final : public Thunk {
    +class ARMV7ABSLongThunk final : public Thunk {
     public:
       ARMV7ABSLongThunk(const SymbolBody &Dest) : Thunk(Dest) {}
     
    @@ -59,7 +59,7 @@ public:
       void addSymbols(ThunkSection &IS) override;
     };
     
    -template  class ARMV7PILongThunk final : public Thunk {
    +class ARMV7PILongThunk final : public Thunk {
     public:
       ARMV7PILongThunk(const SymbolBody &Dest) : Thunk(Dest) {}
     
    @@ -68,7 +68,7 @@ public:
       void addSymbols(ThunkSection &IS) override;
     };
     
    -template  class ThumbV7ABSLongThunk final : public Thunk {
    +class ThumbV7ABSLongThunk final : public Thunk {
     public:
       ThumbV7ABSLongThunk(const SymbolBody &Dest) : Thunk(Dest) {
         this->alignment = 2;
    @@ -79,7 +79,7 @@ public:
       void addSymbols(ThunkSection &IS) override;
     };
     
    -template  class ThumbV7PILongThunk final : public Thunk {
    +class ThumbV7PILongThunk final : public Thunk {
     public:
       ThumbV7PILongThunk(const SymbolBody &Dest) : Thunk(Dest) {
         this->alignment = 2;
    @@ -91,7 +91,7 @@ public:
     };
     
     // MIPS LA25 thunk
    -template  class MipsThunk final : public Thunk {
    +class MipsThunk final : public Thunk {
     public:
       MipsThunk(const SymbolBody &Dest) : Thunk(Dest) {}
     
    @@ -109,117 +109,105 @@ static uint64_t getARMThunkDestVA(const 
       return SignExtend64<32>(V);
     }
     
    -template 
    -void ARMV7ABSLongThunk::writeTo(uint8_t *Buf, ThunkSection &IS) const {
    +void ARMV7ABSLongThunk::writeTo(uint8_t *Buf, ThunkSection &IS) const {
       const uint8_t Data[] = {
           0x00, 0xc0, 0x00, 0xe3, // movw         ip,:lower16:S
           0x00, 0xc0, 0x40, 0xe3, // movt         ip,:upper16:S
           0x1c, 0xff, 0x2f, 0xe1, // bx   ip
       };
    -  uint64_t S = getARMThunkDestVA(this->Destination);
    +  uint64_t S = getARMThunkDestVA(Destination);
       memcpy(Buf, Data, sizeof(Data));
       Target->relocateOne(Buf, R_ARM_MOVW_ABS_NC, S);
       Target->relocateOne(Buf + 4, R_ARM_MOVT_ABS, S);
     }
     
    -template 
    -void ARMV7ABSLongThunk::addSymbols(ThunkSection &IS) {
    -  this->ThunkSym = addSyntheticLocal(
    -      Saver.save("__ARMv7ABSLongThunk_" + this->Destination.getName()),
    -      STT_FUNC, this->Offset, size(), &IS);
    -  addSyntheticLocal("$a", STT_NOTYPE, this->Offset, 0, &IS);
    +void ARMV7ABSLongThunk::addSymbols(ThunkSection &IS) {
    +  ThunkSym = addSyntheticLocal(
    +      Saver.save("__ARMv7ABSLongThunk_" + Destination.getName()), STT_FUNC,
    +      Offset, size(), &IS);
    +  addSyntheticLocal("$a", STT_NOTYPE, Offset, 0, &IS);
     }
     
    -template 
    -void ThumbV7ABSLongThunk::writeTo(uint8_t *Buf, ThunkSection &IS) const {
    +void ThumbV7ABSLongThunk::writeTo(uint8_t *Buf, ThunkSection &IS) const {
       const uint8_t Data[] = {
           0x40, 0xf2, 0x00, 0x0c, // movw         ip, :lower16:S
           0xc0, 0xf2, 0x00, 0x0c, // movt         ip, :upper16:S
           0x60, 0x47,             // bx   ip
       };
    -  uint64_t S = getARMThunkDestVA(this->Destination);
    +  uint64_t S = getARMThunkDestVA(Destination);
       memcpy(Buf, Data, sizeof(Data));
       Target->relocateOne(Buf, R_ARM_THM_MOVW_ABS_NC, S);
       Target->relocateOne(Buf + 4, R_ARM_THM_MOVT_ABS, S);
     }
     
    -template 
    -void ThumbV7ABSLongThunk::addSymbols(ThunkSection &IS) {
    -  this->ThunkSym = addSyntheticLocal(
    -      Saver.save("__Thumbv7ABSLongThunk_" + this->Destination.getName()),
    -      STT_FUNC, this->Offset, size(), &IS);
    -  addSyntheticLocal("$t", STT_NOTYPE, this->Offset, 0, &IS);
    +void ThumbV7ABSLongThunk::addSymbols(ThunkSection &IS) {
    +  ThunkSym = addSyntheticLocal(
    +      Saver.save("__Thumbv7ABSLongThunk_" + Destination.getName()), STT_FUNC,
    +      Offset, size(), &IS);
    +  addSyntheticLocal("$t", STT_NOTYPE, Offset, 0, &IS);
     }
     
    -template 
    -void ARMV7PILongThunk::writeTo(uint8_t *Buf, ThunkSection &IS) const {
    +void ARMV7PILongThunk::writeTo(uint8_t *Buf, ThunkSection &IS) const {
       const uint8_t Data[] = {
           0xf0, 0xcf, 0x0f, 0xe3, // P:  movw ip,:lower16:S - (P + (L1-P) +8)
           0x00, 0xc0, 0x40, 0xe3, //     movt ip,:upper16:S - (P + (L1-P+4) +8)
           0x0f, 0xc0, 0x8c, 0xe0, // L1: add ip, ip, pc
           0x1c, 0xff, 0x2f, 0xe1, //     bx r12
       };
    -  uint64_t S = getARMThunkDestVA(this->Destination);
    -  uint64_t P = this->ThunkSym->getVA();
    +  uint64_t S = getARMThunkDestVA(Destination);
    +  uint64_t P = ThunkSym->getVA();
       memcpy(Buf, Data, sizeof(Data));
       Target->relocateOne(Buf, R_ARM_MOVW_PREL_NC, S - P - 16);
       Target->relocateOne(Buf + 4, R_ARM_MOVT_PREL, S - P - 12);
     }
     
    -template 
    -void ARMV7PILongThunk::addSymbols(ThunkSection &IS) {
    -  this->ThunkSym = addSyntheticLocal(
    -      Saver.save("__ARMV7PILongThunk_" + this->Destination.getName()), STT_FUNC,
    -      this->Offset, size(), &IS);
    -  addSyntheticLocal("$a", STT_NOTYPE, this->Offset, 0, &IS);
    +void ARMV7PILongThunk::addSymbols(ThunkSection &IS) {
    +  ThunkSym = addSyntheticLocal(
    +      Saver.save("__ARMV7PILongThunk_" + Destination.getName()), STT_FUNC,
    +      Offset, size(), &IS);
    +  addSyntheticLocal("$a", STT_NOTYPE, Offset, 0, &IS);
     }
     
    -template 
    -void ThumbV7PILongThunk::writeTo(uint8_t *Buf, ThunkSection &IS) const {
    +void ThumbV7PILongThunk::writeTo(uint8_t *Buf, ThunkSection &IS) const {
       const uint8_t Data[] = {
           0x4f, 0xf6, 0xf4, 0x7c, // P:  movw ip,:lower16:S - (P + (L1-P) + 4)
           0xc0, 0xf2, 0x00, 0x0c, //     movt ip,:upper16:S - (P + (L1-P+4) + 4)
           0xfc, 0x44,             // L1: add  r12, pc
           0x60, 0x47,             //     bx   r12
       };
    -  uint64_t S = getARMThunkDestVA(this->Destination);
    -  uint64_t P = this->ThunkSym->getVA();
    +  uint64_t S = getARMThunkDestVA(Destination);
    +  uint64_t P = ThunkSym->getVA();
       memcpy(Buf, Data, sizeof(Data));
       Target->relocateOne(Buf, R_ARM_THM_MOVW_PREL_NC, S - P - 12);
       Target->relocateOne(Buf + 4, R_ARM_THM_MOVT_PREL, S - P - 8);
     }
     
    -template 
    -void ThumbV7PILongThunk::addSymbols(ThunkSection &IS) {
    -  this->ThunkSym = addSyntheticLocal(
    -      Saver.save("__ThumbV7PILongThunk_" + this->Destination.getName()),
    -      STT_FUNC, this->Offset, size(), &IS);
    -  addSyntheticLocal("$t", STT_NOTYPE, this->Offset, 0, &IS);
    +void ThumbV7PILongThunk::addSymbols(ThunkSection &IS) {
    +  ThunkSym = addSyntheticLocal(
    +      Saver.save("__ThumbV7PILongThunk_" + Destination.getName()), STT_FUNC,
    +      Offset, size(), &IS);
    +  addSyntheticLocal("$t", STT_NOTYPE, Offset, 0, &IS);
     }
     
     // Write MIPS LA25 thunk code to call PIC function from the non-PIC one.
    -template 
    -void MipsThunk::writeTo(uint8_t *Buf, ThunkSection &) const {
    -  const endianness E = ELFT::TargetEndianness;
    -
    +void MipsThunk::writeTo(uint8_t *Buf, ThunkSection &) const {
       uint64_t S = this->Destination.getVA();
    -  write32(Buf, 0x3c190000);                // lui   $25, %hi(func)
    -  write32(Buf + 4, 0x08000000 | (S >> 2)); // j     func
    -  write32(Buf + 8, 0x27390000);            // addiu $25, $25, %lo(func)
    -  write32(Buf + 12, 0x00000000);           // nop
    +  write32(Buf, 0x3c190000, Config->Endianness);                // lui   $25, %hi(func)
    +  write32(Buf + 4, 0x08000000 | (S >> 2), Config->Endianness); // j     func
    +  write32(Buf + 8, 0x27390000, Config->Endianness);            // addiu $25, $25, %lo(func)
    +  write32(Buf + 12, 0x00000000, Config->Endianness);           // nop
       Target->relocateOne(Buf, R_MIPS_HI16, S);
       Target->relocateOne(Buf + 8, R_MIPS_LO16, S);
     }
     
    -template  void MipsThunk::addSymbols(ThunkSection &IS) {
    -  this->ThunkSym = addSyntheticLocal(
    -      Saver.save("__LA25Thunk_" + this->Destination.getName()), STT_FUNC,
    -      this->Offset, size(), &IS);
    +void MipsThunk::addSymbols(ThunkSection &IS) {
    +  ThunkSym =
    +      addSyntheticLocal(Saver.save("__LA25Thunk_" + Destination.getName()),
    +                        STT_FUNC, Offset, size(), &IS);
     }
     
    -template 
    -InputSection *MipsThunk::getTargetInputSection() const {
    -  auto *DR = dyn_cast(&this->Destination);
    +InputSection *MipsThunk::getTargetInputSection() const {
    +  auto *DR = dyn_cast(&Destination);
       return dyn_cast(DR->Section);
     }
     
    @@ -228,7 +216,7 @@ Thunk::Thunk(const SymbolBody &D) : Dest
     Thunk::~Thunk() = default;
     
     // Creates a thunk for Thumb-ARM interworking.
    -template  static Thunk *addThunkArm(uint32_t Reloc, SymbolBody &S) {
    +static Thunk *addThunkArm(uint32_t Reloc, SymbolBody &S) {
       // ARM relocations need ARM to Thumb interworking Thunks.
       // Thumb relocations need Thumb to ARM relocations.
       // Use position independent Thunks if we require position independent code.
    @@ -237,33 +225,29 @@ template  static Thunk *addT
       case R_ARM_PLT32:
       case R_ARM_JUMP24:
         if (Config->Pic)
    -      return make>(S);
    -    return make>(S);
    +      return make(S);
    +    return make(S);
       case R_ARM_THM_JUMP19:
       case R_ARM_THM_JUMP24:
         if (Config->Pic)
    -      return make>(S);
    -    return make>(S);
    +      return make(S);
    +    return make(S);
       }
       fatal("unrecognized relocation type");
     }
     
    -template  static Thunk *addThunkMips(SymbolBody &S) {
    -  return make>(S);
    +static Thunk *addThunkMips(SymbolBody &S) {
    +  return make(S);
     }
     
    -template  Thunk *addThunk(uint32_t RelocType, SymbolBody &S) {
    +Thunk *addThunk(uint32_t RelocType, SymbolBody &S) {
       if (Config->EMachine == EM_ARM)
    -    return addThunkArm(RelocType, S);
    +    return addThunkArm(RelocType, S);
       else if (Config->EMachine == EM_MIPS)
    -    return addThunkMips(S);
    +    return addThunkMips(S);
       llvm_unreachable("add Thunk only supported for ARM and Mips");
       return nullptr;
     }
     
    -template Thunk *addThunk(uint32_t, SymbolBody &);
    -template Thunk *addThunk(uint32_t, SymbolBody &);
    -template Thunk *addThunk(uint32_t, SymbolBody &);
    -template Thunk *addThunk(uint32_t, SymbolBody &);
     } // end namespace elf
     } // end namespace lld
    
    Modified: vendor/lld/dist/ELF/Thunks.h
    ==============================================================================
    --- vendor/lld/dist/ELF/Thunks.h	Wed May 17 20:23:11 2017	(r318421)
    +++ vendor/lld/dist/ELF/Thunks.h	Wed May 17 20:23:13 2017	(r318422)
    @@ -51,7 +51,7 @@ public:
     
     // For a Relocation to symbol S create a Thunk to be added to a synthetic
     // ThunkSection. At present there are implementations for ARM and Mips Thunks.
    -template  Thunk *addThunk(uint32_t RelocType, SymbolBody &S);
    +Thunk *addThunk(uint32_t RelocType, SymbolBody &S);
     
     } // namespace elf
     } // namespace lld
    
    Modified: vendor/lld/dist/ELF/Writer.cpp
    ==============================================================================
    --- vendor/lld/dist/ELF/Writer.cpp	Wed May 17 20:23:11 2017	(r318421)
    +++ vendor/lld/dist/ELF/Writer.cpp	Wed May 17 20:23:13 2017	(r318422)
    @@ -1223,7 +1223,7 @@ template  void Writer:
         // we need to assign addresses so that we can tell if jump instructions
         // are out of range. This will need to turn into a loop that converges
         // when no more Thunks are added
    -    ThunkCreator TC;
    +    ThunkCreator TC;
         if (TC.createThunks(OutputSections))
           applySynthetic({InX::MipsGot},
                          [](SyntheticSection *SS) { SS->updateAllocSize(); });
    
    From owner-svn-src-all@freebsd.org  Wed May 17 20:23:12 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 881F9D71613;
     Wed, 17 May 2017 20:23:12 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 3CF841E74;
     Wed, 17 May 2017 20:23:12 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HKNBsx015627;
     Wed, 17 May 2017 20:23:11 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HKNBFC015626;
     Wed, 17 May 2017 20:23:11 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705172023.v4HKNBFC015626@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Wed, 17 May 2017 20:23:11 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318421 - vendor/libc++/libc++-trunk-r303291
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 20:23:12 -0000
    
    Author: dim
    Date: Wed May 17 20:23:11 2017
    New Revision: 318421
    URL: https://svnweb.freebsd.org/changeset/base/318421
    
    Log:
      Tag libc++ trunk r303291.
    
    Added:
      vendor/libc++/libc++-trunk-r303291/
         - copied from r318420, vendor/libc++/dist/
    
    From owner-svn-src-all@freebsd.org  Wed May 17 20:23:20 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E1DED716A1;
     Wed, 17 May 2017 20:23:20 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id D8D131F6F;
     Wed, 17 May 2017 20:23:19 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HKNIT8015727;
     Wed, 17 May 2017 20:23:18 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HKNI3N015726;
     Wed, 17 May 2017 20:23:18 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705172023.v4HKNI3N015726@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Wed, 17 May 2017 20:23:18 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318423 - vendor/lld/lld-trunk-r303291
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 20:23:20 -0000
    
    Author: dim
    Date: Wed May 17 20:23:18 2017
    New Revision: 318423
    URL: https://svnweb.freebsd.org/changeset/base/318423
    
    Log:
      Tag lld trunk r303291.
    
    Added:
      vendor/lld/lld-trunk-r303291/
         - copied from r318422, vendor/lld/dist/
    
    From owner-svn-src-all@freebsd.org  Wed May 17 20:23:29 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DA1DD71740;
     Wed, 17 May 2017 20:23:29 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 2CC48DF;
     Wed, 17 May 2017 20:23:29 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HKNSB6015839;
     Wed, 17 May 2017 20:23:28 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HKNS87015838;
     Wed, 17 May 2017 20:23:28 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705172023.v4HKNS87015838@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Wed, 17 May 2017 20:23:28 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318425 - vendor/lldb/lldb-trunk-r303291
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 20:23:29 -0000
    
    Author: dim
    Date: Wed May 17 20:23:27 2017
    New Revision: 318425
    URL: https://svnweb.freebsd.org/changeset/base/318425
    
    Log:
      Tag lldb trunk r303291.
    
    Added:
      vendor/lldb/lldb-trunk-r303291/
         - copied from r318424, vendor/lldb/dist/
    
    From owner-svn-src-all@freebsd.org  Wed May 17 20:23:25 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B611D716F9;
     Wed, 17 May 2017 20:23:25 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 2B22FA;
     Wed, 17 May 2017 20:23:25 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HKNOQA015793;
     Wed, 17 May 2017 20:23:24 GMT (envelope-from dim@FreeBSD.org)
    Received: (from dim@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HKNMto015774;
     Wed, 17 May 2017 20:23:22 GMT (envelope-from dim@FreeBSD.org)
    Message-Id: <201705172023.v4HKNMto015774@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
     using -f
    From: Dimitry Andric 
    Date: Wed, 17 May 2017 20:23:22 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-vendor@freebsd.org
    Subject: svn commit: r318424 - in vendor/lldb/dist: include/lldb/Symbol
     packages/Python/lldbsuite/test
     packages/Python/lldbsuite/test/lang/c/conflicting-symbol
     packages/Python/lldbsuite/test/lang/c/conflict...
    X-SVN-Group: vendor
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 20:23:25 -0000
    
    Author: dim
    Date: Wed May 17 20:23:22 2017
    New Revision: 318424
    URL: https://svnweb.freebsd.org/changeset/base/318424
    
    Log:
      Vendor import of lldb trunk r303291:
      https://llvm.org/svn/llvm-project/lldb/trunk@303291
    
    Added:
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.c   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/OneConstant.c   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.c   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/TwoConstant.c   (contents, props changed)
      vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/main.c   (contents, props changed)
    Modified:
      vendor/lldb/dist/include/lldb/Symbol/SymbolContext.h
      vendor/lldb/dist/packages/Python/lldbsuite/test/lldbtest.py
      vendor/lldb/dist/source/Breakpoint/Breakpoint.cpp
      vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
      vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
      vendor/lldb/dist/source/Symbol/SymbolContext.cpp
    
    Modified: vendor/lldb/dist/include/lldb/Symbol/SymbolContext.h
    ==============================================================================
    --- vendor/lldb/dist/include/lldb/Symbol/SymbolContext.h	Wed May 17 20:23:18 2017	(r318423)
    +++ vendor/lldb/dist/include/lldb/Symbol/SymbolContext.h	Wed May 17 20:23:22 2017	(r318424)
    @@ -235,6 +235,29 @@ public:
     
       bool GetAddressRangeFromHereToEndLine(uint32_t end_line, AddressRange &range,
                                             Status &error);
    +  
    +  //------------------------------------------------------------------
    +  /// Find the best global data symbol visible from this context.
    +  ///
    +  /// Symbol priority is:
    +  ///     - extern symbol in the current module if there is one
    +  ///     - non-extern symbol in the current module if there is one
    +  ///     - extern symbol in the target
    +  ///     - non-extern symbol in the target
    +  /// It is an error if the highest-priority result is ambiguous.
    +  ///
    +  /// @param[in] name
    +  ///     The name of the symbol to search for.
    +  ///
    +  /// @param[out] error
    +  ///     An error that will be populated with a message if there was an
    +  ///     ambiguous result.  The error will not be populated if no result
    +  ///     was found.
    +  ///
    +  /// @return
    +  ///     The symbol that was found, or \b nullptr if none was found.
    +  //------------------------------------------------------------------
    +  const Symbol *FindBestGlobalDataSymbol(const ConstString &name, Status &error);
     
       void GetDescription(Stream *s, lldb::DescriptionLevel level,
                           Target *target) const;
    
    Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile	Wed May 17 20:23:22 2017	(r318424)
    @@ -0,0 +1,18 @@
    +LEVEL := ../../../make
    +
    +LD_EXTRAS := -L. -l$(LIB_PREFIX)One -l$(LIB_PREFIX)Two
    +C_SOURCES := main.c
    +
    +main.o : CFLAGS_EXTRAS += -g -O0
    +
    +include $(LEVEL)/Makefile.rules
    +
    +.PHONY:
    +a.out: lib_One lib_Two
    +
    +lib_%:
    +	$(MAKE) -f $*.mk
    +
    +clean::
    +	$(MAKE) -f One.mk clean
    +	$(MAKE) -f Two.mk clean
    
    Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk	Wed May 17 20:23:22 2017	(r318424)
    @@ -0,0 +1,12 @@
    +LEVEL := ../../../make
    +
    +DYLIB_NAME := One
    +DYLIB_C_SOURCES := One/One.c One/OneConstant.c
    +DYLIB_ONLY := YES
    +
    +include $(LEVEL)/Makefile.rules
    +
    +CFLAGS_EXTRAS += -fPIC
    +
    +One/OneConstant.o: One/OneConstant.c
    +	$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
    
    Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.c
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.c	Wed May 17 20:23:22 2017	(r318424)
    @@ -0,0 +1,6 @@
    +#include "One.h"
    +#include 
    +
    +void one() {
    +  printf("One\n"); // break here
    +}
    
    Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h	Wed May 17 20:23:22 2017	(r318424)
    @@ -0,0 +1,4 @@
    +#ifndef ONE_H
    +#define ONE_H
    +void one();
    +#endif
    
    Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/OneConstant.c
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/OneConstant.c	Wed May 17 20:23:22 2017	(r318424)
    @@ -0,0 +1 @@
    +int __attribute__ ((visibility("hidden"))) conflicting_symbol = 11111;
    
    Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py	Wed May 17 20:23:22 2017	(r318424)
    @@ -0,0 +1,90 @@
    +"""Test that conflicting symbols in different shared libraries work correctly"""
    +
    +from __future__ import print_function
    +
    +
    +import os
    +import time
    +import lldb
    +from lldbsuite.test.decorators import *
    +from lldbsuite.test.lldbtest import *
    +from lldbsuite.test import lldbutil
    +
    +
    +class TestConflictingSymbols(TestBase):
    +
    +    mydir = TestBase.compute_mydir(__file__)
    +    NO_DEBUG_INFO_TESTCASE = True
    +
    +    def test_conflicting_symbols(self):
    +        self.build()
    +        exe = os.path.join(os.getcwd(), "a.out")
    +        target = self.dbg.CreateTarget("a.out")
    +        self.assertTrue(target, VALID_TARGET)
    +
    +        # Register our shared libraries for remote targets so they get
    +        # automatically uploaded
    +        environment = self.registerSharedLibrariesWithTarget(
    +            target, ['One', 'Two'])
    +
    +        One_line = line_number('One/One.c', '// break here')
    +        Two_line = line_number('Two/Two.c', '// break here')
    +        main_line = line_number('main.c', '// break here')
    +        lldbutil.run_break_set_command(
    +            self, 'breakpoint set -f One.c -l %s' % (One_line))
    +        lldbutil.run_break_set_command(
    +            self, 'breakpoint set -f Two.c -l %s' % (Two_line))
    +        lldbutil.run_break_set_by_file_and_line(
    +            self, 'main.c', main_line, num_expected_locations=1, loc_exact=True)
    +
    +        process = target.LaunchSimple(
    +            None, environment, self.get_process_working_directory())
    +        self.assertTrue(process, PROCESS_IS_VALID)
    +
    +        # The stop reason of the thread should be breakpoint.
    +        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
    +                    substrs=['stopped',
    +                             'stop reason = breakpoint'])
    +
    +        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
    +                    substrs=[' resolved, hit count = 1'])
    +
    +        # This should display correctly.
    +        self.expect(
    +            "expr (unsigned long long)conflicting_symbol",
    +            "Symbol from One should be found",
    +            substrs=[
    +                "11111"])
    +
    +        self.runCmd("continue", RUN_SUCCEEDED)
    +
    +        # The stop reason of the thread should be breakpoint.
    +        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
    +                    substrs=['stopped',
    +                             'stop reason = breakpoint'])
    +
    +        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
    +                    substrs=[' resolved, hit count = 1'])
    +
    +        self.expect(
    +            "expr (unsigned long long)conflicting_symbol",
    +            "Symbol from Two should be found",
    +            substrs=[
    +                "22222"])
    +
    +        self.runCmd("continue", RUN_SUCCEEDED)
    +
    +        # The stop reason of the thread should be breakpoint.
    +        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
    +                    substrs=['stopped',
    +                             'stop reason = breakpoint'])
    +
    +        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
    +                    substrs=[' resolved, hit count = 1'])
    +
    +        self.expect(
    +            "expr (unsigned long long)conflicting_symbol",
    +            "An error should be printed when symbols can't be ordered",
    +            error=True,
    +            substrs=[
    +                "Multiple internal symbols"])
    
    Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk	Wed May 17 20:23:22 2017	(r318424)
    @@ -0,0 +1,12 @@
    +LEVEL := ../../../make
    +
    +DYLIB_NAME := Two
    +DYLIB_C_SOURCES := Two/Two.c Two/TwoConstant.c
    +DYLIB_ONLY := YES
    +
    +include $(LEVEL)/Makefile.rules
    +
    +CFLAGS_EXTRAS += -fPIC
    +
    +Two/TwoConstant.o: Two/TwoConstant.c
    +	$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
    
    Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.c
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.c	Wed May 17 20:23:22 2017	(r318424)
    @@ -0,0 +1,6 @@
    +#include "Two.h"
    +#include 
    +
    +void two() {
    +  printf("Two\n"); // break here
    +}
    
    Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h	Wed May 17 20:23:22 2017	(r318424)
    @@ -0,0 +1,4 @@
    +#ifndef TWO_H
    +#define TWO_H
    +void two();
    +#endif
    
    Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/TwoConstant.c
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/TwoConstant.c	Wed May 17 20:23:22 2017	(r318424)
    @@ -0,0 +1 @@
    +int __attribute__ ((visibility("hidden"))) conflicting_symbol = 22222;
    
    Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/main.c
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/main.c	Wed May 17 20:23:22 2017	(r318424)
    @@ -0,0 +1,11 @@
    +#include "One/One.h"
    +#include "Two/Two.h"
    +
    +#include 
    +
    +int main() {
    +  one();
    +  two();
    +  printf("main\n"); // break here
    +  return(0); 
    +}
    
    Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/lldbtest.py
    ==============================================================================
    --- vendor/lldb/dist/packages/Python/lldbsuite/test/lldbtest.py	Wed May 17 20:23:18 2017	(r318423)
    +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lldbtest.py	Wed May 17 20:23:22 2017	(r318424)
    @@ -1934,7 +1934,7 @@ class TestBase(Base):
                 # "libFoo.dylib" or "libFoo.so", or "Foo.so" for "Foo.so" or "libFoo.so", or just a
                 # basename like "libFoo.so". So figure out which one it is and resolve the local copy
                 # of the shared library accordingly
    -            if os.path.exists(name):
    +            if os.path.isfile(name):
                     local_shlib_path = name  # name is the full path to the local shared library
                 else:
                     # Check relative names
    
    Modified: vendor/lldb/dist/source/Breakpoint/Breakpoint.cpp
    ==============================================================================
    --- vendor/lldb/dist/source/Breakpoint/Breakpoint.cpp	Wed May 17 20:23:18 2017	(r318423)
    +++ vendor/lldb/dist/source/Breakpoint/Breakpoint.cpp	Wed May 17 20:23:22 2017	(r318424)
    @@ -837,8 +837,8 @@ bool Breakpoint::AddName(llvm::StringRef
       if (new_name.empty())
         return false;
       if (!BreakpointID::StringIsBreakpointName(new_name, error)) {
    -    error.SetErrorStringWithFormat("input name \"%s\" not a breakpoint name.",
    -                                   new_name);
    +    error.SetErrorStringWithFormatv("input name \"{0}\" not a breakpoint name.",
    +                                    new_name);
         return false;
       }
       if (!error.Success())
    
    Modified: vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
    ==============================================================================
    --- vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp	Wed May 17 20:23:18 2017	(r318423)
    +++ vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp	Wed May 17 20:23:22 2017	(r318424)
    @@ -591,103 +591,6 @@ addr_t ClangExpressionDeclMap::GetSymbol
                               symbol_type);
     }
     
    -const Symbol *ClangExpressionDeclMap::FindGlobalDataSymbol(
    -    Target &target, const ConstString &name, lldb_private::Module *module) {
    -  SymbolContextList sc_list;
    -
    -  if (module)
    -    module->FindSymbolsWithNameAndType(name, eSymbolTypeAny, sc_list);
    -  else
    -    target.GetImages().FindSymbolsWithNameAndType(name, eSymbolTypeAny,
    -                                                  sc_list);
    -
    -  const uint32_t matches = sc_list.GetSize();
    -  for (uint32_t i = 0; i < matches; ++i) {
    -    SymbolContext sym_ctx;
    -    sc_list.GetContextAtIndex(i, sym_ctx);
    -    if (sym_ctx.symbol) {
    -      const Symbol *symbol = sym_ctx.symbol;
    -      const Address sym_address = symbol->GetAddress();
    -
    -      if (sym_address.IsValid()) {
    -        switch (symbol->GetType()) {
    -        case eSymbolTypeData:
    -        case eSymbolTypeRuntime:
    -        case eSymbolTypeAbsolute:
    -        case eSymbolTypeObjCClass:
    -        case eSymbolTypeObjCMetaClass:
    -        case eSymbolTypeObjCIVar:
    -          if (symbol->GetDemangledNameIsSynthesized()) {
    -            // If the demangled name was synthesized, then don't use it
    -            // for expressions. Only let the symbol match if the mangled
    -            // named matches for these symbols.
    -            if (symbol->GetMangled().GetMangledName() != name)
    -              break;
    -          }
    -          return symbol;
    -
    -        case eSymbolTypeReExported: {
    -          ConstString reexport_name = symbol->GetReExportedSymbolName();
    -          if (reexport_name) {
    -            ModuleSP reexport_module_sp;
    -            ModuleSpec reexport_module_spec;
    -            reexport_module_spec.GetPlatformFileSpec() =
    -                symbol->GetReExportedSymbolSharedLibrary();
    -            if (reexport_module_spec.GetPlatformFileSpec()) {
    -              reexport_module_sp =
    -                  target.GetImages().FindFirstModule(reexport_module_spec);
    -              if (!reexport_module_sp) {
    -                reexport_module_spec.GetPlatformFileSpec()
    -                    .GetDirectory()
    -                    .Clear();
    -                reexport_module_sp =
    -                    target.GetImages().FindFirstModule(reexport_module_spec);
    -              }
    -            }
    -            // Don't allow us to try and resolve a re-exported symbol if it is
    -            // the same
    -            // as the current symbol
    -            if (name == symbol->GetReExportedSymbolName() &&
    -                module == reexport_module_sp.get())
    -              return NULL;
    -
    -            return FindGlobalDataSymbol(target,
    -                                        symbol->GetReExportedSymbolName(),
    -                                        reexport_module_sp.get());
    -          }
    -        } break;
    -
    -        case eSymbolTypeCode: // We already lookup functions elsewhere
    -        case eSymbolTypeVariable:
    -        case eSymbolTypeLocal:
    -        case eSymbolTypeParam:
    -        case eSymbolTypeTrampoline:
    -        case eSymbolTypeInvalid:
    -        case eSymbolTypeException:
    -        case eSymbolTypeSourceFile:
    -        case eSymbolTypeHeaderFile:
    -        case eSymbolTypeObjectFile:
    -        case eSymbolTypeCommonBlock:
    -        case eSymbolTypeBlock:
    -        case eSymbolTypeVariableType:
    -        case eSymbolTypeLineEntry:
    -        case eSymbolTypeLineHeader:
    -        case eSymbolTypeScopeBegin:
    -        case eSymbolTypeScopeEnd:
    -        case eSymbolTypeAdditional:
    -        case eSymbolTypeCompiler:
    -        case eSymbolTypeInstrumentation:
    -        case eSymbolTypeUndefined:
    -        case eSymbolTypeResolver:
    -          break;
    -        }
    -      }
    -    }
    -  }
    -
    -  return NULL;
    -}
    -
     lldb::VariableSP ClangExpressionDeclMap::FindGlobalVariable(
         Target &target, ModuleSP &module, const ConstString &name,
         CompilerDeclContext *namespace_decl, TypeFromUser *type) {
    @@ -1526,9 +1429,18 @@ void ClangExpressionDeclMap::FindExterna
           // We couldn't find a non-symbol variable for this.  Now we'll hunt for
           // a generic
           // data symbol, and -- if it is found -- treat it as a variable.
    -
    -      const Symbol *data_symbol = FindGlobalDataSymbol(*target, name);
    -
    +      Status error;
    +      
    +      const Symbol *data_symbol =
    +          m_parser_vars->m_sym_ctx.FindBestGlobalDataSymbol(name, error);
    +      
    +      if (!error.Success()) {
    +        const unsigned diag_id =
    +            m_ast_context->getDiagnostics().getCustomDiagID(
    +                clang::DiagnosticsEngine::Level::Error, "%0");
    +        m_ast_context->getDiagnostics().Report(diag_id) << error.AsCString();
    +      }
    +                                          
           if (data_symbol) {
             std::string warning("got name from symbols: ");
             warning.append(name.AsCString());
    
    Modified: vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
    ==============================================================================
    --- vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h	Wed May 17 20:23:18 2017	(r318423)
    +++ vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h	Wed May 17 20:23:22 2017	(r318424)
    @@ -448,24 +448,6 @@ private:
       uint64_t GetParserID() { return (uint64_t) this; }
     
       //------------------------------------------------------------------
    -  /// Given a target, find a data symbol that has the given name.
    -  ///
    -  /// @param[in] target
    -  ///     The target to use as the basis for the search.
    -  ///
    -  /// @param[in] name
    -  ///     The name as a plain C string.
    -  ///
    -  /// @param[in] module
    -  ///     The module to limit the search to. This can be NULL
    -  ///
    -  /// @return
    -  ///     The LLDB Symbol found, or NULL if none was found.
    -  //------------------------------------------------------------------
    -  const Symbol *FindGlobalDataSymbol(Target &target, const ConstString &name,
    -                                     Module *module = NULL);
    -
    -  //------------------------------------------------------------------
       /// Given a target, find a variable that matches the given name and
       /// type.
       ///
    
    Modified: vendor/lldb/dist/source/Symbol/SymbolContext.cpp
    ==============================================================================
    --- vendor/lldb/dist/source/Symbol/SymbolContext.cpp	Wed May 17 20:23:18 2017	(r318423)
    +++ vendor/lldb/dist/source/Symbol/SymbolContext.cpp	Wed May 17 20:23:22 2017	(r318424)
    @@ -799,6 +799,163 @@ bool SymbolContext::GetAddressRangeFromH
       return true;
     }
     
    +const Symbol *
    +SymbolContext::FindBestGlobalDataSymbol(const ConstString &name, Status &error) {
    +  error.Clear();
    +  
    +  if (!target_sp) {
    +    return nullptr;
    +  }
    +  
    +  Target &target = *target_sp;
    +  Module *module = module_sp.get();
    +  
    +  auto ProcessMatches = [this, &name, &target, module]
    +  (SymbolContextList &sc_list, Status &error) -> const Symbol* {
    +    llvm::SmallVector external_symbols;
    +    llvm::SmallVector internal_symbols;
    +    const uint32_t matches = sc_list.GetSize();
    +    for (uint32_t i = 0; i < matches; ++i) {
    +      SymbolContext sym_ctx;
    +      sc_list.GetContextAtIndex(i, sym_ctx);
    +      if (sym_ctx.symbol) {
    +        const Symbol *symbol = sym_ctx.symbol;
    +        const Address sym_address = symbol->GetAddress();
    +        
    +        if (sym_address.IsValid()) {
    +          switch (symbol->GetType()) {
    +            case eSymbolTypeData:
    +            case eSymbolTypeRuntime:
    +            case eSymbolTypeAbsolute:
    +            case eSymbolTypeObjCClass:
    +            case eSymbolTypeObjCMetaClass:
    +            case eSymbolTypeObjCIVar:
    +              if (symbol->GetDemangledNameIsSynthesized()) {
    +                // If the demangled name was synthesized, then don't use it
    +                // for expressions. Only let the symbol match if the mangled
    +                // named matches for these symbols.
    +                if (symbol->GetMangled().GetMangledName() != name)
    +                  break;
    +              }
    +              if (symbol->IsExternal()) {
    +                external_symbols.push_back(symbol);
    +              } else {
    +                internal_symbols.push_back(symbol);
    +              }
    +              break;
    +            case eSymbolTypeReExported: {
    +              ConstString reexport_name = symbol->GetReExportedSymbolName();
    +              if (reexport_name) {
    +                ModuleSP reexport_module_sp;
    +                ModuleSpec reexport_module_spec;
    +                reexport_module_spec.GetPlatformFileSpec() =
    +                symbol->GetReExportedSymbolSharedLibrary();
    +                if (reexport_module_spec.GetPlatformFileSpec()) {
    +                  reexport_module_sp =
    +                  target.GetImages().FindFirstModule(reexport_module_spec);
    +                  if (!reexport_module_sp) {
    +                    reexport_module_spec.GetPlatformFileSpec()
    +                    .GetDirectory()
    +                    .Clear();
    +                    reexport_module_sp =
    +                    target.GetImages().FindFirstModule(reexport_module_spec);
    +                  }
    +                }
    +                // Don't allow us to try and resolve a re-exported symbol if it is
    +                // the same as the current symbol
    +                if (name == symbol->GetReExportedSymbolName() &&
    +                    module == reexport_module_sp.get())
    +                  return nullptr;
    +                
    +                return FindBestGlobalDataSymbol(
    +                    symbol->GetReExportedSymbolName(), error);
    +              }
    +            } break;
    +              
    +            case eSymbolTypeCode: // We already lookup functions elsewhere
    +            case eSymbolTypeVariable:
    +            case eSymbolTypeLocal:
    +            case eSymbolTypeParam:
    +            case eSymbolTypeTrampoline:
    +            case eSymbolTypeInvalid:
    +            case eSymbolTypeException:
    +            case eSymbolTypeSourceFile:
    +            case eSymbolTypeHeaderFile:
    +            case eSymbolTypeObjectFile:
    +            case eSymbolTypeCommonBlock:
    +            case eSymbolTypeBlock:
    +            case eSymbolTypeVariableType:
    +            case eSymbolTypeLineEntry:
    +            case eSymbolTypeLineHeader:
    +            case eSymbolTypeScopeBegin:
    +            case eSymbolTypeScopeEnd:
    +            case eSymbolTypeAdditional:
    +            case eSymbolTypeCompiler:
    +            case eSymbolTypeInstrumentation:
    +            case eSymbolTypeUndefined:
    +            case eSymbolTypeResolver:
    +              break;
    +          }
    +        }
    +      }
    +    }
    +    
    +    if (external_symbols.size() > 1) {
    +      StreamString ss;
    +      ss.Printf("Multiple external symbols found for '%s'\n", name.AsCString());
    +      for (const Symbol *symbol : external_symbols) {
    +        symbol->GetDescription(&ss, eDescriptionLevelFull, &target);
    +      }
    +      ss.PutChar('\n');
    +      error.SetErrorString(ss.GetData());
    +      return nullptr;
    +    } else if (external_symbols.size()) {
    +      return external_symbols[0];
    +    } else if (internal_symbols.size() > 1) {
    +      StreamString ss;
    +      ss.Printf("Multiple internal symbols found for '%s'\n", name.AsCString());
    +      for (const Symbol *symbol : internal_symbols) {
    +        symbol->GetDescription(&ss, eDescriptionLevelVerbose, &target);
    +        ss.PutChar('\n');
    +      }
    +      error.SetErrorString(ss.GetData());
    +      return nullptr;
    +    } else if (internal_symbols.size()) {
    +      return internal_symbols[0];
    +    } else {
    +      return nullptr;
    +    }
    +  };
    +  
    +  if (module) {
    +    SymbolContextList sc_list;
    +    module->FindSymbolsWithNameAndType(name, eSymbolTypeAny, sc_list);
    +    const Symbol *const module_symbol = ProcessMatches(sc_list, error);
    +    
    +    if (!error.Success()) {
    +      return nullptr;
    +    } else if (module_symbol) {
    +      return module_symbol;
    +    }
    +  }
    +  
    +  {
    +    SymbolContextList sc_list;
    +    target.GetImages().FindSymbolsWithNameAndType(name, eSymbolTypeAny,
    +                                                  sc_list);
    +    const Symbol *const target_symbol = ProcessMatches(sc_list, error);
    +    
    +    if (!error.Success()) {
    +      return nullptr;
    +    } else if (target_symbol) {
    +      return target_symbol;
    +    }
    +  }
    +  
    +  return nullptr; // no error; we just didn't find anything
    +}
    +
    +
     //----------------------------------------------------------------------
     //
     //  SymbolContextSpecifier
    
    From owner-svn-src-all@freebsd.org  Wed May 17 21:14:29 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42228D714E4;
     Wed, 17 May 2017 21:14:29 +0000 (UTC)
     (envelope-from loos@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 1A2038F4;
     Wed, 17 May 2017 21:14:29 +0000 (UTC)
     (envelope-from loos@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HLESEh036564;
     Wed, 17 May 2017 21:14:28 GMT (envelope-from loos@FreeBSD.org)
    Received: (from loos@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HLESDA036563;
     Wed, 17 May 2017 21:14:28 GMT (envelope-from loos@FreeBSD.org)
    Message-Id: <201705172114.v4HLESDA036563@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: loos set sender to
     loos@FreeBSD.org using -f
    From: Luiz Otavio O Souza 
    Date: Wed, 17 May 2017 21:14:28 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318426 - head/sys/arm/mv
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 21:14:29 -0000
    
    Author: loos
    Date: Wed May 17 21:14:27 2017
    New Revision: 318426
    URL: https://svnweb.freebsd.org/changeset/base/318426
    
    Log:
      Use the MACROS to access the Global mpic registers.  Makes the code
      consistent and easier to read.
      
      While here, remove two unused static functions and fix a unused function
      warning when building !INTRNG.
      
      No functional changes.
      
      Sponsored by:	Rubicon Communications, LLC (Netgate)
    
    Modified:
      head/sys/arm/mv/mpic.c
    
    Modified: head/sys/arm/mv/mpic.c
    ==============================================================================
    --- head/sys/arm/mv/mpic.c	Wed May 17 20:23:27 2017	(r318425)
    +++ head/sys/arm/mv/mpic.c	Wed May 17 21:14:27 2017	(r318426)
    @@ -148,12 +148,10 @@ static void	mpic_unmask_irq(uintptr_t nb
     static void	mpic_mask_irq(uintptr_t nb);
     static void	mpic_mask_irq_err(uintptr_t nb);
     static void	mpic_unmask_irq_err(uintptr_t nb);
    +#ifdef INTRNG
     static int	mpic_intr(void *arg);
    -static void	mpic_unmask_msi(void);
    -#ifndef INTRNG
    -static void	arm_mask_irq_err(uintptr_t);
    -static void	arm_unmask_irq_err(uintptr_t);
     #endif
    +static void	mpic_unmask_msi(void);
     
     #define	MPIC_WRITE(softc, reg, val) \
         bus_space_write_4((softc)->mpic_bst, (softc)->mpic_bsh, (reg), (val))
    @@ -260,8 +258,7 @@ mv_mpic_attach(device_t dev)
     		sc->drbl_bsh = rman_get_bushandle(sc->mpic_res[2]);
     	}
     
    -	bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
    -	    MPIC_CTRL, 1);
    +	MPIC_WRITE(mv_mpic_sc, MPIC_CTRL, 1);
     	MPIC_CPU_WRITE(mv_mpic_sc, MPIC_CTP, 0);
     
     	val = MPIC_READ(mv_mpic_sc, MPIC_CTRL);
    @@ -435,27 +432,12 @@ arm_mask_irq(uintptr_t nb)
     	mpic_mask_irq(nb);
     }
     
    -
    -static void
    -arm_mask_irq_err(uintptr_t nb)
    -{
    -
    -	mpic_mask_irq_err(nb);
    -}
    -
     void
     arm_unmask_irq(uintptr_t nb)
     {
     
     	mpic_unmask_irq(nb);
     }
    -
    -void
    -arm_unmask_irq_err(uintptr_t nb)
    -{
    -
    -	mpic_unmask_irq_err(nb);
    -}
     #endif
     
     static void
    @@ -471,8 +453,7 @@ mpic_unmask_irq_err(uintptr_t nb)
     	uint32_t mask;
     	uint8_t bit_off;
     
    -	bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
    -	    MPIC_ISE, MPIC_INT_ERR);
    +	MPIC_WRITE(mv_mpic_sc, MPIC_ISE, MPIC_INT_ERR);
     	MPIC_CPU_WRITE(mv_mpic_sc, MPIC_ICM, MPIC_INT_ERR);
     
     	bit_off = nb - ERR_IRQ;
    @@ -498,8 +479,7 @@ mpic_unmask_irq(uintptr_t nb)
     {
     
     	if (nb < ERR_IRQ) {
    -		bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
    -		    MPIC_ISE, nb);
    +		MPIC_WRITE(mv_mpic_sc, MPIC_ISE, nb);
     		MPIC_CPU_WRITE(mv_mpic_sc, MPIC_ICM, nb);
     	} else if (nb < MSI_IRQ)
     		mpic_unmask_irq_err(nb);
    @@ -513,8 +493,7 @@ mpic_mask_irq(uintptr_t nb)
     {
     
     	if (nb < ERR_IRQ) {
    -		bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
    -		    MPIC_ICE, nb);
    +		MPIC_WRITE(mv_mpic_sc, MPIC_ICE, nb);
     		MPIC_CPU_WRITE(mv_mpic_sc, MPIC_ISM, nb);
     	} else if (nb < MSI_IRQ)
     		mpic_mask_irq_err(nb);
    @@ -533,8 +512,7 @@ mv_mpic_get_cause_err(void)
     	uint32_t err_cause;
     	uint8_t bit_off;
     
    -	err_cause = bus_space_read_4(mv_mpic_sc->mpic_bst,
    -	    mv_mpic_sc->mpic_bsh, MPIC_ERR_CAUSE);
    +	err_cause = MPIC_READ(mv_mpic_sc, MPIC_ERR_CAUSE);
     
     	if (err_cause)
     		bit_off = ffs(err_cause) - 1;
    @@ -615,8 +593,7 @@ pic_ipi_send(cpuset_t cpus, u_int ipi)
     		if (CPU_ISSET(i, &cpus))
     			val |= (1 << (8 + i));
     	val |= ipi;
    -	bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
    -	    MPIC_SOFT_INT, val);
    +	MPIC_WRITE(mv_mpic_sc, MPIC_SOFT_INT, val);
     }
     
     int
    
    From owner-svn-src-all@freebsd.org  Wed May 17 21:33:38 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id D417ED7195B;
     Wed, 17 May 2017 21:33:38 +0000 (UTC) (envelope-from slm@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 813281303;
     Wed, 17 May 2017 21:33:38 +0000 (UTC) (envelope-from slm@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HLXbc2044714;
     Wed, 17 May 2017 21:33:37 GMT (envelope-from slm@FreeBSD.org)
    Received: (from slm@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HLXbi6044710;
     Wed, 17 May 2017 21:33:37 GMT (envelope-from slm@FreeBSD.org)
    Message-Id: <201705172133.v4HLXbi6044710@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: slm set sender to slm@FreeBSD.org
     using -f
    From: Stephen McConnell 
    Date: Wed, 17 May 2017 21:33:37 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318427 - in head: share/man/man4 sys/dev/mpr
     sys/dev/mpr/mpi
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 21:33:38 -0000
    
    Author: slm
    Date: Wed May 17 21:33:37 2017
    New Revision: 318427
    URL: https://svnweb.freebsd.org/changeset/base/318427
    
    Log:
      Add tri-mode support (SAS/SATA/PCIe).
      
      This includes NVMe device support and adds support for the following adapters:
          SAS 3408
          SAS 3416
          SAS 3508
          SAS 3516
          SAS 3616
          SAS 3708
          SAS 3716
      
      Reviewed by:    ken, scottl, asomers, mav
      Approved by:	ken, scottl, mav
      MFC after:      2 weeks
      Relnotes:	yes
      Differential Revision: https://reviews.freebsd.org/D10095
    
    Added:
      head/sys/dev/mpr/mpi/mpi2_pci.h   (contents, props changed)
    Modified:
      head/share/man/man4/mpr.4
      head/sys/dev/mpr/mpi/mpi2.h
      head/sys/dev/mpr/mpi/mpi2_cnfg.h
      head/sys/dev/mpr/mpi/mpi2_hbd.h
      head/sys/dev/mpr/mpi/mpi2_history.txt
      head/sys/dev/mpr/mpi/mpi2_init.h
      head/sys/dev/mpr/mpi/mpi2_ioc.h
      head/sys/dev/mpr/mpi/mpi2_tool.h
      head/sys/dev/mpr/mpr.c
      head/sys/dev/mpr/mpr_config.c
      head/sys/dev/mpr/mpr_mapping.c
      head/sys/dev/mpr/mpr_mapping.h
      head/sys/dev/mpr/mpr_pci.c
      head/sys/dev/mpr/mpr_sas.c
      head/sys/dev/mpr/mpr_sas.h
      head/sys/dev/mpr/mpr_sas_lsi.c
      head/sys/dev/mpr/mpr_table.c
      head/sys/dev/mpr/mpr_table.h
      head/sys/dev/mpr/mpr_user.c
      head/sys/dev/mpr/mprvar.h
    
    Modified: head/share/man/man4/mpr.4
    ==============================================================================
    --- head/share/man/man4/mpr.4	Wed May 17 21:14:27 2017	(r318426)
    +++ head/share/man/man4/mpr.4	Wed May 17 21:33:37 2017	(r318427)
    @@ -1,8 +1,8 @@
     .\"
     .\" Copyright (c) 2010 Spectra Logic Corporation
     .\" Copyright (c) 2014 LSI Corp
    -.\" Copyright (c) 2016 Avago Technologies
    -.\" Copyright (c) 2016 Broadcom Ltd.
    +.\" Copyright (c) 2017 Avago Technologies
    +.\" Copyright (c) 2017 Broadcom Ltd.
     .\" All rights reserved.
     .\"
     .\" Redistribution and use in source and binary forms, with or without
    @@ -38,12 +38,12 @@
     .\" $Id$
     .\" $FreeBSD$
     .\"
    -.Dd July 6, 2016
    +.Dd May 17, 2017
     .Dt MPR 4
     .Os
     .Sh NAME
     .Nm mpr
    -.Nd "LSI Fusion-MPT 3 IT/IR 12Gb/s Serial Attached SCSI/SATA driver"
    +.Nd "LSI Fusion-MPT 3/3.5 IT/IR 12Gb/s Serial Attached SCSI/SATA/PCIe driver"
     .Sh SYNOPSIS
     To compile this driver into the kernel, place these lines in the kernel
     configuration file:
    @@ -62,8 +62,8 @@ mpr_load="YES"
     The
     .Nm
     driver provides support for Broadcom Ltd./Avago Tech (LSI)
    -Fusion-MPT 3 IT/IR
    -.Tn SAS
    +Fusion-MPT 3/3.5 IT/IR
    +.Tn SAS/PCIe
     controllers.
     .Sh HARDWARE
     These controllers are supported by the
    @@ -81,6 +81,24 @@ Broadcom Ltd./Avago Tech (LSI) SAS 3108 
     Broadcom Ltd./Avago Tech (LSI) SAS 3216 (16 Port SAS)
     .It
     Broadcom Ltd./Avago Tech (LSI) SAS 3224 (24 Port SAS)
    +.It
    +Broadcom Ltd./Avago Tech (LSI) SAS 3316 (16 Port SAS)
    +.It
    +Broadcom Ltd./Avago Tech (LSI) SAS 3324 (24 Port SAS)
    +.It
    +Broadcom Ltd./Avago Tech (LSI) SAS 3408 (8 Port SAS/PCIe)
    +.It
    +Broadcom Ltd./Avago Tech (LSI) SAS 3416 (16 Port SAS/PCIe)
    +.It
    +Broadcom Ltd./Avago Tech (LSI) SAS 3508 (8 Port SAS/PCIe)
    +.It
    +Broadcom Ltd./Avago Tech (LSI) SAS 3516 (16 Port SAS/PCIe)
    +.It
    +Broadcom Ltd./Avago Tech (LSI) SAS 3616 (16 Port SAS/PCIe)
    +.It
    +Broadcom Ltd./Avago Tech (LSI) SAS 3708 (8 Port SAS/PCIe)
    +.It
    +Broadcom Ltd./Avago Tech (LSI) SAS 3716 (16 Port SAS/PCIe)
     .El
     .Sh CONFIGURATION
     In all tunable descriptions below, X represents the adapter number.
    @@ -156,6 +174,24 @@ dev.mpr.X.io_cmds_active
     .Xr sysctl 8
     variable.
     .Pp
    +The current number of free PRP pages is stored in the
    +dev.mpr.X.prp_pages_free
    +.Xr sysctl 8
    +variable.
    +PRP pages are used by NVMe devices for I/O transfers, much like Scatter/Gather
    +lists.
    +.Pp
    +The lowest number of free PRP pages seen since boot is stored in the
    +dev.mpr.X.prp_pages_free_lowwater
    +.Xr sysctl 8
    +variable.
    +.Pp
    +The number of times that PRP page allocations have failed since boot is
    +stored in the
    +dev.mpr.X.prp_page_alloc_fail
    +.Xr sysctl 8
    +variable.
    +.Pp
     To set the maximum number of pages that will be used per I/O for all adapters,
     set this tunable in
     .Xr loader.conf 5 :
    @@ -229,13 +265,13 @@ Send SSU to HDDs, but not to SSDs.
     Send SSU to both HDDs and SSDs.
     .El
     .Pp
    -To control the feature for a specific adapter, set this tunable value in
    +To control this feature for a specific adapter, set this tunable value in
     .Xr loader.conf 5 :
     .Bd -literal -offset indent
     dev.mpr.X.enable_ssu
     .Ed
     .Pp
    -The same set of values are valid when setting this tunable for all adapters.
    +The same set of values are valid as when setting this tunable for all adapters.
     .Pp
     SATA disks that take several seconds to spin up and fail the SATA Identify
     command might not be discovered by the driver.
    @@ -261,6 +297,45 @@ dev.mpr.X.spinup_wait_time=NNNN
     tunable.
     NNNN is the number of seconds to wait for SATA devices to spin up when they fail
     the initial SATA Identify command.
    +.Pp
    +The driver can map devices discovered by the adapter so that target IDs
    +corresponding to a specific device persist across resets and reboots.
    +In some cases it is possible for devices to lose their mapped IDs due to
    +unexpected behavior from certain hardware, such as some types of enclosures.
    +To overcome this problem, a tunable is provided that will force the driver to
    +map devices using the Phy number associated with the device.
    +This feature is not recommended if the topology includes multiple
    +enclosures/expanders.
    +If multiple enclosures/expanders are present in the topology, Phy numbers are
    +repeated, causing all devices at these Phy numbers except the first device to
    +fail enumeration.
    +To control this feature for all adapters, set the
    +.Bd -literal -offset indent
    +hw.mpr.use_phy_num
    +.Ed
    +.Pp
    +tunable in
    +.Xr loader.conf 5
    +to one of these values:
    +.Bl -tag -width 6n -offset indent
    +.It -1
    +Only use Phy numbers to map devices and bypass the driver's mapping logic.
    +.It 0
    +Never use Phy numbers to map devices.
    +.It 1
    +Use Phy numbers to map devices, but only if the driver's mapping logic fails
    +to map the device that is being enumerated.
    +This is the default value.
    +.El
    +.Pp
    +To control this feature for a specific adapter, set this tunable value in
    +.Xr loader.conf 5 :
    +.Bd -literal -offset indent
    +dev.mpr.X.use_phy_num
    +.Ed
    +.Pp
    +The same set of values are valid as when setting this tunable for all adapters.
    +.Pp
     .Sh DEBUGGING
     To enable debugging prints from the
     .Nm
    
    Modified: head/sys/dev/mpr/mpi/mpi2.h
    ==============================================================================
    --- head/sys/dev/mpr/mpi/mpi2.h	Wed May 17 21:14:27 2017	(r318426)
    +++ head/sys/dev/mpr/mpi/mpi2.h	Wed May 17 21:33:37 2017	(r318427)
    @@ -44,7 +44,7 @@
      *                  scatter/gather formats.
      *  Creation Date:  June 21, 2006
      *
    - *  mpi2.h Version:  02.00.42
    + *  mpi2.h Version:  02.00.46
      *
      *  NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
      *        prefix are for use only on MPI v2.5 products, and must not be used
    @@ -132,7 +132,8 @@
      *                      Bumped MPI2_HEADER_VERSION_UNIT.
      *  03-16-15  02.00.37  Updated for MPI v2.6.
      *                      Bumped MPI2_HEADER_VERSION_UNIT.
    - *                      Added Scratchpad registers to
    + *                      Added Scratchpad registers and
    + *                      AtomicRequestDescriptorPost register to
      *                      MPI2_SYSTEM_INTERFACE_REGS.
      *                      Added MPI2_DIAG_SBR_RELOAD.
      *                      Added MPI2_IOCSTATUS_INSUFFICIENT_POWER.
    @@ -142,6 +143,14 @@
      *                      Added V7 HostDiagnostic register defines
      *  12-15-15  02.00.41  Bumped MPI_HEADER_VERSION_UNIT
      *  01-01-16  02.00.42  Bumped MPI_HEADER_VERSION_UNIT
    + *  04-05-16  02.00.43  Modified  MPI26_DIAG_BOOT_DEVICE_SELECT defines
    + *                      to be unique within first 32 characters.
    + *                      Removed AHCI support.
    + *                      Removed SOP support.
    + *                      Bumped MPI2_HEADER_VERSION_UNIT.
    + *  04-10-16  02.00.44  Bumped MPI2_HEADER_VERSION_UNIT.
    + *  07-06-16  02.00.45  Bumped MPI2_HEADER_VERSION_UNIT.
    + *  09-02-16  02.00.46  Bumped MPI2_HEADER_VERSION_UNIT.
      *  --------------------------------------------------------------------------
      */
     
    @@ -185,7 +194,7 @@
     
     
     /* Unit and Dev versioning for this MPI header set */
    -#define MPI2_HEADER_VERSION_UNIT            (0x2A)
    +#define MPI2_HEADER_VERSION_UNIT            (0x2E)
     #define MPI2_HEADER_VERSION_DEV             (0x00)
     #define MPI2_HEADER_VERSION_UNIT_MASK       (0xFF00)
     #define MPI2_HEADER_VERSION_UNIT_SHIFT      (8)
    @@ -245,7 +254,8 @@ typedef volatile struct _MPI2_SYSTEM_INT
         U32         Scratchpad[4];              /* 0xB0 */
         U32         RequestDescriptorPostLow;   /* 0xC0 */
         U32         RequestDescriptorPostHigh;  /* 0xC4 */
    -    U32         Reserved7[14];              /* 0xC8 */
    +    U32         AtomicRequestDescriptorPost;/* 0xC8 */ /* MPI v2.6 and later; reserved in earlier versions */
    +    U32         Reserved7[13];              /* 0xCC */
     } MPI2_SYSTEM_INTERFACE_REGS, MPI2_POINTER PTR_MPI2_SYSTEM_INTERFACE_REGS,
       Mpi2SystemInterfaceRegs_t, MPI2_POINTER pMpi2SystemInterfaceRegs_t;
     
    @@ -293,10 +303,11 @@ typedef volatile struct _MPI2_SYSTEM_INT
     #define MPI2_DIAG_BOOT_DEVICE_SELECT_HCDW       (0x00000800)
     
     /* Defines for V7A/V7R HostDiagnostic Register */
    -#define MPI26_DIAG_BOOT_DEVICE_SELECT_FLASH64    (0x00000000)
    -#define MPI26_DIAG_BOOT_DEVICE_SELECT_HCDW64     (0x00000800)
    -#define MPI26_DIAG_BOOT_DEVICE_SELECT_FLASH32    (0x00001000)
    -#define MPI26_DIAG_BOOT_DEVICE_SELECT_HCDW32     (0x00001800)
    +#define MPI26_DIAG_BOOT_DEVICE_SEL_64FLASH      (0x00000000)
    +#define MPI26_DIAG_BOOT_DEVICE_SEL_64HCDW       (0x00000800)
    +#define MPI26_DIAG_BOOT_DEVICE_SEL_32FLASH      (0x00001000)
    +#define MPI26_DIAG_BOOT_DEVICE_SEL_32HCDW       (0x00001800)
    +
     #define MPI2_DIAG_CLEAR_FLASH_BAD_SIG           (0x00000400)
     #define MPI2_DIAG_FORCE_HCB_ON_RESET            (0x00000200)
     #define MPI2_DIAG_HCB_MODE                      (0x00000100)
    @@ -379,6 +390,7 @@ typedef volatile struct _MPI2_SYSTEM_INT
      */
     #define MPI2_REQUEST_DESCRIPTOR_POST_LOW_OFFSET     (0x000000C0)
     #define MPI2_REQUEST_DESCRIPTOR_POST_HIGH_OFFSET    (0x000000C4)
    +#define MPI26_ATOMIC_REQUEST_DESCRIPTOR_POST_OFFSET (0x000000C8)
     
     
     /* Hard Reset delay timings */
    @@ -415,6 +427,7 @@ typedef struct _MPI2_DEFAULT_REQUEST_DES
     #define MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE            (0x08)
     #define MPI2_REQ_DESCRIPT_FLAGS_RAID_ACCELERATOR        (0x0A)
     #define MPI25_REQ_DESCRIPT_FLAGS_FAST_PATH_SCSI_IO      (0x0C)
    +#define MPI26_REQ_DESCRIPT_FLAGS_PCIE_ENCAPSULATED      (0x10)
     
     #define MPI2_REQ_DESCRIPT_FLAGS_IOC_FIFO_MARKER (0x01)
     
    @@ -482,6 +495,14 @@ typedef MPI2_SCSI_IO_REQUEST_DESCRIPTOR
         MPI2_POINTER pMpi25FastPathSCSIIORequestDescriptor_t;
     
     
    +/* PCIe Encapsulated Request Descriptor */
    +typedef MPI2_SCSI_IO_REQUEST_DESCRIPTOR
    +    MPI26_PCIE_ENCAPSULATED_REQUEST_DESCRIPTOR,
    +    MPI2_POINTER PTR_MPI26_PCIE_ENCAPSULATED_REQUEST_DESCRIPTOR,
    +    Mpi26PCIeEncapsulatedRequestDescriptor_t,
    +    MPI2_POINTER pMpi26PCIeEncapsulatedRequestDescriptor_t;
    +
    +
     /* union of Request Descriptors */
     typedef union _MPI2_REQUEST_DESCRIPTOR_UNION
     {
    @@ -491,11 +512,35 @@ typedef union _MPI2_REQUEST_DESCRIPTOR_U
         MPI2_SCSI_TARGET_REQUEST_DESCRIPTOR         SCSITarget;
         MPI2_RAID_ACCEL_REQUEST_DESCRIPTOR          RAIDAccelerator;
         MPI25_FP_SCSI_IO_REQUEST_DESCRIPTOR         FastPathSCSIIO;
    +    MPI26_PCIE_ENCAPSULATED_REQUEST_DESCRIPTOR  PCIeEncapsulated;
         U64                                         Words;
     } MPI2_REQUEST_DESCRIPTOR_UNION, MPI2_POINTER PTR_MPI2_REQUEST_DESCRIPTOR_UNION,
       Mpi2RequestDescriptorUnion_t, MPI2_POINTER pMpi2RequestDescriptorUnion_t;
     
     
    +/* Atomic Request Descriptors */
    +
    +/*
    + * All Atomic Request Descriptors have the same format, so the following
    + * structure is used for all Atomic Request Descriptors:
    + *      Atomic Default Request Descriptor
    + *      Atomic High Priority Request Descriptor
    + *      Atomic SCSI IO Request Descriptor
    + *      Atomic SCSI Target Request Descriptor
    + *      Atomic RAID Accelerator Request Descriptor
    + *      Atomic Fast Path SCSI IO Request Descriptor
    + *      Atomic PCIe Encapsulated Request Descriptor
    + */
    +
    +/* Atomic Request Descriptor */
    +typedef struct _MPI26_ATOMIC_REQUEST_DESCRIPTOR
    +{
    +    U8              RequestFlags;               /* 0x00 */
    +    U8              MSIxIndex;                  /* 0x01 */
    +    U16             SMID;                       /* 0x02 */
    +} MPI26_ATOMIC_REQUEST_DESCRIPTOR,
    +  MPI2_POINTER PTR_MPI26_ATOMIC_REQUEST_DESCRIPTOR,
    +  Mpi26AtomicRequestDescriptor_t, MPI2_POINTER pMpi26AtomicRequestDescriptor_t;
     
     /* for the RequestFlags field, use the same defines as MPI2_DEFAULT_REQUEST_DESCRIPTOR */
     
    @@ -520,6 +565,7 @@ typedef struct _MPI2_DEFAULT_REPLY_DESCR
     #define MPI2_RPY_DESCRIPT_FLAGS_TARGET_COMMAND_BUFFER       (0x03)
     #define MPI2_RPY_DESCRIPT_FLAGS_RAID_ACCELERATOR_SUCCESS    (0x05)
     #define MPI25_RPY_DESCRIPT_FLAGS_FAST_PATH_SCSI_IO_SUCCESS  (0x06)
    +#define MPI26_RPY_DESCRIPT_FLAGS_PCIE_ENCAPSULATED_SUCCESS  (0x08)
     #define MPI2_RPY_DESCRIPT_FLAGS_UNUSED                      (0x0F)
     
     /* values for marking a reply descriptor as unused */
    @@ -607,6 +653,14 @@ typedef MPI2_SCSI_IO_SUCCESS_REPLY_DESCR
         MPI2_POINTER pMpi25FastPathSCSIIOSuccessReplyDescriptor_t;
     
     
    +/* PCIe Encapsulated Success Reply Descriptor */
    +typedef MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR
    +    MPI26_PCIE_ENCAPSULATED_SUCCESS_REPLY_DESCRIPTOR,
    +    MPI2_POINTER PTR_MPI26_PCIE_ENCAPSULATED_SUCCESS_REPLY_DESCRIPTOR,
    +    Mpi26PCIeEncapsulatedSuccessReplyDescriptor_t,
    +    MPI2_POINTER pMpi26PCIeEncapsulatedSuccessReplyDescriptor_t;
    +
    +
     /* union of Reply Descriptors */
     typedef union _MPI2_REPLY_DESCRIPTORS_UNION
     {
    @@ -617,6 +671,7 @@ typedef union _MPI2_REPLY_DESCRIPTORS_UN
         MPI2_TARGET_COMMAND_BUFFER_REPLY_DESCRIPTOR     TargetCommandBuffer;
         MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR  RAIDAcceleratorSuccess;
         MPI25_FP_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR       FastPathSCSIIOSuccess;
    +    MPI26_PCIE_ENCAPSULATED_SUCCESS_REPLY_DESCRIPTOR    PCIeEncapsulatedSuccess;
         U64                                             Words;
     } MPI2_REPLY_DESCRIPTORS_UNION, MPI2_POINTER PTR_MPI2_REPLY_DESCRIPTORS_UNION,
       Mpi2ReplyDescriptorsUnion_t, MPI2_POINTER pMpi2ReplyDescriptorsUnion_t;
    @@ -659,6 +714,7 @@ typedef union _MPI2_REPLY_DESCRIPTORS_UN
     #define MPI2_FUNCTION_HOST_BASED_DISCOVERY_ACTION   (0x2F) /* Host Based Discovery Action */
     #define MPI2_FUNCTION_PWR_MGMT_CONTROL              (0x30) /* Power Management Control */
     #define MPI2_FUNCTION_SEND_HOST_MESSAGE             (0x31) /* Send Host Message */
    +#define MPI2_FUNCTION_NVME_ENCAPSULATED             (0x33) /* NVMe Encapsulated (MPI v2.6) */
     #define MPI2_FUNCTION_MIN_PRODUCT_SPECIFIC          (0xF0) /* beginning of product-specific range */
     #define MPI2_FUNCTION_MAX_PRODUCT_SPECIFIC          (0xFF) /* end of product-specific range */
     
    @@ -1232,6 +1288,8 @@ typedef union _MPI25_SGE_IO_UNION
     
     #define MPI26_IEEE_SGE_FLAGS_NSF_MASK           (0x1C)
     #define MPI26_IEEE_SGE_FLAGS_NSF_MPI_IEEE       (0x00)
    +#define MPI26_IEEE_SGE_FLAGS_NSF_NVME_PRP       (0x08)
    +#define MPI26_IEEE_SGE_FLAGS_NSF_NVME_SGL       (0x10)
     
     /* Data Location Address Space */
     
    
    Modified: head/sys/dev/mpr/mpi/mpi2_cnfg.h
    ==============================================================================
    --- head/sys/dev/mpr/mpi/mpi2_cnfg.h	Wed May 17 21:14:27 2017	(r318426)
    +++ head/sys/dev/mpr/mpi/mpi2_cnfg.h	Wed May 17 21:33:37 2017	(r318427)
    @@ -42,7 +42,7 @@
      *          Title:  MPI Configuration messages and pages
      *  Creation Date:  November 10, 2006
      *
    - *    mpi2_cnfg.h Version:  02.00.35
    + *    mpi2_cnfg.h Version:  02.00.39
      *
      *  NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
      *        prefix are for use only on MPI v2.5 products, and must not be used
    @@ -223,9 +223,38 @@
      *                      Flags field to IO Unit Page 7.
      *                      Added IO Unit Page 11.
      *                      Added new SAS Phy Event codes
    + *                      Added PCIe configuration pages.
    + *  03-19-15  02.00.32  Fixed PCIe Link Config page structure names to be
    + *                      unique in first 32 characters.
      *  05-25-15  02.00.33  Added more defines for the BiosOptions field of
      *                      MPI2_CONFIG_PAGE_BIOS_1.
    + *  08-25-15  02.00.34  Added PCIe Device Page 2 SGL format capability.
      *  12-18-15  02.00.35  Added SATADeviceWaitTime to SAS IO Unit Page 4.
    + *  01-21-16  02.00.36  Added/modified MPI2_MFGPAGE_DEVID_SAS defines.
    + *                      Added Link field to PCIe Link Pages
    + *                      Added EnclosureLevel and ConnectorName to PCIe
    + *                      Device Page 0.
    + *                      Added define for PCIE IoUnit page 1 max rate shift.
    + *                      Added comment for reserved ExtPageTypes.
    + *                      Added SAS 4 22.5 gbs speed support.
    + *                      Added PCIe 4 16.0 GT/sec speec support.
    + *                      Removed AHCI support.
    + *                      Removed SOP support.
    + *                      Added NegotiatedLinkRate and NegotiatedPortWidth to
    + *                      PCIe device page 0.
    + *  04-10-16  02.00.37  Fixed MPI2_MFGPAGE_DEVID_SAS3616/3708 defines
    + *  07-01-16  02.00.38  Added Manufacturing page 7 Connector types.
    + *                      Changed declaration of ConnectorName in PCIe DevicePage0
    + *                      to match SAS DevicePage 0.
    + *                      Added SATADeviceWaitTime to IO Unit Page 11.
    + *                      Added MPI26_MFGPAGE_DEVID_SAS4008
    + *                      Added x16 PCIe width to IO Unit Page 7
    + *                      Added LINKFLAGS to control SRIS in PCIe IO Unit page 1
    + *                      phy data.
    + *                      Added InitStatus to PCIe IO Unit Page 1 header.
    + *  09-01-16  02.00.39  Added MPI26_CONFIG_PAGE_ENCLOSURE_0 and related defines.
    + *                      Added MPI26_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE and
    + *                      MPI26_ENCLOS_PGAD_FORM_HANDLE page address formats.
      *  --------------------------------------------------------------------------
      */
     
    @@ -310,6 +339,12 @@ typedef union _MPI2_CONFIG_EXT_PAGE_HEAD
     #define MPI2_CONFIG_EXTPAGETYPE_SAS_PORT            (0x18)
     #define MPI2_CONFIG_EXTPAGETYPE_ETHERNET            (0x19)
     #define MPI2_CONFIG_EXTPAGETYPE_EXT_MANUFACTURING   (0x1A)
    +#define MPI2_CONFIG_EXTPAGETYPE_PCIE_IO_UNIT        (0x1B) /* MPI v2.6 and later */
    +#define MPI2_CONFIG_EXTPAGETYPE_PCIE_SWITCH         (0x1C) /* MPI v2.6 and later */
    +#define MPI2_CONFIG_EXTPAGETYPE_PCIE_DEVICE         (0x1D) /* MPI v2.6 and later */
    +#define MPI2_CONFIG_EXTPAGETYPE_PCIE_LINK           (0x1E) /* MPI v2.6 and later */
    +/*  Product specific reserved values  0xE0 - 0xEF */
    +/*  Vendor specific reserved values   0xF0 - 0xFF */
     
     
     /*****************************************************************************
    @@ -377,6 +412,12 @@ typedef union _MPI2_CONFIG_EXT_PAGE_HEAD
     
     #define MPI2_SAS_ENCLOS_PGAD_HANDLE_MASK            (0x0000FFFF)
     
    +/* Enclosure PageAddress format */
    +#define MPI26_ENCLOS_PGAD_FORM_MASK                 (0xF0000000)
    +#define MPI26_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE      (0x00000000)
    +#define MPI26_ENCLOS_PGAD_FORM_HANDLE               (0x10000000)
    +
    +#define MPI26_ENCLOS_PGAD_HANDLE_MASK               (0x0000FFFF)
     
     /* RAID Configuration PageAddress format */
     #define MPI2_RAID_PGAD_FORM_MASK                    (0xF0000000)
    @@ -403,6 +444,33 @@ typedef union _MPI2_CONFIG_EXT_PAGE_HEAD
     #define MPI2_ETHERNET_PGAD_IF_NUMBER_MASK           (0x000000FF)
     
     
    +/* PCIe Switch PageAddress format */
    +#define MPI26_PCIE_SWITCH_PGAD_FORM_MASK            (0xF0000000)
    +#define MPI26_PCIE_SWITCH_PGAD_FORM_GET_NEXT_HNDL   (0x00000000)
    +#define MPI26_PCIE_SWITCH_PGAD_FORM_HNDL_PORTNUM    (0x10000000)
    +#define MPI26_PCIE_SWITCH_EXPAND_PGAD_FORM_HNDL     (0x20000000)
    +
    +#define MPI26_PCIE_SWITCH_PGAD_HANDLE_MASK          (0x0000FFFF)
    +#define MPI26_PCIE_SWITCH_PGAD_PORTNUM_MASK         (0x00FF0000)
    +#define MPI26_PCIE_SWITCH_PGAD_PORTNUM_SHIFT        (16)
    +
    +
    +/* PCIe Device PageAddress format */
    +#define MPI26_PCIE_DEVICE_PGAD_FORM_MASK            (0xF0000000)
    +#define MPI26_PCIE_DEVICE_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
    +#define MPI26_PCIE_DEVICE_PGAD_FORM_HANDLE          (0x20000000)
    +
    +#define MPI26_PCIE_DEVICE_PGAD_HANDLE_MASK          (0x0000FFFF)
    +
    +/* PCIe Link PageAddress format */
    +#define MPI26_PCIE_LINK_PGAD_FORM_MASK            (0xF0000000)
    +#define MPI26_PCIE_LINK_PGAD_FORM_GET_NEXT_LINK   (0x00000000)
    +#define MPI26_PCIE_LINK_PGAD_FORM_LINK_NUM        (0x10000000)
    +
    +#define MPI26_PCIE_DEVICE_PGAD_LINKNUM_MASK       (0x000000FF)
    +
    +
    +
     /****************************************************************************
     *   Configuration messages
     ****************************************************************************/
    @@ -518,6 +586,20 @@ typedef struct _MPI2_CONFIG_REPLY
     #define MPI26_MFGPAGE_DEVID_SAS3324_3               (0x00C2)
     #define MPI26_MFGPAGE_DEVID_SAS3324_4               (0x00C3)
     
    +#define MPI26_MFGPAGE_DEVID_SAS3516                 (0x00AA)
    +#define MPI26_MFGPAGE_DEVID_SAS3516_1               (0x00AB)
    +#define MPI26_MFGPAGE_DEVID_SAS3416                 (0x00AC)
    +#define MPI26_MFGPAGE_DEVID_SAS3508                 (0x00AD)
    +#define MPI26_MFGPAGE_DEVID_SAS3508_1               (0x00AE)
    +#define MPI26_MFGPAGE_DEVID_SAS3408                 (0x00AF)
    +
    +#define MPI26_MFGPAGE_DEVID_SAS3716                 (0x00D0)
    +#define MPI26_MFGPAGE_DEVID_SAS3616                 (0x00D1)
    +#define MPI26_MFGPAGE_DEVID_SAS3708                 (0x00D2)
    +
    +#define MPI26_MFGPAGE_DEVID_SAS4008                 (0x00A1)
    +
    +
     /* Manufacturing Page 0 */
     
     typedef struct _MPI2_CONFIG_PAGE_MAN_0
    @@ -755,6 +837,12 @@ typedef struct _MPI2_MANPAGE7_CONNECTOR_
     #define MPI2_MANPAGE7_PINOUT_SFF_8644_8X                (0x0B)
     #define MPI2_MANPAGE7_PINOUT_SFF_8644_16X               (0x0C)
     #define MPI2_MANPAGE7_PINOUT_SFF_8436                   (0x0D)
    +#define MPI2_MANPAGE7_PINOUT_SFF_8088_A                 (0x0E)
    +#define MPI2_MANPAGE7_PINOUT_SFF_8643_16i               (0x0F)
    +#define MPI2_MANPAGE7_PINOUT_SFF_8654_4i                (0x10)
    +#define MPI2_MANPAGE7_PINOUT_SFF_8654_8i                (0x11)
    +#define MPI2_MANPAGE7_PINOUT_SFF_8611_4i                (0x12)
    +#define MPI2_MANPAGE7_PINOUT_SFF_8611_8i                (0x13)
     
     /* defines for the Location field */
     #define MPI2_MANPAGE7_LOCATION_UNKNOWN                  (0x01)
    @@ -1017,11 +1105,13 @@ typedef struct _MPI2_CONFIG_PAGE_IO_UNIT
     #define MPI2_IOUNITPAGE7_PCIE_WIDTH_X2              (0x02)
     #define MPI2_IOUNITPAGE7_PCIE_WIDTH_X4              (0x04)
     #define MPI2_IOUNITPAGE7_PCIE_WIDTH_X8              (0x08)
    +#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X16             (0x10)
     
     /* defines for IO Unit Page 7 PCIeSpeed field */
     #define MPI2_IOUNITPAGE7_PCIE_SPEED_2_5_GBPS        (0x00)
     #define MPI2_IOUNITPAGE7_PCIE_SPEED_5_0_GBPS        (0x01)
     #define MPI2_IOUNITPAGE7_PCIE_SPEED_8_0_GBPS        (0x02)
    +#define MPI2_IOUNITPAGE7_PCIE_SPEED_16_0_GBPS       (0x03)
     
     /* defines for IO Unit Page 7 ProcessorState field */
     #define MPI2_IOUNITPAGE7_PSTATE_MASK_SECOND         (0x0000000F)
    @@ -1079,6 +1169,7 @@ typedef struct _MPI2_CONFIG_PAGE_IO_UNIT
     /* defines for IO Unit Page 7 Flags field */
     #define MPI2_IOUNITPAGE7_FLAG_CABLE_POWER_EXC       (0x01)
     
    +
     /* IO Unit Page 8 */
     
     #define MPI2_IOUNIT8_NUM_THRESHOLDS     (4)
    @@ -1228,7 +1319,7 @@ typedef struct _MPI26_CONFIG_PAGE_IO_UNI
         U32                             Reserved3;                      /* 0x1C */
         U32                             Reserved4;                      /* 0x20 */
         U8                              BootDeviceWaitTime;             /* 0x24 */
    -    U8                              Reserved5;                      /* 0x25 */
    +    U8                              SATADeviceWaitTime;             /* 0x25 */
         U16                             Reserved6;                      /* 0x26 */
         U8                              NumPhys;                        /* 0x28 */
         U8                              PEInitialSpinupDelay;           /* 0x29 */
    @@ -1249,9 +1340,6 @@ typedef struct _MPI26_CONFIG_PAGE_IO_UNI
     
     
     
    -
    -
    -
     /****************************************************************************
     *   IOC Config Pages
     ****************************************************************************/
    @@ -1968,6 +2056,7 @@ typedef struct _MPI2_CONFIG_PAGE_RD_PDIS
     #define MPI2_SAS_NEG_LINK_RATE_3_0                      (0x09)
     #define MPI2_SAS_NEG_LINK_RATE_6_0                      (0x0A)
     #define MPI25_SAS_NEG_LINK_RATE_12_0                    (0x0B)
    +#define MPI26_SAS_NEG_LINK_RATE_22_5                    (0x0C)
     
     
     /* values for AttachedPhyInfo fields */
    @@ -2035,12 +2124,14 @@ typedef struct _MPI2_CONFIG_PAGE_RD_PDIS
     #define MPI2_SAS_PRATE_MAX_RATE_3_0                     (0x90)
     #define MPI2_SAS_PRATE_MAX_RATE_6_0                     (0xA0)
     #define MPI25_SAS_PRATE_MAX_RATE_12_0                   (0xB0)
    +#define MPI26_SAS_PRATE_MAX_RATE_22_5                   (0xC0)
     #define MPI2_SAS_PRATE_MIN_RATE_MASK                    (0x0F)
     #define MPI2_SAS_PRATE_MIN_RATE_NOT_PROGRAMMABLE        (0x00)
     #define MPI2_SAS_PRATE_MIN_RATE_1_5                     (0x08)
     #define MPI2_SAS_PRATE_MIN_RATE_3_0                     (0x09)
     #define MPI2_SAS_PRATE_MIN_RATE_6_0                     (0x0A)
     #define MPI25_SAS_PRATE_MIN_RATE_12_0                   (0x0B)
    +#define MPI26_SAS_PRATE_MIN_RATE_22_5                   (0x0C)
     
     
     /* values for SAS HwLinkRate fields */
    @@ -2049,11 +2140,13 @@ typedef struct _MPI2_CONFIG_PAGE_RD_PDIS
     #define MPI2_SAS_HWRATE_MAX_RATE_3_0                    (0x90)
     #define MPI2_SAS_HWRATE_MAX_RATE_6_0                    (0xA0)
     #define MPI25_SAS_HWRATE_MAX_RATE_12_0                  (0xB0)
    +#define MPI26_SAS_HWRATE_MAX_RATE_22_5                  (0xC0)
     #define MPI2_SAS_HWRATE_MIN_RATE_MASK                   (0x0F)
     #define MPI2_SAS_HWRATE_MIN_RATE_1_5                    (0x08)
     #define MPI2_SAS_HWRATE_MIN_RATE_3_0                    (0x09)
     #define MPI2_SAS_HWRATE_MIN_RATE_6_0                    (0x0A)
     #define MPI25_SAS_HWRATE_MIN_RATE_12_0                  (0x0B)
    +#define MPI26_SAS_HWRATE_MIN_RATE_22_5                  (0x0C)
     
     
     
    @@ -2227,11 +2320,13 @@ typedef struct _MPI2_CONFIG_PAGE_SASIOUN
     #define MPI2_SASIOUNIT1_MAX_RATE_3_0                                (0x90)
     #define MPI2_SASIOUNIT1_MAX_RATE_6_0                                (0xA0)
     #define MPI25_SASIOUNIT1_MAX_RATE_12_0                              (0xB0)
    +#define MPI26_SASIOUNIT1_MAX_RATE_22_5                              (0xC0)
     #define MPI2_SASIOUNIT1_MIN_RATE_MASK                               (0x0F)
     #define MPI2_SASIOUNIT1_MIN_RATE_1_5                                (0x08)
     #define MPI2_SASIOUNIT1_MIN_RATE_3_0                                (0x09)
     #define MPI2_SASIOUNIT1_MIN_RATE_6_0                                (0x0A)
     #define MPI25_SASIOUNIT1_MIN_RATE_12_0                              (0x0B)
    +#define MPI26_SASIOUNIT1_MIN_RATE_22_5                              (0x0C)
     
     /* see mpi2_sas.h for values for SAS IO Unit Page 1 ControllerPhyDeviceInfo values */
     
    @@ -2718,7 +2813,6 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_DEV
     #define MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID             (0x0002)
     #define MPI2_SAS_DEVICE0_FLAGS_DEVICE_PRESENT               (0x0001)
     
    -
     /* SAS Device Page 1 */
     
     typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_1
    @@ -2885,7 +2979,6 @@ typedef struct _MPI2_SASPHY3_PHY_EVENT_C
     #define MPI2_SASPHY3_EVENT_CODE_HOTPLUG_TIMEOUT             (0xD0)
     #define MPI2_SASPHY3_EVENT_CODE_MISALIGNED_MUX_PRIMITIVE    (0xD1)
     #define MPI2_SASPHY3_EVENT_CODE_RX_AIP                      (0xD2)
    -
     /* Following codes are product specific and in MPI v2.6 and later */
     #define MPI2_SASPHY3_EVENT_CODE_LCARB_WAIT_TIME             (0xD3)
     #define MPI2_SASPHY3_EVENT_CODE_RCVD_CONN_RESP_WAIT_TIME    (0xD4)
    @@ -2898,7 +2991,6 @@ typedef struct _MPI2_SASPHY3_PHY_EVENT_C
     #define MPI2_SASPHY3_EVENT_CODE_SATA_RX_START_RECEIVE       (0xDB)
     #define MPI2_SASPHY3_EVENT_CODE_SMP_RX_START_RECEIVE        (0xDC)
     
    -
     /* values for the CounterType field */
     #define MPI2_SASPHY3_COUNTER_TYPE_WRAPPING                  (0x00)
     #define MPI2_SASPHY3_COUNTER_TYPE_SATURATING                (0x01)
    @@ -2989,7 +3081,7 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_POR
     *   SAS Enclosure Config Pages
     ****************************************************************************/
     
    -/* SAS Enclosure Page 0 */
    +/* SAS Enclosure Page 0, Enclosure Page 0 */
     
     typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0
     {
    @@ -3007,7 +3099,10 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_ENC
         U32                                 Reserved4;                  /* 0x24 */
     } MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0,
       MPI2_POINTER PTR_MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0,
    -  Mpi2SasEnclosurePage0_t, MPI2_POINTER pMpi2SasEnclosurePage0_t;
    +  Mpi2SasEnclosurePage0_t, MPI2_POINTER pMpi2SasEnclosurePage0_t,
    +  MPI26_CONFIG_PAGE_ENCLOSURE_0,
    +  MPI2_POINTER PTR_MPI26_CONFIG_PAGE_ENCLOSURE_0,
    +  Mpi26EnclosurePage0_t, MPI2_POINTER pMpi26EnclosurePage0_t;
     
     #define MPI2_SASENCLOSURE0_PAGEVERSION      (0x04)
     
    @@ -3021,6 +3116,17 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_ENC
     #define MPI2_SAS_ENCLS0_FLAGS_MNG_SES_ENCLOSURE     (0x0004)
     #define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_GPIO          (0x0005)
     
    +#define MPI26_ENCLOSURE0_PAGEVERSION        (0x04)
    +
    +/* Values for Enclosure Page 0 Flags field */
    +#define MPI26_ENCLS0_FLAGS_ENCL_LEVEL_VALID         (0x0010)
    +#define MPI26_ENCLS0_FLAGS_MNG_MASK                 (0x000F)
    +#define MPI26_ENCLS0_FLAGS_MNG_UNKNOWN              (0x0000)
    +#define MPI26_ENCLS0_FLAGS_MNG_IOC_SES              (0x0001)
    +#define MPI26_ENCLS0_FLAGS_MNG_IOC_SGPIO            (0x0002)
    +#define MPI26_ENCLS0_FLAGS_MNG_EXP_SGPIO            (0x0003)
    +#define MPI26_ENCLS0_FLAGS_MNG_SES_ENCLOSURE        (0x0004)
    +#define MPI26_ENCLS0_FLAGS_MNG_IOC_GPIO             (0x0005)
     
     /****************************************************************************
     *   Log Config Page
    @@ -3300,5 +3406,424 @@ typedef struct _MPI2_CONFIG_PAGE_EXT_MAN
     
     /* PageVersion should be provided by product-specific code */
     
    +
    +/****************************************************************************
    +*   values for fields used by several types of PCIe Config Pages
    +****************************************************************************/
    +
    +/* values for NegotiatedLinkRates fields */
    +#define MPI26_PCIE_NEG_LINK_RATE_MASK_PHYSICAL          (0x0F)
    +/* link rates used for Negotiated Physical Link Rate */
    +#define MPI26_PCIE_NEG_LINK_RATE_UNKNOWN                (0x00)
    +#define MPI26_PCIE_NEG_LINK_RATE_PHY_DISABLED           (0x01)
    +#define MPI26_PCIE_NEG_LINK_RATE_2_5                    (0x02)
    +#define MPI26_PCIE_NEG_LINK_RATE_5_0                    (0x03)
    +#define MPI26_PCIE_NEG_LINK_RATE_8_0                    (0x04)
    +#define MPI26_PCIE_NEG_LINK_RATE_16_0                   (0x05)
    +
    +
    +/****************************************************************************
    +*   PCIe IO Unit Config Pages (MPI v2.6 and later)
    +****************************************************************************/
    +
    +/* PCIe IO Unit Page 0 */
    +
    +typedef struct _MPI26_PCIE_IO_UNIT0_PHY_DATA
    +{
    +    U8          Link;                   /* 0x00 */
    +    U8          LinkFlags;              /* 0x01 */
    +    U8          PhyFlags;               /* 0x02 */
    +    U8          NegotiatedLinkRate;     /* 0x03 */
    +    U32         ControllerPhyDeviceInfo;/* 0x04 */
    +    U16         AttachedDevHandle;      /* 0x08 */
    +    U16         ControllerDevHandle;    /* 0x0A */
    +    U32         EnumerationStatus;      /* 0x0C */
    +    U32         Reserved1;              /* 0x10 */
    +} MPI26_PCIE_IO_UNIT0_PHY_DATA, MPI2_POINTER PTR_MPI26_PCIE_IO_UNIT0_PHY_DATA,
    +  Mpi26PCIeIOUnit0PhyData_t, MPI2_POINTER pMpi26PCIeIOUnit0PhyData_t;
    +
    +/*
    + * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
    + * one and check the value returned for NumPhys at runtime.
    + */
    +#ifndef MPI26_PCIE_IOUNIT0_PHY_MAX
    +#define MPI26_PCIE_IOUNIT0_PHY_MAX      (1)
    +#endif
    +
    +typedef struct _MPI26_CONFIG_PAGE_PIOUNIT_0
    +{
    +    MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;                                 /* 0x00 */
    +    U32                                 Reserved1;                              /* 0x08 */
    +    U8                                  NumPhys;                                /* 0x0C */
    +    U8                                  InitStatus;                             /* 0x0D */
    +    U16                                 Reserved3;                              /* 0x0E */
    +    MPI26_PCIE_IO_UNIT0_PHY_DATA        PhyData[MPI26_PCIE_IOUNIT0_PHY_MAX];    /* 0x10 */
    +} MPI26_CONFIG_PAGE_PIOUNIT_0,
    +  MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PIOUNIT_0,
    +  Mpi26PCIeIOUnitPage0_t, MPI2_POINTER pMpi26PCIeIOUnitPage0_t;
    +
    +#define MPI26_PCIEIOUNITPAGE0_PAGEVERSION                   (0x00)
    +
    +/* values for PCIe IO Unit Page 0 LinkFlags */
    +#define MPI26_PCIEIOUNIT0_LINKFLAGS_ENUMERATION_IN_PROGRESS (0x08)
    +
    +/* values for PCIe IO Unit Page 0 PhyFlags */
    +#define MPI26_PCIEIOUNIT0_PHYFLAGS_PHY_DISABLED             (0x08)
    +
    +/* use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
    +
    +/* see mpi2_pci.h for values for PCIe IO Unit Page 0 ControllerPhyDeviceInfo values */
    +
    +/* values for PCIe IO Unit Page 0 EnumerationStatus */
    +#define MPI26_PCIEIOUNIT0_ES_MAX_SWITCHES_EXCEEDED          (0x40000000)
    +#define MPI26_PCIEIOUNIT0_ES_MAX_DEVICES_EXCEEDED           (0x20000000)
    +
    +
    +/* PCIe IO Unit Page 1 */
    +
    +typedef struct _MPI26_PCIE_IO_UNIT1_PHY_DATA
    +{
    +    U8          Link;                       /* 0x00 */
    +    U8          LinkFlags;                  /* 0x01 */
    +    U8          PhyFlags;                   /* 0x02 */
    +    U8          MaxMinLinkRate;             /* 0x03 */
    +    U32         ControllerPhyDeviceInfo;    /* 0x04 */
    +    U32         Reserved1;                  /* 0x08 */
    +} MPI26_PCIE_IO_UNIT1_PHY_DATA, MPI2_POINTER PTR_MPI26_PCIE_IO_UNIT1_PHY_DATA,
    +  Mpi26PCIeIOUnit1PhyData_t, MPI2_POINTER pMpi26PCIeIOUnit1PhyData_t;
    +
    +/* values for LinkFlags */
    +#define MPI26_PCIEIOUNIT1_LINKFLAGS_DIS_SRIS    (0x00)
    +#define MPI26_PCIEIOUNIT1_LINKFLAGS_EN_SRIS     (0x01)
    +
    +/*
    + * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
    + * one and check the value returned for NumPhys at runtime.
    + */
    +#ifndef MPI26_PCIE_IOUNIT1_PHY_MAX
    +#define MPI26_PCIE_IOUNIT1_PHY_MAX      (1)
    +#endif
    +
    +typedef struct _MPI26_CONFIG_PAGE_PIOUNIT_1
    +{
    +    MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;                             /* 0x00 */
    +    U16                                 ControlFlags;                       /* 0x08 */
    +    U16                                 Reserved;                           /* 0x0A */
    +    U16                                 AdditionalControlFlags;             /* 0x0C */
    +    U16                                 NVMeMaxQueueDepth;                  /* 0x0E */
    +    U8                                  NumPhys;                            /* 0x10 */
    +    U8                                  Reserved1;                          /* 0x11 */
    +    U16                                 Reserved2;                          /* 0x12 */
    +    MPI26_PCIE_IO_UNIT1_PHY_DATA        PhyData[MPI26_PCIE_IOUNIT1_PHY_MAX];/* 0x14 */
    +} MPI26_CONFIG_PAGE_PIOUNIT_1,
    +  MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PIOUNIT_1,
    +  Mpi26PCIeIOUnitPage1_t, MPI2_POINTER pMpi26PCIeIOUnitPage1_t;
    +
    +#define MPI26_PCIEIOUNITPAGE1_PAGEVERSION   (0x00)
    +
    +/* values for PCIe IO Unit Page 1 PhyFlags */
    +#define MPI26_PCIEIOUNIT1_PHYFLAGS_PHY_DISABLE                      (0x08)
    +#define MPI26_PCIEIOUNIT1_PHYFLAGS_ENDPOINT_ONLY                    (0x01)
    +
    +/* values for PCIe IO Unit Page 1 MaxMinLinkRate */
    +#define MPI26_PCIEIOUNIT1_MAX_RATE_MASK                             (0xF0)
    +#define MPI26_PCIEIOUNIT1_MAX_RATE_SHIFT                            (4)
    +#define MPI26_PCIEIOUNIT1_MAX_RATE_2_5                              (0x20)
    +#define MPI26_PCIEIOUNIT1_MAX_RATE_5_0                              (0x30)
    +#define MPI26_PCIEIOUNIT1_MAX_RATE_8_0                              (0x40)
    +#define MPI26_PCIEIOUNIT1_MAX_RATE_16_0                             (0x50)
    +
    +/* see mpi2_pci.h for values for PCIe IO Unit Page 0 ControllerPhyDeviceInfo values */
    +
    +
    +/****************************************************************************
    +*   PCIe Switch Config Pages (MPI v2.6 and later)
    +****************************************************************************/
    +
    +/* PCIe Switch Page 0 */
    +
    +typedef struct _MPI26_CONFIG_PAGE_PSWITCH_0
    +{
    +    MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;                     /* 0x00 */
    +    U8                                  PhysicalPort;               /* 0x08 */
    +    U8                                  Reserved1;                  /* 0x09 */
    +    U16                                 Reserved2;                  /* 0x0A */
    +    U16                                 DevHandle;                  /* 0x0C */
    +    U16                                 ParentDevHandle;            /* 0x0E */
    +    U8                                  NumPorts;                   /* 0x10 */
    +    U8                                  PCIeLevel;                  /* 0x11 */
    +    U16                                 Reserved3;                  /* 0x12 */
    +    U32                                 Reserved4;                  /* 0x14 */
    +    U32                                 Reserved5;                  /* 0x18 */
    +    U32                                 Reserved6;                  /* 0x1C */
    +} MPI26_CONFIG_PAGE_PSWITCH_0, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PSWITCH_0,
    +  Mpi26PCIeSwitchPage0_t, MPI2_POINTER pMpi26PCIeSwitchPage0_t;
    +
    +#define MPI26_PCIESWITCH0_PAGEVERSION       (0x00)
    +
    +
    +/* PCIe Switch Page 1 */
    +
    +typedef struct _MPI26_CONFIG_PAGE_PSWITCH_1
    +{
    +    MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;                     /* 0x00 */
    +    U8                                  PhysicalPort;               /* 0x08 */
    +    U8                                  Reserved1;                  /* 0x09 */
    +    U16                                 Reserved2;                  /* 0x0A */
    +    U8                                  NumPorts;                   /* 0x0C */
    +    U8                                  PortNum;                    /* 0x0D */
    +    U16                                 AttachedDevHandle;          /* 0x0E */
    +    U16                                 SwitchDevHandle;            /* 0x10 */
    +    U8                                  NegotiatedPortWidth;        /* 0x12 */
    +    U8                                  NegotiatedLinkRate;         /* 0x13 */
    +    U32                                 Reserved4;                  /* 0x14 */
    +    U32                                 Reserved5;                  /* 0x18 */
    +} MPI26_CONFIG_PAGE_PSWITCH_1, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PSWITCH_1,
    +  Mpi26PCIeSwitchPage1_t, MPI2_POINTER pMpi26PCIeSwitchPage1_t;
    +
    +#define MPI26_PCIESWITCH1_PAGEVERSION       (0x00)
    +
    +/* use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
    +
    +
    +/****************************************************************************
    +*   PCIe Device Config Pages (MPI v2.6 and later)
    +****************************************************************************/
    +
    +/* PCIe Device Page 0 */
    +
    +typedef struct _MPI26_CONFIG_PAGE_PCIEDEV_0
    +{
    +    MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;                 /* 0x00 */
    +    U16                                 Slot;                   /* 0x08 */
    +    U16                                 EnclosureHandle;        /* 0x0A */
    +    U64                                 WWID;                   /* 0x0C */
    +    U16                                 ParentDevHandle;        /* 0x14 */
    +    U8                                  PortNum;                /* 0x16 */
    +    U8                                  AccessStatus;           /* 0x17 */
    +    U16                                 DevHandle;              /* 0x18 */
    +    U8                                  PhysicalPort;           /* 0x1A */
    +    U8                                  Reserved1;              /* 0x1B */
    +    U32                                 DeviceInfo;             /* 0x1C */
    +    U32                                 Flags;                  /* 0x20 */
    +    U8                                  SupportedLinkRates;     /* 0x24 */
    +    U8                                  MaxPortWidth;           /* 0x25 */
    +    U8                                  NegotiatedPortWidth;    /* 0x26 */
    +    U8                                  NegotiatedLinkRate;     /* 0x27 */
    +    U8                                  EnclosureLevel;         /* 0x28 */
    +    U8                                  Reserved2;              /* 0x29 */
    +    U16                                 Reserved3;              /* 0x2A */
    +    U8                                  ConnectorName[4];       /* 0x2C */
    +    U32                                 Reserved4;              /* 0x30 */
    +    U32                                 Reserved5;              /* 0x34 */
    +} MPI26_CONFIG_PAGE_PCIEDEV_0, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PCIEDEV_0,
    +  Mpi26PCIeDevicePage0_t, MPI2_POINTER pMpi26PCIeDevicePage0_t;
    +
    +#define MPI26_PCIEDEVICE0_PAGEVERSION       (0x01)
    +
    +/* values for PCIe Device Page 0 AccessStatus field */
    +#define MPI26_PCIEDEV0_ASTATUS_NO_ERRORS                    (0x00)
    +#define MPI26_PCIEDEV0_ASTATUS_NEEDS_INITIALIZATION         (0x04)
    +#define MPI26_PCIEDEV0_ASTATUS_CAPABILITY_FAILED            (0x02)
    +#define MPI26_PCIEDEV0_ASTATUS_DEVICE_BLOCKED               (0x07)
    +#define MPI26_PCIEDEV0_ASTATUS_MEMORY_SPACE_ACCESS_FAILED   (0x08)
    +#define MPI26_PCIEDEV0_ASTATUS_UNSUPPORTED_DEVICE           (0x09)
    +#define MPI26_PCIEDEV0_ASTATUS_MSIX_REQUIRED                (0x0A)
    +#define MPI26_PCIEDEV0_ASTATUS_UNKNOWN                      (0x10)
    +
    +#define MPI26_PCIEDEV0_ASTATUS_NVME_READY_TIMEOUT           (0x30)
    +#define MPI26_PCIEDEV0_ASTATUS_NVME_DEVCFG_UNSUPPORTED      (0x31)
    +#define MPI26_PCIEDEV0_ASTATUS_NVME_IDENTIFY_FAILED         (0x32)
    +#define MPI26_PCIEDEV0_ASTATUS_NVME_QCONFIG_FAILED          (0x33)
    +#define MPI26_PCIEDEV0_ASTATUS_NVME_QCREATION_FAILED        (0x34)
    +#define MPI26_PCIEDEV0_ASTATUS_NVME_EVENTCFG_FAILED         (0x35)
    +#define MPI26_PCIEDEV0_ASTATUS_NVME_GET_FEATURE_STAT_FAILED (0x36)
    +#define MPI26_PCIEDEV0_ASTATUS_NVME_IDLE_TIMEOUT            (0x37)
    +#define MPI26_PCIEDEV0_ASTATUS_NVME_FAILURE_STATUS          (0x38)
    +
    +#define MPI26_PCIEDEV0_ASTATUS_INIT_FAIL_MAX                (0x3F)
    +
    +/* see mpi2_pci.h for the MPI26_PCIE_DEVINFO_ defines used for the DeviceInfo field */
    +
    +/* values for PCIe Device Page 0 Flags field */
    +#define MPI26_PCIEDEV0_FLAGS_UNAUTHORIZED_DEVICE            (0x8000)
    +#define MPI26_PCIEDEV0_FLAGS_ENABLED_FAST_PATH              (0x4000)
    +#define MPI26_PCIEDEV0_FLAGS_FAST_PATH_CAPABLE              (0x2000)
    +#define MPI26_PCIEDEV0_FLAGS_ASYNCHRONOUS_NOTIFICATION      (0x0400)
    +#define MPI26_PCIEDEV0_FLAGS_ATA_SW_PRESERVATION            (0x0200)
    +#define MPI26_PCIEDEV0_FLAGS_UNSUPPORTED_DEVICE             (0x0100)
    +#define MPI26_PCIEDEV0_FLAGS_ATA_48BIT_LBA_SUPPORTED        (0x0080)
    +#define MPI26_PCIEDEV0_FLAGS_ATA_SMART_SUPPORTED            (0x0040)
    +#define MPI26_PCIEDEV0_FLAGS_ATA_NCQ_SUPPORTED              (0x0020)
    +#define MPI26_PCIEDEV0_FLAGS_ATA_FUA_SUPPORTED              (0x0010)
    +#define MPI26_PCIEDEV0_FLAGS_ENCL_LEVEL_VALID               (0x0002)
    +#define MPI26_PCIEDEV0_FLAGS_DEVICE_PRESENT                 (0x0001)
    +
    +/* values for PCIe Device Page 0 SupportedLinkRates field */
    +#define MPI26_PCIEDEV0_LINK_RATE_16_0_SUPPORTED             (0x08)
    +#define MPI26_PCIEDEV0_LINK_RATE_8_0_SUPPORTED              (0x04)
    +#define MPI26_PCIEDEV0_LINK_RATE_5_0_SUPPORTED              (0x02)
    +#define MPI26_PCIEDEV0_LINK_RATE_2_5_SUPPORTED              (0x01)
    +
    +/* use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */
    +
    +
    +/* PCIe Device Page 2 */
    +
    +typedef struct _MPI26_CONFIG_PAGE_PCIEDEV_2
    +{
    +    MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;                 /* 0x00 */
    +    U16                                 DevHandle;              /* 0x08 */
    +    U16                                 Reserved1;              /* 0x0A */
    +    U32                                 MaximumDataTransferSize;/* 0x0C */
    +    U32                                 Capabilities;           /* 0x10 */
    +    U32                                 Reserved2;              /* 0x14 */
    +} MPI26_CONFIG_PAGE_PCIEDEV_2, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PCIEDEV_2,
    +  Mpi26PCIeDevicePage2_t, MPI2_POINTER pMpi26PCIeDevicePage2_t;
    +
    +#define MPI26_PCIEDEVICE2_PAGEVERSION       (0x00)
    +
    +/* defines for PCIe Device Page 2 Capabilities field */
    +#define MPI26_PCIEDEV2_CAP_SGL_FORMAT                  (0x00000004)
    +#define MPI26_PCIEDEV2_CAP_BIT_BUCKET_SUPPORT          (0x00000002)
    +#define MPI26_PCIEDEV2_CAP_SGL_SUPPORT                 (0x00000001)
    +
    +
    +/****************************************************************************
    +*   PCIe Link Config Pages (MPI v2.6 and later)
    +****************************************************************************/
    +
    +/* PCIe Link Page 1 */
    +
    +typedef struct _MPI26_CONFIG_PAGE_PCIELINK_1
    +{
    +    MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;                     /* 0x00 */
    +    U8                                  Link;                       /* 0x08 */
    +    U8                                  Reserved1;                  /* 0x09 */
    +    U16                                 Reserved2;                  /* 0x0A */
    +    U32                                 CorrectableErrorCount;      /* 0x0C */
    +    U16                                 NonFatalErrorCount;         /* 0x10 */
    +    U16                                 Reserved3;                  /* 0x12 */
    +    U16                                 FatalErrorCount;            /* 0x14 */
    +    U16                                 Reserved4;                  /* 0x16 */
    +} MPI26_CONFIG_PAGE_PCIELINK_1, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PCIELINK_1,
    +  Mpi26PcieLinkPage1_t, MPI2_POINTER pMpi26PcieLinkPage1_t;
    +
    +#define MPI26_PCIELINK1_PAGEVERSION            (0x00)
    +
    +/* PCIe Link Page 2 */
    +
    +typedef struct _MPI26_PCIELINK2_LINK_EVENT
    +{
    +    U8          LinkEventCode;      /* 0x00 */
    +    U8          Reserved1;          /* 0x01 */
    +    U16         Reserved2;          /* 0x02 */
    +    U32         LinkEventInfo;      /* 0x04 */
    +} MPI26_PCIELINK2_LINK_EVENT, MPI2_POINTER PTR_MPI26_PCIELINK2_LINK_EVENT,
    +  Mpi26PcieLink2LinkEvent_t, MPI2_POINTER pMpi26PcieLink2LinkEvent_t;
    +
    +/* use MPI26_PCIELINK3_EVTCODE_ for the LinkEventCode field */
    +
    +
    +/*
    + * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
    + * one and check the value returned for NumLinkEvents at runtime.
    + */
    +#ifndef MPI26_PCIELINK2_LINK_EVENT_MAX
    +#define MPI26_PCIELINK2_LINK_EVENT_MAX      (1)
    +#endif
    +
    +typedef struct _MPI26_CONFIG_PAGE_PCIELINK_2
    +{
    +    MPI2_CONFIG_EXTENDED_PAGE_HEADER    Header;                     /* 0x00 */
    +    U8                                  Link;                       /* 0x08 */
    +    U8                                  Reserved1;                  /* 0x09 */
    +    U16                                 Reserved2;                  /* 0x0A */
    +    U8                                  NumLinkEvents;              /* 0x0C */
    +    U8                                  Reserved3;                  /* 0x0D */
    +    U16                                 Reserved4;                  /* 0x0E */
    +    MPI26_PCIELINK2_LINK_EVENT          LinkEvent[MPI26_PCIELINK2_LINK_EVENT_MAX]; /* 0x10 */
    +} MPI26_CONFIG_PAGE_PCIELINK_2, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PCIELINK_2,
    +  Mpi26PcieLinkPage2_t, MPI2_POINTER pMpi26PcieLinkPage2_t;
    +
    +#define MPI26_PCIELINK2_PAGEVERSION            (0x00)
    +
    +
    +/* PCIe Link Page 3 */
    +
    +typedef struct _MPI26_PCIELINK3_LINK_EVENT_CONFIG
    +{
    +    U8          LinkEventCode;      /* 0x00 */
    +    U8          Reserved1;          /* 0x01 */
    +    U16         Reserved2;          /* 0x02 */
    +    U8          CounterType;        /* 0x04 */
    +    U8          ThresholdWindow;    /* 0x05 */
    +    U8          TimeUnits;          /* 0x06 */
    +    U8          Reserved3;          /* 0x07 */
    +    U32         EventThreshold;     /* 0x08 */
    +    U16         ThresholdFlags;     /* 0x0C */
    +    U16         Reserved4;          /* 0x0E */
    +} MPI26_PCIELINK3_LINK_EVENT_CONFIG, MPI2_POINTER PTR_MPI26_PCIELINK3_LINK_EVENT_CONFIG,
    +  Mpi26PcieLink3LinkEventConfig_t, MPI2_POINTER pMpi26PcieLink3LinkEventConfig_t;
    +
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Wed May 17 22:05:08 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA655D71408;
     Wed, 17 May 2017 22:05:08 +0000 (UTC)
     (envelope-from loos@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 8A8FC825;
     Wed, 17 May 2017 22:05:08 +0000 (UTC)
     (envelope-from loos@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HM57nS057434;
     Wed, 17 May 2017 22:05:07 GMT (envelope-from loos@FreeBSD.org)
    Received: (from loos@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HM57p1057433;
     Wed, 17 May 2017 22:05:07 GMT (envelope-from loos@FreeBSD.org)
    Message-Id: <201705172205.v4HM57p1057433@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: loos set sender to
     loos@FreeBSD.org using -f
    From: Luiz Otavio O Souza 
    Date: Wed, 17 May 2017 22:05:07 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318428 - head/sys/boot/fdt/dts/arm
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 22:05:08 -0000
    
    Author: loos
    Date: Wed May 17 22:05:07 2017
    New Revision: 318428
    URL: https://svnweb.freebsd.org/changeset/base/318428
    
    Log:
      Fix the offset for the CPU0 MPIC registers.
      
      Please note that only a subset of CPU0 registers are exported.  CPU1
      registers are not touched.
      
      Obtained from:	ARMADA38X Functional Specifications
      Sponsored by:	Rubicon Communications, LLC (Netgate)
    
    Modified:
      head/sys/boot/fdt/dts/arm/armada-38x.dtsi
    
    Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi
    ==============================================================================
    --- head/sys/boot/fdt/dts/arm/armada-38x.dtsi	Wed May 17 21:33:37 2017	(r318427)
    +++ head/sys/boot/fdt/dts/arm/armada-38x.dtsi	Wed May 17 22:05:07 2017	(r318428)
    @@ -419,7 +419,7 @@
     
     			mpic: interrupt-controller@20a00 {
     				compatible = "marvell,mpic";
    -				reg = <0x20a00 0x2d0>, <0x21070 0x58>;
    +				reg = <0x20a00 0x2d0>, <0x21870 0x58>;
     				#interrupt-cells = <1>;
     				#size-cells = <1>;
     				interrupt-controller;
    
    From owner-svn-src-all@freebsd.org  Wed May 17 22:13:10 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1401BD718A9;
     Wed, 17 May 2017 22:13:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id A7012EFE;
     Wed, 17 May 2017 22:13:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HMD8Th061378;
     Wed, 17 May 2017 22:13:08 GMT (envelope-from jhb@FreeBSD.org)
    Received: (from jhb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HMD8Js061369;
     Wed, 17 May 2017 22:13:08 GMT (envelope-from jhb@FreeBSD.org)
    Message-Id: <201705172213.v4HMD8Js061369@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
     using -f
    From: John Baldwin 
    Date: Wed, 17 May 2017 22:13:08 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318429 - in head: share/man/man4 sys/conf sys/dev/cxgbe
     sys/dev/cxgbe/crypto sys/modules/cxgbe sys/modules/cxgbe/ccr sys/powerpc/conf
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 22:13:10 -0000
    
    Author: jhb
    Date: Wed May 17 22:13:07 2017
    New Revision: 318429
    URL: https://svnweb.freebsd.org/changeset/base/318429
    
    Log:
      Add a driver for the Chelsio T6 crypto accelerator engine.
      
      The ccr(4) driver supports use of the crypto accelerator engine on
      Chelsio T6 NICs in "lookaside" mode via the opencrypto framework.
      
      Currently, the driver supports AES-CBC, AES-CTR, AES-GCM, and AES-XTS
      cipher algorithms as well as the SHA1-HMAC, SHA2-256-HMAC, SHA2-384-HMAC,
      and SHA2-512-HMAC authentication algorithms.  The driver also supports
      chaining one of AES-CBC, AES-CTR, or AES-XTS with an authentication
      algorithm for encrypt-then-authenticate operations.
      
      Note that this driver is still under active development and testing and
      may not yet be ready for production use.  It does pass the tests in
      tests/sys/opencrypto with the exception that the AES-GCM implementation
      in the driver does not yet support requests with a zero byte payload.
      
      To use this driver currently, the "uwire" configuration must be used
      along with explicitly enabling support for lookaside crypto capabilities
      in the cxgbe(4) driver.  These can be done by setting the following
      tunables before loading the cxgbe(4) driver:
      
          hw.cxgbe.config_file=uwire
          hw.cxgbe.cryptocaps_allowed=-1
      
      MFC after:	1 month
      Relnotes:	yes
      Sponsored by:	Chelsio Communications
      Differential Revision:	https://reviews.freebsd.org/D10763
    
    Added:
      head/share/man/man4/ccr.4   (contents, props changed)
      head/sys/dev/cxgbe/crypto/
      head/sys/dev/cxgbe/crypto/t4_crypto.c   (contents, props changed)
      head/sys/dev/cxgbe/crypto/t4_crypto.h   (contents, props changed)
      head/sys/modules/cxgbe/ccr/
      head/sys/modules/cxgbe/ccr/Makefile   (contents, props changed)
    Modified:
      head/share/man/man4/Makefile
      head/share/man/man4/cxgbe.4
      head/sys/conf/NOTES
      head/sys/conf/files
      head/sys/dev/cxgbe/adapter.h
      head/sys/modules/cxgbe/Makefile
      head/sys/powerpc/conf/NOTES
    
    Modified: head/share/man/man4/Makefile
    ==============================================================================
    --- head/share/man/man4/Makefile	Wed May 17 22:05:07 2017	(r318428)
    +++ head/share/man/man4/Makefile	Wed May 17 22:13:07 2017	(r318429)
    @@ -100,6 +100,7 @@ MAN=	aac.4 \
     	cc_newreno.4 \
     	cc_vegas.4 \
     	${_ccd.4} \
    +	ccr.4 \
     	cd.4 \
     	cdce.4 \
     	cfi.4 \
    
    Added: head/share/man/man4/ccr.4
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ head/share/man/man4/ccr.4	Wed May 17 22:13:07 2017	(r318429)
    @@ -0,0 +1,110 @@
    +.\" Copyright (c) 2017, Chelsio Inc
    +.\" All rights reserved.
    +.\"
    +.\" Redistribution and use in source and binary forms, with or without
    +.\" modification, are permitted provided that the following conditions
    +.\" are met:
    +.\" 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$
    +.\"
    +.Dd May 16, 2017
    +.Dt CCR 4
    +.Os
    +.Sh NAME
    +.Nm ccr
    +.Nd "Chelsio T6 crypto accelerator driver"
    +.Sh SYNOPSIS
    +To compile this driver into the kernel,
    +place the following lines in your
    +kernel configuration file:
    +.Bd -ragged -offset indeunt
    +.Cd "device ccr"
    +.Ed
    +.Pp
    +To load the driver as a
    +module at boot time, place the following line in
    +.Xr loader.conf 5 :
    +.Bd -literal -offset indent
    +ccr_load="YES"
    +.Ed
    +.Sh DESCRIPTION
    +The
    +.Nm
    +driver provides support for the crypto accelerator engine included on
    +PCI Express Ethernet adapters based on the Chelsio Terminator 6 ASIC (T6).
    +The driver accelerates AES-CBC, AES-CTR, AES-GCM, AES-XTS, SHA1-HMAC,
    +SHA2-256-HMAC, SHA2-384-HMAC, and SHA2-512-HMAC operations for
    +.Xr crypto 4
    +and
    +.Xr ipsec 4 .
    +The driver also supports chaining one of AES-CBC, AES-CTR, or AES-XTS with
    +SHA1-HMAC, SHA2-256-HMAC, SHA2-384-HMAC, or SHA2-512-HMAC for
    +encrypt-then-authenticate operations.
    +For further hardware information and questions related to hardware
    +requirements, see
    +.Pa http://www.chelsio.com/ .
    +.Pp
    +The
    +.Nm
    +driver attaches as a child of an existing Chelsio NIC device and thus
    +requires that the
    +.Xr cxgbe 4
    +driver be active.
    +.Sh HARDWARE
    +The
    +.Nm
    +driver supports the crypto accelerator engine included on adapters
    +based on the T6 ASIC:
    +.Pp
    +.Bl -bullet -compact
    +.It
    +Chelsio T6225-CR
    +.It
    +Chelsio T6225-SO-CR
    +.It
    +Chelsio T62100-LP-CR
    +.It
    +Chelsio T62100-SO-CR
    +.It
    +Chelsio T62100-CR
    +.El
    +.Sh SUPPORT
    +For general information and support,
    +go to the Chelsio support website at:
    +.Pa http://www.chelsio.com/ .
    +.Pp
    +If an issue is identified with this driver with a supported adapter,
    +email all the specific information related to the issue to
    +.Aq Mt support@chelsio.com .
    +.Sh SEE ALSO
    +.Xr crypto 4 ,
    +.Xr cxgbe 4 ,
    +.Xr ipsec 4
    +.Sh HISTORY
    +The
    +.Nm
    +device driver first appeared in
    +.Fx 12.0 .
    +.Sh AUTHORS
    +.An -nosplit
    +The
    +.Nm
    +driver was written by
    +.An John Baldwin Aq Mt jhb@FreeBSD.org .
    
    Modified: head/share/man/man4/cxgbe.4
    ==============================================================================
    --- head/share/man/man4/cxgbe.4	Wed May 17 22:05:07 2017	(r318428)
    +++ head/share/man/man4/cxgbe.4	Wed May 17 22:13:07 2017	(r318429)
    @@ -31,7 +31,7 @@
     .\"
     .\" $FreeBSD$
     .\"
    -.Dd December 22, 2016
    +.Dd May 16, 2017
     .Dt CXGBE 4
     .Os
     .Sh NAME
    @@ -367,6 +367,7 @@ email all the specific information relat
     .Sh SEE ALSO
     .Xr altq 4 ,
     .Xr arp 4 ,
    +.Xr ccr 4 ,
     .Xr cxgb 4 ,
     .Xr cxgbev 4 ,
     .Xr netintro 4 ,
    
    Modified: head/sys/conf/NOTES
    ==============================================================================
    --- head/sys/conf/NOTES	Wed May 17 22:05:07 2017	(r318428)
    +++ head/sys/conf/NOTES	Wed May 17 22:13:07 2017	(r318429)
    @@ -2849,6 +2849,8 @@ device		cryptodev	# /dev/crypto for acce
     
     device		rndtest		# FIPS 140-2 entropy tester
     
    +device		ccr		# Chelsio T6
    +
     device		hifn		# Hifn 7951, 7781, etc.
     options 	HIFN_DEBUG	# enable debugging support: hw.hifn.debug
     options 	HIFN_RNDTEST	# enable rndtest support
    
    Modified: head/sys/conf/files
    ==============================================================================
    --- head/sys/conf/files	Wed May 17 22:05:07 2017	(r318428)
    +++ head/sys/conf/files	Wed May 17 22:13:07 2017	(r318429)
    @@ -1428,6 +1428,8 @@ t6fw.fw			optional cxgbe					\
     	compile-with	"${NORMAL_FW}"					\
     	no-obj no-implicit-rule						\
     	clean		"t6fw.fw"
    +dev/cxgbe/crypto/t4_crypto.c	optional ccr \
    +	compile-with "${NORMAL_C} -I$S/dev/cxgbe"
     dev/cy/cy.c			optional cy
     dev/cy/cy_isa.c			optional cy isa
     dev/cy/cy_pci.c			optional cy pci
    
    Modified: head/sys/dev/cxgbe/adapter.h
    ==============================================================================
    --- head/sys/dev/cxgbe/adapter.h	Wed May 17 22:05:07 2017	(r318428)
    +++ head/sys/dev/cxgbe/adapter.h	Wed May 17 22:13:07 2017	(r318429)
    @@ -796,6 +796,7 @@ struct adapter {
     	struct tom_tunables tt;
     	void *iwarp_softc;	/* (struct c4iw_dev *) */
     	void *iscsi_ulp_softc;	/* (struct cxgbei_data *) */
    +	void *ccr_softc;	/* (struct ccr_softc *) */
     	struct l2t_data *l2t;	/* L2 table */
     	struct tid_info tids;
     
    
    Added: head/sys/dev/cxgbe/crypto/t4_crypto.c
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ head/sys/dev/cxgbe/crypto/t4_crypto.c	Wed May 17 22:13:07 2017	(r318429)
    @@ -0,0 +1,2102 @@
    +/*-
    + * Copyright (c) 2017 Chelsio Communications, Inc.
    + * All rights reserved.
    + * Written by: John Baldwin 
    + *
    + * 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 "cryptodev_if.h"
    +
    +#include "common/common.h"
    +#include "crypto/t4_crypto.h"
    +
    +/*
    + * Requests consist of:
    + *
    + * +-------------------------------+
    + * | struct fw_crypto_lookaside_wr |
    + * +-------------------------------+
    + * | struct ulp_txpkt              |
    + * +-------------------------------+
    + * | struct ulptx_idata            |
    + * +-------------------------------+
    + * | struct cpl_tx_sec_pdu         |
    + * +-------------------------------+
    + * | struct cpl_tls_tx_scmd_fmt    |
    + * +-------------------------------+
    + * | key context header            |
    + * +-------------------------------+
    + * | AES key                       |  ----- For requests with AES
    + * +-------------------------------+ -
    + * | IPAD (16-byte aligned)        |  \
    + * +-------------------------------+  +---- For requests with HMAC
    + * | OPAD (16-byte aligned)        |  /
    + * +-------------------------------+ -
    + * | GMAC H                        |  ----- For AES-GCM
    + * +-------------------------------+ -
    + * | struct cpl_rx_phys_dsgl       |  \
    + * +-------------------------------+  +---- Destination buffer for
    + * | PHYS_DSGL entries             |  /     non-hash-only requests
    + * +-------------------------------+ -
    + * | 16 dummy bytes                |  ----- Only for hash-only requests
    + * +-------------------------------+
    + * | IV                            |  ----- If immediate IV
    + * +-------------------------------+
    + * | Payload                       |  ----- If immediate Payload
    + * +-------------------------------+ -
    + * | struct ulptx_sgl              |  \
    + * +-------------------------------+  +---- If payload via SGL
    + * | SGL entries                   |  /
    + * +-------------------------------+ -
    + *
    + * Note that the key context must be padded to ensure 16-byte alignment.
    + * For HMAC requests, the key consists of the partial hash of the IPAD
    + * followed by the partial hash of the OPAD.
    + *
    + * Replies consist of:
    + *
    + * +-------------------------------+
    + * | struct cpl_fw6_pld            |
    + * +-------------------------------+
    + * | hash digest                   |  ----- For HMAC request with
    + * +-------------------------------+        'hash_size' set in work request
    + *
    + * A 32-bit big-endian error status word is supplied in the last 4
    + * bytes of data[0] in the CPL_FW6_PLD message.  bit 0 indicates a
    + * "MAC" error and bit 1 indicates a "PAD" error.
    + *
    + * The 64-bit 'cookie' field from the fw_crypto_lookaside_wr message
    + * in the request is returned in data[1] of the CPL_FW6_PLD message.
    + *
    + * For block cipher replies, the updated IV is supplied in data[2] and
    + * data[3] of the CPL_FW6_PLD message.
    + *
    + * For hash replies where the work request set 'hash_size' to request
    + * a copy of the hash in the reply, the hash digest is supplied
    + * immediately following the CPL_FW6_PLD message.
    + */
    +
    +/*
    + * The documentation for CPL_RX_PHYS_DSGL claims a maximum of 32
    + * SG entries.
    + */
    +#define	MAX_RX_PHYS_DSGL_SGE	32
    +#define	DSGL_SGE_MAXLEN		65535
    +
    +static MALLOC_DEFINE(M_CCR, "ccr", "Chelsio T6 crypto");
    +
    +struct ccr_session_hmac {
    +	struct auth_hash *auth_hash;
    +	int hash_len;
    +	unsigned int partial_digest_len;
    +	unsigned int auth_mode;
    +	unsigned int mk_size;
    +	char ipad[CHCR_HASH_MAX_BLOCK_SIZE_128];
    +	char opad[CHCR_HASH_MAX_BLOCK_SIZE_128];
    +};
    +
    +struct ccr_session_gmac {
    +	int hash_len;
    +	char ghash_h[GMAC_BLOCK_LEN];
    +};
    +
    +struct ccr_session_blkcipher {
    +	unsigned int cipher_mode;
    +	unsigned int key_len;
    +	unsigned int iv_len;
    +	__be32 key_ctx_hdr;
    +	char enckey[CHCR_AES_MAX_KEY_LEN];
    +	char deckey[CHCR_AES_MAX_KEY_LEN];
    +};
    +
    +struct ccr_session {
    +	bool active;
    +	int pending;
    +	enum { HMAC, BLKCIPHER, AUTHENC, GCM } mode;
    +	union {
    +		struct ccr_session_hmac hmac;
    +		struct ccr_session_gmac gmac;
    +	};
    +	struct ccr_session_blkcipher blkcipher;
    +};
    +
    +struct ccr_softc {
    +	struct adapter *adapter;
    +	device_t dev;
    +	uint32_t cid;
    +	int tx_channel_id;
    +	struct ccr_session *sessions;
    +	int nsessions;
    +	struct mtx lock;
    +	bool detaching;
    +	struct sge_wrq *txq;
    +	struct sge_rxq *rxq;
    +
    +	/*
    +	 * Pre-allocate S/G lists used when preparing a work request.
    +	 * 'sg_crp' contains an sglist describing the entire buffer
    +	 * for a 'struct cryptop'.  'sg_ulptx' is used to describe
    +	 * the data the engine should DMA as input via ULPTX_SGL.
    +	 * 'sg_dsgl' is used to describe the destination that cipher
    +	 * text and a tag should be written to.
    +	 */
    +	struct sglist *sg_crp;
    +	struct sglist *sg_ulptx;
    +	struct sglist *sg_dsgl;
    +
    +	/* Statistics. */
    +	uint64_t stats_blkcipher_encrypt;
    +	uint64_t stats_blkcipher_decrypt;
    +	uint64_t stats_hmac;
    +	uint64_t stats_authenc_encrypt;
    +	uint64_t stats_authenc_decrypt;
    +	uint64_t stats_gcm_encrypt;
    +	uint64_t stats_gcm_decrypt;
    +	uint64_t stats_wr_nomem;
    +	uint64_t stats_inflight;
    +	uint64_t stats_mac_error;
    +	uint64_t stats_pad_error;
    +	uint64_t stats_bad_session;
    +	uint64_t stats_sglist_error;
    +	uint64_t stats_process_error;
    +};
    +
    +/*
    + * Crypto requests involve two kind of scatter/gather lists.
    + *
    + * Non-hash-only requests require a PHYS_DSGL that describes the
    + * location to store the results of the encryption or decryption
    + * operation.  This SGL uses a different format (PHYS_DSGL) and should
    + * exclude the crd_skip bytes at the start of the data as well as
    + * any AAD or IV.  For authenticated encryption requests it should
    + * cover include the destination of the hash or tag.
    + *
    + * The input payload may either be supplied inline as immediate data,
    + * or via a standard ULP_TX SGL.  This SGL should include AAD,
    + * ciphertext, and the hash or tag for authenticated decryption
    + * requests.
    + *
    + * These scatter/gather lists can describe different subsets of the
    + * buffer described by the crypto operation.  ccr_populate_sglist()
    + * generates a scatter/gather list that covers the entire crypto
    + * operation buffer that is then used to construct the other
    + * scatter/gather lists.
    + */
    +static int
    +ccr_populate_sglist(struct sglist *sg, struct cryptop *crp)
    +{
    +	int error;
    +
    +	sglist_reset(sg);
    +	if (crp->crp_flags & CRYPTO_F_IMBUF)
    +		error = sglist_append_mbuf(sg, (struct mbuf *)crp->crp_buf);
    +	else if (crp->crp_flags & CRYPTO_F_IOV)
    +		error = sglist_append_uio(sg, (struct uio *)crp->crp_buf);
    +	else
    +		error = sglist_append(sg, crp->crp_buf, crp->crp_ilen);
    +	return (error);
    +}
    +
    +/*
    + * Segments in 'sg' larger than 'maxsegsize' are counted as multiple
    + * segments.
    + */
    +static int
    +ccr_count_sgl(struct sglist *sg, int maxsegsize)
    +{
    +	int i, nsegs;
    +
    +	nsegs = 0;
    +	for (i = 0; i < sg->sg_nseg; i++)
    +		nsegs += howmany(sg->sg_segs[i].ss_len, maxsegsize);
    +	return (nsegs);
    +}
    +
    +/* These functions deal with PHYS_DSGL for the reply buffer. */
    +static inline int
    +ccr_phys_dsgl_len(int nsegs)
    +{
    +	int len;
    +
    +	len = (nsegs / 8) * sizeof(struct phys_sge_pairs);
    +	if ((nsegs % 8) != 0) {
    +		len += sizeof(uint16_t) * 8;
    +		len += roundup2(nsegs % 8, 2) * sizeof(uint64_t);
    +	}
    +	return (len);
    +}
    +
    +static void
    +ccr_write_phys_dsgl(struct ccr_softc *sc, void *dst, int nsegs)
    +{
    +	struct sglist *sg;
    +	struct cpl_rx_phys_dsgl *cpl;
    +	struct phys_sge_pairs *sgl;
    +	vm_paddr_t paddr;
    +	size_t seglen;
    +	u_int i, j;
    +
    +	sg = sc->sg_dsgl;
    +	cpl = dst;
    +	cpl->op_to_tid = htobe32(V_CPL_RX_PHYS_DSGL_OPCODE(CPL_RX_PHYS_DSGL) |
    +	    V_CPL_RX_PHYS_DSGL_ISRDMA(0));
    +	cpl->pcirlxorder_to_noofsgentr = htobe32(
    +	    V_CPL_RX_PHYS_DSGL_PCIRLXORDER(0) |
    +	    V_CPL_RX_PHYS_DSGL_PCINOSNOOP(0) |
    +	    V_CPL_RX_PHYS_DSGL_PCITPHNTENB(0) | V_CPL_RX_PHYS_DSGL_DCAID(0) |
    +	    V_CPL_RX_PHYS_DSGL_NOOFSGENTR(nsegs));
    +	cpl->rss_hdr_int.opcode = CPL_RX_PHYS_ADDR;
    +	cpl->rss_hdr_int.qid = htobe16(sc->rxq->iq.abs_id);
    +	cpl->rss_hdr_int.hash_val = 0;
    +	sgl = (struct phys_sge_pairs *)(cpl + 1);
    +	j = 0;
    +	for (i = 0; i < sg->sg_nseg; i++) {
    +		seglen = sg->sg_segs[i].ss_len;
    +		paddr = sg->sg_segs[i].ss_paddr;
    +		do {
    +			sgl->addr[j] = htobe64(paddr);
    +			if (seglen > DSGL_SGE_MAXLEN) {
    +				sgl->len[j] = htobe16(DSGL_SGE_MAXLEN);
    +				paddr += DSGL_SGE_MAXLEN;
    +				seglen -= DSGL_SGE_MAXLEN;
    +			} else {
    +				sgl->len[j] = htobe16(seglen);
    +				seglen = 0;
    +			}
    +			j++;
    +			if (j == 8) {
    +				sgl++;
    +				j = 0;
    +			}
    +		} while (seglen != 0);
    +	}
    +	MPASS(j + 8 * (sgl - (struct phys_sge_pairs *)(cpl + 1)) == nsegs);
    +}
    +
    +/* These functions deal with the ULPTX_SGL for input payload. */
    +static inline int
    +ccr_ulptx_sgl_len(int nsegs)
    +{
    +	u_int n;
    +
    +	nsegs--; /* first segment is part of ulptx_sgl */
    +	n = sizeof(struct ulptx_sgl) + 8 * ((3 * nsegs) / 2 + (nsegs & 1));
    +	return (roundup2(n, 16));
    +}
    +
    +static void
    +ccr_write_ulptx_sgl(struct ccr_softc *sc, void *dst, int nsegs)
    +{
    +	struct ulptx_sgl *usgl;
    +	struct sglist *sg;
    +	struct sglist_seg *ss;
    +	int i;
    +
    +	sg = sc->sg_ulptx;
    +	MPASS(nsegs == sg->sg_nseg);
    +	ss = &sg->sg_segs[0];
    +	usgl = dst;
    +	usgl->cmd_nsge = htobe32(V_ULPTX_CMD(ULP_TX_SC_DSGL) |
    +	    V_ULPTX_NSGE(nsegs));
    +	usgl->len0 = htobe32(ss->ss_len);
    +	usgl->addr0 = htobe64(ss->ss_paddr);
    +	ss++;
    +	for (i = 0; i < sg->sg_nseg - 1; i++) {
    +		usgl->sge[i / 2].len[i & 1] = htobe32(ss->ss_len);
    +		usgl->sge[i / 2].addr[i & 1] = htobe64(ss->ss_paddr);
    +		ss++;
    +	}
    +	
    +}
    +
    +static bool
    +ccr_use_imm_data(u_int transhdr_len, u_int input_len)
    +{
    +
    +	if (input_len > CRYPTO_MAX_IMM_TX_PKT_LEN)
    +		return (false);
    +	if (roundup2(transhdr_len, 16) + roundup2(input_len, 16) >
    +	    SGE_MAX_WR_LEN)
    +		return (false);
    +	return (true);
    +}
    +
    +static void
    +ccr_populate_wreq(struct ccr_softc *sc, struct chcr_wr *crwr, u_int kctx_len,
    +    u_int wr_len, uint32_t sid, u_int imm_len, u_int sgl_len, u_int hash_size,
    +    u_int iv_loc, struct cryptop *crp)
    +{
    +	u_int cctx_size;
    +
    +	cctx_size = sizeof(struct _key_ctx) + kctx_len;
    +	crwr->wreq.op_to_cctx_size = htobe32(
    +	    V_FW_CRYPTO_LOOKASIDE_WR_OPCODE(FW_CRYPTO_LOOKASIDE_WR) |
    +	    V_FW_CRYPTO_LOOKASIDE_WR_COMPL(0) |
    +	    V_FW_CRYPTO_LOOKASIDE_WR_IMM_LEN(imm_len) |
    +	    V_FW_CRYPTO_LOOKASIDE_WR_CCTX_LOC(1) |
    +	    V_FW_CRYPTO_LOOKASIDE_WR_CCTX_SIZE(cctx_size >> 4));
    +	crwr->wreq.len16_pkd = htobe32(
    +	    V_FW_CRYPTO_LOOKASIDE_WR_LEN16(wr_len / 16));
    +	crwr->wreq.session_id = htobe32(sid);
    +	crwr->wreq.rx_chid_to_rx_q_id = htobe32(
    +	    V_FW_CRYPTO_LOOKASIDE_WR_RX_CHID(sc->tx_channel_id) |
    +	    V_FW_CRYPTO_LOOKASIDE_WR_LCB(0) |
    +	    V_FW_CRYPTO_LOOKASIDE_WR_PHASH(0) |
    +	    V_FW_CRYPTO_LOOKASIDE_WR_IV(iv_loc) |
    +	    V_FW_CRYPTO_LOOKASIDE_WR_FQIDX(0) |
    +	    V_FW_CRYPTO_LOOKASIDE_WR_TX_CH(0) |
    +	    V_FW_CRYPTO_LOOKASIDE_WR_RX_Q_ID(sc->rxq->iq.abs_id));
    +	crwr->wreq.key_addr = 0;
    +	crwr->wreq.pld_size_hash_size = htobe32(
    +	    V_FW_CRYPTO_LOOKASIDE_WR_PLD_SIZE(sgl_len) |
    +	    V_FW_CRYPTO_LOOKASIDE_WR_HASH_SIZE(hash_size));
    +	crwr->wreq.cookie = htobe64((uintptr_t)crp);
    +
    +	crwr->ulptx.cmd_dest = htobe32(V_ULPTX_CMD(ULP_TX_PKT) |
    +	    V_ULP_TXPKT_DATAMODIFY(0) |
    +	    V_ULP_TXPKT_CHANNELID(sc->tx_channel_id) | V_ULP_TXPKT_DEST(0) |
    +	    V_ULP_TXPKT_FID(0) | V_ULP_TXPKT_RO(1));
    +	crwr->ulptx.len = htobe32(
    +	    ((wr_len - sizeof(struct fw_crypto_lookaside_wr)) / 16));
    +
    +	crwr->sc_imm.cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM) |
    +	    V_ULP_TX_SC_MORE(imm_len != 0 ? 0 : 1));
    +	crwr->sc_imm.len = htobe32(wr_len - offsetof(struct chcr_wr, sec_cpl) -
    +	    sgl_len);
    +}
    +
    +static int
    +ccr_hmac(struct ccr_softc *sc, uint32_t sid, struct ccr_session *s,
    +    struct cryptop *crp)
    +{
    +	struct chcr_wr *crwr;
    +	struct wrqe *wr;
    +	struct auth_hash *axf;
    +	struct cryptodesc *crd;
    +	char *dst;
    +	u_int hash_size_in_response, kctx_flits, kctx_len, transhdr_len, wr_len;
    +	u_int imm_len, iopad_size;
    +	int error, sgl_nsegs, sgl_len;
    +
    +	axf = s->hmac.auth_hash;
    +
    +	/* PADs must be 128-bit aligned. */
    +	iopad_size = roundup2(s->hmac.partial_digest_len, 16);
    +
    +	/*
    +	 * The 'key' part of the context includes the aligned IPAD and
    +	 * OPAD.
    +	 */
    +	kctx_len = iopad_size * 2;
    +	hash_size_in_response = axf->hashsize;
    +	transhdr_len = HASH_TRANSHDR_SIZE(kctx_len);
    +
    +	crd = crp->crp_desc;
    +	if (ccr_use_imm_data(transhdr_len, crd->crd_len)) {
    +		imm_len = crd->crd_len;
    +		sgl_nsegs = 0;
    +		sgl_len = 0;
    +	} else {
    +		imm_len = 0;
    +		sglist_reset(sc->sg_ulptx);
    +		error = sglist_append_sglist(sc->sg_ulptx, sc->sg_crp,
    +		    crd->crd_skip, crd->crd_len);
    +		if (error)
    +			return (error);
    +		sgl_nsegs = sc->sg_ulptx->sg_nseg;
    +		sgl_len = ccr_ulptx_sgl_len(sgl_nsegs);
    +	}
    +
    +	wr_len = roundup2(transhdr_len, 16) + roundup2(imm_len, 16) + sgl_len;
    +	wr = alloc_wrqe(wr_len, sc->txq);
    +	if (wr == NULL) {
    +		sc->stats_wr_nomem++;
    +		return (ENOMEM);
    +	}
    +	crwr = wrtod(wr);
    +	memset(crwr, 0, wr_len);
    +
    +	ccr_populate_wreq(sc, crwr, kctx_len, wr_len, sid, imm_len, sgl_len,
    +	    hash_size_in_response, IV_NOP, crp);
    +
    +	/* XXX: Hardcodes SGE loopback channel of 0. */
    +	crwr->sec_cpl.op_ivinsrtofst = htobe32(
    +	    V_CPL_TX_SEC_PDU_OPCODE(CPL_TX_SEC_PDU) |
    +	    V_CPL_TX_SEC_PDU_RXCHID(sc->tx_channel_id) |
    +	    V_CPL_TX_SEC_PDU_ACKFOLLOWS(0) | V_CPL_TX_SEC_PDU_ULPTXLPBK(1) |
    +	    V_CPL_TX_SEC_PDU_CPLLEN(2) | V_CPL_TX_SEC_PDU_PLACEHOLDER(0) |
    +	    V_CPL_TX_SEC_PDU_IVINSRTOFST(0));
    +
    +	crwr->sec_cpl.pldlen = htobe32(crd->crd_len);
    +
    +	crwr->sec_cpl.cipherstop_lo_authinsert = htobe32(
    +	    V_CPL_TX_SEC_PDU_AUTHSTART(1) | V_CPL_TX_SEC_PDU_AUTHSTOP(0));
    +
    +	/* These two flits are actually a CPL_TLS_TX_SCMD_FMT. */
    +	crwr->sec_cpl.seqno_numivs = htobe32(
    +	    V_SCMD_SEQ_NO_CTRL(0) |
    +	    V_SCMD_PROTO_VERSION(CHCR_SCMD_PROTO_VERSION_GENERIC) |
    +	    V_SCMD_CIPH_MODE(CHCR_SCMD_CIPHER_MODE_NOP) |
    +	    V_SCMD_AUTH_MODE(s->hmac.auth_mode) |
    +	    V_SCMD_HMAC_CTRL(CHCR_SCMD_HMAC_CTRL_NO_TRUNC));
    +	crwr->sec_cpl.ivgen_hdrlen = htobe32(
    +	    V_SCMD_LAST_FRAG(0) | V_SCMD_MORE_FRAGS(0) | V_SCMD_MAC_ONLY(1));
    +
    +	memcpy(crwr->key_ctx.key, s->hmac.ipad, s->hmac.partial_digest_len);
    +	memcpy(crwr->key_ctx.key + iopad_size, s->hmac.opad,
    +	    s->hmac.partial_digest_len);
    +
    +	/* XXX: F_KEY_CONTEXT_SALT_PRESENT set, but 'salt' not set. */
    +	kctx_flits = (sizeof(struct _key_ctx) + kctx_len) / 16;
    +	crwr->key_ctx.ctx_hdr = htobe32(V_KEY_CONTEXT_CTX_LEN(kctx_flits) |
    +	    V_KEY_CONTEXT_OPAD_PRESENT(1) | V_KEY_CONTEXT_SALT_PRESENT(1) |
    +	    V_KEY_CONTEXT_CK_SIZE(CHCR_KEYCTX_NO_KEY) |
    +	    V_KEY_CONTEXT_MK_SIZE(s->hmac.mk_size) | V_KEY_CONTEXT_VALID(1));
    +
    +	dst = (char *)(crwr + 1) + kctx_len + DUMMY_BYTES;
    +	if (imm_len != 0)
    +		crypto_copydata(crp->crp_flags, crp->crp_buf, crd->crd_skip,
    +		    crd->crd_len, dst);
    +	else
    +		ccr_write_ulptx_sgl(sc, dst, sgl_nsegs);
    +
    +	/* XXX: TODO backpressure */
    +	t4_wrq_tx(sc->adapter, wr);
    +
    +	return (0);
    +}
    +
    +static int
    +ccr_hmac_done(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp,
    +    const struct cpl_fw6_pld *cpl, int error)
    +{
    +	struct cryptodesc *crd;
    +
    +	crd = crp->crp_desc;
    +	if (error == 0) {
    +		crypto_copyback(crp->crp_flags, crp->crp_buf, crd->crd_inject,
    +		    s->hmac.hash_len, (c_caddr_t)(cpl + 1));
    +	}
    +
    +	return (error);
    +}
    +
    +static int
    +ccr_blkcipher(struct ccr_softc *sc, uint32_t sid, struct ccr_session *s,
    +    struct cryptop *crp)
    +{
    +	char iv[CHCR_MAX_CRYPTO_IV_LEN];
    +	struct chcr_wr *crwr;
    +	struct wrqe *wr;
    +	struct cryptodesc *crd;
    +	char *dst;
    +	u_int iv_loc, kctx_len, key_half, op_type, transhdr_len, wr_len;
    +	u_int imm_len;
    +	int dsgl_nsegs, dsgl_len;
    +	int sgl_nsegs, sgl_len;
    +	int error;
    +
    +	crd = crp->crp_desc;
    +
    +	if (s->blkcipher.key_len == 0)
    +		return (EINVAL);
    +	if (crd->crd_alg == CRYPTO_AES_CBC &&
    +	    (crd->crd_len % AES_BLOCK_LEN) != 0)
    +		return (EINVAL);
    +
    +	iv_loc = IV_NOP;
    +	if (crd->crd_flags & CRD_F_ENCRYPT) {
    +		op_type = CHCR_ENCRYPT_OP;
    +		if (crd->crd_flags & CRD_F_IV_EXPLICIT)
    +			memcpy(iv, crd->crd_iv, s->blkcipher.iv_len);
    +		else
    +			arc4rand(iv, s->blkcipher.iv_len, 0);
    +		iv_loc = IV_IMMEDIATE;
    +		if ((crd->crd_flags & CRD_F_IV_PRESENT) == 0)
    +			crypto_copyback(crp->crp_flags, crp->crp_buf,
    +			    crd->crd_inject, s->blkcipher.iv_len, iv);
    +	} else {
    +		op_type = CHCR_DECRYPT_OP;
    +		if (crd->crd_flags & CRD_F_IV_EXPLICIT) {
    +			memcpy(iv, crd->crd_iv, s->blkcipher.iv_len);
    +			iv_loc = IV_IMMEDIATE;
    +		} else
    +			iv_loc = IV_DSGL;
    +	}
    +
    +	sglist_reset(sc->sg_dsgl);
    +	error = sglist_append_sglist(sc->sg_dsgl, sc->sg_crp, crd->crd_skip,
    +	    crd->crd_len);
    +	if (error)
    +		return (error);
    +	dsgl_nsegs = ccr_count_sgl(sc->sg_dsgl, DSGL_SGE_MAXLEN);
    +	if (dsgl_nsegs > MAX_RX_PHYS_DSGL_SGE)
    +		return (EFBIG);
    +	dsgl_len = ccr_phys_dsgl_len(dsgl_nsegs);
    +
    +	/* The 'key' must be 128-bit aligned. */
    +	kctx_len = roundup2(s->blkcipher.key_len, 16);
    +	transhdr_len = CIPHER_TRANSHDR_SIZE(kctx_len, dsgl_len);
    +
    +	if (ccr_use_imm_data(transhdr_len, crd->crd_len +
    +	    s->blkcipher.iv_len)) {
    +		imm_len = crd->crd_len;
    +		if (iv_loc == IV_DSGL) {
    +			crypto_copydata(crp->crp_flags, crp->crp_buf,
    +			    crd->crd_inject, s->blkcipher.iv_len, iv);
    +			iv_loc = IV_IMMEDIATE;
    +		}
    +		sgl_nsegs = 0;
    +		sgl_len = 0;
    +	} else {
    +		imm_len = 0;
    +		sglist_reset(sc->sg_ulptx);
    +		if (iv_loc == IV_DSGL) {
    +			error = sglist_append_sglist(sc->sg_ulptx, sc->sg_crp,
    +			    crd->crd_inject, s->blkcipher.iv_len);
    +			if (error)
    +				return (error);
    +		}
    +		error = sglist_append_sglist(sc->sg_ulptx, sc->sg_crp,
    +		    crd->crd_skip, crd->crd_len);
    +		if (error)
    +			return (error);
    +		sgl_nsegs = sc->sg_ulptx->sg_nseg;
    +		sgl_len = ccr_ulptx_sgl_len(sgl_nsegs);
    +	}
    +
    +	wr_len = roundup2(transhdr_len, 16) + roundup2(imm_len, 16) + sgl_len;
    +	if (iv_loc == IV_IMMEDIATE)
    +		wr_len += s->blkcipher.iv_len;
    +	wr = alloc_wrqe(wr_len, sc->txq);
    +	if (wr == NULL) {
    +		sc->stats_wr_nomem++;
    +		return (ENOMEM);
    +	}
    +	crwr = wrtod(wr);
    +	memset(crwr, 0, wr_len);
    +
    +	ccr_populate_wreq(sc, crwr, kctx_len, wr_len, sid, imm_len, sgl_len, 0,
    +	    iv_loc, crp);
    +
    +	/* XXX: Hardcodes SGE loopback channel of 0. */
    +	crwr->sec_cpl.op_ivinsrtofst = htobe32(
    +	    V_CPL_TX_SEC_PDU_OPCODE(CPL_TX_SEC_PDU) |
    +	    V_CPL_TX_SEC_PDU_RXCHID(sc->tx_channel_id) |
    +	    V_CPL_TX_SEC_PDU_ACKFOLLOWS(0) | V_CPL_TX_SEC_PDU_ULPTXLPBK(1) |
    +	    V_CPL_TX_SEC_PDU_CPLLEN(2) | V_CPL_TX_SEC_PDU_PLACEHOLDER(0) |
    +	    V_CPL_TX_SEC_PDU_IVINSRTOFST(1));
    +
    +	crwr->sec_cpl.pldlen = htobe32(s->blkcipher.iv_len + crd->crd_len);
    +
    +	crwr->sec_cpl.aadstart_cipherstop_hi = htobe32(
    +	    V_CPL_TX_SEC_PDU_CIPHERSTART(s->blkcipher.iv_len + 1) |
    +	    V_CPL_TX_SEC_PDU_CIPHERSTOP_HI(0));
    +	crwr->sec_cpl.cipherstop_lo_authinsert = htobe32(
    +	    V_CPL_TX_SEC_PDU_CIPHERSTOP_LO(0));
    +
    +	/* These two flits are actually a CPL_TLS_TX_SCMD_FMT. */
    +	crwr->sec_cpl.seqno_numivs = htobe32(
    +	    V_SCMD_SEQ_NO_CTRL(0) |
    +	    V_SCMD_PROTO_VERSION(CHCR_SCMD_PROTO_VERSION_GENERIC) |
    +	    V_SCMD_ENC_DEC_CTRL(op_type) |
    +	    V_SCMD_CIPH_MODE(s->blkcipher.cipher_mode) |
    +	    V_SCMD_AUTH_MODE(CHCR_SCMD_AUTH_MODE_NOP) |
    +	    V_SCMD_HMAC_CTRL(CHCR_SCMD_HMAC_CTRL_NOP) |
    +	    V_SCMD_IV_SIZE(s->blkcipher.iv_len / 2) |
    +	    V_SCMD_NUM_IVS(0));
    +	crwr->sec_cpl.ivgen_hdrlen = htobe32(
    +	    V_SCMD_IV_GEN_CTRL(0) |
    +	    V_SCMD_MORE_FRAGS(0) | V_SCMD_LAST_FRAG(0) | V_SCMD_MAC_ONLY(0) |
    +	    V_SCMD_AADIVDROP(1) | V_SCMD_HDR_LEN(dsgl_len));
    +
    +	crwr->key_ctx.ctx_hdr = s->blkcipher.key_ctx_hdr;
    +	switch (crd->crd_alg) {
    +	case CRYPTO_AES_CBC:
    +		if (crd->crd_flags & CRD_F_ENCRYPT)
    +			memcpy(crwr->key_ctx.key, s->blkcipher.enckey,
    +			    s->blkcipher.key_len);
    +		else
    +			memcpy(crwr->key_ctx.key, s->blkcipher.deckey,
    +			    s->blkcipher.key_len);
    +		break;
    +	case CRYPTO_AES_ICM:
    +		memcpy(crwr->key_ctx.key, s->blkcipher.enckey,
    +		    s->blkcipher.key_len);
    +		break;
    +	case CRYPTO_AES_XTS:
    +		key_half = s->blkcipher.key_len / 2;
    +		memcpy(crwr->key_ctx.key, s->blkcipher.enckey + key_half,
    +		    key_half);
    +		if (crd->crd_flags & CRD_F_ENCRYPT)
    +			memcpy(crwr->key_ctx.key + key_half,
    +			    s->blkcipher.enckey, key_half);
    +		else
    +			memcpy(crwr->key_ctx.key + key_half,
    +			    s->blkcipher.deckey, key_half);
    +		break;
    +	}
    +
    +	dst = (char *)(crwr + 1) + kctx_len;
    +	ccr_write_phys_dsgl(sc, dst, dsgl_nsegs);
    +	dst += sizeof(struct cpl_rx_phys_dsgl) + dsgl_len;
    +	if (iv_loc == IV_IMMEDIATE) {
    +		memcpy(dst, iv, s->blkcipher.iv_len);
    +		dst += s->blkcipher.iv_len;
    +	}
    +	if (imm_len != 0)
    +		crypto_copydata(crp->crp_flags, crp->crp_buf, crd->crd_skip,
    +		    crd->crd_len, dst);
    +	else
    +		ccr_write_ulptx_sgl(sc, dst, sgl_nsegs);
    +
    +	/* XXX: TODO backpressure */
    +	t4_wrq_tx(sc->adapter, wr);
    +
    +	return (0);
    +}
    +
    +static int
    +ccr_blkcipher_done(struct ccr_softc *sc, struct ccr_session *s,
    +    struct cryptop *crp, const struct cpl_fw6_pld *cpl, int error)
    +{
    +
    +	/*
    +	 * The updated IV to permit chained requests is at
    +	 * cpl->data[2], but OCF doesn't permit chained requests.
    +	 */
    +	return (error);
    +}
    +
    +/*
    + * 'hashsize' is the length of a full digest.  'authsize' is the
    + * requested digest length for this operation which may be less
    + * than 'hashsize'.
    + */
    +static int
    +ccr_hmac_ctrl(unsigned int hashsize, unsigned int authsize)
    +{
    +
    +	if (authsize == 10)
    +		return (CHCR_SCMD_HMAC_CTRL_TRUNC_RFC4366);
    +	if (authsize == 12)
    +		return (CHCR_SCMD_HMAC_CTRL_IPSEC_96BIT);
    +	if (authsize == hashsize / 2)
    +		return (CHCR_SCMD_HMAC_CTRL_DIV2);
    +	return (CHCR_SCMD_HMAC_CTRL_NO_TRUNC);
    +}
    +
    +static int
    +ccr_authenc(struct ccr_softc *sc, uint32_t sid, struct ccr_session *s,
    +    struct cryptop *crp, struct cryptodesc *crda, struct cryptodesc *crde)
    +{
    +	char iv[CHCR_MAX_CRYPTO_IV_LEN];
    +	struct chcr_wr *crwr;
    +	struct wrqe *wr;
    +	struct auth_hash *axf;
    +	char *dst;
    +	u_int iv_loc, kctx_len, key_half, op_type, transhdr_len, wr_len;
    +	u_int hash_size_in_response, imm_len, iopad_size;
    +	u_int aad_start, aad_len, aad_stop;
    +	u_int auth_start, auth_stop, auth_insert;
    +	u_int cipher_start, cipher_stop;
    +	u_int hmac_ctrl, input_len;
    +	int dsgl_nsegs, dsgl_len;
    +	int sgl_nsegs, sgl_len;
    +	int error;
    +
    +	if (s->blkcipher.key_len == 0)
    +		return (EINVAL);
    +	if (crde->crd_alg == CRYPTO_AES_CBC &&
    +	    (crde->crd_len % AES_BLOCK_LEN) != 0)
    +		return (EINVAL);
    +
    +	/*
    +	 * AAD is only permitted before the cipher/plain text, not
    +	 * after.
    +	 */
    +	if (crda->crd_len + crda->crd_skip > crde->crd_len + crde->crd_skip)
    +		return (EINVAL);
    +
    +	axf = s->hmac.auth_hash;
    +	hash_size_in_response = s->hmac.hash_len;
    +
    +	/*
    +	 * The IV is always stored at the start of the buffer even
    +	 * though it may be duplicated in the payload.  The crypto
    +	 * engine doesn't work properly if the IV offset points inside
    +	 * of the AAD region, so a second copy is always required.
    +	 */
    +	iv_loc = IV_IMMEDIATE;
    +	if (crde->crd_flags & CRD_F_ENCRYPT) {
    +		op_type = CHCR_ENCRYPT_OP;
    +		if (crde->crd_flags & CRD_F_IV_EXPLICIT)
    +			memcpy(iv, crde->crd_iv, s->blkcipher.iv_len);
    +		else
    +			arc4rand(iv, s->blkcipher.iv_len, 0);
    +		if ((crde->crd_flags & CRD_F_IV_PRESENT) == 0)
    +			crypto_copyback(crp->crp_flags, crp->crp_buf,
    +			    crde->crd_inject, s->blkcipher.iv_len, iv);
    +	} else {
    +		op_type = CHCR_DECRYPT_OP;
    +		if (crde->crd_flags & CRD_F_IV_EXPLICIT)
    +			memcpy(iv, crde->crd_iv, s->blkcipher.iv_len);
    +		else
    +			crypto_copydata(crp->crp_flags, crp->crp_buf,
    +			    crde->crd_inject, s->blkcipher.iv_len, iv);
    +	}
    +
    +	/*
    +	 * The output buffer consists of the cipher text followed by
    +	 * the hash when encrypting.  For decryption it only contains
    +	 * the plain text.
    +	 */
    +	sglist_reset(sc->sg_dsgl);
    +	error = sglist_append_sglist(sc->sg_dsgl, sc->sg_crp, crde->crd_skip,
    +	    crde->crd_len);
    +	if (error)
    +		return (error);
    +	if (op_type == CHCR_ENCRYPT_OP) {
    +		error = sglist_append_sglist(sc->sg_dsgl, sc->sg_crp,
    +		    crda->crd_inject, hash_size_in_response);
    +		if (error)
    +			return (error);
    +	}
    +	dsgl_nsegs = ccr_count_sgl(sc->sg_dsgl, DSGL_SGE_MAXLEN);
    +	if (dsgl_nsegs > MAX_RX_PHYS_DSGL_SGE)
    +		return (EFBIG);
    +	dsgl_len = ccr_phys_dsgl_len(dsgl_nsegs);
    +
    +	/* PADs must be 128-bit aligned. */
    +	iopad_size = roundup2(s->hmac.partial_digest_len, 16);
    +
    +	/*
    +	 * The 'key' part of the key context consists of the key followed
    +	 * by the IPAD and OPAD.
    +	 */
    +	kctx_len = roundup2(s->blkcipher.key_len, 16) + iopad_size * 2;
    +	transhdr_len = CIPHER_TRANSHDR_SIZE(kctx_len, dsgl_len);
    +
    +	/*
    +	 * The input buffer consists of the IV, any AAD, and then the
    +	 * cipher/plain text.  For decryption requests the hash is
    +	 * appended after the cipher text.
    +	 */
    +	if (crda->crd_skip < crde->crd_skip) {
    +		if (crda->crd_skip + crda->crd_len > crde->crd_skip)
    +			aad_len = (crde->crd_skip - crda->crd_skip);
    +		else
    +			aad_len = crda->crd_len;
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-all@freebsd.org  Wed May 17 22:29:27 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18541D71BD1;
     Wed, 17 May 2017 22:29:27 +0000 (UTC)
     (envelope-from rpokala@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id E942F156C;
     Wed, 17 May 2017 22:29:26 +0000 (UTC)
     (envelope-from rpokala@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HMTPdl065766;
     Wed, 17 May 2017 22:29:25 GMT (envelope-from rpokala@FreeBSD.org)
    Received: (from rpokala@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HMTPHG065760;
     Wed, 17 May 2017 22:29:25 GMT (envelope-from rpokala@FreeBSD.org)
    Message-Id: <201705172229.v4HMTPHG065760@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: rpokala set sender to
     rpokala@FreeBSD.org using -f
    From: Ravi Pokala 
    Date: Wed, 17 May 2017 22:29:25 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
    Subject: svn commit: r318430 - in stable/10: sbin/ifconfig sys/net sys/sys
    X-SVN-Group: stable-10
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 22:29:27 -0000
    
    Author: rpokala
    Date: Wed May 17 22:29:25 2017
    New Revision: 318430
    URL: https://svnweb.freebsd.org/changeset/base/318430
    
    Log:
      MFC r318160, 318176: Persistently store NIC's hardware MAC address, and add
      a way to retrive it
      
      NOTE: Due to restructuring, the merges didn't apply cleanly; the resulting
      change is almost identical to what went into stable/11, but in some cases in
      different locations.
      
      The MAC address reported by `ifconfig ${nic} ether' does not always match
      the address in the hardware, as reported by the driver during attach. In
      particular, NICs which are components of a lagg(4) interface all report the
      same MAC.
      
      When attaching, the NIC driver passes the MAC address it read from the
      hardware as an argument to ether_ifattach(). Keep a second copy of it, and
      create ioctl(SIOCGHWADDR) to return it. Teach `ifconfig' to report it along
      with the active MAC address.
      
      PR:		194386
    
    Modified:
      stable/10/sbin/ifconfig/af_link.c
      stable/10/sys/net/if.c
      stable/10/sys/net/if_ethersubr.c
      stable/10/sys/net/if_var.h
      stable/10/sys/sys/sockio.h
    Directory Properties:
      stable/10/   (props changed)
    
    Modified: stable/10/sbin/ifconfig/af_link.c
    ==============================================================================
    --- stable/10/sbin/ifconfig/af_link.c	Wed May 17 22:13:07 2017	(r318429)
    +++ stable/10/sbin/ifconfig/af_link.c	Wed May 17 22:29:25 2017	(r318430)
    @@ -42,6 +42,7 @@ static const char rcsid[] =
     #include 
     #include 
     #include 
    +#include 
     
     #include 
     #include 
    @@ -69,6 +70,41 @@ link_status(int s __unused, const struct
     
     			printf("\tlladdr %s\n", link_ntoa(sdl) + n);
     		}
    +		/* Best-effort (i.e. failures are silent) to get original
    +		 * hardware address, as read by NIC driver at attach time. Only
    +		 * applies to Ethernet NICs (IFT_ETHER). However, laggX
    +		 * interfaces claim to be IFT_ETHER, and re-type their component
    +		 * Ethernet NICs as IFT_IEEE8023ADLAG. So, check for both. If
    +		 * the MAC is zeroed, then it's actually a lagg.
    +		 */
    +		if ((sdl->sdl_type == IFT_ETHER ||
    +		    sdl->sdl_type == IFT_IEEE8023ADLAG) &&
    +		    sdl->sdl_alen == ETHER_ADDR_LEN) {
    +			struct ifreq ifr;
    +			int sock_hw;
    +			int rc;
    +			static const u_char laggaddr[6] = {0};
    +
    +			strncpy(ifr.ifr_name, ifa->ifa_name,
    +			    sizeof(ifr.ifr_name));
    +			memcpy(&ifr.ifr_addr, ifa->ifa_addr,
    +			    sizeof(ifa->ifa_addr->sa_len));
    +			ifr.ifr_addr.sa_family = AF_LOCAL;
    +			if ((sock_hw = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) {
    +				warn("socket(AF_LOCAL,SOCK_DGRAM)");
    +				return;
    +			}
    +			rc = ioctl(sock_hw, SIOCGHWADDR, &ifr);
    +			close(sock_hw);
    +			if (rc != 0) {
    +				return;
    +			}
    +			if (memcmp(ifr.ifr_addr.sa_data, laggaddr, sdl->sdl_alen) == 0) {
    +				return;
    +			}
    +			printf("\thwaddr %s\n", ether_ntoa((const struct ether_addr *)
    +			    &ifr.ifr_addr.sa_data));
    +		}
     	}
     }
     
    
    Modified: stable/10/sys/net/if.c
    ==============================================================================
    --- stable/10/sys/net/if.c	Wed May 17 22:13:07 2017	(r318429)
    +++ stable/10/sys/net/if.c	Wed May 17 22:29:25 2017	(r318430)
    @@ -732,6 +732,11 @@ if_attach_internal(struct ifnet *ifp, in
     		/* Reliably crash if used uninitialized. */
     		ifp->if_broadcastaddr = NULL;
     
    +		if (ifp->if_type == IFT_ETHER) {
    +			ifp->if_hw_addr = malloc(ifp->if_addrlen, M_IFADDR,
    +			    M_WAITOK | M_ZERO);
    +		}
    +
     #if defined(INET) || defined(INET6)
     		/* Use defaults for TSO, if nothing is set */
     		if (ifp->if_hw_tsomax == 0 &&
    @@ -988,6 +993,8 @@ if_detach_internal(struct ifnet *ifp, in
     		 * Remove link ifaddr pointer and maybe decrement if_index.
     		 * Clean up all addresses.
     		 */
    +		free(ifp->if_hw_addr, M_IFADDR);
    +		ifp->if_hw_addr = NULL;
     		ifp->if_addr = NULL;
     
     		/* We can now free link ifaddr. */
    @@ -2639,6 +2646,10 @@ ifhwioctl(u_long cmd, struct ifnet *ifp,
     		EVENTHANDLER_INVOKE(iflladdr_event, ifp);
     		break;
     
    +	case SIOCGHWADDR:
    +		error = if_gethwaddr(ifp, ifr);
    +		break;
    +
     	case SIOCAIFGROUP:
     	{
     		struct ifgroupreq *ifgr = (struct ifgroupreq *)ifr;
    @@ -3578,6 +3589,29 @@ if_setlladdr(struct ifnet *ifp, const u_
     }
     
     /*
    + * Get the link layer address that was read from the hardware at attach.
    + *
    + * This is only set by Ethernet NICs (IFT_ETHER), but laggX interfaces re-type
    + * their component interfaces as IFT_IEEE8023ADLAG.
    + */
    +int
    +if_gethwaddr(struct ifnet *ifp, struct ifreq *ifr)
    +{
    +
    +	if (ifp->if_hw_addr == NULL)
    +		return (ENODEV);
    +
    +	switch (ifp->if_type) {
    +	case IFT_ETHER:
    +	case IFT_IEEE8023ADLAG:
    +		bcopy(ifp->if_hw_addr, ifr->ifr_addr.sa_data, ifp->if_addrlen);
    +		return (0);
    +	default:
    +		return (ENODEV);
    +	}
    +}
    +
    +/*
      * The name argument must be a pointer to storage which will last as
      * long as the interface does.  For physical devices, the result of
      * device_get_name(dev) is a good choice and for pseudo-devices a
    
    Modified: stable/10/sys/net/if_ethersubr.c
    ==============================================================================
    --- stable/10/sys/net/if_ethersubr.c	Wed May 17 22:13:07 2017	(r318429)
    +++ stable/10/sys/net/if_ethersubr.c	Wed May 17 22:29:25 2017	(r318430)
    @@ -918,6 +918,9 @@ ether_ifattach(struct ifnet *ifp, const 
     	sdl->sdl_alen = ifp->if_addrlen;
     	bcopy(lla, LLADDR(sdl), ifp->if_addrlen);
     
    +	if (ifp->if_hw_addr != NULL)
    +		bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen);
    +
     	bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN);
     	if (ng_ether_attach_p != NULL)
     		(*ng_ether_attach_p)(ifp);
    
    Modified: stable/10/sys/net/if_var.h
    ==============================================================================
    --- stable/10/sys/net/if_var.h	Wed May 17 22:13:07 2017	(r318429)
    +++ stable/10/sys/net/if_var.h	Wed May 17 22:29:25 2017	(r318430)
    @@ -200,6 +200,7 @@ struct ifnet {
     		(struct ifnet *, struct vnet *, char *);
     	struct	vnet *if_home_vnet;	/* where this ifnet originates from */
     	struct	ifaddr	*if_addr;	/* pointer to link-level address */
    +	void	*if_hw_addr;		/* hardware link-level address */
     	void	*if_llsoftc;		/* link layer softc */
     	int	if_drv_flags;		/* driver-managed status flags */
     	struct  ifaltq if_snd;		/* output queue (includes altq) */
    @@ -973,6 +974,7 @@ void	if_qflush(struct ifnet *);
     void	if_ref(struct ifnet *);
     void	if_rele(struct ifnet *);
     int	if_setlladdr(struct ifnet *, const u_char *, int);
    +int	if_gethwaddr(struct ifnet *, struct ifreq *);
     void	if_up(struct ifnet *);
     int	ifioctl(struct socket *, u_long, caddr_t, struct thread *);
     int	ifpromisc(struct ifnet *, int);
    
    Modified: stable/10/sys/sys/sockio.h
    ==============================================================================
    --- stable/10/sys/sys/sockio.h	Wed May 17 22:13:07 2017	(r318429)
    +++ stable/10/sys/sys/sockio.h	Wed May 17 22:29:25 2017	(r318430)
    @@ -97,6 +97,7 @@
     #define	SIOCGIFSTATUS	_IOWR('i', 59, struct ifstat)	/* get IF status */
     #define	SIOCSIFLLADDR	 _IOW('i', 60, struct ifreq)	/* set linklevel addr */
     #define	SIOCGI2C	_IOWR('i', 61, struct ifreq)	/* get I2C data  */
    +#define	SIOCGHWADDR	_IOWR('i', 62, struct ifreq)	/* get hardware lladdr */
     
     #define	SIOCSIFPHYADDR	 _IOW('i', 70, struct ifaliasreq) /* set gif address */
     #define	SIOCGIFPSRCADDR	_IOWR('i', 71, struct ifreq)	/* get gif psrc addr */
    
    From owner-svn-src-all@freebsd.org  Wed May 17 22:51:30 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3E35D710E4;
     Wed, 17 May 2017 22:51:29 +0000 (UTC)
     (envelope-from jonathan@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id C985A1F45;
     Wed, 17 May 2017 22:51:29 +0000 (UTC)
     (envelope-from jonathan@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HMpSXB076793;
     Wed, 17 May 2017 22:51:28 GMT (envelope-from jonathan@FreeBSD.org)
    Received: (from jonathan@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HMpSr3076792;
     Wed, 17 May 2017 22:51:28 GMT (envelope-from jonathan@FreeBSD.org)
    Message-Id: <201705172251.v4HMpSr3076792@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: jonathan set sender to
     jonathan@FreeBSD.org using -f
    From: Jonathan Anderson 
    Date: Wed, 17 May 2017 22:51:28 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318431 - head/libexec/rtld-elf
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Wed, 17 May 2017 22:51:30 -0000
    
    Author: jonathan
    Date: Wed May 17 22:51:28 2017
    New Revision: 318431
    URL: https://svnweb.freebsd.org/changeset/base/318431
    
    Log:
      Allow rtld direct-exec to take a file descriptor.
      
      When executing rtld directly, allow a file descriptor to be explicitly
      specified rather than opened from the given path. This, together with the
      LD_LIBRARY_PATH_FDS environment variable, allows dynamically-linked
      applications to be executed from within capability mode.
      
      Also add some rudimentary argument parsing (without pulling in getopt or
      the like) to accept this file descriptor, a help (-h) option and a basic
      usage string.
      
      Reviewed by:	kib
      Sponsored by:	NSERC, RDC
      Differential Revision:	https://reviews.freebsd.org/D10751
    
    Modified:
      head/libexec/rtld-elf/rtld.c
    
    Modified: head/libexec/rtld-elf/rtld.c
    ==============================================================================
    --- head/libexec/rtld-elf/rtld.c	Wed May 17 22:29:25 2017	(r318430)
    +++ head/libexec/rtld-elf/rtld.c	Wed May 17 22:51:28 2017	(r318431)
    @@ -115,8 +115,10 @@ static void objlist_push_head(Objlist *,
     static void objlist_push_tail(Objlist *, Obj_Entry *);
     static void objlist_put_after(Objlist *, Obj_Entry *, Obj_Entry *);
     static void objlist_remove(Objlist *, Obj_Entry *);
    +static int parse_args(char* argv[], int argc, bool *use_pathp, int *fdp);
     static int parse_integer(const char *);
     static void *path_enumerate(const char *, path_enum_proc, void *);
    +static void print_usage(const char *argv0);
     static void release_object(Obj_Entry *);
     static int relocate_object_dag(Obj_Entry *root, bool bind_now,
         Obj_Entry *rtldobj, int flags, RtldLockState *lockstate);
    @@ -350,9 +352,9 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
         char **argv, *argv0, **env, **envp, *kexecpath, *library_path_rpath;
         caddr_t imgentry;
         char buf[MAXPATHLEN];
    -    int argc, fd, i, mib[2], phnum;
    +    int argc, fd, i, mib[2], phnum, rtld_argc;
         size_t len;
    -    bool dir_enable;
    +    bool dir_enable, explicit_fd, search_in_path;
     
         /*
          * On entry, the dynamic linker itself has not been relocated yet.
    @@ -428,15 +430,19 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
     	    }
     	    dbg("opening main program in direct exec mode");
     	    if (argc >= 2) {
    -		argv0 = argv[1];
    -		fd = open(argv0, O_RDONLY | O_CLOEXEC | O_VERIFY);
    +		rtld_argc = parse_args(argv, argc, &search_in_path, &fd);
    +		argv0 = argv[rtld_argc];
    +		explicit_fd = (fd != -1);
    +		if (!explicit_fd)
    +		    fd = open(argv0, O_RDONLY | O_CLOEXEC | O_VERIFY);
     		if (fd == -1) {
     		    rtld_printf("Opening %s: %s\n", argv0,
     		      rtld_strerror(errno));
     		    rtld_die();
     		}
     		if (fstat(fd, &st) == -1) {
    -		    rtld_printf("Stat %s: %s\n", argv0,
    +		    _rtld_error("failed to fstat FD %d (%s): %s", fd,
    +		      explicit_fd ? "user-provided descriptor" : argv0,
     		      rtld_strerror(errno));
     		    rtld_die();
     		}
    @@ -469,26 +475,23 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
     
     		/*
     		 * For direct exec mode, argv[0] is the interpreter
    -		 * name, we must remove it and shift arguments left by
    -		 * 1 before invoking binary main.  Since stack layout
    +		 * name, we must remove it and shift arguments left
    +		 * before invoking binary main.  Since stack layout
     		 * places environment pointers and aux vectors right
     		 * after the terminating NULL, we must shift
     		 * environment and aux as well.
    -		 * XXX Shift will be > 1 when options are implemented.
     		 */
    +		main_argc = argc - rtld_argc;
    +		for (i = 0; i <= main_argc; i++)
    +		    argv[i] = argv[i + rtld_argc];
    +		*argcp -= rtld_argc;
    +		environ = env = envp = argv + main_argc + 1;
     		do {
    -		    *argv = *(argv + 1);
    -		    argv++;
    -		} while (*argv != NULL);
    -		*argcp -= 1;
    -		main_argc = argc - 1;
    -		environ = env = envp = argv;
    -		do {
    -		    *envp = *(envp + 1);
    +		    *envp = *(envp + rtld_argc);
     		    envp++;
     		} while (*envp != NULL);
     		aux = auxp = (Elf_Auxinfo *)envp;
    -		auxpf = (Elf_Auxinfo *)(envp + 1);
    +		auxpf = (Elf_Auxinfo *)(envp + rtld_argc);
     		for (;; auxp++, auxpf++) {
     		    *auxp = *auxpf;
     		    if (auxp->a_type == AT_NULL)
    @@ -5274,6 +5277,81 @@ symlook_init_from_req(SymLook *dst, cons
     
     
     /*
    + * Parse a set of command-line arguments.
    + */
    +static int
    +parse_args(char* argv[], int argc, bool *use_pathp, int *fdp)
    +{
    +	const char *arg;
    +	int fd, i, j, arglen;
    +	char opt;
    +
    +	dbg("Parsing command-line arguments");
    +	*use_pathp = false;
    +	*fdp = -1;
    +
    +	for (i = 1; i < argc; i++ ) {
    +		arg = argv[i];
    +		dbg("argv[%d]: '%s'", i, arg);
    +
    +		/*
    +		 * rtld arguments end with an explicit "--" or with the first
    +		 * non-prefixed argument.
    +		 */
    +		if (strcmp(arg, "--") == 0) {
    +			i++;
    +			break;
    +		}
    +		if (arg[0] != '-')
    +			break;
    +
    +		/*
    +		 * All other arguments are single-character options that can
    +		 * be combined, so we need to search through `arg` for them.
    +		 */
    +		arglen = strlen(arg);
    +		for (j = 1; j < arglen; j++) {
    +			opt = arg[j];
    +			if (opt == 'h') {
    +				print_usage(argv[0]);
    +				rtld_die();
    +			} else if (opt == 'f') {
    +			/*
    +			 * -f XX can be used to specify a descriptor for the
    +			 * binary named at the command line (i.e., the later
    +			 * argument will specify the process name but the
    +			 * descriptor is what will actually be executed)
    +			 */
    +			if (j != arglen - 1) {
    +				/* -f must be the last option in, e.g., -abcf */
    +				_rtld_error("invalid options: %s", arg);
    +				rtld_die();
    +			}
    +			i++;
    +			fd = parse_integer(argv[i]);
    +			if (fd == -1) {
    +				_rtld_error("invalid file descriptor: '%s'",
    +				    argv[i]);
    +				rtld_die();
    +			}
    +			*fdp = fd;
    +			break;
    +			/* TODO:
    +			} else if (opt == 'p') {
    +				*use_pathp = true;
    +			*/
    +			} else {
    +				rtld_printf("invalid argument: '%s'\n", arg);
    +				print_usage(argv[0]);
    +				rtld_die();
    +			}
    +		}
    +	}
    +
    +	return (i);
    +}
    +
    +/*
      * Parse a file descriptor number without pulling in more of libc (e.g. atoi).
      */
     static int
    @@ -5300,6 +5378,20 @@ parse_integer(const char *str)
     	return (n);
     }
     
    +void print_usage(const char *argv0)
    +{
    +
    +	rtld_printf("Usage: %s [-h] [-f ] [--]  []\n"
    +		"\n"
    +		"Options:\n"
    +		"  -h        Display this help message\n"
    +		/* TODO: "  -p        Search in PATH for named binary\n" */
    +		"  -f    Execute  instead of searching for \n"
    +		"  --        End of RTLD options\n"
    +		"    Name of process to execute\n"
    +		"      Arguments to the executed process\n", argv0);
    +}
    +
     /*
      * Overrides for libc_pic-provided functions.
      */
    
    From owner-svn-src-all@freebsd.org  Thu May 18 00:32:06 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EEB4D700FA;
     Thu, 18 May 2017 00:32:06 +0000 (UTC)
     (envelope-from jonathan@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 4AFDF15B0;
     Thu, 18 May 2017 00:32:06 +0000 (UTC)
     (envelope-from jonathan@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I0W5CS017678;
     Thu, 18 May 2017 00:32:05 GMT (envelope-from jonathan@FreeBSD.org)
    Received: (from jonathan@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I0W5KB017677;
     Thu, 18 May 2017 00:32:05 GMT (envelope-from jonathan@FreeBSD.org)
    Message-Id: <201705180032.v4I0W5KB017677@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: jonathan set sender to
     jonathan@FreeBSD.org using -f
    From: Jonathan Anderson 
    Date: Thu, 18 May 2017 00:32:05 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318432 - head/libexec/rtld-elf
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 00:32:06 -0000
    
    Author: jonathan
    Date: Thu May 18 00:32:05 2017
    New Revision: 318432
    URL: https://svnweb.freebsd.org/changeset/base/318432
    
    Log:
      Fix some nroff syntax in rtld.1.
      
      When I originally documented the LD_LIBRARY_PATH_FDS environment variable,
      I used `.Ev` rather than `.It Ev` to introduce it; this led to the
      documentation being embedded in the previous paragraph (LD_LIBRARY_PATH).
    
    Modified:
      head/libexec/rtld-elf/rtld.1
    
    Modified: head/libexec/rtld-elf/rtld.1
    ==============================================================================
    --- head/libexec/rtld-elf/rtld.1	Wed May 17 22:51:28 2017	(r318431)
    +++ head/libexec/rtld-elf/rtld.1	Thu May 18 00:32:05 2017	(r318432)
    @@ -192,7 +192,7 @@ the directories specified by
     will be searched first
     followed by the set of built-in standard directories.
     This variable is unset for set-user-ID and set-group-ID programs.
    -.Ev LD_LIBRARY_PATH_FDS
    +.It Ev LD_LIBRARY_PATH_FDS
     A colon separated list of file descriptor numbers for library directories.
     This is intended for use within
     .Xr capsicum 4
    
    From owner-svn-src-all@freebsd.org  Thu May 18 00:49:44 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id C94CED70769;
     Thu, 18 May 2017 00:49:44 +0000 (UTC)
     (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net)
    Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140])
     (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 7B9201DEF;
     Thu, 18 May 2017 00:49:43 +0000 (UTC)
     (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net)
    Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1])
     by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v4I0nZnJ063722;
     Wed, 17 May 2017 17:49:35 -0700 (PDT)
     (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net)
    Received: (from freebsd@localhost)
     by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v4I0nZa1063721;
     Wed, 17 May 2017 17:49:35 -0700 (PDT) (envelope-from freebsd)
    From: "Rodney W. Grimes" 
    Message-Id: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net>
    Subject: Re: svn commit: r318400 - head/sbin/ipfw
    In-Reply-To: <201705171056.v4HAuMOV078812@repo.freebsd.org>
    To: "Andrey V. Elsukov" 
    Date: Wed, 17 May 2017 17:49:34 -0700 (PDT)
    CC: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Reply-To: rgrimes@freebsd.org
    X-Mailer: ELM [version 2.4ME+ PL121h (25)]
    MIME-Version: 1.0
    Content-Transfer-Encoding: 7bit
    Content-Type: text/plain; charset=US-ASCII
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 00:49:44 -0000
    
    [ Charset UTF-8 unsupported, converting... ]
    > Author: ae
    > Date: Wed May 17 10:56:22 2017
    > New Revision: 318400
    > URL: https://svnweb.freebsd.org/changeset/base/318400
    > 
    > Log:
    >   Allow zero port specification in table entries with type flow.
    >   
    >   PR:		217620
    >   MFC after:	1 week
    > 
    > Modified:
    >   head/sbin/ipfw/tables.c
    > 
    > Modified: head/sbin/ipfw/tables.c
    > ==============================================================================
    > --- head/sbin/ipfw/tables.c	Wed May 17 09:04:09 2017	(r318399)
    > +++ head/sbin/ipfw/tables.c	Wed May 17 10:56:22 2017	(r318400)
    > @@ -1260,16 +1260,14 @@ tentry_fill_key_type(char *arg, ipfw_obj
    >  			if ((p = strchr(arg, ',')) != NULL)
    >  				*p++ = '\0';
    >  
    > -			if ((port = htons(strtol(arg, NULL, 10))) == 0) {
    > +			port = htons(strtol(arg, &pp, 10));
                                                          ^^^
    Can this be converted to a sizeof(foo) somehow?
    Constants like this are typically bad style and lead to bugs.
    
    > +			if (*pp != '\0') {
    >  				if ((sent = getservbyname(arg, NULL)) == NULL)
    >  					errx(EX_DATAERR, "Unknown service: %s",
    >  					    arg);
    > -				else
    > -					key = sent->s_port;
    > +				port = sent->s_port;
    >  			}
    > -			
    >  			tfe->sport = port;
    > -
    >  			arg = p;
    >  		}
    >  
    > @@ -1304,16 +1302,14 @@ tentry_fill_key_type(char *arg, ipfw_obj
    >  			if ((p = strchr(arg, ',')) != NULL)
    >  				*p++ = '\0';
    >  
    > -			if ((port = htons(strtol(arg, NULL, 10))) == 0) {
    > +			port = htons(strtol(arg, &pp, 10));
    > +			if (*pp != '\0') {
    >  				if ((sent = getservbyname(arg, NULL)) == NULL)
    >  					errx(EX_DATAERR, "Unknown service: %s",
    >  					    arg);
    > -				else
    > -					key = sent->s_port;
    > +				port = sent->s_port;
    >  			}
    > -			
    >  			tfe->dport = port;
    > -
    >  			arg = p;
    >  		}
    >  
    > 
    > 
    
    -- 
    Rod Grimes                                                 rgrimes@freebsd.org
    
    From owner-svn-src-all@freebsd.org  Thu May 18 01:32:52 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13D3BD70810;
     Thu, 18 May 2017 01:32:52 +0000 (UTC)
     (envelope-from sephe@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id D7D141FFE;
     Thu, 18 May 2017 01:32:51 +0000 (UTC)
     (envelope-from sephe@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I1WoN3043235;
     Thu, 18 May 2017 01:32:50 GMT (envelope-from sephe@FreeBSD.org)
    Received: (from sephe@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I1WoL0043234;
     Thu, 18 May 2017 01:32:50 GMT (envelope-from sephe@FreeBSD.org)
    Message-Id: <201705180132.v4I1WoL0043234@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: sephe set sender to
     sephe@FreeBSD.org using -f
    From: Sepherosa Ziehau 
    Date: Thu, 18 May 2017 01:32:50 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318433 - stable/11/contrib/hyperv/tools
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 01:32:52 -0000
    
    Author: sephe
    Date: Thu May 18 01:32:50 2017
    New Revision: 318433
    URL: https://svnweb.freebsd.org/changeset/base/318433
    
    Log:
      MFC 317783
          hyperv/kvp: Fix pool direcrory and file permission
      
          PR:		209385
          Sponsored by:	Microsoft
    
    Modified:
      stable/11/contrib/hyperv/tools/hv_kvp_daemon.c
    Directory Properties:
      stable/11/   (props changed)
    
    Modified: stable/11/contrib/hyperv/tools/hv_kvp_daemon.c
    ==============================================================================
    --- stable/11/contrib/hyperv/tools/hv_kvp_daemon.c	Thu May 18 00:32:05 2017	(r318432)
    +++ stable/11/contrib/hyperv/tools/hv_kvp_daemon.c	Thu May 18 01:32:50 2017	(r318433)
    @@ -61,6 +61,10 @@ typedef uint16_t	__u16;
     typedef uint32_t	__u32;
     typedef uint64_t	__u64;
     
    +#define POOL_FILE_MODE	(S_IRUSR | S_IWUSR)
    +#define POOL_DIR_MODE	(POOL_FILE_MODE | S_IXUSR)
    +#define POOL_DIR	"/var/db/hyperv/pool"
    +
     /*
      * ENUM Data
      */
    @@ -285,11 +289,12 @@ kvp_file_init(void)
     	int i;
     	int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK;
     
    -	if (mkdir("/var/db/hyperv/pool", S_IRUSR | S_IWUSR | S_IROTH) < 0 &&
    +	if (mkdir(POOL_DIR, POOL_DIR_MODE) < 0 &&
     	    (errno != EEXIST && errno != EISDIR)) {
     		KVP_LOG(LOG_ERR, " Failed to create /var/db/hyperv/pool\n");
     		exit(EXIT_FAILURE);
     	}
    +	chmod(POOL_DIR, POOL_DIR_MODE); /* fix old mistake */
     
     	for (i = 0; i < HV_KVP_POOL_COUNT; i++)
     	{
    @@ -297,11 +302,12 @@ kvp_file_init(void)
     		records_read = 0;
     		num_blocks = 1;
     		snprintf(fname, MAX_FILE_NAME, "/var/db/hyperv/pool/.kvp_pool_%d", i);
    -		fd = open(fname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IROTH);
    +		fd = open(fname, O_RDWR | O_CREAT, POOL_FILE_MODE);
     
     		if (fd == -1) {
     			return (1);
     		}
    +		fchmod(fd, POOL_FILE_MODE); /* fix old mistake */
     
     
     		filep = fopen(fname, "r");
    
    From owner-svn-src-all@freebsd.org  Thu May 18 01:35:08 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77D87D70B0E;
     Thu, 18 May 2017 01:35:08 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 4779A12DE;
     Thu, 18 May 2017 01:35:08 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I1Z7UQ043410;
     Thu, 18 May 2017 01:35:07 GMT (envelope-from ngie@FreeBSD.org)
    Received: (from ngie@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I1Z7Fh043409;
     Thu, 18 May 2017 01:35:07 GMT (envelope-from ngie@FreeBSD.org)
    Message-Id: <201705180135.v4I1Z7Fh043409@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: ngie set sender to
     ngie@FreeBSD.org using -f
    From: Ngie Cooper 
    Date: Thu, 18 May 2017 01:35:07 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318434 - head/usr.bin/getconf
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 01:35:08 -0000
    
    Author: ngie
    Date: Thu May 18 01:35:07 2017
    New Revision: 318434
    URL: https://svnweb.freebsd.org/changeset/base/318434
    
    Log:
      Make the `.gperf.c` suffix rule depend on fake-gperf.awk
      
      Parameterize out fake-gperf.awk to avoid duplicating the path
      
      MFC after:	2 weeks
      Sponsored by:	Dell EMC Isilon
    
    Modified:
      head/usr.bin/getconf/Makefile
    
    Modified: head/usr.bin/getconf/Makefile
    ==============================================================================
    --- head/usr.bin/getconf/Makefile	Thu May 18 01:32:50 2017	(r318433)
    +++ head/usr.bin/getconf/Makefile	Thu May 18 01:35:07 2017	(r318434)
    @@ -13,8 +13,9 @@ CLEANFILES+=	confstr.c limits.c pathconf
     
     all:	conflicts
     
    -.gperf.c:
    -	LC_ALL=C awk -f ${.CURDIR}/fake-gperf.awk ${.IMPSRC} >${.TARGET}
    +FAKE_GPERF=	${.CURDIR}/fake-gperf.awk
    +.gperf.c: ${FAKE_GPERF}
    +	LC_ALL=C awk -f ${FAKE_GPERF} ${.IMPSRC} >${.TARGET}
     
     .gperf.names:
     	LC_ALL=C awk '/^[_A-Z]/ { print; }' ${.IMPSRC} | \
    
    From owner-svn-src-all@freebsd.org  Thu May 18 01:42:56 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEAC4D712ED;
     Thu, 18 May 2017 01:42:56 +0000 (UTC)
     (envelope-from sephe@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id BE50819BD;
     Thu, 18 May 2017 01:42:56 +0000 (UTC)
     (envelope-from sephe@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I1gtXh047457;
     Thu, 18 May 2017 01:42:55 GMT (envelope-from sephe@FreeBSD.org)
    Received: (from sephe@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I1gtRN047456;
     Thu, 18 May 2017 01:42:55 GMT (envelope-from sephe@FreeBSD.org)
    Message-Id: <201705180142.v4I1gtRN047456@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: sephe set sender to
     sephe@FreeBSD.org using -f
    From: Sepherosa Ziehau 
    Date: Thu, 18 May 2017 01:42:55 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
    Subject: svn commit: r318435 - stable/10/contrib/hyperv/tools
    X-SVN-Group: stable-10
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 01:42:57 -0000
    
    Author: sephe
    Date: Thu May 18 01:42:55 2017
    New Revision: 318435
    URL: https://svnweb.freebsd.org/changeset/base/318435
    
    Log:
      MFC 317783
          hyperv/kvp: Fix pool direcrory and file permission
      
          PR:		209385
          Sponsored by:	Microsoft
    
    Modified:
      stable/10/contrib/hyperv/tools/hv_kvp_daemon.c
    Directory Properties:
      stable/10/   (props changed)
    
    Modified: stable/10/contrib/hyperv/tools/hv_kvp_daemon.c
    ==============================================================================
    --- stable/10/contrib/hyperv/tools/hv_kvp_daemon.c	Thu May 18 01:35:07 2017	(r318434)
    +++ stable/10/contrib/hyperv/tools/hv_kvp_daemon.c	Thu May 18 01:42:55 2017	(r318435)
    @@ -61,6 +61,10 @@ typedef uint16_t	__u16;
     typedef uint32_t	__u32;
     typedef uint64_t	__u64;
     
    +#define POOL_FILE_MODE	(S_IRUSR | S_IWUSR)
    +#define POOL_DIR_MODE	(POOL_FILE_MODE | S_IXUSR)
    +#define POOL_DIR	"/var/db/hyperv/pool"
    +
     /*
      * ENUM Data
      */
    @@ -285,11 +289,12 @@ kvp_file_init(void)
     	int i;
     	int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK;
     
    -	if (mkdir("/var/db/hyperv/pool", S_IRUSR | S_IWUSR | S_IROTH) < 0 &&
    +	if (mkdir(POOL_DIR, POOL_DIR_MODE) < 0 &&
     	    (errno != EEXIST && errno != EISDIR)) {
     		KVP_LOG(LOG_ERR, " Failed to create /var/db/hyperv/pool\n");
     		exit(EXIT_FAILURE);
     	}
    +	chmod(POOL_DIR, POOL_DIR_MODE); /* fix old mistake */
     
     	for (i = 0; i < HV_KVP_POOL_COUNT; i++)
     	{
    @@ -297,11 +302,12 @@ kvp_file_init(void)
     		records_read = 0;
     		num_blocks = 1;
     		snprintf(fname, MAX_FILE_NAME, "/var/db/hyperv/pool/.kvp_pool_%d", i);
    -		fd = open(fname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IROTH);
    +		fd = open(fname, O_RDWR | O_CREAT, POOL_FILE_MODE);
     
     		if (fd == -1) {
     			return (1);
     		}
    +		fchmod(fd, POOL_FILE_MODE); /* fix old mistake */
     
     
     		filep = fopen(fname, "r");
    
    From owner-svn-src-all@freebsd.org  Thu May 18 01:43:31 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1F82D713D0;
     Thu, 18 May 2017 01:43:31 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id CF4451B31;
     Thu, 18 May 2017 01:43:31 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I1hUrr047544;
     Thu, 18 May 2017 01:43:30 GMT (envelope-from ngie@FreeBSD.org)
    Received: (from ngie@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I1hUcT047538;
     Thu, 18 May 2017 01:43:30 GMT (envelope-from ngie@FreeBSD.org)
    Message-Id: <201705180143.v4I1hUcT047538@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: ngie set sender to
     ngie@FreeBSD.org using -f
    From: Ngie Cooper 
    Date: Thu, 18 May 2017 01:43:30 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318436 - in head: etc/mtree usr.bin/getconf
     usr.bin/getconf/tests
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 01:43:32 -0000
    
    Author: ngie
    Date: Thu May 18 01:43:30 2017
    New Revision: 318436
    URL: https://svnweb.freebsd.org/changeset/base/318436
    
    Log:
      usr.bin/getconf: add some initial tests
      
      Items tested via this commit are:
      - Some basic POSIX constants.
      - Some valid programming environments with -v.
      - Some invalid programming environments via -v.
      
      NOTE: this test makes assumptions about ILP32/LP32 vs LP64 that are
      currently not true on all architectures to avoid hardcoding some
      architectures in the tests. I'm working on improving getconf(1) to be
      more sane about handling ILP32/LP32 vs LP64. Future commits are coming
      soon to address this.
      
      MFC after:	2 weeks
      Tested with:	amd64, i386
      Sponsored by:	Dell EMC Isilon
    
    Added:
      head/usr.bin/getconf/tests/
      head/usr.bin/getconf/tests/Makefile   (contents, props changed)
      head/usr.bin/getconf/tests/arch_type.c   (contents, props changed)
      head/usr.bin/getconf/tests/getconf_test.sh   (contents, props changed)
    Modified:
      head/etc/mtree/BSD.tests.dist
      head/usr.bin/getconf/Makefile
      head/usr.bin/getconf/getconf.h
    
    Modified: head/etc/mtree/BSD.tests.dist
    ==============================================================================
    --- head/etc/mtree/BSD.tests.dist	Thu May 18 01:42:55 2017	(r318435)
    +++ head/etc/mtree/BSD.tests.dist	Thu May 18 01:43:30 2017	(r318436)
    @@ -622,6 +622,8 @@
             ..
             file2c
             ..
    +        getconf
    +        ..
             grep
             ..
             gzip
    
    Modified: head/usr.bin/getconf/Makefile
    ==============================================================================
    --- head/usr.bin/getconf/Makefile	Thu May 18 01:42:55 2017	(r318435)
    +++ head/usr.bin/getconf/Makefile	Thu May 18 01:43:30 2017	(r318436)
    @@ -1,5 +1,7 @@
     # $FreeBSD$
     
    +.include 
    +
     PROG=	getconf
     
     SRCS=	confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c
    @@ -35,4 +37,8 @@ conflicting.names:	confstr.names limits.
     unique.names:		conflicting.names
     	LC_ALL=C sort -u ${.ALLSRC} >${.TARGET}
     
    +.if ${MK_TESTS} != "no"
    +SUBDIR+=	tests
    +.endif
    +
     .include 
    
    Modified: head/usr.bin/getconf/getconf.h
    ==============================================================================
    --- head/usr.bin/getconf/getconf.h	Thu May 18 01:42:55 2017	(r318435)
    +++ head/usr.bin/getconf/getconf.h	Thu May 18 01:43:30 2017	(r318436)
    @@ -36,8 +36,15 @@ typedef long long intmax_t;
     #include 
     #endif
     
    +typedef enum {
    +	PROG_ENV_VALID_NO_ALT_PATH = -1,
    +	PROG_ENV_INVALID = 0,
    +	PROG_ENV_VALID_HAS_ALT_PATH = 1,
    +	PROG_ENV_UNKNOWN = 2,
    +} prog_env_validity;
    +
     int	find_confstr(const char *name, int *key);
     int	find_limit(const char *name, intmax_t *value);
     int	find_pathconf(const char *name, int *key);
    -int	find_progenv(const char *name, const char **alt_path);
    +prog_env_validity	find_progenv(const char *name, const char **alt_path);
     int	find_sysconf(const char *name, int *key);
    
    Added: head/usr.bin/getconf/tests/Makefile
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ head/usr.bin/getconf/tests/Makefile	Thu May 18 01:43:30 2017	(r318436)
    @@ -0,0 +1,11 @@
    +# $FreeBSD$
    +
    +ATF_TESTS_SH+=	getconf_test
    +
    +PROGS+=		arch_type
    +
    +BINDIR=		${TESTSDIR}
    +
    +WARNS?=		6
    +
    +.include 
    
    Added: head/usr.bin/getconf/tests/arch_type.c
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ head/usr.bin/getconf/tests/arch_type.c	Thu May 18 01:43:30 2017	(r318436)
    @@ -0,0 +1,59 @@
    +/*
    + * Copyright (c) 2017 Ngie 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 
    +__RCSID("$FreeBSD$");
    +
    +#include 
    +#include 
    +#include 
    +#include 
    +
    +int
    +main(void)
    +{
    +	bool known_arch_type;
    +
    +	known_arch_type = false;
    +#ifdef	__LP64__
    +	printf("LP64\n");
    +	known_arch_type = true;
    +#endif
    +#ifdef	__LP32__
    +	printf("LP32\n");
    +	known_arch_type = true;
    +#endif
    +#ifdef	__ILP32__
    +	printf("ILP32\n");
    +	known_arch_type = true;
    +#endif
    +
    +	if (known_arch_type)
    +		exit(0);
    +
    +	fprintf(stderr, "unknown architecture type detected\n");
    +	assert(0);
    +}
    
    Added: head/usr.bin/getconf/tests/getconf_test.sh
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ head/usr.bin/getconf/tests/getconf_test.sh	Thu May 18 01:43:30 2017	(r318436)
    @@ -0,0 +1,120 @@
    +#
    +# Copyright (c) 2017 Dell EMC
    +# 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$
    +
    +POSITIVE_EXP_EXPR_RE='match:[1-9][0-9]*'
    +
    +POSIX_CONSTANTS="ARG_MAX PAGESIZE"
    +POSIX_PATH_CONSTANTS="NAME_MAX PATH_MAX"
    +SUPPORTED_32BIT_PROGRAM_ENVS="POSIX_V6_ILP32_OFFBIG"
    +SUPPORTED_64BIT_PROGRAM_ENVS="POSIX_V6_LP64_OFF64"
    +UNAVAILABLE_PROGRAM_ENVS="I_AM_BOGUS"
    +UNSUPPORTED_32BIT_PROGRAM_ENVS="POSIX_V6_LP64_OFF64"
    +UNSUPPORTED_64BIT_PROGRAM_ENVS="POSIX_V6_ILP32_OFFBIG"
    +
    +XOPEN_CONSTANTS=
    +
    +# XXX: hardcoded sysexits
    +EX_USAGE=64
    +EX_UNAVAILABLE=69
    +
    +set_program_environments()
    +{
    +	atf_check -o save:arch_type.out $(atf_get_srcdir)/arch_type
    +	arch_type=$(cat arch_type.out)
    +	case "$arch_type" in
    +	ILP32|LP32)
    +		SUPPORTED_PROGRAM_ENVS="$SUPPORTED_PROGRAM_ENVS $SUPPORTED_32BIT_PROGRAM_ENVS"
    +		UNSUPPORTED_PROGRAM_ENVS="$UNSUPPORTED_PROGRAM_ENVS $UNSUPPORTED_32BIT_PROGRAM_ENVS"
    +		;;
    +	LP64)
    +		SUPPORTED_PROGRAM_ENVS="$SUPPORTED_PROGRAM_ENVS $SUPPORTED_64BIT_PROGRAM_ENVS"
    +		UNSUPPORTED_PROGRAM_ENVS="$UNSUPPORTED_PROGRAM_ENVS $UNSUPPORTED_64BIT_PROGRAM_ENVS"
    +		;;
    +	*)
    +		atf_fail "arch_type output unexpected: $arch_type"
    +		;;
    +	esac
    +}
    +
    +atf_test_case no_programming_environment
    +no_programming_environment_head()
    +{
    +	atf_set	"descr" "Test some POSIX constants as a positive functional test"
    +}
    +
    +no_programming_environment_body()
    +{
    +	for var in $POSIX_CONSTANTS; do
    +		atf_check -o "$POSITIVE_EXP_EXPR_RE" getconf $var
    +	done
    +	for var in $POSIX_PATH_CONSTANTS; do
    +		atf_check -o "$POSITIVE_EXP_EXPR_RE" getconf $var .
    +	done
    +}
    +
    +atf_test_case programming_environment
    +programming_environment_head()
    +{
    +	atf_set	"descr" "Test some constants with specific programming environments"
    +}
    +
    +programming_environment_body()
    +{
    +	set_program_environments
    +
    +	for prog_env in ${SUPPORTED_PROGRAM_ENVS}; do
    +		for var in $POSIX_CONSTANTS; do
    +			atf_check -o "$POSITIVE_EXP_EXPR_RE" \
    +			    getconf -v $prog_env $var
    +		done
    +	done
    +}
    +
    +atf_test_case programming_environment_unsupported
    +programming_environment_unsupported_head()
    +{
    +	atf_set	"descr" "Test for unsupported environments"
    +}
    +
    +programming_environment_unsupported_body()
    +{
    +	set_program_environments
    +
    +	for prog_env in ${UNSUPPORTED_PROGRAM_ENVS}; do
    +		for var in $POSIX_CONSTANTS; do
    +			atf_check -e not-empty -s exit:$EX_UNAVAILABLE \
    +			    getconf -v $prog_env $var
    +		done
    +	done
    +}
    +
    +atf_init_test_cases()
    +{
    +	atf_add_test_case no_programming_environment
    +	atf_add_test_case programming_environment
    +	atf_add_test_case programming_environment_unsupported
    +}
    
    From owner-svn-src-all@freebsd.org  Thu May 18 01:46:32 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A2C3D715FD;
     Thu, 18 May 2017 01:46:32 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id EEA511DC5;
     Thu, 18 May 2017 01:46:31 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I1kU6s047721;
     Thu, 18 May 2017 01:46:30 GMT (envelope-from ngie@FreeBSD.org)
    Received: (from ngie@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I1kU1R047720;
     Thu, 18 May 2017 01:46:30 GMT (envelope-from ngie@FreeBSD.org)
    Message-Id: <201705180146.v4I1kU1R047720@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: ngie set sender to
     ngie@FreeBSD.org using -f
    From: Ngie Cooper 
    Date: Thu, 18 May 2017 01:46:30 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318437 - head/usr.bin/getconf
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 01:46:32 -0000
    
    Author: ngie
    Date: Thu May 18 01:46:30 2017
    New Revision: 318437
    URL: https://svnweb.freebsd.org/changeset/base/318437
    
    Log:
      Revert local changes to find_progenv accidentally committed in r318436
      
      MFC after:	2 weeks
      MFC with:	r318436
      Sponsored by:	Dell EMC Isilon
    
    Modified:
      head/usr.bin/getconf/getconf.h
    
    Modified: head/usr.bin/getconf/getconf.h
    ==============================================================================
    --- head/usr.bin/getconf/getconf.h	Thu May 18 01:43:30 2017	(r318436)
    +++ head/usr.bin/getconf/getconf.h	Thu May 18 01:46:30 2017	(r318437)
    @@ -36,15 +36,8 @@ typedef long long intmax_t;
     #include 
     #endif
     
    -typedef enum {
    -	PROG_ENV_VALID_NO_ALT_PATH = -1,
    -	PROG_ENV_INVALID = 0,
    -	PROG_ENV_VALID_HAS_ALT_PATH = 1,
    -	PROG_ENV_UNKNOWN = 2,
    -} prog_env_validity;
    -
     int	find_confstr(const char *name, int *key);
     int	find_limit(const char *name, intmax_t *value);
     int	find_pathconf(const char *name, int *key);
    -prog_env_validity	find_progenv(const char *name, const char **alt_path);
    +int	find_progenv(const char *name, const char **alt_path);
     int	find_sysconf(const char *name, int *key);
    
    From owner-svn-src-all@freebsd.org  Thu May 18 02:00:27 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 322E1D71F05;
     Thu, 18 May 2017 02:00:27 +0000 (UTC)
     (envelope-from bdrewery@FreeBSD.org)
    Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client CN "freefall.freebsd.org",
     Issuer "Let's Encrypt Authority X3" (verified OK))
     by mx1.freebsd.org (Postfix) with ESMTPS id E43E315C2;
     Thu, 18 May 2017 02:00:26 +0000 (UTC)
     (envelope-from bdrewery@FreeBSD.org)
    Received: from mail.xzibition.com (unknown [127.0.1.132])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by freefall.freebsd.org (Postfix) with ESMTPS id E17486DD2;
     Thu, 18 May 2017 02:00:25 +0000 (UTC)
     (envelope-from bdrewery@FreeBSD.org)
    Received: from mail.xzibition.com (localhost [172.31.3.2])
     by mail.xzibition.com (Postfix) with ESMTP id 61FC477E5;
     Thu, 18 May 2017 02:00:24 +0000 (UTC)
    X-Virus-Scanned: amavisd-new at mail.xzibition.com
    Received: from mail.xzibition.com ([172.31.3.2])
     by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new,
     port 10026)
     with LMTP id IRxYv4NmvBLL; Thu, 18 May 2017 02:00:21 +0000 (UTC)
    Subject: Re: svn commit: r310230 - head/sys/cam/scsi
    DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com B28DA77DF
    To: Alexander Motin , src-committers@freebsd.org,
     svn-src-all@freebsd.org, svn-src-head@freebsd.org
    References: <201612181502.uBIF2o4a023448@repo.freebsd.org>
    From: Bryan Drewery 
    Organization: FreeBSD
    Message-ID: 
    Date: Wed, 17 May 2017 19:00:03 -0700
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0)
     Gecko/20100101 Thunderbird/45.8.0
    MIME-Version: 1.0
    In-Reply-To: <201612181502.uBIF2o4a023448@repo.freebsd.org>
    Content-Type: multipart/signed; micalg=pgp-sha512;
     protocol="application/pgp-signature";
     boundary="3aWcPsVgnSaKubs64dVRi18s1MHXPfvK3"
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 02:00:27 -0000
    
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
    --3aWcPsVgnSaKubs64dVRi18s1MHXPfvK3
    Content-Type: multipart/mixed; boundary="9uU2E3GaNi2sIbabd7nVWw3INDW82ucjL";
     protected-headers="v1"
    From: Bryan Drewery 
    To: Alexander Motin , src-committers@freebsd.org,
     svn-src-all@freebsd.org, svn-src-head@freebsd.org
    Message-ID: 
    Subject: Re: svn commit: r310230 - head/sys/cam/scsi
    References: <201612181502.uBIF2o4a023448@repo.freebsd.org>
    In-Reply-To: <201612181502.uBIF2o4a023448@repo.freebsd.org>
    
    --9uU2E3GaNi2sIbabd7nVWw3INDW82ucjL
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: quoted-printable
    
    On 12/18/16 7:02 AM, Alexander Motin wrote:
    > Author: mav
    > Date: Sun Dec 18 15:02:50 2016
    > New Revision: 310230
    > URL: https://svnweb.freebsd.org/changeset/base/310230
    >=20
    > Log:
    >   Don't treat informational exceptions (warnings and impending failures=
    )
    >   a.k.a. SCSI SMART events as errors.  Log them to console and continue=
    =2E
    >  =20
    >   MFC after:	2 weeks
    >=20
    > Modified:
    >   head/sys/cam/scsi/scsi_all.c
    >=20
    > Modified: head/sys/cam/scsi/scsi_all.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/cam/scsi/scsi_all.c	Sun Dec 18 14:54:20 2016	(r310229)
    > +++ head/sys/cam/scsi/scsi_all.c	Sun Dec 18 15:02:50 2016	(r310230)
    > @@ -1233,58 +1233,58 @@ static struct asc_table_entry asc_table[
    >  	{ SST(0x0A, 0x00, SS_FATAL | ENOSPC,
    >  	    "Error log overflow") },
    >  	/* DTLPWROMAEBKVF */
    > -	{ SST(0x0B, 0x00, SS_RDEF,
    > +	{ SST(0x0B, 0x00, SS_NOP | SSQ_PRINT_SENSE,
    
    After this change (removing SS_RETRY), will a retry still occur on the
    changed SENSE exceptions via something else?
    
    --=20
    Regards,
    Bryan Drewery
    
    
    --9uU2E3GaNi2sIbabd7nVWw3INDW82ucjL--
    
    --3aWcPsVgnSaKubs64dVRi18s1MHXPfvK3
    Content-Type: application/pgp-signature; name="signature.asc"
    Content-Description: OpenPGP digital signature
    Content-Disposition: attachment; filename="signature.asc"
    
    -----BEGIN PGP SIGNATURE-----
    Comment: GPGTools - https://gpgtools.org
    
    iQEcBAEBCgAGBQJZHQAkAAoJEDXXcbtuRpfPSzEH/iBsxxIu8mdgMWT1ebnduODn
    lzH2atkYEbM8ubW2b5Qv20ssEru2bWVFKfBqJ5Vsntcqi1FI+NB9B0X/+7Pazdeu
    IwPUzi/9/eJX+vQgftqVLd4pbxz4L6AcUKMP30/Zxas/eYnqg7uN8b55wDk8EHAj
    xMEJD3Lb5ezyLIzdULVlU0QQiGWYit33cXZGdS6+GOBb7vtYZcgRNUfN+6JoaTH9
    CjKxErdzoLtWJ0F3udrXRVxps1qWHFMksifhaDEoLqAKdZciH1K+UbvSbt09BbnC
    o9FLXkk3d6u0fzK9tzanHfwk7tzVmxDtZhxXymvuHa4pZzOPCdwSL+CJKVneJaI=
    =B4gY
    -----END PGP SIGNATURE-----
    
    --3aWcPsVgnSaKubs64dVRi18s1MHXPfvK3--
    
    From owner-svn-src-all@freebsd.org  Thu May 18 02:44:05 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15CC9D72B0E;
     Thu, 18 May 2017 02:44:05 +0000 (UTC)
     (envelope-from mavbsd@gmail.com)
    Received: from mail-pg0-x22b.google.com (mail-pg0-x22b.google.com
     [IPv6:2607:f8b0:400e:c05::22b])
     (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
     (Client CN "smtp.gmail.com",
     Issuer "Google Internet Authority G2" (verified OK))
     by mx1.freebsd.org (Postfix) with ESMTPS id D8CFD14F2;
     Thu, 18 May 2017 02:44:04 +0000 (UTC)
     (envelope-from mavbsd@gmail.com)
    Received: by mail-pg0-x22b.google.com with SMTP id x64so15631470pgd.3;
     Wed, 17 May 2017 19:44:04 -0700 (PDT)
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
     h=sender:subject:to:references:from:message-id:date:user-agent
     :mime-version:in-reply-to:content-language:content-transfer-encoding;
     bh=+/l3pdIHfwwJXOcnJDEBCOlhx3RBYfNMazMGdvaxtI0=;
     b=fD1qkp3qNd70tpMO3AwVazW4ueUfVrLXEONVhZDQMFO0DNHQ+2WQzy6KuTN5q2rpH4
     SMngOKQ5cT0FIWU6Zrt0gtKwyQGDkD/4jgIsZ2hbmoDBn1qBCIPaWPP40qmw2RVGXBpA
     yzbKwRUhJLUcM1ALHPT8sOCxfMlBQVZx07PaPlEMAIbB+XvHs2xKh8OuG76AeCpfxnH0
     Tg5AQlAPNXXb30bEp2E6et95NdrHW1TeEQRdF1hb8Wk73SgjW+T++KDcb+MW88gMlgsr
     /qcXjtaA7/gI8LvgRUs/8T5pncyh8cJuF6Cby3stR92DfkXzvRXhdE1IGvLPILc84Y6L
     MxqA==
    X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
     d=1e100.net; s=20161025;
     h=x-gm-message-state:sender:subject:to:references:from:message-id
     :date:user-agent:mime-version:in-reply-to:content-language
     :content-transfer-encoding;
     bh=+/l3pdIHfwwJXOcnJDEBCOlhx3RBYfNMazMGdvaxtI0=;
     b=s3i/KqfiYphXb1Z6gDKOrHUx+BdJ7T6mKt97VPANKYuE0EiC87v+aOiOEnt0zt+oC5
     H/0tf8V9tsbdvTRp/htqvFfzbSbCvWh/r9QBua2hN2nsyVPf5pvOUpi9vXJ7qtmRHvd3
     zFLbRHIOsDB/sV82v8rbP8N9DBJGf1icc9PUDwUXTyzOd3BtYAxWWCXdyN4LQILTSrA2
     VtjU5vGvnatiL9S+jrYcgt/GUQl3RTGWQbvEE9vD2KE7vcoOPo17faKbjs2wYg6sAUPv
     fga2YVBIBZpl1KoYOJEvYyw0+VVfkKiLEu7k7xOdUzL7c2hj0Vetij7A4Ww+K4XGj5tq
     TNFA==
    X-Gm-Message-State: AODbwcCh1QGfWuOYxtpVksMVrDEFSziMsi5Hd2yQM0Su9Vi6zPo8bZID
     1nfiU4MBNQ5u+w2TK5Q=
    X-Received: by 10.99.55.88 with SMTP id g24mr1898807pgn.176.1495075444245;
     Wed, 17 May 2017 19:44:04 -0700 (PDT)
    Received: from spectre.mavhome.dp.ua ([2601:647:4b00:5308:228:f8ff:fe04:d12])
     by smtp.gmail.com with ESMTPSA id
     x12sm6662286pge.60.2017.05.17.19.44.01
     (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
     Wed, 17 May 2017 19:44:02 -0700 (PDT)
    Sender: Alexander Motin 
    Subject: Re: svn commit: r310230 - head/sys/cam/scsi
    To: Bryan Drewery , src-committers@freebsd.org,
     svn-src-all@freebsd.org, svn-src-head@freebsd.org
    References: <201612181502.uBIF2o4a023448@repo.freebsd.org>
     
    From: Alexander Motin 
    Message-ID: <32cea555-27c9-555e-405b-1303bcd7ae17@FreeBSD.org>
    Date: Wed, 17 May 2017 19:44:01 -0700
    User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101
     Thunderbird/52.0
    MIME-Version: 1.0
    In-Reply-To: 
    Content-Type: text/plain; charset=utf-8
    Content-Language: en-US
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 02:44:05 -0000
    
    On 17.05.2017 19:00, Bryan Drewery wrote:
    > On 12/18/16 7:02 AM, Alexander Motin wrote:
    >> Author: mav
    >> Date: Sun Dec 18 15:02:50 2016
    >> New Revision: 310230
    >> URL: https://svnweb.freebsd.org/changeset/base/310230
    >>
    >> Log:
    >>   Don't treat informational exceptions (warnings and impending failures)
    >>   a.k.a. SCSI SMART events as errors.  Log them to console and continue.
    >>   
    >>   MFC after:	2 weeks
    >>
    >> Modified:
    >>   head/sys/cam/scsi/scsi_all.c
    >>
    >> Modified: head/sys/cam/scsi/scsi_all.c
    >> ==============================================================================
    >> --- head/sys/cam/scsi/scsi_all.c	Sun Dec 18 14:54:20 2016	(r310229)
    >> +++ head/sys/cam/scsi/scsi_all.c	Sun Dec 18 15:02:50 2016	(r310230)
    >> @@ -1233,58 +1233,58 @@ static struct asc_table_entry asc_table[
    >>  	{ SST(0x0A, 0x00, SS_FATAL | ENOSPC,
    >>  	    "Error log overflow") },
    >>  	/* DTLPWROMAEBKVF */
    >> -	{ SST(0x0B, 0x00, SS_RDEF,
    >> +	{ SST(0x0B, 0x00, SS_NOP | SSQ_PRINT_SENSE,
    > 
    > After this change (removing SS_RETRY), will a retry still occur on the
    > changed SENSE exceptions via something else?
    
    There will be no retry, since it is no longer considered an error.  It
    is successful command completion status.  The command will complete
    normally after just logging the status for administrative purposes.
    
    -- 
    Alexander Motin
    
    From owner-svn-src-all@freebsd.org  Thu May 18 03:32:02 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1549D69F65;
     Thu, 18 May 2017 03:32:02 +0000 (UTC) (envelope-from smh@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 76CC8171D;
     Thu, 18 May 2017 03:32:02 +0000 (UTC) (envelope-from smh@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I3W1pg092997;
     Thu, 18 May 2017 03:32:01 GMT (envelope-from smh@FreeBSD.org)
    Received: (from smh@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I3W1QL092994;
     Thu, 18 May 2017 03:32:01 GMT (envelope-from smh@FreeBSD.org)
    Message-Id: <201705180332.v4I3W1QL092994@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org
     using -f
    From: Steven Hartland 
    Date: Thu, 18 May 2017 03:32:01 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
    Subject: svn commit: r318438 - in stable/10: cddl/lib/libdtrace sys/netinet
    X-SVN-Group: stable-10
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 03:32:02 -0000
    
    Author: smh
    Date: Thu May 18 03:32:01 2017
    New Revision: 318438
    URL: https://svnweb.freebsd.org/changeset/base/318438
    
    Log:
      Revert the partial MFC of r313045 which broke dtrace
      
      This removes the mbuf to ipinfo_t translator and switches tcp_autorcvbuf to
      use the older mtod macro.
      
      This was originally merged to stable/10 as part of r317375.
      
      Reported by:	markj
      Reviewed by:	markj, hiren
      Sponsored by:	Multiplay
      Differential Revision:  https://reviews.freebsd.org/D10769
    
    Modified:
      stable/10/cddl/lib/libdtrace/ip.d
      stable/10/sys/netinet/in_kdtrace.c
      stable/10/sys/netinet/tcp_input.c
    Directory Properties:
      stable/10/   (props changed)
    
    Modified: stable/10/cddl/lib/libdtrace/ip.d
    ==============================================================================
    --- stable/10/cddl/lib/libdtrace/ip.d	Thu May 18 01:46:30 2017	(r318437)
    +++ stable/10/cddl/lib/libdtrace/ip.d	Thu May 18 03:32:01 2017	(r318438)
    @@ -240,24 +240,6 @@ translator ipinfo_t < uint8_t *p > {
     #pragma D binding "1.0" IFF_LOOPBACK
     inline int IFF_LOOPBACK =	0x8;
     
    -#pragma D binding "1.13" translator
    -translator ipinfo_t < struct mbuf *m > {
    -	ip_ver =	m == NULL ? 0 : ((struct ip *)m->m_data)->ip_v;
    -	ip_plength =	m == NULL ? 0 :
    -	    ((struct ip *)m->m_data)->ip_v == 4 ?
    -	    ntohs(((struct ip *)m->m_data)->ip_len) - 
    -			(((struct ip *)m->m_data)->ip_hl << 2):
    -	    ntohs(((struct ip6_hdr *)m->m_data)->ip6_ctlun.ip6_un1.ip6_un1_plen);
    -	ip_saddr =	m == NULL ? 0 :
    -	    ((struct ip *)m->m_data)->ip_v == 4 ?
    -	    inet_ntoa(&((struct ip *)m->m_data)->ip_src.s_addr) :
    -	    inet_ntoa6(&((struct ip6_hdr *)m->m_data)->ip6_src);
    -	ip_daddr =	m == NULL ? 0 :
    -	    ((struct ip *)m->m_data)->ip_v == 4 ?
    -	    inet_ntoa(&((struct ip *)m->m_data)->ip_dst.s_addr) :
    -	    inet_ntoa6(&((struct ip6_hdr *)m->m_data)->ip6_dst);
    -};
    -
     #pragma D binding "1.0" translator
     translator ifinfo_t < struct ifnet *p > {
     	if_name =	p->if_xname;
    
    Modified: stable/10/sys/netinet/in_kdtrace.c
    ==============================================================================
    --- stable/10/sys/netinet/in_kdtrace.c	Thu May 18 01:46:30 2017	(r318437)
    +++ stable/10/sys/netinet/in_kdtrace.c	Thu May 18 03:32:01 2017	(r318438)
    @@ -58,28 +58,28 @@ SDT_PROBE_DEFINE6_XLATE(ip, , , send,
     SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__established,
         "void *", "pktinfo_t *",
         "struct tcpcb *", "csinfo_t *",
    -    "struct mbuf *", "ipinfo_t *",
    +    "uint8_t *", "ipinfo_t *",
         "struct tcpcb *", "tcpsinfo_t *" ,
         "struct tcphdr *", "tcpinfoh_t *");
     
     SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__refused,
         "void *", "pktinfo_t *",
         "struct tcpcb *", "csinfo_t *",
    -    "struct mbuf *", "ipinfo_t *",
    +    "uint8_t *", "ipinfo_t *",
         "struct tcpcb *", "tcpsinfo_t *" ,
         "struct tcphdr *", "tcpinfo_t *");
     
     SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__established,
         "void *", "pktinfo_t *",
         "struct tcpcb *", "csinfo_t *",
    -    "struct mbuf *", "ipinfo_t *",
    +    "uint8_t *", "ipinfo_t *",
         "struct tcpcb *", "tcpsinfo_t *" ,
         "struct tcphdr *", "tcpinfoh_t *");
     
     SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__refused,
         "void *", "pktinfo_t *",
         "struct tcpcb *", "csinfo_t *",
    -    "struct mbuf *", "ipinfo_t *",
    +    "uint8_t *", "ipinfo_t *",
         "struct tcpcb *", "tcpsinfo_t *" ,
         "struct tcphdr *", "tcpinfoh_t *");
     
    @@ -93,7 +93,7 @@ SDT_PROBE_DEFINE5_XLATE(tcp, , , connect
     SDT_PROBE_DEFINE5_XLATE(tcp, , , receive,
         "void *", "pktinfo_t *",
         "struct tcpcb *", "csinfo_t *",
    -    "struct mbuf *", "ipinfo_t *",
    +    "uint8_t *", "ipinfo_t *",
         "struct tcpcb *", "tcpsinfo_t *" ,
         "struct tcphdr *", "tcpinfoh_t *");
     
    @@ -115,7 +115,7 @@ SDT_PROBE_DEFINE6_XLATE(tcp, , , state__
     SDT_PROBE_DEFINE6_XLATE(tcp, , , receive__autoresize,
         "void *", "void *",
         "struct tcpcb *", "csinfo_t *",
    -    "struct mbuf *", "ipinfo_t *",
    +    "uint8_t *", "ipinfo_t *",
         "struct tcpcb *", "tcpsinfo_t *" ,
         "struct tcphdr *", "tcpinfoh_t *",
         "int", "int");
    
    Modified: stable/10/sys/netinet/tcp_input.c
    ==============================================================================
    --- stable/10/sys/netinet/tcp_input.c	Thu May 18 01:46:30 2017	(r318437)
    +++ stable/10/sys/netinet/tcp_input.c	Thu May 18 03:32:01 2017	(r318438)
    @@ -1519,7 +1519,8 @@ tcp_autorcvbuf(struct mbuf *m, struct tc
     			newsize = min(so->so_rcv.sb_hiwat +
     			    V_tcp_autorcvbuf_inc, V_tcp_autorcvbuf_max);
     		}
    -		TCP_PROBE6(receive__autoresize, NULL, tp, m, tp, th, newsize);
    +		TCP_PROBE6(receive__autoresize, NULL, tp, mtod(m, const char *),
    +		    tp, th, newsize);
     
     		/* Start over with next RTT. */
     		tp->rfbuf_ts = 0;
    
    From owner-svn-src-all@freebsd.org  Thu May 18 04:49:04 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57511D726F6;
     Thu, 18 May 2017 04:49:04 +0000 (UTC)
     (envelope-from bu7cher@yandex.ru)
    Received: from forward1m.cmail.yandex.net (forward1m.cmail.yandex.net
     [IPv6:2a02:6b8:b030::18])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK))
     by mx1.freebsd.org (Postfix) with ESMTPS id CD9F81389;
     Thu, 18 May 2017 04:49:03 +0000 (UTC)
     (envelope-from bu7cher@yandex.ru)
    Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [95.108.130.59])
     by forward1m.cmail.yandex.net (Yandex) with ESMTP id 56B62217D3;
     Thu, 18 May 2017 07:48:51 +0300 (MSK)
    Received: from smtp1j.mail.yandex.net (localhost.localdomain [127.0.0.1])
     by smtp1j.mail.yandex.net (Yandex) with ESMTP id 28EE63C81054;
     Thu, 18 May 2017 07:48:48 +0300 (MSK)
    Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id
     Dfc6lwemod-mlsGdKJC; Thu, 18 May 2017 07:48:48 +0300
     (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
     (Client certificate not present)
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
     t=1495082928; bh=WN0FJk3nR8Nge81XXqA6khwBNM0blrp6zpW5Ky2WJaM=;
     h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To;
     b=C7xqQ2wk2Y9DjxinKN46dsL1n/X8g37ZDHXqVCLQfg/rGw/A5OWNsb3ozLcJc4vBU
     gzmyCXURl1eqONFgHB87Ombw9CjdWTDvfwH1NRyKFYzGJ+wrNplkNfOl5+YqeFPPBz
     C9PgBtLtesYkmOoILj23FCy+huzRgG2rtePEBbZo=
    Authentication-Results: smtp1j.mail.yandex.net; dkim=pass header.i=@yandex.ru
    X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0
    Subject: Re: svn commit: r318400 - head/sbin/ipfw
    To: rgrimes@freebsd.org
    Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    References: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net>
    From: "Andrey V. Elsukov" 
    Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A
    Message-ID: <72e5d765-dfd5-dd65-b8f1-9d5524cde366@yandex.ru>
    Date: Thu, 18 May 2017 07:47:03 +0300
    User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101
     Thunderbird/52.0.1
    MIME-Version: 1.0
    In-Reply-To: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net>
    Content-Type: multipart/signed; micalg=pgp-sha256;
     protocol="application/pgp-signature";
     boundary="siHLtSsUO8aIvOaXfWLit5o77ESrA96GP"
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 04:49:04 -0000
    
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
    --siHLtSsUO8aIvOaXfWLit5o77ESrA96GP
    Content-Type: multipart/mixed; boundary="Etn7cfJBTaL5WvR4bGS0ux69lbSX3jEgf";
     protected-headers="v1"
    From: "Andrey V. Elsukov" 
    To: rgrimes@freebsd.org
    Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Message-ID: <72e5d765-dfd5-dd65-b8f1-9d5524cde366@yandex.ru>
    Subject: Re: svn commit: r318400 - head/sbin/ipfw
    References: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net>
    In-Reply-To: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net>
    
    --Etn7cfJBTaL5WvR4bGS0ux69lbSX3jEgf
    Content-Type: text/plain; charset=utf-8
    Content-Language: en-US
    Content-Transfer-Encoding: quoted-printable
    
    On 18.05.2017 03:49, Rodney W. Grimes wrote:
    > [ Charset UTF-8 unsupported, converting... ]
    >> Author: ae
    >> Date: Wed May 17 10:56:22 2017
    >> New Revision: 318400
    >> URL: https://svnweb.freebsd.org/changeset/base/318400
    >>
    >> Log:
    >>   Allow zero port specification in table entries with type flow.
    >>  =20
    >>   PR:		217620
    >>   MFC after:	1 week
    >>
    >> Modified:
    >>   head/sbin/ipfw/tables.c
    >>
    >> Modified: head/sbin/ipfw/tables.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/sbin/ipfw/tables.c	Wed May 17 09:04:09 2017	(r318399)
    >> +++ head/sbin/ipfw/tables.c	Wed May 17 10:56:22 2017	(r318400)
    >> @@ -1260,16 +1260,14 @@ tentry_fill_key_type(char *arg, ipfw_obj
    >>  			if ((p =3D strchr(arg, ',')) !=3D NULL)
    >>  				*p++ =3D '\0';
    >> =20
    >> -			if ((port =3D htons(strtol(arg, NULL, 10))) =3D=3D 0) {
    >> +			port =3D htons(strtol(arg, &pp, 10));
    >                                                       ^^^
    > Can this be converted to a sizeof(foo) somehow?
    > Constants like this are typically bad style and lead to bugs.
    
    This means that decimal number is expected in the string.
    Not sure what bugs this can lead to.
    
    --=20
    WBR, Andrey V. Elsukov
    
    
    --Etn7cfJBTaL5WvR4bGS0ux69lbSX3jEgf--
    
    --siHLtSsUO8aIvOaXfWLit5o77ESrA96GP
    Content-Type: application/pgp-signature; name="signature.asc"
    Content-Description: OpenPGP digital signature
    Content-Disposition: attachment; filename="signature.asc"
    
    -----BEGIN PGP SIGNATURE-----
    Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
    
    iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlkdJ0cACgkQAcXqBBDI
    oXrJmQgAsDjmNc/WgLSIXEYc8jSmWJc9hvHmKVYwITYNUXHPk6EcKTF7fKb6tINv
    kytgFF7Bd3ZlrkqBrXgXlpdOnNac9ZzUI3UfC3qoqEbrKCWQ624kL54l3RE0w1f9
    k2RZBJ+CvL1XLriu03U8PCtCpNyXbl6LCK4IcBb+sPj26TvFqNekdBrS+sp11eSr
    +g1biZ6ckFHcKn/xqFbOk3V7MbKSTS1tzsGFovEIbctvusi4hTd6wAYH4i5C7J7O
    sICNA279K1A2YXCAQLvRQjQvl4U/jMEEea6EgLapfCMD25XkjiexmSiVaYoD6piL
    asy2P8jVeykpw47udjt6zKtOnKntUA==
    =9dAA
    -----END PGP SIGNATURE-----
    
    --siHLtSsUO8aIvOaXfWLit5o77ESrA96GP--
    
    From owner-svn-src-all@freebsd.org  Thu May 18 06:13:31 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32C28D72792;
     Thu, 18 May 2017 06:13:31 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id F3DCD1F93;
     Thu, 18 May 2017 06:13:30 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I6DTZW058239;
     Thu, 18 May 2017 06:13:29 GMT (envelope-from ngie@FreeBSD.org)
    Received: (from ngie@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I6DTXL058238;
     Thu, 18 May 2017 06:13:29 GMT (envelope-from ngie@FreeBSD.org)
    Message-Id: <201705180613.v4I6DTXL058238@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: ngie set sender to
     ngie@FreeBSD.org using -f
    From: Ngie Cooper 
    Date: Thu, 18 May 2017 06:13:29 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318439 - head/sys/modules/ipsec
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 06:13:31 -0000
    
    Author: ngie
    Date: Thu May 18 06:13:29 2017
    New Revision: 318439
    URL: https://svnweb.freebsd.org/changeset/base/318439
    
    Log:
      Normalize .PATH on SRCTOP
      
      This will help Jenkins dedupe 9 warnings between the static build and
      the module build of ipsec(4).
      
      Missed in SRCTOP conversion in r314651.
      
      MFC with:	r314651
      Sponsored by:	Dell EMC Isilon
    
    Modified:
      head/sys/modules/ipsec/Makefile
    
    Modified: head/sys/modules/ipsec/Makefile
    ==============================================================================
    --- head/sys/modules/ipsec/Makefile	Thu May 18 03:32:01 2017	(r318438)
    +++ head/sys/modules/ipsec/Makefile	Thu May 18 06:13:29 2017	(r318439)
    @@ -1,6 +1,6 @@
     # $FreeBSD$
     
    -.PATH: ${SRCTOP}/sys/net ${.CURDIR}/../../netipsec
    +.PATH: ${SRCTOP}/sys/net ${SRCTOP}/sys/netipsec
     
     KMOD=	ipsec
     SRCS=	if_ipsec.c ipsec.c ipsec_input.c ipsec_mbuf.c ipsec_mod.c \
    
    From owner-svn-src-all@freebsd.org  Thu May 18 06:15:43 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72A04D7281C;
     Thu, 18 May 2017 06:15:43 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 42F7C1104;
     Thu, 18 May 2017 06:15:43 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I6Fgev058367;
     Thu, 18 May 2017 06:15:42 GMT (envelope-from ngie@FreeBSD.org)
    Received: (from ngie@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I6Fgu5058366;
     Thu, 18 May 2017 06:15:42 GMT (envelope-from ngie@FreeBSD.org)
    Message-Id: <201705180615.v4I6Fgu5058366@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: ngie set sender to
     ngie@FreeBSD.org using -f
    From: Ngie Cooper 
    Date: Thu, 18 May 2017 06:15:42 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318440 - head/sys/modules/dtrace/dtaudit
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 06:15:43 -0000
    
    Author: ngie
    Date: Thu May 18 06:15:42 2017
    New Revision: 318440
    URL: https://svnweb.freebsd.org/changeset/base/318440
    
    Log:
      Normalize SYSDIR on SRCTOP instead of .CURDIR
      
      This is being done to simplify pathing for CFLAGS and source files.
      
      MFC after:	2 weeks
      Sponsored by:	Dell EMC Isilon
    
    Modified:
      head/sys/modules/dtrace/dtaudit/Makefile
    
    Modified: head/sys/modules/dtrace/dtaudit/Makefile
    ==============================================================================
    --- head/sys/modules/dtrace/dtaudit/Makefile	Thu May 18 06:13:29 2017	(r318439)
    +++ head/sys/modules/dtrace/dtaudit/Makefile	Thu May 18 06:15:42 2017	(r318440)
    @@ -1,6 +1,6 @@
     # $FreeBSD$
     
    -SYSDIR?=	${.CURDIR}/../../..
    +SYSDIR?=	${SRCTOP}/sys
     
     .PATH:		${SYSDIR}/security/audit
     
    
    From owner-svn-src-all@freebsd.org  Thu May 18 06:25:40 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBA52D72B58;
     Thu, 18 May 2017 06:25:40 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id A364D1662;
     Thu, 18 May 2017 06:25:40 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I6PdHx062499;
     Thu, 18 May 2017 06:25:39 GMT (envelope-from ngie@FreeBSD.org)
    Received: (from ngie@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I6Pd9j062495;
     Thu, 18 May 2017 06:25:39 GMT (envelope-from ngie@FreeBSD.org)
    Message-Id: <201705180625.v4I6Pd9j062495@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: ngie set sender to
     ngie@FreeBSD.org using -f
    From: Ngie Cooper 
    Date: Thu, 18 May 2017 06:25:39 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318441 - in head/etc: . cron.d
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 06:25:41 -0000
    
    Author: ngie
    Date: Thu May 18 06:25:39 2017
    New Revision: 318441
    URL: https://svnweb.freebsd.org/changeset/base/318441
    
    Log:
      Handle the cron.d entry for MK_AT in cron conditionally
      
      Install /etc/cron.d/at if MK_AT != no, always using it, which tries
      to run a non-existent program via cron(8) every 5 minutes with the
      default /etc/crontab, prior to this commit.
      
      SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at
      because atrun(8) executes programs, which may rely on environment
      currently set via /etc/crontab.
      
      Noted by:	bdrewery (in an internal review)
      MFC after:	2 months
      Relnotes:	yes (may need to add environmental modifications to
      		     /etc/cron.d/at)
      Sponsored by:	Dell EMC Isilon
    
    Added:
      head/etc/cron.d/
      head/etc/cron.d/Makefile   (contents, props changed)
      head/etc/cron.d/at   (contents, props changed)
    Modified:
      head/etc/Makefile
      head/etc/crontab
    
    Modified: head/etc/Makefile
    ==============================================================================
    --- head/etc/Makefile	Thu May 18 06:15:42 2017	(r318440)
    +++ head/etc/Makefile	Thu May 18 06:25:39 2017	(r318441)
    @@ -8,6 +8,7 @@ FILESGROUPS=	FILES
     # No need as it is empty and just causes rebuilds since this file does so much.
     UPDATE_DEPENDFILE=	no
     SUBDIR=	\
    +	cron.d \
     	newsyslog.conf.d \
     	syslog.d
     
    
    Added: head/etc/cron.d/Makefile
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ head/etc/cron.d/Makefile	Thu May 18 06:25:39 2017	(r318441)
    @@ -0,0 +1,11 @@
    +# $FreeBSD$
    +
    +.include 
    +
    +.if ${MK_AT} != "no"
    +FILES+=		at
    +.endif
    +
    +BINDIR=		/etc/cron.d
    +
    +.include 
    
    Added: head/etc/cron.d/at
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ head/etc/cron.d/at	Thu May 18 06:25:39 2017	(r318441)
    @@ -0,0 +1,7 @@
    +# $FreeBSD$
    +#
    +SHELL=/bin/sh
    +PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
    +
    +# See crontab(5) for field format.
    +*/5	*	*	*	*	root	/usr/libexec/atrun
    
    Modified: head/etc/crontab
    ==============================================================================
    --- head/etc/crontab	Thu May 18 06:15:42 2017	(r318440)
    +++ head/etc/crontab	Thu May 18 06:25:39 2017	(r318441)
    @@ -7,8 +7,6 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
     #
     #minute	hour	mday	month	wday	who	command
     #
    -*/5	*	*	*	*	root	/usr/libexec/atrun
    -#
     # Save some entropy so that /dev/random can re-seed on boot.
     */11	*	*	*	*	operator /usr/libexec/save-entropy
     #
    
    From owner-svn-src-all@freebsd.org  Thu May 18 06:27:38 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0BFDD72BFA;
     Thu, 18 May 2017 06:27:38 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 92ED517FA;
     Thu, 18 May 2017 06:27:38 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I6Rbx3062630;
     Thu, 18 May 2017 06:27:37 GMT (envelope-from ngie@FreeBSD.org)
    Received: (from ngie@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I6RbXH062628;
     Thu, 18 May 2017 06:27:37 GMT (envelope-from ngie@FreeBSD.org)
    Message-Id: <201705180627.v4I6RbXH062628@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: ngie set sender to
     ngie@FreeBSD.org using -f
    From: Ngie Cooper 
    Date: Thu, 18 May 2017 06:27:37 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318442 - in head/etc: . cron.d
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 06:27:38 -0000
    
    Author: ngie
    Date: Thu May 18 06:27:37 2017
    New Revision: 318442
    URL: https://svnweb.freebsd.org/changeset/base/318442
    
    Log:
      Revert r318441: the commit message was incoherent
    
    Deleted:
      head/etc/cron.d/
    Modified:
      head/etc/Makefile
      head/etc/crontab
    
    Modified: head/etc/Makefile
    ==============================================================================
    --- head/etc/Makefile	Thu May 18 06:25:39 2017	(r318441)
    +++ head/etc/Makefile	Thu May 18 06:27:37 2017	(r318442)
    @@ -8,7 +8,6 @@ FILESGROUPS=	FILES
     # No need as it is empty and just causes rebuilds since this file does so much.
     UPDATE_DEPENDFILE=	no
     SUBDIR=	\
    -	cron.d \
     	newsyslog.conf.d \
     	syslog.d
     
    
    Modified: head/etc/crontab
    ==============================================================================
    --- head/etc/crontab	Thu May 18 06:25:39 2017	(r318441)
    +++ head/etc/crontab	Thu May 18 06:27:37 2017	(r318442)
    @@ -7,6 +7,8 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
     #
     #minute	hour	mday	month	wday	who	command
     #
    +*/5	*	*	*	*	root	/usr/libexec/atrun
    +#
     # Save some entropy so that /dev/random can re-seed on boot.
     */11	*	*	*	*	operator /usr/libexec/save-entropy
     #
    
    From owner-svn-src-all@freebsd.org  Thu May 18 06:33:57 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 854AFD72E80;
     Thu, 18 May 2017 06:33:57 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 3D3F41C6F;
     Thu, 18 May 2017 06:33:57 +0000 (UTC)
     (envelope-from ngie@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I6Xuis066436;
     Thu, 18 May 2017 06:33:56 GMT (envelope-from ngie@FreeBSD.org)
    Received: (from ngie@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I6Xt1g066432;
     Thu, 18 May 2017 06:33:55 GMT (envelope-from ngie@FreeBSD.org)
    Message-Id: <201705180633.v4I6Xt1g066432@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: ngie set sender to
     ngie@FreeBSD.org using -f
    From: Ngie Cooper 
    Date: Thu, 18 May 2017 06:33:55 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318443 - in head/etc: . cron.d
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 06:33:57 -0000
    
    Author: ngie
    Date: Thu May 18 06:33:55 2017
    New Revision: 318443
    URL: https://svnweb.freebsd.org/changeset/base/318443
    
    Log:
      Conditionally handle the crontab entry for atrun(8)
      
      The default crontab prior to this commit assumes atrun(8) is always
      present, which isn't true if MK_AT == no. Move atrun(8) execution
      from /etc/crontab to /etc/cron.d/at, and base /etc/cron.d/at's installation
      on MK_AT. cron(8) will detect /etc/cron.d/at's presence when the configuration
      is loaded and run atrun every 5 minutes like it would prior to this commit.
      
      SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at
      because atrun(8) executes programs, which may rely on environment
      set in the current default /etc/crontab.
      
      Noted by:	bdrewery (in an internal review)
      MFC after:	2 months
      Relnotes:	yes (may need to add environmental modifications to
      		     /etc/cron.d/at)
      Sponsored by:	Dell EMC Isilon
    
    Added:
      head/etc/cron.d/
      head/etc/cron.d/Makefile   (contents, props changed)
      head/etc/cron.d/at   (contents, props changed)
    Modified:
      head/etc/Makefile
      head/etc/crontab
    
    Modified: head/etc/Makefile
    ==============================================================================
    --- head/etc/Makefile	Thu May 18 06:27:37 2017	(r318442)
    +++ head/etc/Makefile	Thu May 18 06:33:55 2017	(r318443)
    @@ -8,6 +8,7 @@ FILESGROUPS=	FILES
     # No need as it is empty and just causes rebuilds since this file does so much.
     UPDATE_DEPENDFILE=	no
     SUBDIR=	\
    +	cron.d \
     	newsyslog.conf.d \
     	syslog.d
     
    
    Added: head/etc/cron.d/Makefile
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ head/etc/cron.d/Makefile	Thu May 18 06:33:55 2017	(r318443)
    @@ -0,0 +1,11 @@
    +# $FreeBSD$
    +
    +.include 
    +
    +.if ${MK_AT} != "no"
    +FILES+=		at
    +.endif
    +
    +BINDIR=		/etc/cron.d
    +
    +.include 
    
    Added: head/etc/cron.d/at
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ head/etc/cron.d/at	Thu May 18 06:33:55 2017	(r318443)
    @@ -0,0 +1,7 @@
    +# $FreeBSD$
    +#
    +SHELL=/bin/sh
    +PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
    +
    +# See crontab(5) for field format.
    +*/5	*	*	*	*	root	/usr/libexec/atrun
    
    Modified: head/etc/crontab
    ==============================================================================
    --- head/etc/crontab	Thu May 18 06:27:37 2017	(r318442)
    +++ head/etc/crontab	Thu May 18 06:33:55 2017	(r318443)
    @@ -7,8 +7,6 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
     #
     #minute	hour	mday	month	wday	who	command
     #
    -*/5	*	*	*	*	root	/usr/libexec/atrun
    -#
     # Save some entropy so that /dev/random can re-seed on boot.
     */11	*	*	*	*	operator /usr/libexec/save-entropy
     #
    
    From owner-svn-src-all@freebsd.org  Thu May 18 06:43:34 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F966D6C301;
     Thu, 18 May 2017 06:43:34 +0000 (UTC)
     (envelope-from bapt@FreeBSD.org)
    Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client CN "freefall.freebsd.org",
     Issuer "Let's Encrypt Authority X3" (verified OK))
     by mx1.freebsd.org (Postfix) with ESMTPS id 783A21381;
     Thu, 18 May 2017 06:43:34 +0000 (UTC)
     (envelope-from bapt@FreeBSD.org)
    Received: by freefall.freebsd.org (Postfix, from userid 1235)
     id A1C952A13; Thu, 18 May 2017 06:43:33 +0000 (UTC)
    Date: Thu, 18 May 2017 08:43:33 +0200
    From: Baptiste Daroussin 
    To: Jonathan Anderson 
    Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: Re: svn commit: r318431 - head/libexec/rtld-elf
    Message-ID: <20170518064333.5767zwjk46vxi6fw@ivaldir.net>
    References: <201705172251.v4HMpSr3076792@repo.freebsd.org>
    MIME-Version: 1.0
    Content-Type: multipart/signed; micalg=pgp-sha256;
     protocol="application/pgp-signature"; boundary="befnp3zp4ufyadls"
    Content-Disposition: inline
    In-Reply-To: <201705172251.v4HMpSr3076792@repo.freebsd.org>
    User-Agent: NeoMutt/20170428 (1.8.2)
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 06:43:34 -0000
    
    
    --befnp3zp4ufyadls
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable
    
    On Wed, May 17, 2017 at 10:51:28PM +0000, Jonathan Anderson wrote:
    > Author: jonathan
    > Date: Wed May 17 22:51:28 2017
    > New Revision: 318431
    > URL: https://svnweb.freebsd.org/changeset/base/318431
    >=20
    > Log:
    >   Allow rtld direct-exec to take a file descriptor.
    >  =20
    [snip]
    > +}
    > +
    > +/*
    >   * Parse a file descriptor number without pulling in more of libc (e.g. =
    atoi).
    >   */
    >  static int
    > @@ -5300,6 +5378,20 @@ parse_integer(const char *str)
    >  	return (n);
    >  }
    > =20
    > +void print_usage(const char *argv0)
    
    Style(9) bug :)
    
    > +{
    > +
    > +	rtld_printf("Usage: %s [-h] [-f ] [--]  []\n"
    > +		"\n"
    > +		"Options:\n"
    > +		"  -h        Display this help message\n"
    > +		/* TODO: "  -p        Search in PATH for named binary\n" */
    > +		"  -f    Execute  instead of searching for \n"
    > +		"  --        End of RTLD options\n"
    > +		"    Name of process to execute\n"
    > +		"      Arguments to the executed process\n", argv0);
    > +}
    > +
    >  /*
    >   * Overrides for libc_pic-provided functions.
    >   */
    >=20
    
    --befnp3zp4ufyadls
    Content-Type: application/pgp-signature; name="signature.asc"
    
    -----BEGIN PGP SIGNATURE-----
    
    iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlkdQpAACgkQY4mL3PG3
    PlqWFBAAsfCYUNgUff7orua4KEEYjuDPpvQAq+iOTsfu2Ph4Z6IOvR4hDBE/9BIG
    KSbkEgLjEGkeL3TKQNWjFboY8itqXdYDXFv2zkOuLLnkP7Gf+uBOQ4xw5Ukzslxc
    urbvHQqd0q8Hv5H2UXMy4AjJr7VQM2Z28zY8DEL4In4pd0cKbAL0ydYfkF5QYGRZ
    k5WVlZX2ri207jS9ztREI9K1+Fibn6uxEwgCMo0fZ14kPjfsNV9Y9qnq14SzZgyu
    yuo9WTKaimU6rxvZhB8/otZl/Wu+JKQbA76XQxACTZMOaVnGVkTNd6j6AGWVhjYP
    YUlj1xKSy6QZf8S17qHikMBVyT4ZdqZbZvqqzLZeClpxrW3ZrdRchTAzTHuoDrex
    tdjOAyIaHp9f8mHdQMqms142MtOrya4x/mg3rDqW3ADWyydO+tAOV4CuGv9oyFhN
    5PQ+mKXSorc4vP1FCE841Wf/Fpf6jD1NqAk9VUAXM/sj5k+1mh57oZQCetoSbkWW
    5zFNwkbeljELVbmMtRApyHtPShR86wqAbtHKVqw5kY+WuVGzPVTJ8ntAMW/F8cKE
    lj2VUvG1IaN/1vuPG4KeZLmHAHmKaI0+HwBx9rbGwiMq+5KZ3KCzYZFRQrBCwJZy
    GaTZTvg35mRGUemxq5335O+4yqReR4Ta39uVZL8+T/2NqOxcfuw=
    =7GjP
    -----END PGP SIGNATURE-----
    
    --befnp3zp4ufyadls--
    
    From owner-svn-src-all@freebsd.org  Thu May 18 08:25:09 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 554EAD712BA;
     Thu, 18 May 2017 08:25:09 +0000 (UTC)
     (envelope-from trasz@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 19CB7172A;
     Thu, 18 May 2017 08:25:09 +0000 (UTC)
     (envelope-from trasz@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I8P8kb011066;
     Thu, 18 May 2017 08:25:08 GMT (envelope-from trasz@FreeBSD.org)
    Received: (from trasz@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I8P8UA011065;
     Thu, 18 May 2017 08:25:08 GMT (envelope-from trasz@FreeBSD.org)
    Message-Id: <201705180825.v4I8P8UA011065@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: trasz set sender to
     trasz@FreeBSD.org using -f
    From: Edward Tomasz Napierala 
    Date: Thu, 18 May 2017 08:25:08 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318444 - head/sys/geom
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 08:25:09 -0000
    
    Author: trasz
    Date: Thu May 18 08:25:07 2017
    New Revision: 318444
    URL: https://svnweb.freebsd.org/changeset/base/318444
    
    Log:
      Fix typo.
      
      MFC after:	2 weeks
    
    Modified:
      head/sys/geom/geom_vfs.c
    
    Modified: head/sys/geom/geom_vfs.c
    ==============================================================================
    --- head/sys/geom/geom_vfs.c	Thu May 18 06:33:55 2017	(r318443)
    +++ head/sys/geom/geom_vfs.c	Thu May 18 08:25:07 2017	(r318444)
    @@ -168,7 +168,7 @@ g_vfs_strategy(struct bufobj *bo, struct
     	sc = cp->geom->softc;
     
     	/*
    -	 * If the provider has orphaned us, just return EXIO.
    +	 * If the provider has orphaned us, just return ENXIO.
     	 */
     	mtx_lock(&sc->sc_mtx);
     	if (sc->sc_orphaned) {
    
    From owner-svn-src-all@freebsd.org  Thu May 18 09:31:32 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 211AED7257B;
     Thu, 18 May 2017 09:31:32 +0000 (UTC) (envelope-from kib@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id E5AC61A12;
     Thu, 18 May 2017 09:31:31 +0000 (UTC) (envelope-from kib@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I9VUQ5039592;
     Thu, 18 May 2017 09:31:30 GMT (envelope-from kib@FreeBSD.org)
    Received: (from kib@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I9VU5n039591;
     Thu, 18 May 2017 09:31:30 GMT (envelope-from kib@FreeBSD.org)
    Message-Id: <201705180931.v4I9VU5n039591@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
     using -f
    From: Konstantin Belousov 
    Date: Thu, 18 May 2017 09:31:30 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318445 - head/libexec/rtld-elf
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 09:31:32 -0000
    
    Author: kib
    Date: Thu May 18 09:31:30 2017
    New Revision: 318445
    URL: https://svnweb.freebsd.org/changeset/base/318445
    
    Log:
      Fix style [1], add static keyword before static function definition.
      
      Noted by:	bapt [1]
      Sponsored by:	The FreeBSD Foundation
      MFC after:	2 weeks
    
    Modified:
      head/libexec/rtld-elf/rtld.c
    
    Modified: head/libexec/rtld-elf/rtld.c
    ==============================================================================
    --- head/libexec/rtld-elf/rtld.c	Thu May 18 08:25:07 2017	(r318444)
    +++ head/libexec/rtld-elf/rtld.c	Thu May 18 09:31:30 2017	(r318445)
    @@ -5378,7 +5378,8 @@ parse_integer(const char *str)
     	return (n);
     }
     
    -void print_usage(const char *argv0)
    +static void
    +print_usage(const char *argv0)
     {
     
     	rtld_printf("Usage: %s [-h] [-f ] [--]  []\n"
    
    From owner-svn-src-all@freebsd.org  Thu May 18 09:34:28 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A666D727E5;
     Thu, 18 May 2017 09:34:28 +0000 (UTC) (envelope-from kib@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id DEF291F82;
     Thu, 18 May 2017 09:34:27 +0000 (UTC) (envelope-from kib@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I9YQZd039984;
     Thu, 18 May 2017 09:34:26 GMT (envelope-from kib@FreeBSD.org)
    Received: (from kib@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I9YQ6U039983;
     Thu, 18 May 2017 09:34:26 GMT (envelope-from kib@FreeBSD.org)
    Message-Id: <201705180934.v4I9YQ6U039983@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
     using -f
    From: Konstantin Belousov 
    Date: Thu, 18 May 2017 09:34:26 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318446 - head/libexec/rtld-elf
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 09:34:28 -0000
    
    Author: kib
    Date: Thu May 18 09:34:26 2017
    New Revision: 318446
    URL: https://svnweb.freebsd.org/changeset/base/318446
    
    Log:
      Update my copyright, note The FreeBSD Foundation involvement.
      While tweaking copyright block, switch to use __FBSDID for tag.
      
      Sponsored by:	The FreeBSD Foundation
      MFC after:	2 weeks
    
    Modified:
      head/libexec/rtld-elf/rtld.c
    
    Modified: head/libexec/rtld-elf/rtld.c
    ==============================================================================
    --- head/libexec/rtld-elf/rtld.c	Thu May 18 09:31:30 2017	(r318445)
    +++ head/libexec/rtld-elf/rtld.c	Thu May 18 09:34:26 2017	(r318446)
    @@ -1,10 +1,14 @@
     /*-
      * Copyright 1996, 1997, 1998, 1999, 2000 John D. Polstra.
      * Copyright 2003 Alexander Kabaev .
    - * Copyright 2009-2012 Konstantin Belousov .
    + * Copyright 2009-2013 Konstantin Belousov .
      * Copyright 2012 John Marino .
    + * Copyright 2014-2017 The FreeBSD Foundation
      * All rights reserved.
      *
    + * Portions of this software were developed by Konstantin Belousov
    + * under sponsorship from the FreeBSD Foundation.
    + *
      * Redistribution and use in source and binary forms, with or without
      * modification, are permitted provided that the following conditions
      * are met:
    @@ -24,8 +28,6 @@
      * 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$
      */
     
     /*
    @@ -34,6 +36,9 @@
      * John Polstra .
      */
     
    +#include 
    +__FBSDID("$FreeBSD$");
    +
     #include 
     #include 
     #include 
    
    From owner-svn-src-all@freebsd.org  Thu May 18 09:45:48 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 481E2D72B45;
     Thu, 18 May 2017 09:45:48 +0000 (UTC)
     (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net)
    Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140])
     (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 0BE7615FA;
     Thu, 18 May 2017 09:45:47 +0000 (UTC)
     (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net)
    Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1])
     by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v4I9jkLk065430;
     Thu, 18 May 2017 02:45:46 -0700 (PDT)
     (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net)
    Received: (from freebsd@localhost)
     by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v4I9jkTP065429;
     Thu, 18 May 2017 02:45:46 -0700 (PDT) (envelope-from freebsd)
    From: "Rodney W. Grimes" 
    Message-Id: <201705180945.v4I9jkTP065429@pdx.rh.CN85.dnsmgr.net>
    Subject: Re: svn commit: r318400 - head/sbin/ipfw
    In-Reply-To: <72e5d765-dfd5-dd65-b8f1-9d5524cde366@yandex.ru>
    To: "Andrey V. Elsukov" 
    Date: Thu, 18 May 2017 02:45:46 -0700 (PDT)
    CC: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, 
     svn-src-head@freebsd.org
    Reply-To: rgrimes@freebsd.org
    X-Mailer: ELM [version 2.4ME+ PL121h (25)]
    MIME-Version: 1.0
    Content-Transfer-Encoding: 7bit
    Content-Type: text/plain; charset=US-ASCII
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 09:45:48 -0000
    
    -- Start of PGP signed section.
    [ Charset UTF-8 unsupported, converting... ]
    > On 18.05.2017 03:49, Rodney W. Grimes wrote:
    > > [ Charset UTF-8 unsupported, converting... ]
    > >> Author: ae
    > >> Date: Wed May 17 10:56:22 2017
    > >> New Revision: 318400
    > >> URL: https://svnweb.freebsd.org/changeset/base/318400
    > >>
    > >> Log:
    > >>   Allow zero port specification in table entries with type flow.
    > >>   
    > >>   PR:		217620
    > >>   MFC after:	1 week
    > >>
    > >> Modified:
    > >>   head/sbin/ipfw/tables.c
    > >>
    > >> Modified: head/sbin/ipfw/tables.c
    > >> ==============================================================================
    > >> --- head/sbin/ipfw/tables.c	Wed May 17 09:04:09 2017	(r318399)
    > >> +++ head/sbin/ipfw/tables.c	Wed May 17 10:56:22 2017	(r318400)
    > >> @@ -1260,16 +1260,14 @@ tentry_fill_key_type(char *arg, ipfw_obj
    > >>  			if ((p = strchr(arg, ',')) != NULL)
    > >>  				*p++ = '\0';
    > >>  
    > >> -			if ((port = htons(strtol(arg, NULL, 10))) == 0) {
    > >> +			port = htons(strtol(arg, &pp, 10));
    > >                                                       ^^^
    > > Can this be converted to a sizeof(foo) somehow?
    > > Constants like this are typically bad style and lead to bugs.
    > 
    > This means that decimal number is expected in the string.
    > Not sure what bugs this can lead to.
    
    Ignore me, my brain was reading strtok as strncpy and expecting
    the third argument to be length limit.
    
    -- 
    Rod Grimes                                                 rgrimes@freebsd.org
    
    From owner-svn-src-all@freebsd.org  Thu May 18 09:56:32 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA265D72E0F;
     Thu, 18 May 2017 09:56:32 +0000 (UTC)
     (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net)
    Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140])
     (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 8FF541AFF;
     Thu, 18 May 2017 09:56:32 +0000 (UTC)
     (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net)
    Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1])
     by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v4I9uVER065466;
     Thu, 18 May 2017 02:56:31 -0700 (PDT)
     (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net)
    Received: (from freebsd@localhost)
     by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v4I9uVpQ065465;
     Thu, 18 May 2017 02:56:31 -0700 (PDT) (envelope-from freebsd)
    From: "Rodney W. Grimes" 
    Message-Id: <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net>
    Subject: Re: svn commit: r318441 - in head/etc: . cron.d
    In-Reply-To: <201705180625.v4I6Pd9j062495@repo.freebsd.org>
    To: Ngie Cooper 
    Date: Thu, 18 May 2017 02:56:31 -0700 (PDT)
    CC: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Reply-To: rgrimes@freebsd.org
    X-Mailer: ELM [version 2.4ME+ PL121h (25)]
    MIME-Version: 1.0
    Content-Transfer-Encoding: 7bit
    Content-Type: text/plain; charset=US-ASCII
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 09:56:33 -0000
    
    > Author: ngie
    > Date: Thu May 18 06:25:39 2017
    > New Revision: 318441
    > URL: https://svnweb.freebsd.org/changeset/base/318441
    > 
    > Log:
    >   Handle the cron.d entry for MK_AT in cron conditionally
    >   
    >   Install /etc/cron.d/at if MK_AT != no, always using it, which tries
    >   to run a non-existent program via cron(8) every 5 minutes with the
    >   default /etc/crontab, prior to this commit.
    >   
    >   SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at
    >   because atrun(8) executes programs, which may rely on environment
    >   currently set via /etc/crontab.
    >   
    >   Noted by:	bdrewery (in an internal review)
    >   MFC after:	2 months
    >   Relnotes:	yes (may need to add environmental modifications to
    >   		     /etc/cron.d/at)
    >   Sponsored by:	Dell EMC Isilon
    > 
    > Added:
    >   head/etc/cron.d/
    >   head/etc/cron.d/Makefile   (contents, props changed)
    >   head/etc/cron.d/at   (contents, props changed)
    > Modified:
    >   head/etc/Makefile
    >   head/etc/crontab
    > 
    > Modified: head/etc/Makefile
    > ==============================================================================
    > --- head/etc/Makefile	Thu May 18 06:15:42 2017	(r318440)
    > +++ head/etc/Makefile	Thu May 18 06:25:39 2017	(r318441)
    > @@ -8,6 +8,7 @@ FILESGROUPS=	FILES
    >  # No need as it is empty and just causes rebuilds since this file does so much.
    >  UPDATE_DEPENDFILE=	no
    >  SUBDIR=	\
    > +	cron.d \
    >  	newsyslog.conf.d \
    >  	syslog.d
    
    The thread on the newsyslog clearly shows that this is a contriversial change.
    
    I strongly object to further splitting of /etc/FOO into /etc/foo.d/FOO files
    to suite Dell/EMC/Isilon's needs.  It is in conflict with the needs and
    desires of others.
    
    I especially object to it being done on a 1 of case, either completly split
    the file or make it 1 file, but making it this miss match is just adding to
    the work load of ansible and puppet task writting.  You now have to mange
    2 config files rather than 1 for cron, and 7 for newsyslog instead of 1.
    
    > Added: head/etc/cron.d/Makefile
    > ==============================================================================
    > --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    > +++ head/etc/cron.d/Makefile	Thu May 18 06:25:39 2017	(r318441)
    > @@ -0,0 +1,11 @@
    > +# $FreeBSD$
    > +
    > +.include 
    > +
    > +.if ${MK_AT} != "no"
    > +FILES+=		at
    > +.endif
    > +
    > +BINDIR=		/etc/cron.d
    > +
    > +.include 
    > 
    > Added: head/etc/cron.d/at
    > ==============================================================================
    > --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    > +++ head/etc/cron.d/at	Thu May 18 06:25:39 2017	(r318441)
    > @@ -0,0 +1,7 @@
    > +# $FreeBSD$
    > +#
    > +SHELL=/bin/sh
    > +PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
    > +
    > +# See crontab(5) for field format.
    > +*/5	*	*	*	*	root	/usr/libexec/atrun
    > 
    > Modified: head/etc/crontab
    > ==============================================================================
    > --- head/etc/crontab	Thu May 18 06:15:42 2017	(r318440)
    > +++ head/etc/crontab	Thu May 18 06:25:39 2017	(r318441)
    > @@ -7,8 +7,6 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
    >  #
    >  #minute	hour	mday	month	wday	who	command
    >  #
    > -*/5	*	*	*	*	root	/usr/libexec/atrun
    > -#
    >  # Save some entropy so that /dev/random can re-seed on boot.
    >  */11	*	*	*	*	operator /usr/libexec/save-entropy
    >  #
    > 
    > 
    
    -- 
    Rod Grimes                                                 rgrimes@freebsd.org
    
    From owner-svn-src-all@freebsd.org  Thu May 18 12:27:42 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC0AED71312;
     Thu, 18 May 2017 12:27:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 78A658D;
     Thu, 18 May 2017 12:27:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ICRfAI009534;
     Thu, 18 May 2017 12:27:41 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ICRfqD009533;
     Thu, 18 May 2017 12:27:41 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181227.v4ICRfqD009533@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 12:27:41 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
    Subject: svn commit: r318447 - in stable: 10 11
    X-SVN-Group: stable-10
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 12:27:42 -0000
    
    Author: gjb
    Date: Thu May 18 12:27:41 2017
    New Revision: 318447
    URL: https://svnweb.freebsd.org/changeset/base/318447
    
    Log:
      MFC r318294:
       Correct the URL to instructions for updating system sources.
      
      PR:		219303
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/10/README
    Directory Properties:
      stable/10/   (props changed)
    
    Changes in other areas also in this revision:
    Modified:
      stable/11/README
    Directory Properties:
      stable/11/   (props changed)
    
    Modified: stable/10/README
    ==============================================================================
    --- stable/10/README	Thu May 18 09:34:26 2017	(r318446)
    +++ stable/10/README	Thu May 18 12:27:41 2017	(r318447)
    @@ -87,4 +87,4 @@ usr.sbin	System administration commands.
     For information on synchronizing your source tree with one or more of
     the FreeBSD Project's development branches, please see:
     
    -  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html
    +  https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html
    
    From owner-svn-src-all@freebsd.org  Thu May 18 12:27:42 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEAA1D71318;
     Thu, 18 May 2017 12:27:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 9EB948E;
     Thu, 18 May 2017 12:27:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ICRfDj009540;
     Thu, 18 May 2017 12:27:41 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ICRfkq009539;
     Thu, 18 May 2017 12:27:41 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181227.v4ICRfkq009539@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 12:27:41 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318447 - in stable: 10 11
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 12:27:42 -0000
    
    Author: gjb
    Date: Thu May 18 12:27:41 2017
    New Revision: 318447
    URL: https://svnweb.freebsd.org/changeset/base/318447
    
    Log:
      MFC r318294:
       Correct the URL to instructions for updating system sources.
      
      PR:		219303
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/README
    Directory Properties:
      stable/11/   (props changed)
    
    Changes in other areas also in this revision:
    Modified:
      stable/10/README
    Directory Properties:
      stable/10/   (props changed)
    
    Modified: stable/11/README
    ==============================================================================
    --- stable/11/README	Thu May 18 09:34:26 2017	(r318446)
    +++ stable/11/README	Thu May 18 12:27:41 2017	(r318447)
    @@ -81,4 +81,4 @@ usr.sbin	System administration commands.
     For information on synchronizing your source tree with one or more of
     the FreeBSD Project's development branches, please see:
     
    -  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html
    +  https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html
    
    From owner-svn-src-all@freebsd.org  Thu May 18 12:55:09 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 280F7D72210;
     Thu, 18 May 2017 12:55:09 +0000 (UTC)
     (envelope-from allanjude@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id EC4091503;
     Thu, 18 May 2017 12:55:08 +0000 (UTC)
     (envelope-from allanjude@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ICt7JZ021644;
     Thu, 18 May 2017 12:55:07 GMT (envelope-from allanjude@FreeBSD.org)
    Received: (from allanjude@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ICt7UM021643;
     Thu, 18 May 2017 12:55:07 GMT (envelope-from allanjude@FreeBSD.org)
    Message-Id: <201705181255.v4ICt7UM021643@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: allanjude set sender to
     allanjude@FreeBSD.org using -f
    From: Allan Jude 
    Date: Thu, 18 May 2017 12:55:07 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318448 - head/usr.bin/top
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 12:55:09 -0000
    
    Author: allanjude
    Date: Thu May 18 12:55:07 2017
    New Revision: 318448
    URL: https://svnweb.freebsd.org/changeset/base/318448
    
    Log:
      Explain the new fields in top(1) related to ZFS compressed ARC
      
      Reviewed by:	bcr
      X-MFC-with:	316314
      Differential Revision:	https://reviews.freebsd.org/D10781
    
    Modified:
      head/usr.bin/top/top.local.1
    
    Modified: head/usr.bin/top/top.local.1
    ==============================================================================
    --- head/usr.bin/top/top.local.1	Thu May 18 12:27:41 2017	(r318447)
    +++ head/usr.bin/top/top.local.1	Thu May 18 12:55:07 2017	(r318448)
    @@ -2,9 +2,10 @@
     .SH "FreeBSD NOTES"
     
     .SH DESCRIPTION OF MEMORY
    -Mem: 9220K Active, 1M Inact, 1M Laundry, 3284K Wired, 2M Buf, 932K Free
    -ARC: 2048K Total, 342K MRU, 760K MFU, 272K Anon, 96K Header, 442K Other
    -Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out
    +Mem: 61M Active, 86M Inact, 368K Laundry, 22G Wired, 102G Free
    +ARC: 15G Total, 9303M MFU, 6155M MRU, 1464K Anon, 98M Header, 35M Other
    +     15G Compressed, 27G Uncompressed, 1.75:1 Ratio, 174M Overhead
    +Swap: 4096M Total, 532M Free, 13% Inuse, 80K In, 104K Out
     .TP
     .B K:
     Kilobyte
    @@ -54,8 +55,20 @@ number of ARC bytes holding in flight da
     .B Header:
     number of ARC bytes holding headers
     .TP
    -.B Other
    +.B Other:
     miscellaneous ARC bytes
    +.TP
    +.B Compressed:
    +bytes of memory used by ARC caches
    +.TP
    +.B Uncompressed:
    +bytes of data stored in ARC caches before compression
    +.TP
    +.B Ratio:
    +ratio of uncompressed data to total ARC size
    +.TP
    +.B Overhead:
    +amount of overhead from ARC compression
     .SS Swap Stats
     .TP
     .B Total:
    
    From owner-svn-src-all@freebsd.org  Thu May 18 13:09:33 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8F53D724D0;
     Thu, 18 May 2017 13:09:33 +0000 (UTC)
     (envelope-from bapt@FreeBSD.org)
    Received: from freefall.freebsd.org (freefall.freebsd.org
     [IPv6:2610:1c1:1:6074::16:84])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client CN "freefall.freebsd.org",
     Issuer "Let's Encrypt Authority X3" (verified OK))
     by mx1.freebsd.org (Postfix) with ESMTPS id 812051BEA;
     Thu, 18 May 2017 13:09:33 +0000 (UTC)
     (envelope-from bapt@FreeBSD.org)
    Received: by freefall.freebsd.org (Postfix, from userid 1235)
     id A73E67400; Thu, 18 May 2017 13:09:32 +0000 (UTC)
    Date: Thu, 18 May 2017 15:09:32 +0200
    From: Baptiste Daroussin 
    To: rgrimes@freebsd.org
    Cc: Ngie Cooper , svn-src-head@freebsd.org,
     svn-src-all@freebsd.org, src-committers@freebsd.org
    Subject: Re: svn commit: r318441 - in head/etc: . cron.d
    Message-ID: <20170518130932.eo5clhki4za2vigz@ivaldir.net>
    References: <201705180625.v4I6Pd9j062495@repo.freebsd.org>
     <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net>
    MIME-Version: 1.0
    Content-Type: multipart/signed; micalg=pgp-sha256;
     protocol="application/pgp-signature"; boundary="hkqzmaj2eaimfgcz"
    Content-Disposition: inline
    In-Reply-To: <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net>
    User-Agent: NeoMutt/20170428 (1.8.2)
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 13:09:33 -0000
    
    
    --hkqzmaj2eaimfgcz
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable
    
    On Thu, May 18, 2017 at 02:56:31AM -0700, Rodney W. Grimes wrote:
    > > Author: ngie
    > > Date: Thu May 18 06:25:39 2017
    > > New Revision: 318441
    > > URL: https://svnweb.freebsd.org/changeset/base/318441
    > >=20
    > > Log:
    > >   Handle the cron.d entry for MK_AT in cron conditionally
    > >  =20
    > >   Install /etc/cron.d/at if MK_AT !=3D no, always using it, which tries
    > >   to run a non-existent program via cron(8) every 5 minutes with the
    > >   default /etc/crontab, prior to this commit.
    > >  =20
    > >   SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at
    > >   because atrun(8) executes programs, which may rely on environment
    > >   currently set via /etc/crontab.
    > >  =20
    > >   Noted by:	bdrewery (in an internal review)
    > >   MFC after:	2 months
    > >   Relnotes:	yes (may need to add environmental modifications to
    > >   		     /etc/cron.d/at)
    > >   Sponsored by:	Dell EMC Isilon
    > >=20
    > > Added:
    > >   head/etc/cron.d/
    > >   head/etc/cron.d/Makefile   (contents, props changed)
    > >   head/etc/cron.d/at   (contents, props changed)
    > > Modified:
    > >   head/etc/Makefile
    > >   head/etc/crontab
    > >=20
    > > Modified: head/etc/Makefile
    > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
    =3D=3D=3D=3D=3D
    > > --- head/etc/Makefile	Thu May 18 06:15:42 2017	(r318440)
    > > +++ head/etc/Makefile	Thu May 18 06:25:39 2017	(r318441)
    > > @@ -8,6 +8,7 @@ FILESGROUPS=3D	FILES
    > >  # No need as it is empty and just causes rebuilds since this file does=
     so much.
    > >  UPDATE_DEPENDFILE=3D	no
    > >  SUBDIR=3D	\
    > > +	cron.d \
    > >  	newsyslog.conf.d \
    > >  	syslog.d
    >=20
    > The thread on the newsyslog clearly shows that this is a contriversial ch=
    ange.
    >=20
    > I strongly object to further splitting of /etc/FOO into /etc/foo.d/FOO fi=
    les
    > to suite Dell/EMC/Isilon's needs.  It is in conflict with the needs and
    > desires of others.
    
    Has multiple people has stated, on the newsyslog thread. this is not a
    DELL/EMC/Isilon need, this is also a requirement for plenty of use cases
    1. Consistency
      as a project we do support building WITHOUT_FOO there is no reason to ins=
    tall
      syslog, cron configuration for FOO if the system was built without foo
    
    2. Packaging base
      if one does not install at there is no need for the at crontab to be inst=
    alled
      (same reason as 1.)
    
    3. Large deployment of freebsd farms
      Being able to administrate thousands of FreeBSD machines, one often ends =
    up
      using tools like puppet, chef, ansible, cfengine. When programmatically
      handling configuration management it is way easier and safer to simple
      add/removes files in a directory rather than mangling^Winplace editing fi=
    les.
    
    4. Ports/packages
      On can provide easily sample configuration for cron, syslog (not only) an=
    d the
      admin can decide to use it or not easily (ususally this is done by making
      symlinks from the said file which would live in share/* into the .d direc=
    tory.
    
    This is not a new trend in FreeBSD: newsyslog, rc.conf, libmap and more.
    
    Best regards,
    Bapt
    
    --hkqzmaj2eaimfgcz
    Content-Type: application/pgp-signature; name="signature.asc"
    
    -----BEGIN PGP SIGNATURE-----
    
    iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlkdnQkACgkQY4mL3PG3
    PlphKw//S2nZH85ZFQ5miEw9PbpWRR63V9cHp3M/OhT63hPeZ1TIXcU6Y3dPEKPU
    zCUjSeds8bZDKauR9ifPy1HhUzuvSIcJNQCaErCLE4l/F3Zc3jUC/nTQ7vsF1FGf
    lKf41fsoXnVuurBOhubmLwBu9BYjfw4grWPmJzIx1gv5mnYF9wf80d40VdsEOr6/
    4c/lErNr0B3RcWFq6yv93cYLDxCkGK0pxq1XJpQO1WygRYqBYZLvBwHAUG6/02Vi
    V0Piyu6apBzHvDyWoncrULYCtfF7UtxdGmdOQVH3arCNSBHtOUd1oZEtku0G6Qcc
    yHWAzqB8imZWQ9Hko9JX/Xmuqp2CUWLZNsmRxpwpGMbgplSoov4hZNFtiPMQlVhm
    v1j1uXOOPhVG/8wXqVewGf8A8om6GL2fHarMZ0OssZ5RAN9+zctdNL2+GUxqLsNH
    s/1Cx/UUoCx0cLiSBkWdpIhEzv3EYxGdzkTFIpFqMu9/RIrknmtlv+tibfHHivlQ
    7PMpaUSk/P6mSLj/WDHo9cIxBQ1P0z+qs2Wqa+ALyhNpXo1fYZdAEKNGVM2Lzma5
    Lez6+uHOto9hgWJmjG45oGgz34thRT4xg0iy56FwKpYBFXHiiP7879/Oi17fR+32
    2c2/k6b37cMt3WA5bsBiyyw7zdpAFiHq5sSAUa33in8P5nc+JWM=
    =GELL
    -----END PGP SIGNATURE-----
    
    --hkqzmaj2eaimfgcz--
    
    From owner-svn-src-all@freebsd.org  Thu May 18 13:12:25 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62D5CD72742;
     Thu, 18 May 2017 13:12:25 +0000 (UTC)
     (envelope-from jonathan@FreeBSD.org)
    Received: from freefall.freebsd.org (freefall.freebsd.org
     [IPv6:2610:1c1:1:6074::16:84])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client CN "freefall.freebsd.org",
     Issuer "Let's Encrypt Authority X3" (verified OK))
     by mx1.freebsd.org (Postfix) with ESMTPS id 437D41FF6;
     Thu, 18 May 2017 13:12:25 +0000 (UTC)
     (envelope-from jonathan@FreeBSD.org)
    Received: from [IPv6:::1] (unknown [127.0.1.132])
     by freefall.freebsd.org (Postfix) with ESMTP id 1753C7568;
     Thu, 18 May 2017 13:12:24 +0000 (UTC)
     (envelope-from jonathan@FreeBSD.org)
    Subject: Re: svn commit: r318431 - head/libexec/rtld-elf
    To: Baptiste Daroussin 
    Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    References: <201705172251.v4HMpSr3076792@repo.freebsd.org>
     <20170518064333.5767zwjk46vxi6fw@ivaldir.net>
    From: Jonathan Anderson 
    Message-ID: <47efec4d-35cc-2908-af9e-0d462a83d868@FreeBSD.org>
    Date: Thu, 18 May 2017 10:42:23 -0230
    User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101
     Thunderbird/52.0.1
    MIME-Version: 1.0
    In-Reply-To: <20170518064333.5767zwjk46vxi6fw@ivaldir.net>
    Content-Type: text/plain; charset=windows-1252; format=flowed
    Content-Transfer-Encoding: 7bit
    Content-Language: en-US
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 13:12:25 -0000
    
    
    
    On 05/18/17 04:13, Baptiste Daroussin wrote:
    > On Wed, May 17, 2017 at 10:51:28PM +0000, Jonathan Anderson wrote:
    >>   
    >> +void print_usage(const char *argv0)
    > Style(9) bug :)
    
    Duly noted. :)
    
    It looks like kib@ has already sorted this out in his timezone.
    
    
    Jon
    
    -- 
    jonathan@FreeBSD.org
    
    
    From owner-svn-src-all@freebsd.org  Thu May 18 13:19:09 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41A56D72994;
     Thu, 18 May 2017 13:19:09 +0000 (UTC)
     (envelope-from allanjude@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 05D206B1;
     Thu, 18 May 2017 13:19:08 +0000 (UTC)
     (envelope-from allanjude@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IDJ8Uu029783;
     Thu, 18 May 2017 13:19:08 GMT (envelope-from allanjude@FreeBSD.org)
    Received: (from allanjude@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IDJ74T029775;
     Thu, 18 May 2017 13:19:07 GMT (envelope-from allanjude@FreeBSD.org)
    Message-Id: <201705181319.v4IDJ74T029775@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: allanjude set sender to
     allanjude@FreeBSD.org using -f
    From: Allan Jude 
    Date: Thu, 18 May 2017 13:19:07 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318449 - in stable/11: contrib/top usr.bin/top
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 13:19:09 -0000
    
    Author: allanjude
    Date: Thu May 18 13:19:07 2017
    New Revision: 318449
    URL: https://svnweb.freebsd.org/changeset/base/318449
    
    Log:
      MFC r315435:
      	Add ZFS compressed ARC stats to top(1)
      
      MFC r316314:
      	top(1) read the wrong amount of data from sysctl
      
      MFC r318448:
      	Explain the new fields in top(1) related to ZFS compressed ARC
      
      Remove the laundry field during the merge, does not exist in stable/11
    
    Modified:
      stable/11/contrib/top/display.c
      stable/11/contrib/top/display.h
      stable/11/contrib/top/layout.h
      stable/11/contrib/top/machine.h
      stable/11/contrib/top/top.c
      stable/11/usr.bin/top/machine.c
      stable/11/usr.bin/top/top.local.1
    Directory Properties:
      stable/11/   (props changed)
    
    Modified: stable/11/contrib/top/display.c
    ==============================================================================
    --- stable/11/contrib/top/display.c	Thu May 18 12:55:07 2017	(r318448)
    +++ stable/11/contrib/top/display.c	Thu May 18 13:19:07 2017	(r318449)
    @@ -69,6 +69,7 @@ static char **procstate_names;
     static char **cpustate_names;
     static char **memory_names;
     static char **arc_names;
    +static char **carc_names;
     static char **swap_names;
     
     static int num_procstates;
    @@ -105,6 +106,8 @@ int  x_mem =		5;
     int  y_mem =		3;
     int  x_arc =		5;
     int  y_arc =		4;
    +int  x_carc =		5;
    +int  y_carc =		5;
     int  x_swap =		6;
     int  y_swap =		4;
     int  y_message =	5;
    @@ -222,6 +225,7 @@ struct statics *statics;
     	lmemory = (int *)malloc(num_memory * sizeof(int));
     
     	arc_names = statics->arc_names;
    +	carc_names = statics->carc_names;
     	
     	/* calculate starting columns where needed */
     	cpustate_total_length = 0;
    @@ -684,6 +688,47 @@ int *stats;
         line_update(arc_buffer, new, x_arc, y_arc);
     }
     
    +
    +/*
    + *  *_carc(stats) - print "Compressed ARC: " followed by the summary string
    + *
    + *  Assumptions:  cursor is on "lastline"
    + *                for i_carc ONLY: cursor is on the previous line
    + */
    +char carc_buffer[MAX_COLS];
    +
    +void
    +i_carc(stats)
    +
    +int *stats;
    +
    +{
    +    if (carc_names == NULL)
    +	return;
    +
    +    fputs("\n     ", stdout);
    +    lastline++;
    +
    +    /* format and print the memory summary */
    +    summary_format(carc_buffer, stats, carc_names);
    +    fputs(carc_buffer, stdout);
    +}
    +
    +void
    +u_carc(stats)
    +
    +int *stats;
    +
    +{
    +    static char new[MAX_COLS];
    +
    +    if (carc_names == NULL)
    +	return;
    +
    +    /* format the new line */
    +    summary_format(new, stats, carc_names);
    +    line_update(carc_buffer, new, x_carc, y_carc);
    +}
      
     /*
      *  *_swap(stats) - print "Swap: " followed by the swap summary string
    @@ -1174,6 +1219,7 @@ register char **names;
         register int num;
         register char *thisname;
         register int useM = No;
    +    char rbuf[6];
     
         /* format each number followed by its string */
         p = str;
    @@ -1194,6 +1240,14 @@ register char **names;
     		/* skip over the K, since it was included by format_k */
     		p = strecpy(p, thisname+1);
     	    }
    +	    /* is this number a ratio? */
    +	    else if (thisname[0] == ':')
    +	    {
    +		(void) snprintf(rbuf, sizeof(rbuf), "%.2f", 
    +		    (float)*(numbers - 2) / (float)num);
    +		p = strecpy(p, rbuf);
    +		p = strecpy(p, thisname);
    +	    }
     	    else
     	    {
     		p = strecpy(p, itoa(num));
    
    Modified: stable/11/contrib/top/display.h
    ==============================================================================
    --- stable/11/contrib/top/display.h	Thu May 18 12:55:07 2017	(r318448)
    +++ stable/11/contrib/top/display.h	Thu May 18 13:19:07 2017	(r318449)
    @@ -16,6 +16,7 @@ char	*cpustates_tag(void);
     void	 display_header(int t);
     int		 display_init(struct statics *statics);
     void	 i_arc(int *stats);
    +void	 i_carc(int *stats);
     void	 i_cpustates(int *states);
     void	 i_loadave(int mpid, double *avenrun);
     void	 i_memory(int *stats);
    @@ -29,6 +30,7 @@ void	 new_message();
     int		 readline(char *buffer, int size, int numeric);
     char	*trim_header(char *text);
     void	 u_arc(int *stats);
    +void	 u_carc(int *stats);
     void	 u_cpustates(int *states);
     void	 u_endscreen(int hi);
     void	 u_header(char *text);
    
    Modified: stable/11/contrib/top/layout.h
    ==============================================================================
    --- stable/11/contrib/top/layout.h	Thu May 18 12:55:07 2017	(r318448)
    +++ stable/11/contrib/top/layout.h	Thu May 18 13:19:07 2017	(r318449)
    @@ -21,6 +21,8 @@ extern int  x_mem;		/* 5 */
     extern int  y_mem;		/* 3 */
     extern int  x_arc;		/* 5 */
     extern int  y_arc;		/* 4 */
    +extern int  x_carc;		/* 5 */
    +extern int  y_carc;		/* 5 */
     extern int  x_swap;		/* 6 */
     extern int  y_swap;		/* 4 */
     extern int  y_message;		/* 5 */
    
    Modified: stable/11/contrib/top/machine.h
    ==============================================================================
    --- stable/11/contrib/top/machine.h	Thu May 18 12:55:07 2017	(r318448)
    +++ stable/11/contrib/top/machine.h	Thu May 18 13:19:07 2017	(r318449)
    @@ -21,6 +21,7 @@ struct statics
         char **cpustate_names;
         char **memory_names;
         char **arc_names;
    +    char **carc_names;
         char **swap_names;
     #ifdef ORDER
         char **order_names;
    @@ -48,6 +49,7 @@ struct system_info
         int    *cpustates;
         int    *memory;
         int    *arc;
    +    int    *carc;
         int    *swap;
         struct timeval boottime;
         int    ncpus;
    
    Modified: stable/11/contrib/top/top.c
    ==============================================================================
    --- stable/11/contrib/top/top.c	Thu May 18 12:55:07 2017	(r318448)
    +++ stable/11/contrib/top/top.c	Thu May 18 13:19:07 2017	(r318449)
    @@ -125,6 +125,7 @@ void (*d_procstates)() = i_procstates;
     void (*d_cpustates)() = i_cpustates;
     void (*d_memory)() = i_memory;
     void (*d_arc)() = i_arc;
    +void (*d_carc)() = i_carc;
     void (*d_swap)() = i_swap;
     void (*d_message)() = i_message;
     void (*d_header)() = i_header;
    @@ -658,6 +659,7 @@ restart:
     	/* display memory stats */
     	(*d_memory)(system_info.memory);
     	(*d_arc)(system_info.arc);
    +	(*d_carc)(system_info.carc);
     
     	/* display swap stats */
     	(*d_swap)(system_info.swap);
    @@ -724,6 +726,7 @@ restart:
     		    d_cpustates = u_cpustates;
     		    d_memory = u_memory;
     		    d_arc = u_arc;
    +		    d_carc = u_carc;
     		    d_swap = u_swap;
     		    d_message = u_message;
     		    d_header = u_header;
    @@ -1190,6 +1193,7 @@ reset_display()
         d_cpustates  = i_cpustates;
         d_memory     = i_memory;
         d_arc        = i_arc;
    +    d_carc       = i_carc;
         d_swap       = i_swap;
         d_message	 = i_message;
         d_header	 = i_header;
    
    Modified: stable/11/usr.bin/top/machine.c
    ==============================================================================
    --- stable/11/usr.bin/top/machine.c	Thu May 18 12:55:07 2017	(r318448)
    +++ stable/11/usr.bin/top/machine.c	Thu May 18 13:19:07 2017	(r318449)
    @@ -188,6 +188,12 @@ char *arcnames[] = {
     	NULL
     };
     
    +int carc_stats[5];
    +char *carcnames[] = {
    +	"K Compressed, ", "K Uncompressed, ", ":1 Ratio, ", "K Overhead",
    +	NULL
    +};
    +
     int swap_stats[7];
     char *swapnames[] = {
     	"K Total, ", "K Used, ", "K Free, ", "% Inuse, ", "K In, ", "K Out",
    @@ -223,6 +229,7 @@ static long total_majflt;
     /* these are for getting the memory statistics */
     
     static int arc_enabled;
    +static int carc_enabled;
     static int pageshift;		/* log base 2 of the pagesize */
     
     /* define pagetok in terms of pageshift */
    @@ -283,16 +290,18 @@ update_layout(void)
     
     	y_mem = 3;
     	y_arc = 4;
    -	y_swap = 4 + arc_enabled;
    -	y_idlecursor = 5 + arc_enabled;
    -	y_message = 5 + arc_enabled;
    -	y_header = 6 + arc_enabled;
    -	y_procs = 7 + arc_enabled;
    -	Header_lines = 7 + arc_enabled;
    +	y_carc = 5;
    +	y_swap = 4 + arc_enabled + carc_enabled;
    +	y_idlecursor = 5 + arc_enabled + carc_enabled;
    +	y_message = 5 + arc_enabled + carc_enabled;
    +	y_header = 6 + arc_enabled + carc_enabled;
    +	y_procs = 7 + arc_enabled + carc_enabled;
    +	Header_lines = 7 + arc_enabled + carc_enabled;
     
     	if (pcpu_stats) {
     		y_mem += ncpus - 1;
     		y_arc += ncpus - 1;
    +		y_carc += ncpus - 1;
     		y_swap += ncpus - 1;
     		y_idlecursor += ncpus - 1;
     		y_message += ncpus - 1;
    @@ -307,6 +316,7 @@ machine_init(struct statics *statics, ch
     {
     	int i, j, empty, pagesize;
     	uint64_t arc_size;
    +	boolean_t carc_en;
     	size_t size;
     	struct passwd *pw;
     
    @@ -318,6 +328,10 @@ machine_init(struct statics *statics, ch
     	    size != sizeof(smpmode))
     		smpmode = 0;
     
    +	size = sizeof(carc_en);
    +	if (sysctlbyname("vfs.zfs.compressed_arc_enabled", &carc_en, &size,
    +	    NULL, 0) == 0 && carc_en == 1)
    +		carc_enabled = 1;
     	size = sizeof(arc_size);
     	if (sysctlbyname("kstat.zfs.misc.arcstats.size", &arc_size, &size,
     	    NULL, 0) == 0 && arc_size != 0)
    @@ -368,6 +382,10 @@ machine_init(struct statics *statics, ch
     		statics->arc_names = arcnames;
     	else
     		statics->arc_names = NULL;
    +	if (carc_enabled)
    +		statics->carc_names = carcnames;
    +	else
    +		statics->carc_names = NULL;
     	statics->swap_names = swapnames;
     #ifdef ORDER
     	statics->order_names = ordernames;
    @@ -559,6 +577,16 @@ get_system_info(struct system_info *si)
     		arc_stats[5] = arc_stat >> 10;
     		si->arc = arc_stats;
     	}
    +	if (carc_enabled) {
    +		GETSYSCTL("kstat.zfs.misc.arcstats.compressed_size", arc_stat);
    +		carc_stats[0] = arc_stat >> 10;
    +		GETSYSCTL("kstat.zfs.misc.arcstats.uncompressed_size", arc_stat);
    +		carc_stats[1] = arc_stat >> 10;
    +		carc_stats[2] = arc_stats[0]; /* ARC Total */
    +		GETSYSCTL("kstat.zfs.misc.arcstats.overhead_size", arc_stat);
    +		carc_stats[3] = arc_stat >> 10;
    +		si->carc = carc_stats;
    +	}
     
     	/* set arrays and strings */
     	if (pcpu_stats) {
    
    Modified: stable/11/usr.bin/top/top.local.1
    ==============================================================================
    --- stable/11/usr.bin/top/top.local.1	Thu May 18 12:55:07 2017	(r318448)
    +++ stable/11/usr.bin/top/top.local.1	Thu May 18 13:19:07 2017	(r318449)
    @@ -2,9 +2,10 @@
     .SH "FreeBSD NOTES"
     
     .SH DESCRIPTION OF MEMORY
    -Mem: 9220K Active, 1M Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free
    -ARC: 2048K Total, 342K MRU, 760K MFU, 272K Anon, 232K Header, 442K Other
    -Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out
    +Mem: 61M Active, 86M Inact, 22G Wired, 1M Cache, 2M Buf, 102G Free
    +ARC: 15G Total, 9303M MFU, 6155M MRU, 1464K Anon, 98M Header, 35M Other
    +     15G Compressed, 27G Uncompressed, 1.75:1 Ratio, 174M Overhead
    +Swap: 4096M Total, 532M Free, 13% Inuse, 80K In, 104K Out
     .TP
     .B K:
     Kilobyte
    @@ -55,8 +56,20 @@ number of ARC bytes holding in flight da
     .B Header:
     number of ARC bytes holding headers
     .TP
    -.B Other
    +.B Other:
     miscellaneous ARC bytes
    +.TP
    +.B Compressed:
    +bytes of memory used by ARC caches
    +.TP
    +.B Uncompressed:
    +bytes of data stored in ARC caches before compression
    +.TP
    +.B Ratio:
    +ratio of uncompressed data to total ARC size
    +.TP
    +.B Overhead:
    +amount of overhead from ARC compression
     .SS Swap Stats
     .TP
     .B Total:
    
    From owner-svn-src-all@freebsd.org  Thu May 18 13:49:55 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0030ED733D0;
     Thu, 18 May 2017 13:49:54 +0000 (UTC) (envelope-from kib@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id C13B11D37;
     Thu, 18 May 2017 13:49:54 +0000 (UTC) (envelope-from kib@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IDnrsZ044852;
     Thu, 18 May 2017 13:49:53 GMT (envelope-from kib@FreeBSD.org)
    Received: (from kib@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IDnrPf044850;
     Thu, 18 May 2017 13:49:53 GMT (envelope-from kib@FreeBSD.org)
    Message-Id: <201705181349.v4IDnrPf044850@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
     using -f
    From: Konstantin Belousov 
    Date: Thu, 18 May 2017 13:49:53 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318450 - head/lib/libc/tests/gen
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 13:49:55 -0000
    
    Author: kib
    Date: Thu May 18 13:49:53 2017
    New Revision: 318450
    URL: https://svnweb.freebsd.org/changeset/base/318450
    
    Log:
      Add tests for some cases in r318298.
      
      The first test triggers the out of bounds read of the 'left' array. It
      only fails when realpath.c is compiled with '-fsanitize=address'.
      
      The other test checks for ENOENT when running into an empty
      symlink. This matches NetBSD's realpath(3) semantics. Previously,
      empty symlinks were treated like ".".
      
      Submitted by:	Jan Kokemц╪ller 
      PR:	219154
      MFC after:	2 weeks
    
    Added:
      head/lib/libc/tests/gen/realpath2_test.c   (contents, props changed)
    Modified:
      head/lib/libc/tests/gen/Makefile
    
    Modified: head/lib/libc/tests/gen/Makefile
    ==============================================================================
    --- head/lib/libc/tests/gen/Makefile	Thu May 18 13:19:07 2017	(r318449)
    +++ head/lib/libc/tests/gen/Makefile	Thu May 18 13:49:53 2017	(r318450)
    @@ -13,6 +13,7 @@ ATF_TESTS_C+=		popen_test
     ATF_TESTS_C+=		posix_spawn_test
     ATF_TESTS_C+=		wordexp_test
     ATF_TESTS_C+=		dlopen_empty_test
    +ATF_TESTS_C+=		realpath2_test
     
     # TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid,
     # TODO: t_siginfo (fixes require further inspection)
    
    Added: head/lib/libc/tests/gen/realpath2_test.c
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ head/lib/libc/tests/gen/realpath2_test.c	Thu May 18 13:49:53 2017	(r318450)
    @@ -0,0 +1,102 @@
    +/*
    + * Copyright (c) 2017 Jan Kokemüller
    + * 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 
    +
    +ATF_TC(realpath_buffer_overflow);
    +ATF_TC_HEAD(realpath_buffer_overflow, tc)
    +{
    +	atf_tc_set_md_var(tc, "descr",
    +	    "Test for out of bounds read from 'left' array "
    +	    "(compile realpath.c with '-fsanitize=address')");
    +}
    +
    +ATF_TC_BODY(realpath_buffer_overflow, tc)
    +{
    +	char path[MAXPATHLEN] = { 0 };
    +	char resb[MAXPATHLEN] = { 0 };
    +	size_t i;
    +
    +	path[0] = 'a';
    +	path[1] = '/';
    +	for (i = 2; i < sizeof(path) - 1; ++i) {
    +		path[i] = 'a';
    +	}
    +
    +	ATF_REQUIRE(realpath(path, resb) == NULL);
    +}
    +
    +ATF_TC(realpath_empty_symlink);
    +ATF_TC_HEAD(realpath_empty_symlink, tc)
    +{
    +	atf_tc_set_md_var(tc, "descr",
    +	    "Test for correct behavior when encountering empty symlinks");
    +}
    +
    +ATF_TC_BODY(realpath_empty_symlink, tc)
    +{
    +	char path[MAXPATHLEN] = { 0 };
    +	char slnk[MAXPATHLEN] = { 0 };
    +	char resb[MAXPATHLEN] = { 0 };
    +	int fd;
    +
    +	(void)strlcat(slnk, "empty_symlink", sizeof(slnk));
    +
    +	ATF_REQUIRE(symlink("", slnk) == 0);
    +
    +	fd = open("aaa", O_RDONLY | O_CREAT, 0600);
    +
    +	ATF_REQUIRE(fd >= 0);
    +	ATF_REQUIRE(close(fd) == 0);
    +
    +	(void)strlcat(path, "empty_symlink", sizeof(path));
    +	(void)strlcat(path, "/aaa", sizeof(path));
    +
    +	ATF_REQUIRE_ERRNO(ENOENT, realpath(path, resb) == NULL);
    +
    +	ATF_REQUIRE(unlink("aaa") == 0);
    +	ATF_REQUIRE(unlink(slnk) == 0);
    +}
    +
    +ATF_TP_ADD_TCS(tp)
    +{
    +
    +	ATF_TP_ADD_TC(tp, realpath_buffer_overflow);
    +	ATF_TP_ADD_TC(tp, realpath_empty_symlink);
    +
    +	return atf_no_error();
    +}
    
    From owner-svn-src-all@freebsd.org  Thu May 18 14:05:31 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E9B9D73C14;
     Thu, 18 May 2017 14:05:31 +0000 (UTC)
     (envelope-from emaste@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 40366D29;
     Thu, 18 May 2017 14:05:31 +0000 (UTC)
     (envelope-from emaste@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IE5UNt052867;
     Thu, 18 May 2017 14:05:30 GMT (envelope-from emaste@FreeBSD.org)
    Received: (from emaste@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IE5TEi052861;
     Thu, 18 May 2017 14:05:29 GMT (envelope-from emaste@FreeBSD.org)
    Message-Id: <201705181405.v4IE5TEi052861@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: emaste set sender to
     emaste@FreeBSD.org using -f
    From: Ed Maste 
    Date: Thu, 18 May 2017 14:05:29 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318451 - in head/usr.sbin/makefs: . ffs
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 14:05:31 -0000
    
    Author: emaste
    Date: Thu May 18 14:05:29 2017
    New Revision: 318451
    URL: https://svnweb.freebsd.org/changeset/base/318451
    
    Log:
      makefs: clean up signedness warnings and bump WARNS to 3
      
      Reviewed by:	kib
      Sponsored by:	The FreeBSD Foundation
      Differential Revision:	https://reviews.freebsd.org/D10650
    
    Modified:
      head/usr.sbin/makefs/Makefile
      head/usr.sbin/makefs/ffs.c
      head/usr.sbin/makefs/ffs/ffs_alloc.c
      head/usr.sbin/makefs/ffs/ffs_balloc.c
      head/usr.sbin/makefs/ffs/ffs_bswap.c
      head/usr.sbin/makefs/mtree.c
    
    Modified: head/usr.sbin/makefs/Makefile
    ==============================================================================
    --- head/usr.sbin/makefs/Makefile	Thu May 18 13:49:53 2017	(r318450)
    +++ head/usr.sbin/makefs/Makefile	Thu May 18 14:05:29 2017	(r318451)
    @@ -14,7 +14,7 @@ SRCS=	cd9660.c ffs.c \
     	walk.c
     MAN=	makefs.8
     
    -WARNS?=	2
    +WARNS?=	3
     
     .include "${SRCDIR}/cd9660/Makefile.inc"
     .include "${SRCDIR}/ffs/Makefile.inc"
    
    Modified: head/usr.sbin/makefs/ffs.c
    ==============================================================================
    --- head/usr.sbin/makefs/ffs.c	Thu May 18 13:49:53 2017	(r318450)
    +++ head/usr.sbin/makefs/ffs.c	Thu May 18 14:05:29 2017	(r318451)
    @@ -1065,10 +1065,11 @@ ffs_write_inode(union dinode *dp, uint32
     	struct ufs2_dinode *dp2, *dip;
     	struct cg	*cgp;
     	struct fs	*fs;
    -	int		cg, cgino, i;
    +	int		cg, cgino;
    +	uint32_t	i;
     	daddr_t		d;
     	char		sbbuf[FFS_MAXBSIZE];
    -	int32_t		initediblk;
    +	uint32_t	initediblk;
     	ffs_opt_t	*ffs_opts = fsopts->fs_specific;
     
     	assert (dp != NULL);
    
    Modified: head/usr.sbin/makefs/ffs/ffs_alloc.c
    ==============================================================================
    --- head/usr.sbin/makefs/ffs/ffs_alloc.c	Thu May 18 13:49:53 2017	(r318450)
    +++ head/usr.sbin/makefs/ffs/ffs_alloc.c	Thu May 18 14:05:29 2017	(r318451)
    @@ -64,7 +64,7 @@ static int scanc(u_int, const u_char *, 
     
     static daddr_t ffs_alloccg(struct inode *, int, daddr_t, int);
     static daddr_t ffs_alloccgblk(struct inode *, struct buf *, daddr_t);
    -static daddr_t ffs_hashalloc(struct inode *, int, daddr_t, int,
    +static daddr_t ffs_hashalloc(struct inode *, u_int, daddr_t, int,
     		     daddr_t (*)(struct inode *, int, daddr_t, int));
     static int32_t ffs_mapsearch(struct fs *, struct cg *, daddr_t, int);
     
    @@ -152,8 +152,8 @@ daddr_t
     ffs_blkpref_ufs1(struct inode *ip, daddr_t lbn, int indx, int32_t *bap)
     {
     	struct fs *fs;
    -	int cg;
    -	int avgbfree, startcg;
    +	u_int cg, startcg;
    +	int avgbfree;
     
     	fs = ip->i_fs;
     	if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) {
    @@ -191,8 +191,8 @@ daddr_t
     ffs_blkpref_ufs2(struct inode *ip, daddr_t lbn, int indx, int64_t *bap)
     {
     	struct fs *fs;
    -	int cg;
    -	int avgbfree, startcg;
    +	u_int cg, startcg;
    +	int avgbfree;
     
     	fs = ip->i_fs;
     	if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) {
    @@ -240,12 +240,12 @@ ffs_blkpref_ufs2(struct inode *ip, daddr
      */
     /*VARARGS5*/
     static daddr_t
    -ffs_hashalloc(struct inode *ip, int cg, daddr_t pref, int size,
    +ffs_hashalloc(struct inode *ip, u_int cg, daddr_t pref, int size,
         daddr_t (*allocator)(struct inode *, int, daddr_t, int))
     {
     	struct fs *fs;
     	daddr_t result;
    -	int i, icg = cg;
    +	u_int i, icg = cg;
     
     	fs = ip->i_fs;
     	/*
    
    Modified: head/usr.sbin/makefs/ffs/ffs_balloc.c
    ==============================================================================
    --- head/usr.sbin/makefs/ffs/ffs_balloc.c	Thu May 18 13:49:53 2017	(r318450)
    +++ head/usr.sbin/makefs/ffs/ffs_balloc.c	Thu May 18 14:05:29 2017	(r318451)
    @@ -123,7 +123,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t 
     
     	if (lbn < UFS_NDADDR) {
     		nb = ufs_rw32(ip->i_ffs1_db[lbn], needswap);
    -		if (nb != 0 && ip->i_ffs1_size >= lblktosize(fs, lbn + 1)) {
    +		if (nb != 0 && ip->i_ffs1_size >=
    +		    (uint64_t)lblktosize(fs, lbn + 1)) {
     
     			/*
     			 * The block is an already-allocated direct block
    @@ -178,7 +179,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t 
     			 * allocate a new block or fragment.
     			 */
     
    -			if (ip->i_ffs1_size < lblktosize(fs, lbn + 1))
    +			if (ip->i_ffs1_size < (uint64_t)lblktosize(fs, lbn + 1))
     				nsize = fragroundup(fs, size);
     			else
     				nsize = fs->fs_bsize;
    @@ -373,7 +374,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t 
     
     	if (lbn < UFS_NDADDR) {
     		nb = ufs_rw64(ip->i_ffs2_db[lbn], needswap);
    -		if (nb != 0 && ip->i_ffs2_size >= lblktosize(fs, lbn + 1)) {
    +		if (nb != 0 && ip->i_ffs2_size >=
    +		    (uint64_t)lblktosize(fs, lbn + 1)) {
     
     			/*
     			 * The block is an already-allocated direct block
    @@ -428,7 +430,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t 
     			 * allocate a new block or fragment.
     			 */
     
    -			if (ip->i_ffs2_size < lblktosize(fs, lbn + 1))
    +			if (ip->i_ffs2_size < (uint64_t)lblktosize(fs, lbn + 1))
     				nsize = fragroundup(fs, size);
     			else
     				nsize = fs->fs_bsize;
    
    Modified: head/usr.sbin/makefs/ffs/ffs_bswap.c
    ==============================================================================
    --- head/usr.sbin/makefs/ffs/ffs_bswap.c	Thu May 18 13:49:53 2017	(r318450)
    +++ head/usr.sbin/makefs/ffs/ffs_bswap.c	Thu May 18 14:05:29 2017	(r318451)
    @@ -39,12 +39,12 @@ __FBSDID("$FreeBSD$");
     #include 
     #include 
     #include 
    -#define panic(x)	printf("%s\n", (x)), abort()
     #endif
     
     #include 
     #include "ffs/ufs_bswap.h"
     #include 
    +#include "ffs/ffs_extern.h"
     
     #define	fs_old_postbloff	fs_spare5[0]
     #define	fs_old_rotbloff		fs_spare5[1]
    
    Modified: head/usr.sbin/makefs/mtree.c
    ==============================================================================
    --- head/usr.sbin/makefs/mtree.c	Thu May 18 13:49:53 2017	(r318450)
    +++ head/usr.sbin/makefs/mtree.c	Thu May 18 14:05:29 2017	(r318451)
    @@ -505,7 +505,8 @@ read_mtree_keywords(FILE *fp, fsnode *no
     	struct stat *st, sb;
     	intmax_t num;
     	u_long flset, flclr;
    -	int error, istemp, type;
    +	int error, istemp;
    +	uint32_t type;
     
     	st = &node->inode->st;
     	do {
    
    From owner-svn-src-all@freebsd.org  Thu May 18 14:09:58 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98B9CD73CD9;
     Thu, 18 May 2017 14:09:58 +0000 (UTC)
     (envelope-from oleg@lath.rinet.ru)
    Received: from lath.rinet.ru (lath.rinet.ru [195.54.192.90])
     by mx1.freebsd.org (Postfix) with ESMTP id 5B3EFEFF;
     Thu, 18 May 2017 14:09:55 +0000 (UTC)
     (envelope-from oleg@lath.rinet.ru)
    Received: by lath.rinet.ru (Postfix, from userid 222)
     id B3BC2B47; Thu, 18 May 2017 17:04:03 +0300 (MSK)
    Date: Thu, 18 May 2017 17:04:03 +0300
    From: Oleg Bulyzhin 
    To: Sepherosa Ziehau 
    Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org, araujo@FreeBSD.org, hps@FreeBSD.org
    Subject: Re: svn commit: r305177 - head/sys/net
    Message-ID: <20170518140403.GA54405@lath.RINET.ru>
    References: <201609010632.u816WZUj025186@repo.freebsd.org>
    MIME-Version: 1.0
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline
    In-Reply-To: <201609010632.u816WZUj025186@repo.freebsd.org>
    User-Agent: Mutt/1.8.0 (2017-02-23)
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 14:09:58 -0000
    
    On Thu, Sep 01, 2016 at 06:32:35AM +0000, Sepherosa Ziehau wrote:
    > Author: sephe
    > Date: Thu Sep  1 06:32:35 2016
    > New Revision: 305177
    > URL: https://svnweb.freebsd.org/changeset/base/305177
    > 
    > Log:
    >   net/vlan: Shift for pri is 13 (pri mask 0xe000) not 1.
    >   
    >   Reviewed by:	araujo, hps
    >   MFC after:	1 week
    >   Sponsored by:	Microsoft
    >   Differential Revision:	https://reviews.freebsd.org/D7710
    > 
    > Modified:
    >   head/sys/net/ethernet.h
    > 
    > Modified: head/sys/net/ethernet.h
    > ==============================================================================
    > --- head/sys/net/ethernet.h	Thu Sep  1 06:05:08 2016	(r305176)
    > +++ head/sys/net/ethernet.h	Thu Sep  1 06:32:35 2016	(r305177)
    > @@ -92,7 +92,7 @@ struct ether_vlan_header {
    >  #define	EVL_PRIOFTAG(tag)	(((tag) >> 13) & 7)
    >  #define	EVL_CFIOFTAG(tag)	(((tag) >> 12) & 1)
    >  #define	EVL_MAKETAG(vlid, pri, cfi)					\
    > -	((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK))
    > +	((((((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK))
    >  
    >  /*
    >   *  NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields.
    
    Please revert this one. It's just plain wrong and previous one was ok.
    
    If you care about readability it should be: 
    ((((pri) & 7) << 13) | (((cfi) & 1) << 12) | ((vlid) & EVL_VLID_MASK))
    
    -- 
    Oleg.
    
    ================================================================
    === Oleg Bulyzhin -- OBUL-RIPN -- OBUL-RIPE -- oleg@rinet.ru ===
    ================================================================
    
    
    From owner-svn-src-all@freebsd.org  Thu May 18 14:19:08 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E529D73FD7;
     Thu, 18 May 2017 14:19:08 +0000 (UTC)
     (envelope-from manu@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 09A03162C;
     Thu, 18 May 2017 14:19:07 +0000 (UTC)
     (envelope-from manu@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IEJ6uW056965;
     Thu, 18 May 2017 14:19:06 GMT (envelope-from manu@FreeBSD.org)
    Received: (from manu@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IEJ6jQ056960;
     Thu, 18 May 2017 14:19:06 GMT (envelope-from manu@FreeBSD.org)
    Message-Id: <201705181419.v4IEJ6jQ056960@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: manu set sender to
     manu@FreeBSD.org using -f
    From: Emmanuel Vadot 
    Date: Thu, 18 May 2017 14:19:06 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
    Subject: svn commit: r318452 - in head/usr.sbin/makefs: . ffs
    X-SVN-Group: head
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 14:19:08 -0000
    
    Author: manu
    Date: Thu May 18 14:19:06 2017
    New Revision: 318452
    URL: https://svnweb.freebsd.org/changeset/base/318452
    
    Log:
      makefs: Add soft-updates option
      
      Add the ffs option to enable soft-updates.
      The option is only processed is ufs2 has been selected.
      
      Reviewed by:	emaste, bapt (earlier version), allanjude (earlier version)
      Sponsored by:	Gandi.net
      Differential Revision:	https://reviews.freebsd.org/D10773
    
    Modified:
      head/usr.sbin/makefs/ffs.c
      head/usr.sbin/makefs/ffs.h
      head/usr.sbin/makefs/ffs/mkfs.c
      head/usr.sbin/makefs/makefs.8
    
    Modified: head/usr.sbin/makefs/ffs.c
    ==============================================================================
    --- head/usr.sbin/makefs/ffs.c	Thu May 18 14:05:29 2017	(r318451)
    +++ head/usr.sbin/makefs/ffs.c	Thu May 18 14:19:06 2017	(r318452)
    @@ -176,6 +176,8 @@ ffs_prep_opts(fsinfo_t *fsopts)
     	      0, 0, "Optimization (time|space)" },
     	    { 'l', "label", ffs_opts->label, OPT_STRARRAY,
     	      1, sizeof(ffs_opts->label), "UFS label" },
    +	    { 's', "softupdates", &ffs_opts->softupdates, OPT_INT32,
    +	      0, 1, "enable softupdates" },
     	    { .name = NULL }
     	};
     
    @@ -190,6 +192,7 @@ ffs_prep_opts(fsinfo_t *fsopts)
     	ffs_opts->avgfilesize= -1;
     	ffs_opts->avgfpdir= -1;
     	ffs_opts->version = 1;
    +	ffs_opts->softupdates = 0;
     
     	fsopts->fs_specific = ffs_opts;
     	fsopts->fs_options = copy_opts(ffs_options);
    
    Modified: head/usr.sbin/makefs/ffs.h
    ==============================================================================
    --- head/usr.sbin/makefs/ffs.h	Thu May 18 14:05:29 2017	(r318451)
    +++ head/usr.sbin/makefs/ffs.h	Thu May 18 14:19:06 2017	(r318452)
    @@ -64,6 +64,7 @@ typedef struct {
     	int	version;	/* filesystem version (1 = FFS, 2 = UFS2) */
     	int	maxbsize;	/* maximum extent size */
     	int	maxblkspercg;	/* max # of blocks per cylinder group */
    +	int	softupdates;	/* soft updates */
     		/* XXX: support `old' file systems ? */
     } ffs_opt_t;
     
    
    Modified: head/usr.sbin/makefs/ffs/mkfs.c
    ==============================================================================
    --- head/usr.sbin/makefs/ffs/mkfs.c	Thu May 18 14:05:29 2017	(r318451)
    +++ head/usr.sbin/makefs/ffs/mkfs.c	Thu May 18 14:19:06 2017	(r318452)
    @@ -279,6 +279,8 @@ ffs_mkfs(const char *fsys, const fsinfo_
     		sblock.fs_inopb = sblock.fs_bsize / sizeof(struct ufs2_dinode);
     		sblock.fs_maxsymlinklen = ((UFS_NDADDR + UFS_NIADDR) *
     		    sizeof (ufs2_daddr_t));
    +		if (ffs_opts->softupdates == 1)
    +			sblock.fs_flags |= FS_DOSOFTDEP;
     	}
     
     	sblock.fs_sblkno =
    
    Modified: head/usr.sbin/makefs/makefs.8
    ==============================================================================
    --- head/usr.sbin/makefs/makefs.8	Thu May 18 14:05:29 2017	(r318451)
    +++ head/usr.sbin/makefs/makefs.8	Thu May 18 14:19:06 2017	(r318452)
    @@ -35,7 +35,7 @@
     .\"
     .\" $FreeBSD$
     .\"
    -.Dd April 6, 2017
    +.Dd May 17, 2017
     .Dt MAKEFS 8
     .Os
     .Sh NAME
    @@ -308,6 +308,8 @@ Maximum total number of blocks in a cyli
     .It Sy version
     UFS version.
     1 for FFS (default), 2 for UFS2.
    +.It Sy softupdates
    +0 for disable (default), 1 for enable
     .El
     .Ss CD9660-specific options
     .Sy cd9660
    
    From owner-svn-src-all@freebsd.org  Thu May 18 14:27:03 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FB40D72336;
     Thu, 18 May 2017 14:27:03 +0000 (UTC) (envelope-from hps@selasky.org)
    Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 26FCD1D1C;
     Thu, 18 May 2017 14:27:02 +0000 (UTC) (envelope-from hps@selasky.org)
    Received: from hps2016.home.selasky.org (unknown [62.141.129.119])
     (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
     (No client certificate requested)
     by mail.turbocat.net (Postfix) with ESMTPSA id 7858A26093C;
     Thu, 18 May 2017 16:27:00 +0200 (CEST)
    Subject: Re: svn commit: r305177 - head/sys/net
    To: Oleg Bulyzhin , Sepherosa Ziehau 
    Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org, araujo@FreeBSD.org, hps@FreeBSD.org
    References: <201609010632.u816WZUj025186@repo.freebsd.org>
     <20170518140403.GA54405@lath.RINET.ru>
    From: Hans Petter Selasky 
    Message-ID: <355478da-ed4d-60bb-bb4e-144a694e28b8@selasky.org>
    Date: Thu, 18 May 2017 16:25:01 +0200
    User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101
     Thunderbird/52.0.1
    MIME-Version: 1.0
    In-Reply-To: <20170518140403.GA54405@lath.RINET.ru>
    Content-Type: text/plain; charset=utf-8; format=flowed
    Content-Language: en-US
    Content-Transfer-Encoding: 7bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 14:27:03 -0000
    
    On 05/18/17 16:04, Oleg Bulyzhin wrote:
    > On Thu, Sep 01, 2016 at 06:32:35AM +0000, Sepherosa Ziehau wrote:
    >> Author: sephe
    >> Date: Thu Sep  1 06:32:35 2016
    >> New Revision: 305177
    >> URL: https://svnweb.freebsd.org/changeset/base/305177
    >>
    >> Log:
    >>    net/vlan: Shift for pri is 13 (pri mask 0xe000) not 1.
    >>    
    >>    Reviewed by:	araujo, hps
    >>    MFC after:	1 week
    >>    Sponsored by:	Microsoft
    >>    Differential Revision:	https://reviews.freebsd.org/D7710
    >>
    >> Modified:
    >>    head/sys/net/ethernet.h
    >>
    >> Modified: head/sys/net/ethernet.h
    >> ==============================================================================
    >> --- head/sys/net/ethernet.h	Thu Sep  1 06:05:08 2016	(r305176)
    >> +++ head/sys/net/ethernet.h	Thu Sep  1 06:32:35 2016	(r305177)
    >> @@ -92,7 +92,7 @@ struct ether_vlan_header {
    >>   #define	EVL_PRIOFTAG(tag)	(((tag) >> 13) & 7)
    >>   #define	EVL_CFIOFTAG(tag)	(((tag) >> 12) & 1)
    >>   #define	EVL_MAKETAG(vlid, pri, cfi)					\
    >> -	((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK))
    >> +	((((((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK))
    >>   
    >>   /*
    >>    *  NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields.
    > 
    > Please revert this one. It's just plain wrong and previous one was ok.
    > 
    
    Hi,
    
    Can you explain a bit more what is wrong?
    
    > If you care about readability it should be:
    > ((((pri) & 7) << 13) | (((cfi) & 1) << 12) | ((vlid) & EVL_VLID_MASK))
    
    Isn't this exactly what the patch is doing? -R ???
    
    --HPS
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:00:31 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0CB2D72BEC;
     Thu, 18 May 2017 15:00:31 +0000 (UTC)
     (envelope-from oleg@lath.rinet.ru)
    Received: from lath.rinet.ru (lath.rinet.ru [195.54.192.90])
     by mx1.freebsd.org (Postfix) with ESMTP id 6218CFA4;
     Thu, 18 May 2017 15:00:31 +0000 (UTC)
     (envelope-from oleg@lath.rinet.ru)
    Received: by lath.rinet.ru (Postfix, from userid 222)
     id 590B4CFF; Thu, 18 May 2017 18:00:30 +0300 (MSK)
    Date: Thu, 18 May 2017 18:00:30 +0300
    From: Oleg Bulyzhin 
    To: Hans Petter Selasky 
    Cc: Oleg Bulyzhin , Sepherosa Ziehau ,
     src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org, araujo@FreeBSD.org, hps@FreeBSD.org
    Subject: Re: svn commit: r305177 - head/sys/net
    Message-ID: <20170518150030.GA55481@lath.RINET.ru>
    References: <201609010632.u816WZUj025186@repo.freebsd.org>
     <20170518140403.GA54405@lath.RINET.ru>
     <355478da-ed4d-60bb-bb4e-144a694e28b8@selasky.org>
    MIME-Version: 1.0
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline
    In-Reply-To: <355478da-ed4d-60bb-bb4e-144a694e28b8@selasky.org>
    User-Agent: Mutt/1.8.0 (2017-02-23)
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:00:31 -0000
    
    On Thu, May 18, 2017 at 04:25:01PM +0200, Hans Petter Selasky wrote:
    > On 05/18/17 16:04, Oleg Bulyzhin wrote:
    > > On Thu, Sep 01, 2016 at 06:32:35AM +0000, Sepherosa Ziehau wrote:
    > >> Author: sephe
    > >> Date: Thu Sep  1 06:32:35 2016
    > >> New Revision: 305177
    > >> URL: https://svnweb.freebsd.org/changeset/base/305177
    > >>
    > >> Log:
    > >>    net/vlan: Shift for pri is 13 (pri mask 0xe000) not 1.
    > >>    
    > >>    Reviewed by:	araujo, hps
    > >>    MFC after:	1 week
    > >>    Sponsored by:	Microsoft
    > >>    Differential Revision:	https://reviews.freebsd.org/D7710
    > >>
    > >> Modified:
    > >>    head/sys/net/ethernet.h
    > >>
    > >> Modified: head/sys/net/ethernet.h
    > >> ==============================================================================
    > >> --- head/sys/net/ethernet.h	Thu Sep  1 06:05:08 2016	(r305176)
    > >> +++ head/sys/net/ethernet.h	Thu Sep  1 06:32:35 2016	(r305177)
    > >> @@ -92,7 +92,7 @@ struct ether_vlan_header {
    > >>   #define	EVL_PRIOFTAG(tag)	(((tag) >> 13) & 7)
    > >>   #define	EVL_CFIOFTAG(tag)	(((tag) >> 12) & 1)
    > >>   #define	EVL_MAKETAG(vlid, pri, cfi)					\
    > >> -	((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK))
    > >> +	((((((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK))
    > >>   
    > >>   /*
    > >>    *  NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields.
    > > 
    > > Please revert this one. It's just plain wrong and previous one was ok.
    > > 
    > 
    > Hi,
    > 
    > Can you explain a bit more what is wrong?
    > 
    > > If you care about readability it should be:
    > > ((((pri) & 7) << 13) | (((cfi) & 1) << 12) | ((vlid) & EVL_VLID_MASK))
    > 
    > Isn't this exactly what the patch is doing? -R ???
    
    Current version is shifting pri out of uint16. If you examine parentheses:
    pri is shifted left 13, then 12.
    Original version did it right (shift 1, then 12 (total 13)).
    
    
    -- 
    Oleg.
    
    ================================================================
    === Oleg Bulyzhin -- OBUL-RIPN -- OBUL-RIPE -- oleg@rinet.ru ===
    ================================================================
    
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:10:06 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 365D9D7307A;
     Thu, 18 May 2017 15:10:06 +0000 (UTC)
     (envelope-from bjkfbsd@gmail.com)
    Received: from mail-oi0-x229.google.com (mail-oi0-x229.google.com
     [IPv6:2607:f8b0:4003:c06::229])
     (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
     (Client CN "smtp.gmail.com",
     Issuer "Google Internet Authority G2" (verified OK))
     by mx1.freebsd.org (Postfix) with ESMTPS id DD3A1160E;
     Thu, 18 May 2017 15:10:02 +0000 (UTC)
     (envelope-from bjkfbsd@gmail.com)
    Received: by mail-oi0-x229.google.com with SMTP id h4so57728673oib.3;
     Thu, 18 May 2017 08:10:02 -0700 (PDT)
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
     h=mime-version:in-reply-to:references:from:date:message-id:subject:to
     :cc; bh=rXFf1m+PKc0Jst4UNAxHnlnMYVGw2l/PMtaWxFqEQZ4=;
     b=tDDJfR6XbY9vqU/nlpM9txJbrqSnDR+PnV+lySMKMwiYKj7q65ht5g0j8WJsg6YYuc
     sn357j7sxgo1p2t2Q8R4vfBNbrbCACibT6/FxsCOowsRfGkyCvcTRqX7YhSqgDhTviw5
     0cXQy+sej/GfJsBaDkQS9gcEqqvlHGsOXVaOB4XGCUSw/IDLDj/3utftaTeKE2OigWT5
     sfQocqnjndI36mvmNbAyqI679Rap6CP8AsEfteRa2LATms51jGQOSlkKQcMbWHwSuYOX
     +mqj/QJqyRtCxjmCutMvH99nAIOQHklt4O1L+pwPWsXcox9zUBy4cJ+LeFvnt/7kMGSR
     L85g==
    X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
     d=1e100.net; s=20161025;
     h=x-gm-message-state:mime-version:in-reply-to:references:from:date
     :message-id:subject:to:cc;
     bh=rXFf1m+PKc0Jst4UNAxHnlnMYVGw2l/PMtaWxFqEQZ4=;
     b=hYwCgHiK0VbbpcWFy5IKyefR1W8oKUFz3qHaZrT8EqHUeygZn9GqTDgJH9mi3LDYpz
     /O7IV/4Lzckc8a8670Fn3LMbzm8rXPFxJSERFL0jq6udu0n4exCEkuzgPiUAcop8f2uI
     HhbCGQ/1FWEi+AzzCKxJdL6XZh5KURAYy+bz00+mxIB8WBVvkYhX2nZzASnuGs6EVnqu
     ksJQGfKvipQN8DjdgzKt1m8DAk6j8vDPCyyjtQStvWi+wP41bG1I+dTYVRdkDgBVywqr
     qtmIbMh26Hu/xKqraK4fLp3lhtR2rcd0lRMMS9JvHRU5M8KWTvQseoYOOLCUZDVHRHNq
     vz2g==
    X-Gm-Message-State: AODbwcCYPpfWSZd5ACEG2gyjGkjFxkrde0MFv/EuQEBKD/EOk2zk5jX8
     YP3DkMFjDax26uPcLI36gXJmgB2mcw==
    X-Received: by 10.157.29.235 with SMTP id w40mr2706985otw.128.1495120201896;
     Thu, 18 May 2017 08:10:01 -0700 (PDT)
    MIME-Version: 1.0
    Received: by 10.182.20.163 with HTTP; Thu, 18 May 2017 08:10:01 -0700 (PDT)
    In-Reply-To: <20170518150030.GA55481@lath.RINET.ru>
    References: <201609010632.u816WZUj025186@repo.freebsd.org>
     <20170518140403.GA54405@lath.RINET.ru>
     <355478da-ed4d-60bb-bb4e-144a694e28b8@selasky.org>
     <20170518150030.GA55481@lath.RINET.ru>
    From: Benjamin Kaduk 
    Date: Thu, 18 May 2017 10:10:01 -0500
    Message-ID: 
    Subject: Re: svn commit: r305177 - head/sys/net
    To: Oleg Bulyzhin 
    Cc: Hans Petter Selasky , 
     "src-committers@freebsd.org" , 
     "svn-src-all@freebsd.org" , araujo@freebsd.org,
     hps@freebsd.org, "svn-src-head@freebsd.org" ,
     Sepherosa Ziehau 
    Content-Type: text/plain; charset="UTF-8"
    X-Content-Filtered-By: Mailman/MimeDel 2.1.23
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:10:06 -0000
    
    On Thu, May 18, 2017 at 10:00 AM, Oleg Bulyzhin  wrote:
    
    > On Thu, May 18, 2017 at 04:25:01PM +0200, Hans Petter Selasky wrote:
    > >
    > > Can you explain a bit more what is wrong?
    > >
    > > > If you care about readability it should be:
    > > > ((((pri) & 7) << 13) | (((cfi) & 1) << 12) | ((vlid) & EVL_VLID_MASK))
    > >
    > > Isn't this exactly what the patch is doing? -R ???
    >
    > Current version is shifting pri out of uint16. If you examine parentheses:
    > pri is shifted left 13, then 12.
    > Original version did it right (shift 1, then 12 (total 13)).
    >
    
    Calculations in the C abstract machine would be performed in the 'int' type
    to which uint16 operands are promoted, though.
    
    -Ben
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:13:17 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 024C1D73209;
     Thu, 18 May 2017 15:13:17 +0000 (UTC) (envelope-from hps@selasky.org)
    Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id C10151A8D;
     Thu, 18 May 2017 15:13:16 +0000 (UTC) (envelope-from hps@selasky.org)
    Received: from hps2016.home.selasky.org (unknown [62.141.129.119])
     (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
     (No client certificate requested)
     by mail.turbocat.net (Postfix) with ESMTPSA id E05AA26093C;
     Thu, 18 May 2017 17:13:14 +0200 (CEST)
    Subject: Re: svn commit: r305177 - head/sys/net
    To: Oleg Bulyzhin 
    Cc: Sepherosa Ziehau , src-committers@freebsd.org,
     svn-src-all@freebsd.org, svn-src-head@freebsd.org, araujo@FreeBSD.org
    References: <201609010632.u816WZUj025186@repo.freebsd.org>
     <20170518140403.GA54405@lath.RINET.ru>
     <355478da-ed4d-60bb-bb4e-144a694e28b8@selasky.org>
     <20170518150030.GA55481@lath.RINET.ru>
    From: Hans Petter Selasky 
    Message-ID: 
    Date: Thu, 18 May 2017 17:11:16 +0200
    User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101
     Thunderbird/52.0.1
    MIME-Version: 1.0
    In-Reply-To: <20170518150030.GA55481@lath.RINET.ru>
    Content-Type: text/plain; charset=utf-8; format=flowed
    Content-Language: en-US
    Content-Transfer-Encoding: 7bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:13:17 -0000
    
    On 05/18/17 17:00, Oleg Bulyzhin wrote:
    > On Thu, May 18, 2017 at 04:25:01PM +0200, Hans Petter Selasky wrote:
    >> On 05/18/17 16:04, Oleg Bulyzhin wrote:
    >>> On Thu, Sep 01, 2016 at 06:32:35AM +0000, Sepherosa Ziehau wrote:
    >>>> Author: sephe
    >>>> Date: Thu Sep  1 06:32:35 2016
    >>>> New Revision: 305177
    >>>> URL: https://svnweb.freebsd.org/changeset/base/305177
    >>>>
    >>>> Log:
    >>>>     net/vlan: Shift for pri is 13 (pri mask 0xe000) not 1.
    >>>>     
    >>>>     Reviewed by:	araujo, hps
    >>>>     MFC after:	1 week
    >>>>     Sponsored by:	Microsoft
    >>>>     Differential Revision:	https://reviews.freebsd.org/D7710
    >>>>
    >>>> Modified:
    >>>>     head/sys/net/ethernet.h
    >>>>
    >>>> Modified: head/sys/net/ethernet.h
    >>>> ==============================================================================
    >>>> --- head/sys/net/ethernet.h	Thu Sep  1 06:05:08 2016	(r305176)
    >>>> +++ head/sys/net/ethernet.h	Thu Sep  1 06:32:35 2016	(r305177)
    >>>> @@ -92,7 +92,7 @@ struct ether_vlan_header {
    >>>>    #define	EVL_PRIOFTAG(tag)	(((tag) >> 13) & 7)
    >>>>    #define	EVL_CFIOFTAG(tag)	(((tag) >> 12) & 1)
    >>>>    #define	EVL_MAKETAG(vlid, pri, cfi)					\
    >>>> -	((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK))
    >>>> +	((((((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK))
    >>>>    
    >>>>    /*
    >>>>     *  NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields.
    >>>
    >>> Please revert this one. It's just plain wrong and previous one was ok.
    >>>
    >>
    >> Hi,
    >>
    >> Can you explain a bit more what is wrong?
    >>
    >>> If you care about readability it should be:
    >>> ((((pri) & 7) << 13) | (((cfi) & 1) << 12) | ((vlid) & EVL_VLID_MASK))
    >>
    >> Isn't this exactly what the patch is doing? -R ???
    > 
    > Current version is shifting pri out of uint16. If you examine parentheses:
    > pri is shifted left 13, then 12.
    > Original version did it right (shift 1, then 12 (total 13)).
    > 
    
    Hi Oleg,
    
    I see. The VLAN priority is then always zero after this change.
    
    I'll let Sepherosa handle the revert and/or readability update.
    
    --HPS
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:41:50 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FFE7D73924;
     Thu, 18 May 2017 15:41:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 3FEBEC09;
     Thu, 18 May 2017 15:41:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfne1093067;
     Thu, 18 May 2017 15:41:49 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfnUS093066;
     Thu, 18 May 2017 15:41:49 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfnUS093066@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:49 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318454 - stable/11/release/doc/en_US.ISO8859-1/relnotes
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:41:50 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:49 2017
    New Revision: 318454
    URL: https://svnweb.freebsd.org/changeset/base/318454
    
    Log:
      Document r318357, ixl(4) updated to version 1.7.12-k.
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:48 2017	(r318453)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:49 2017	(r318454)
    @@ -471,6 +471,10 @@
           The &man.bytgpio.4; driver has been
     	added, providing support for Intel® Bay Trail™
     	SoC GPIO controllers.
    +
    +      The &man.ixl.4; driver has been updated
    +	to version 1.7.12-k.
         
     
         
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:41:51 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43B0DD7392A;
     Thu, 18 May 2017 15:41:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 154B7C0A;
     Thu, 18 May 2017 15:41:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfobh093111;
     Thu, 18 May 2017 15:41:50 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfojS093110;
     Thu, 18 May 2017 15:41:50 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfojS093110@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:50 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318455 - stable/11/release/doc/en_US.ISO8859-1/hardware
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:41:51 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:49 2017
    New Revision: 318455
    URL: https://svnweb.freebsd.org/changeset/base/318455
    
    Log:
      Add qlnxe(4)
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml	Thu May 18 15:41:49 2017	(r318454)
    +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml	Thu May 18 15:41:49 2017	(r318455)
    @@ -898,6 +898,8 @@
     
           &hwlist.pcn;
     
    +      &hwlist.qlnxe;
    +
           &hwlist.qlxgb;
     
           &hwlist.qlxgbe;
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:41:52 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8AE1D73956;
     Thu, 18 May 2017 15:41:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id BA664C1A;
     Thu, 18 May 2017 15:41:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfp9Y093198;
     Thu, 18 May 2017 15:41:51 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfpia093197;
     Thu, 18 May 2017 15:41:51 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfpia093197@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:51 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318457 - stable/11/release/doc/en_US.ISO8859-1/relnotes
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:41:53 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:51 2017
    New Revision: 318457
    URL: https://svnweb.freebsd.org/changeset/base/318457
    
    Log:
      Document r312358, alc(4) Killer E2400 support.
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:50 2017	(r318456)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:51 2017	(r318457)
    @@ -495,6 +495,10 @@
     	sponsor="&chelsio;">The &man.cxgbe.4; driver has been updated
     	to firmware version 1.16.26.0.
     
    +      The &man.alc.4; driver has been updated
    +	to provide support for Atheros® Killer E2400™
    +	Gigabit ethernet cards.
    +
           The &man.qlnxe.4; driver has been added,
     	providing support for Cavium® Qlogic™ 45000 Series
     	adapters.
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:41:49 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87E54D7391F;
     Thu, 18 May 2017 15:41:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 59700C01;
     Thu, 18 May 2017 15:41:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfm4i093024;
     Thu, 18 May 2017 15:41:48 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfm2F093023;
     Thu, 18 May 2017 15:41:48 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfm2F093023@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:48 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318453 - stable/11/release/doc/en_US.ISO8859-1/relnotes
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:41:49 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:48 2017
    New Revision: 318453
    URL: https://svnweb.freebsd.org/changeset/base/318453
    
    Log:
      Document r307144, cloudabi 32-bit support on 64-bit envionments.
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 14:19:06 2017	(r318452)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:48 2017	(r318453)
    @@ -507,7 +507,10 @@
         
           Hardware Support
     
    -       
    +      The &man.cloudabi.4; driver has been updated to allow
    +	running 32-bit binaries within 64-bit userland environments
    +	when the kernel configuration file has the
    +	COMPAT_CLOUDABI32 option present.
         
     
         
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:41:54 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E23AD73962;
     Thu, 18 May 2017 15:41:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id CE7C0C34;
     Thu, 18 May 2017 15:41:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfq3d093242;
     Thu, 18 May 2017 15:41:52 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfqGj093240;
     Thu, 18 May 2017 15:41:52 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfqGj093240@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:52 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318458 - in stable/11/release/doc:
     en_US.ISO8859-1/relnotes share/xml
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:41:54 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:52 2017
    New Revision: 318458
    URL: https://svnweb.freebsd.org/changeset/base/318458
    
    Log:
      Document r314005, alc(4) Killer E2500 support.
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
      stable/11/release/doc/share/xml/sponsor.ent
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:51 2017	(r318457)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:52 2017	(r318458)
    @@ -499,6 +499,11 @@
     	to provide support for Atheros® Killer E2400™
     	Gigabit ethernet cards.
     
    +      The
    +	&man.alc.4; driver has been updated to provide support for
    +	Atheros® Killer E2500™ Gigabit ethernet
    +	cards.
    +
           The &man.qlnxe.4; driver has been added,
     	providing support for Cavium® Qlogic™ 45000 Series
     	adapters.
    
    Modified: stable/11/release/doc/share/xml/sponsor.ent
    ==============================================================================
    --- stable/11/release/doc/share/xml/sponsor.ent	Thu May 18 15:41:51 2017	(r318457)
    +++ stable/11/release/doc/share/xml/sponsor.ent	Thu May 18 15:41:52 2017	(r318458)
    @@ -40,6 +40,7 @@
     
     
     
    +
     
     
     
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:41:55 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE7FDD73977;
     Thu, 18 May 2017 15:41:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 70C98C6C;
     Thu, 18 May 2017 15:41:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfsOH093328;
     Thu, 18 May 2017 15:41:54 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfso9093327;
     Thu, 18 May 2017 15:41:54 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfso9093327@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:54 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318460 - stable/11/release/doc/en_US.ISO8859-1/relnotes
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:41:55 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:54 2017
    New Revision: 318460
    URL: https://svnweb.freebsd.org/changeset/base/318460
    
    Log:
      Document r307576, Elantech support added to atkbdc(4).
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:53 2017	(r318459)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:54 2017	(r318460)
    @@ -529,6 +529,12 @@
     	userland environments when the kernel configuration file has
     	the COMPAT_CLOUDABI32 option
     	present.
    +
    +      The &man.atkbdc.4; driver has been
    +	updated to provide support for Elantech® trackpads.  To
    +	enable hardware support, add
    +	hw.psm.elantech_support=1 to
    +	&man.loader.conf.5;.
         
     
         
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:41:58 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63340D7399A;
     Thu, 18 May 2017 15:41:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 32505CCD;
     Thu, 18 May 2017 15:41:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfvNL093459;
     Thu, 18 May 2017 15:41:57 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfv2o093458;
     Thu, 18 May 2017 15:41:57 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfv2o093458@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:57 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318463 - stable/11/release/doc/en_US.ISO8859-1/relnotes
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:41:58 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:56 2017
    New Revision: 318463
    URL: https://svnweb.freebsd.org/changeset/base/318463
    
    Log:
      Document r310852, miibus(4) Microchip/Micrel KSZ9031 support.
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:56 2017	(r318462)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:56 2017	(r318463)
    @@ -491,6 +491,11 @@
     	providing support for Broadcom® NetXtreme-C™ and
     	NetXtreme-E™ devices.
     
    +      The &man.miibus.4; driver has been updated
    +	to support Microchip/Micrel KSZ9031 Gigabit ethernet
    +	cards.
    +
           The &man.cxgbe.4; driver has been updated
     	to firmware version 1.16.26.0 for T4, T5, and T6 cards.
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:41:52 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 193F6D73934;
     Thu, 18 May 2017 15:41:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id DEA38C0E;
     Thu, 18 May 2017 15:41:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfoZc093155;
     Thu, 18 May 2017 15:41:50 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfoOi093154;
     Thu, 18 May 2017 15:41:50 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfoOi093154@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:50 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318456 - stable/11/release/doc/en_US.ISO8859-1/relnotes
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:41:52 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:50 2017
    New Revision: 318456
    URL: https://svnweb.freebsd.org/changeset/base/318456
    
    Log:
      Document r311506, cxgbe(4) firmware version 1.16.26.0.
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:49 2017	(r318455)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:50 2017	(r318456)
    @@ -491,6 +491,10 @@
     	providing support for Broadcom® NetXtreme-C™ and
     	NetXtreme-E™ devices.
     
    +      The &man.cxgbe.4; driver has been updated
    +	to firmware version 1.16.26.0.
    +
           The &man.qlnxe.4; driver has been added,
     	providing support for Cavium® Qlogic™ 45000 Series
     	adapters.
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:41:54 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6860D73966;
     Thu, 18 May 2017 15:41:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 9645DC49;
     Thu, 18 May 2017 15:41:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfrhS093285;
     Thu, 18 May 2017 15:41:53 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfrxl093284;
     Thu, 18 May 2017 15:41:53 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfrxl093284@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:53 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318459 - stable/11/release/doc/en_US.ISO8859-1/relnotes
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:41:54 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:53 2017
    New Revision: 318459
    URL: https://svnweb.freebsd.org/changeset/base/318459
    
    Log:
      Add missing revision for cloudabi 32-bit support.
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:52 2017	(r318458)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:53 2017	(r318459)
    @@ -524,10 +524,11 @@
         
           Hardware Support
     
    -      The &man.cloudabi.4; driver has been updated to allow
    -	running 32-bit binaries within 64-bit userland environments
    -	when the kernel configuration file has the
    -	COMPAT_CLOUDABI32 option present.
    +      The &man.cloudabi.4; driver has been
    +	updated to allow running 32-bit binaries within 64-bit
    +	userland environments when the kernel configuration file has
    +	the COMPAT_CLOUDABI32 option
    +	present.
         
     
         
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:41:56 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 913A6D7397E;
     Thu, 18 May 2017 15:41:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 5D449C8B;
     Thu, 18 May 2017 15:41:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFftCl093371;
     Thu, 18 May 2017 15:41:55 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFftmX093370;
     Thu, 18 May 2017 15:41:55 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFftmX093370@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:55 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318461 - stable/11/release/doc/en_US.ISO8859-1/relnotes
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:41:56 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:55 2017
    New Revision: 318461
    URL: https://svnweb.freebsd.org/changeset/base/318461
    
    Log:
      Clarify the cxgbe(4) firmware update is for T4, T5, and T6 cards.
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:54 2017	(r318460)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:55 2017	(r318461)
    @@ -493,7 +493,7 @@
     
           The &man.cxgbe.4; driver has been updated
    -	to firmware version 1.16.26.0.
    +	to firmware version 1.16.26.0 for T4, T5, and T6 cards.
     
           The &man.alc.4; driver has been updated
     	to provide support for Atheros® Killer E2400™
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:41:59 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23AD6D739AE;
     Thu, 18 May 2017 15:41:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id E8052CE3;
     Thu, 18 May 2017 15:41:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfvnB093502;
     Thu, 18 May 2017 15:41:57 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfvx0093501;
     Thu, 18 May 2017 15:41:57 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfvx0093501@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:57 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318464 - stable/11/release/doc/en_US.ISO8859-1/relnotes
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:41:59 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:57 2017
    New Revision: 318464
    URL: https://svnweb.freebsd.org/changeset/base/318464
    
    Log:
      Move the ixl(4) entry to the network driver section.
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:56 2017	(r318463)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:57 2017	(r318464)
    @@ -471,10 +471,6 @@
           The &man.bytgpio.4; driver has been
     	added, providing support for Intel® Bay Trail™
     	SoC GPIO controllers.
    -
    -      The &man.ixl.4; driver has been updated
    -	to version 1.7.12-k.
         
     
         
    @@ -519,6 +515,10 @@
     
           The &man.qlxgbe.4; firmware has been
     	updated to version 5.4.64.
    +
    +      The &man.ixl.4; driver has been updated
    +	to version 1.7.12-k.
         
       
     
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:41:57 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EE61D73994;
     Thu, 18 May 2017 15:41:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id 4ABE9CA1;
     Thu, 18 May 2017 15:41:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfuh9093415;
     Thu, 18 May 2017 15:41:56 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfu2J093413;
     Thu, 18 May 2017 15:41:56 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfu2J093413@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:56 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318462 - in stable/11/release/doc:
     en_US.ISO8859-1/relnotes share/xml
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:41:57 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:56 2017
    New Revision: 318462
    URL: https://svnweb.freebsd.org/changeset/base/318462
    
    Log:
      Document r315330, etherswitch(4) support for RTL8366RB and RTL8366SR.
      Correct the Netgate sponsor entity while here.
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
      stable/11/release/doc/share/xml/sponsor.ent
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:55 2017	(r318461)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:56 2017	(r318462)
    @@ -504,6 +504,10 @@
     	Atheros® Killer E2500™ Gigabit ethernet
     	cards.
     
    +      The &man.etherswitch.4; driver has been
    +	updated to support RTL8366RB and RTL8366SR cards.
    +
           The &man.qlnxe.4; driver has been added,
     	providing support for Cavium® Qlogic™ 45000 Series
     	adapters.
    
    Modified: stable/11/release/doc/share/xml/sponsor.ent
    ==============================================================================
    --- stable/11/release/doc/share/xml/sponsor.ent	Thu May 18 15:41:55 2017	(r318461)
    +++ stable/11/release/doc/share/xml/sponsor.ent	Thu May 18 15:41:56 2017	(r318462)
    @@ -46,7 +46,7 @@
     
     
     
    -
    +
     
     
     
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:42:00 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08A4ED739C9;
     Thu, 18 May 2017 15:42:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id BF8A0D00;
     Thu, 18 May 2017 15:41:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfwbi093545;
     Thu, 18 May 2017 15:41:58 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfwVO093544;
     Thu, 18 May 2017 15:41:58 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfwVO093544@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:58 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318465 - stable/11/release/doc/en_US.ISO8859-1/relnotes
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:42:00 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:58 2017
    New Revision: 318465
    URL: https://svnweb.freebsd.org/changeset/base/318465
    
    Log:
      Document r311686, bsdinstall(8) hidden wifi network support.
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:57 2017	(r318464)
    +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml	Thu May 18 15:41:58 2017	(r318465)
    @@ -314,7 +314,9 @@
         
           Installation and Configuration Tools
     
    -       
    +      The &man.bsdinstall.8; installer has
    +	been updated to include support for hidden wireless networks
    +	when configuring the &man.wlan.4; interface.
         
     
         
    
    From owner-svn-src-all@freebsd.org  Thu May 18 15:42:00 2017
    Return-Path: 
    Delivered-To: svn-src-all@mailman.ysv.freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEA0AD739DD;
     Thu, 18 May 2017 15:42:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org (repo.freebsd.org
     [IPv6:2610:1c1:1:6068::e6a:0])
     (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
     (Client did not present a certificate)
     by mx1.freebsd.org (Postfix) with ESMTPS id A1822D25;
     Thu, 18 May 2017 15:42:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
    Received: from repo.freebsd.org ([127.0.1.37])
     by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfxno093589;
     Thu, 18 May 2017 15:41:59 GMT (envelope-from gjb@FreeBSD.org)
    Received: (from gjb@localhost)
     by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfx4H093588;
     Thu, 18 May 2017 15:41:59 GMT (envelope-from gjb@FreeBSD.org)
    Message-Id: <201705181541.v4IFfx4H093588@repo.freebsd.org>
    X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
     using -f
    From: Glen Barber 
    Date: Thu, 18 May 2017 15:41:59 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
    Subject: svn commit: r318466 - stable/11/release/doc/en_US.ISO8859-1/errata
    X-SVN-Group: stable-11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-all@freebsd.org
    X-Mailman-Version: 2.1.23
    Precedence: list
    List-Id: "SVN commit messages for the entire src tree \(except for "
     user" and " projects" \)" 
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Thu, 18 May 2017 15:42:01 -0000
    
    Author: gjb
    Date: Thu May 18 15:41:59 2017
    New Revision: 318466
    URL: https://svnweb.freebsd.org/changeset/base/318466
    
    Log:
      Fix FDP style nits found by igor(1).
      
      Sponsored by:	The FreeBSD Foundation
    
    Modified:
      stable/11/release/doc/en_US.ISO8859-1/errata/article.xml
    
    Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml
    ==============================================================================
    --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml	Thu May 18 15:41:58 2017	(r318465)
    +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml	Thu May 18 15:41:59 2017	(r318466)
    @@ -1,8 +1,8 @@
     
     
    +	"http://www.FreeBSD.org/release/XML/release.ent">
     %release;
     
     %sponsor;
    @@ -13,10 +13,10 @@
     ]>
     
     
    + xmlns:xlink="http://www.w3.org/1999/xlink" + version="5.0"> - &os; &release; Errata + &os; &release; Errata The &os; Project @@ -25,7 +25,8 @@ 2016 - The &os; Documentation Project + The &os; Documentation + Project @@ -37,45 +38,44 @@ This document lists errata items for &os; &release;, - containing significant information discovered after the release - or too late in the release cycle to be otherwise included in the - release documentation. - This information includes security advisories, as well as news - relating to the software or documentation that could affect its - operation or usability. An up-to-date version of this document - should always be consulted before installing this version of + containing significant information discovered after the + release or too late in the release cycle to be otherwise + included in the release documentation. This information + includes security advisories, as well as news relating to the + software or documentation that could affect its operation or + usability. An up-to-date version of this document should + always be consulted before installing this version of &os;. - This errata document for &os; &release; - will be maintained until the release of &os; &release.next;. + This errata document for &os; &release; will be maintained + until the release of &os; &release.next;. Introduction - This errata document contains late-breaking news - about &os; &release; - Before installing this version, it is important to consult this - document to learn about any post-release discoveries or problems - that may already have been found and fixed. + This errata document contains late-breaking + news about &os; &release; Before installing this + version, it is important to consult this document to learn about + any post-release discoveries or problems that may already have + been found and fixed. Any version of this errata document actually distributed with the release (for example, on a CDROM distribution) will be out of date by definition, but other copies are kept updated on the Internet and should be consulted as the current - errata for this release. These other copies of the - errata are located at - , - plus any sites - which keep up-to-date mirrors of this location. + errata for this release. These other copies of the + errata are located at , plus any + sites which keep up-to-date mirrors of this location. Source and binary snapshots of &os; &release.branch; also contain up-to-date copies of this document (as of the time of the snapshot). - For a list of all &os; CERT security advisories, see - . + For a list of all &os; CERT security advisories, see . From owner-svn-src-all@freebsd.org Thu May 18 16:24:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4822D73E4D; Thu, 18 May 2017 16:24:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 727DF1DA4; Thu, 18 May 2017 16:24:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IGOA1M013193; Thu, 18 May 2017 16:24:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IGOAIx013191; Thu, 18 May 2017 16:24:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181624.v4IGOAIx013191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 16:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318467 - in stable/11/release/doc/en_US.ISO8859-1: hardware readme X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 16:24:11 -0000 Author: gjb Date: Thu May 18 16:24:10 2017 New Revision: 318467 URL: https://svnweb.freebsd.org/changeset/base/318467 Log: Fix FDP style nits reported by igor(1). Bump copyright year in readme/article.xml. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 15:41:59 2017 (r318466) +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 16:24:10 2017 (r318467) @@ -1,16 +1,20 @@ %release; %devauto; ]> -
    - &os; &release.current; Hardware Notes - +
    - The &os; Documentation Project + + &os; &release.current; Hardware Notes + + + The &os; Documentation Project + $FreeBSD$ @@ -33,7 +37,8 @@ 2015 2016 2017 - The &os; Documentation Project + The &os; Documentation + Project @@ -112,8 +117,8 @@ - The single-core &intel; &xeon; - processors Nocona, Irwindale, + The single-core &intel; &xeon; processors + Nocona, Irwindale, Potomac, and Cranford have EM64T support. @@ -132,7 +137,8 @@ - All &intel; ¢rino; Duo and ¢rino; Pro platforms + All &intel; ¢rino; Duo and ¢rino; Pro + platforms @@ -142,11 +148,11 @@ - Some &intel; &pentium; 4s and &celeron; Ds using - the Prescott core have EM64T support. See - the Intel - Processor Spec Finder for the definitive answer about - EM64T support in Intel processors. + Some &intel; &pentium; 4s and &celeron; Ds using the + Prescott core have EM64T support. See the + Intel + Processor Spec Finder for the definitive answer + about EM64T support in Intel processors. @@ -171,14 +177,14 @@ i386 &os;/&arch.i386; runs on a wide variety of IBM PC - compatible machines. Due to the wide range of + compatible machines. Due to the wide range of hardware available for this architecture, it is impossible to exhaustively list all combinations of equipment supported by &os;. Nevertheless, some general guidelines are presented here. Almost all &i386;-compatible processors with a floating - point unit are supported. All &intel; processors beginning + point unit are supported. All &intel; processors beginning with the 80486 are supported, including the 80486, &pentium;, &pentium; Pro, &pentium; II, &pentium; III, &pentium; 4, and variants thereof, such as the &xeon; and &celeron; processors. @@ -248,11 +254,13 @@ (DSDT) provided by each machine's BIOS. Some machines have bad or incomplete DSDTs, which prevents ACPI from functioning correctly. Replacement DSDTs for some machines can be found - at the DSDT - section of the ACPI4Linux project - Web site. &os; can use these DSDTs to override the DSDT - provided by the BIOS; see the &man.acpi.4; manual page for - more information. + at the DSDT + section of the ACPI4Linux + project Web site. &os; can use these DSDTs to override the + DSDT provided by the BIOS; see the &man.acpi.4; manual page + for more information. @@ -287,8 +295,8 @@ powerpc - All Apple PowerPC machines with built-in USB are supported, - as well a limited selection of non-Apple machines, + All Apple PowerPC machines with built-in USB are + supported, as well a limited selection of non-Apple machines, including KVM on POWER7 SMP is supported on all systems with more than @@ -299,8 +307,8 @@ sparc64 This section describes the systems currently known to be - supported by &os; on the Fujitsu &sparc64; and Sun &ultrasparc; - platforms. + supported by &os; on the Fujitsu &sparc64; and Sun + &ultrasparc; platforms. SMP is supported on all systems with more than 1 processor. @@ -310,8 +318,8 @@ supported by the &man.creator.4; (Sun Creator, Sun Creator3D and Sun Elite3D) or &man.machfb.4; (Sun PGX and Sun PGX64 as well as the ATI Mach64 chips found onboard in for example - &sun.blade; 100, &sun.blade; 150, &sun.ultra; 5 and &sun.ultra; 10) - driver must use the serial console. + &sun.blade; 100, &sun.blade; 150, &sun.ultra; 5 and + &sun.ultra; 10) driver must use the serial console. If you have a system that is not listed here, it may not have been tested with &os; &release.current;. We encourage @@ -456,10 +464,11 @@ The following systems are partially supported by &os;. In - particular the fiber channel controllers in SBus-based systems are not - supported. However, it is possible to use these with a SCSI controller - supported by the &man.esp.4; driver (Sun ESP SCSI, Sun FAS Fast-SCSI - and Sun FAS366 Fast-Wide SCSI controllers). + particular the fiber channel controllers in SBus-based systems + are not supported. However, it is possible to use these with + a SCSI controller supported by the &man.esp.4; driver (Sun ESP + SCSI, Sun FAS Fast-SCSI and Sun FAS366 Fast-Wide SCSI + controllers). @@ -471,9 +480,9 @@ - Starting with 7.2-RELEASE, &arch.sparc64; systems based on Sun - &ultrasparc; III and beyond are also supported by &os;, which includes - the following known working systems: + Starting with 7.2-RELEASE, &arch.sparc64; systems based on + Sun &ultrasparc; III and beyond are also supported by &os;, + which includes the following known working systems: @@ -501,7 +510,8 @@ - &sun.fire; V215 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) + &sun.fire; V215 (support first appeared in 7.3-RELEASE + and 8.1-RELEASE) @@ -509,7 +519,8 @@ - &sun.fire; V245 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) + &sun.fire; V245 (support first appeared in 7.3-RELEASE + and 8.1-RELEASE) @@ -522,9 +533,10 @@ - &sun.fire; V480 (501-6780 and 501-6790 centerplanes only, for - which support first appeared in 7.3-RELEASE and 8.1-RELEASE, - other centerplanes might work beginning with 8.3-RELEASE and 9.0-RELEASE) + &sun.fire; V480 (501-6780 and 501-6790 centerplanes + only, for which support first appeared in 7.3-RELEASE and + 8.1-RELEASE, other centerplanes might work beginning with + 8.3-RELEASE and 9.0-RELEASE) @@ -532,8 +544,9 @@ - &sun.fire; V890 (support first appeared in 7.4-RELEASE and 8.1-RELEASE, - non-mixed &ultrasparc; IV/IV+ CPU-configurations only) + &sun.fire; V890 (support first appeared in 7.4-RELEASE + and 8.1-RELEASE, non-mixed &ultrasparc; IV/IV+ + CPU-configurations only) @@ -550,14 +563,16 @@ - &sun.fire; V490 (support first appeared in 7.4-RELEASE and 8.1-RELEASE, - non-mixed &ultrasparc; IV/IV+ CPU-configurations only) + &sun.fire; V490 (support first appeared in 7.4-RELEASE + and 8.1-RELEASE, non-mixed &ultrasparc; IV/IV+ + CPU-configurations only) - Starting with 7.4-RELEASE and 8.1-RELEASE, &arch.sparc64; systems based on - Fujitsu &sparc64; V are also supported by &os;, which - includes the following known working systems: + Starting with 7.4-RELEASE and 8.1-RELEASE, &arch.sparc64; + systems based on Fujitsu &sparc64; V are also supported by + &os;, which includes the following known working + systems: @@ -565,8 +580,8 @@ - The following Fujitsu &primepower; systems are not tested but - believed to be also supported by &os;: + The following Fujitsu &primepower; systems are not tested + but believed to be also supported by &os;: @@ -682,7 +697,7 @@ [&arch.amd64;, &arch.i386;] Booting from these - controllers is supported. EISA adapters are not + controllers is supported. EISA adapters are not supported. @@ -712,7 +727,7 @@ [&arch.amd64;, &arch.i386;] Booting from these - controllers is supported. EISA adapters are not + controllers is supported. EISA adapters are not supported. @@ -765,8 +780,8 @@ support CD-ROM commands are supported for read-only access by the CD-ROM drivers (such as &man.cd.4;). WORM/CD-R/CD-RW writing support is provided by &man.cdrecord.1;, which is a - part of the sysutils/cdrtools port in the Ports - Collection. + part of the sysutils/cdrtools port in the + Ports Collection. The following CD-ROM type systems are supported at this time: @@ -1020,8 +1035,8 @@ 4965AGN IEEE 802.11n PCI network adapters (&man.iwn.4; driver) - [&arch.i386;, &arch.amd64;] Marvell Libertas IEEE 802.11b/g - PCI network adapters (&man.malo.4; driver) + [&arch.i386;, &arch.amd64;] Marvell Libertas IEEE + 802.11b/g PCI network adapters (&man.malo.4; driver) Marvell 88W8363 IEEE 802.11n wireless network adapters (&man.mwl.4; driver) @@ -1032,8 +1047,8 @@ &hwlist.rsu; - Realtek RTL8188CE based PCIe IEEE 802.11b/g/n wireless network - adapters (&man.rtwn.4; driver) + Realtek RTL8188CE based PCIe IEEE 802.11b/g/n wireless + network adapters (&man.rtwn.4; driver) &hwlist.rum; @@ -1147,12 +1162,13 @@ - [&arch.amd64;, &arch.i386;] Avlab Technology, PCI IO 2S - and PCI IO 4S + [&arch.amd64;, &arch.i386;] Avlab Technology, PCI IO + 2S and PCI IO 4S - [&arch.amd64;, &arch.i386;] Comtrol RocketPort 550 + [&arch.amd64;, &arch.i386;] Comtrol RocketPort + 550 @@ -1222,7 +1238,7 @@ [&arch.amd64;, &arch.i386;] SIIG Cyber 4S PCI - 16C550/16C650/16C850 + 16C550/16C650/16C850 @@ -1305,7 +1321,7 @@ "flags 0x15000?01" is necessary in kernel - configuration. + configuration. [&arch.pc98;] Media Intelligent RSB-384 (&man.sio.4; @@ -1453,8 +1469,9 @@ - [&arch.amd64;, &arch.i386;, &arch.pc98;] - USB Bluetooth adapters can be found in Bluetooth section. + [&arch.amd64;, &arch.i386;, &arch.pc98;] USB Bluetooth + adapters can be found in Bluetooth section. &hwlist.ohci; @@ -1576,7 +1593,8 @@ Information regarding specific video cards and compatibility with Xorg can be - found at http://www.x.org/. + found at http://www.x.org/. [&arch.amd64;, &arch.i386;, &arch.pc98;] @@ -1631,7 +1649,8 @@ &man.moused.8; has more information on using pointing devices with &os;. Information on using pointing devices - with Xorg can be found at http://www.x.org/. + with Xorg can be found at http://www.x.org/. [&arch.amd64;, &arch.i386;] PC standard @@ -1664,8 +1683,9 @@ [&arch.i386;] Xilinx XC6200-based reconfigurable hardware - cards compatible with the HOT1 from Virtual Computers (xrpu - driver). + cards compatible with the HOT1 from Virtual Computers + (xrpu driver). [&arch.pc98;] Power Management Controller of NEC PC-98 Note (pmc driver) Modified: stable/11/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu May 18 15:41:59 2017 (r318466) +++ stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu May 18 16:24:10 2017 (r318467) @@ -1,10 +1,10 @@ %release; ]> - -
    - &os; &release.current; README - +
    + + + &os; &release.current; README The &os; Project @@ -37,7 +39,10 @@ 2013 2014 2015 - The &os; Documentation Project + 2016 + 2017 + The &os; Documentation + Project @@ -48,35 +53,36 @@ &tm-attrib.general; - - This document gives a brief introduction to &os; - &release.current;. It includes some information on how to - obtain &os;, a listing of various ways to contact the &os; - Project, and pointers to some other sources of - information. - + + This document gives a brief introduction to &os; + &release.current;. It includes some information on how to + obtain &os;, a listing of various ways to contact the &os; + Project, and pointers to some other sources of + information. + Introduction - This distribution is a &release.type; of &os; &release.current;, the - latest point along the &release.branch; branch. + This distribution is a &release.type; of &os; + &release.current;, the latest point along the &release.branch; + branch. About &os; &os; is an operating system based on 4.4 BSD Lite for AMD64 and Intel EM64T based PC hardware (&arch.amd64;), - Intel, AMD, Cyrix or NexGen x86 based PC hardware (&arch.i386;), - NEC PC-9801/9821 series PCs and compatibles (&arch.pc98;), - and &ultrasparc; machines (&arch.sparc64;). Versions - for the &arm; (&arch.arm;), &mips; (&arch.mips;), and - &powerpc; (&arch.powerpc;) architectures are currently under - development as well. &os; works with a wide variety of - peripherals and configurations and can be used for everything - from software development to games to Internet Service - Provision. + Intel, AMD, Cyrix or NexGen x86 based PC + hardware (&arch.i386;), NEC PC-9801/9821 series PCs and + compatibles (&arch.pc98;), and &ultrasparc; machines + (&arch.sparc64;). Versions for the &arm; (&arch.arm;), &mips; + (&arch.mips;), and &powerpc; (&arch.powerpc;) architectures + are currently under development as well. &os; works with + a wide variety of peripherals and configurations and can be + used for everything from software development to games to + Internet Service Provision. This release of &os; contains everything you need to run such a system, including full source code for the kernel and @@ -88,61 +94,63 @@ A large collection of third-party ported software (the Ports Collection) is also provided to make it - easy to obtain and install all your favorite traditional &unix; - utilities for &os;. Each port consists of a - set of scripts to retrieve, configure, build, and install a - piece of software, with a single command. Over &os.numports; - ports, from editors to programming languages to graphical - applications, make &os; a powerful and comprehensive operating - environment that extends far beyond what's provided by many - commercial versions of &unix;. Most ports are also available as - pre-compiled packages, which can be quickly - installed from the installation program. + easy to obtain and install all your favorite traditional + &unix; utilities for &os;. Each port consists + of a set of scripts to retrieve, configure, build, and install + a piece of software, with a single command. Over + &os.numports; ports, from editors to programming languages to + graphical applications, make &os; a powerful and comprehensive + operating environment that extends far beyond what's provided + by many commercial versions of &unix;. Most ports are also + available as pre-compiled packages, which can + be quickly installed from the installation program. Target Audience - This &release.type; is aimed primarily at early adopters - and various other users who want to get involved with the - ongoing development of &os;. While the &os; development team - tries its best to ensure that each &release.type; works as - advertised, &release.branch; is very much a - work-in-progress. - - The basic requirements for using this &release.type; are - technical proficiency with &os; and an understanding of the - ongoing development process of &os; &release.branch; (as - discussed on the &a.current;). - - For those more interested in doing business with &os; than - in experimenting with new &os; technology, formal releases - (such as &release.prev.stable;) are frequently more appropriate. - Releases undergo a period of testing and quality assurance - checking to ensure high reliability and dependability. - - This &release.type; is aimed primarily at early adopters - and various other users who want to get involved with the - ongoing development of &os;. While the &os; development team - tries its best to ensure that each &release.type; works as - advertised, &release.branch; is very much a - work-in-progress. - - The basic requirements for using this &release.type; are - technical proficiency with &os; and an understanding of the - ongoing development process of &os; &release.branch; (as - discussed on the &a.current;). - - For those more interested in doing business with &os; than - in experimenting with new &os; technology, formal releases - (such as &release.prev.stable;) are frequently more appropriate. - Releases undergo a period of testing and quality assurance - checking to ensure high reliability and dependability. - - This &release.type; of &os; is suitable for all users. It - has undergone a period of testing and quality assurance - checking to ensure the highest reliability and - dependability. + This &release.type; is aimed + primarily at early adopters and various other users who want + to get involved with the ongoing development of &os;. While + the &os; development team tries its best to ensure that each + &release.type; works as advertised, &release.branch; is very + much a work-in-progress. + + The basic requirements for using + this &release.type; are technical proficiency with &os; and an + understanding of the ongoing development process of &os; + &release.branch; (as discussed on the &a.current;). + + For those more interested in doing + business with &os; than in experimenting with new &os; + technology, formal releases (such as &release.prev.stable;) + are frequently more appropriate. Releases undergo a period of + testing and quality assurance checking to ensure high + reliability and dependability. + + This &release.type; is aimed + primarily at early adopters and various other users who want + to get involved with the ongoing development of &os;. While + the &os; development team tries its best to ensure that each + &release.type; works as advertised, &release.branch; is very + much a work-in-progress. + + The basic requirements for using + this &release.type; are technical proficiency with &os; and an + understanding of the ongoing development process of &os; + &release.branch; (as discussed on the &a.current;). + + For those more interested in doing + business with &os; than in experimenting with new &os; + technology, formal releases (such as &release.prev.stable;) + are frequently more appropriate. Releases undergo a period of + testing and quality assurance checking to ensure high + reliability and dependability. + + This &release.type; of &os; is + suitable for all users. It has undergone a period of testing + and quality assurance checking to ensure the highest + reliability and dependability. @@ -166,16 +174,18 @@ Collection, or other extra material. A list of the CDROM and DVD publishers known to the - project are listed in the Obtaining - &os; appendix to the Handbook. + project are listed in the Obtaining + &os; appendix to the Handbook. FTP You can use FTP to retrieve &os; and any or all of its - optional packages from ftp://ftp.FreeBSD.org/, which is the official - &os; release site, or any of its + optional packages from ftp://ftp.FreeBSD.org/, + which is the official &os; release site, or any of its mirrors. Lists of locations that mirror &os; can be found in the @@ -187,8 +197,9 @@ Additional mirror sites are always welcome. Contact freebsd-admin@FreeBSD.org for more details on becoming an official mirror site. You can also find useful - information for mirror sites at the Mirroring - &os; article. + information for mirror sites at the Mirroring &os; + article. Mirrors generally contain the ISO images generally used to create a CDROM of a &os; release. They usually also contain @@ -208,16 +219,18 @@ For any questions or general technical support issues, please send mail to the &a.questions;. - If you're tracking the &release.branch; development efforts, you - must join the &a.current;, in order to - keep abreast of recent developments and changes that may - affect the way you use and maintain the system. - - Being a largely-volunteer effort, the &os; - Project is always happy to have extra hands willing to help—there are already far more desired enhancements than - there is time to implement them. To contact the developers on - technical matters, or with offers of help, please send mail to - the &a.hackers;. + If you're tracking the &release.branch; development + efforts, you must join the &a.current;, + in order to keep abreast of recent developments and changes + that may affect the way you use and maintain the + system. + + Being a largely-volunteer effort, the &os; Project is + always happy to have extra hands willing to help—there + are already far more desired enhancements than there is time + to implement them. To contact the developers on technical + matters, or with offers of help, please send mail to the + &a.hackers;. Please note that these mailing lists can experience significant amounts of traffic. If you @@ -226,13 +239,15 @@ preferable to subscribe instead to the &a.announce;. All of the mailing lists can be freely joined by anyone - wishing to do so. Visit the - &os; Mailman Info Page. This will give you more - information on joining the various lists, accessing archives, - etc. There are a number of mailing lists targeted at special - interest groups not mentioned here; more information can be - obtained either from the Mailman pages or the mailing - lists section of the &os; Web site. + wishing to do so. Visit the &os; Mailman Info + Page. This will give you more information on joining + the various lists, accessing archives, etc. There are + a number of mailing lists targeted at special interest groups + not mentioned here; more information can be obtained either + from the Mailman pages or the mailing + lists section of the &os; Web site. Do not send email to the lists @@ -286,48 +301,48 @@ provided in various formats. Most distributions will include both ASCII text (.TXT) and HTML (.HTM) renditions. Some distributions - may also include other formats such as Portable Document Format - (.PDF). + may also include other formats such as Portable Document + Format (.PDF). - - - README.TXT: This file, which - gives some general information about &os; as well as - some cursory notes about obtaining a - distribution. - - - - RELNOTES.TXT: The release - notes, showing what's new and different in &os; - &release.current; compared to the previous release (&os; - &release.prev;). - - - - HARDWARE.TXT: The hardware - compatibility list, showing devices with which &os; has - been tested and is known to work. - - - - ERRATA.TXT: Release errata. - Late-breaking, post-release information can be found in - this file, which is principally applicable to releases - (as opposed to snapshots). It is important to consult - this file before installing a release of &os;, as it - contains the latest information on problems which have - been found and fixed since the release was - created. - - - + + + README.TXT: This file, which + gives some general information about &os; as well as + some cursory notes about obtaining a + distribution. + + + + RELNOTES.TXT: The release + notes, showing what's new and different in &os; + &release.current; compared to the previous release (&os; + &release.prev;). + + + + HARDWARE.TXT: The hardware + compatibility list, showing devices with which &os; has + been tested and is known to work. + + + + ERRATA.TXT: Release errata. + Late-breaking, post-release information can be found in + this file, which is principally applicable to releases + (as opposed to snapshots). It is important to consult + this file before installing a release of &os;, as it + contains the latest information on problems which have + been found and fixed since the release was + created. + + On platforms that support &man.bsdinstall.8; (currently - &arch.amd64;, &arch.i386;, &arch.pc98;, and &arch.sparc64;), these documents are generally available via the - Documentation menu during installation. Once the system is - installed, you can revisit this menu by re-running the - &man.bsdinstall.8; utility. + &arch.amd64;, &arch.i386;, &arch.pc98;, and &arch.sparc64;), + these documents are generally available via the Documentation + menu during installation. Once the system is installed, you + can revisit this menu by re-running the &man.bsdinstall.8; + utility. It is extremely important to read the errata for any @@ -338,8 +353,9 @@ other copies are kept updated on the Internet and should be consulted as the current errata for this release. These other copies of the errata are located at - &url.base;/releases/ (as - well as any sites which keep up-to-date mirrors of this + &url.base;/releases/ + (as well as any sites which keep up-to-date mirrors of this location). @@ -347,18 +363,19 @@ Manual Pages - As with almost all &unix; like operating systems, &os; comes - with a set of on-line manual pages, accessed through the - &man.man.1; command or through the hypertext manual - pages gateway on the &os; Web site. In general, the - manual pages provide information on the different commands and - APIs available to the &os; user. + As with almost all &unix; like operating systems, &os; + comes with a set of on-line manual pages, accessed through the + &man.man.1; command or through the hypertext + manual pages gateway on the &os; Web site. In + general, the manual pages provide information on the different + commands and APIs available to the &os; user. In some cases, manual pages are written to give information on particular topics. Notable examples of such - manual pages are &man.tuning.7; (a guide to performance tuning), - &man.security.7; (an introduction to &os; security), and - &man.style.9; (a style guide to kernel coding). + manual pages are &man.tuning.7; (a guide to performance + tuning), &man.security.7; (an introduction to &os; security), + and &man.style.9; (a style guide to kernel coding). @@ -366,31 +383,34 @@ Two highly-useful collections of &os;-related information, maintained by the &os; Project, - are the &os; Handbook and &os; FAQ (Frequently Asked - Questions document). On-line versions of the Handbook - and FAQ - are always available from the &os; Documentation - page or its mirrors. If you install the + are the &os; Handbook and &os; FAQ (Frequently Asked Questions + document). On-line versions of the Handbook and FAQ are always + available from the &os; Documentation + page or its mirrors. If you install the doc distribution set, you can use a Web browser to read the Handbook and FAQ locally. In particular, note that the Handbook contains a step-by-step guide to installing &os;. A number of on-line books and articles, also maintained by - the &os; Project, cover more-specialized, &os;-related topics. - This material spans a wide range of topics, from effective use - of the mailing lists, to dual-booting &os; with other - operating systems, to guidelines for new committers. Like the - Handbook and FAQ, these documents are available from the &os; - Documentation Page or in the doc - distribution set. + the &os; Project, cover more-specialized, &os;-related topics. + This material spans a wide range of topics, from effective use + of the mailing lists, to dual-booting &os; with other + operating systems, to guidelines for new committers. Like the + Handbook and FAQ, these documents are available from the &os; + Documentation Page or in the doc + distribution set. A listing of other books and documents about &os; can be - found in the bibliography - of the &os; Handbook. Because of &os;'s strong &unix; heritage, - many other articles and books written for &unix; systems are - applicable as well, some of which are also listed in the - bibliography. + found in the bibliography + of the &os; Handbook. Because of &os;'s strong &unix; + heritage, many other articles and books written for &unix; + systems are applicable as well, some of which are also listed + in the bibliography. @@ -399,10 +419,11 @@ &os; represents the cumulative work of many hundreds, if not thousands, of individuals from around the world who have worked - countless hours to bring about this &release.type;. For a - complete list of &os; developers and contributors, please see - Contributors - to &os; on the &os; Web site or any of its + countless hours to bring about this &release.type;. For + a complete list of &os; developers and contributors, please see + Contributors + to &os; on the &os; Web site or any of its mirrors. Special thanks also go to the many thousands of &os; users From owner-svn-src-all@freebsd.org Thu May 18 16:24:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DADD6D73E56; Thu, 18 May 2017 16:24:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BE381DA6; Thu, 18 May 2017 16:24:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IGOBLW013238; Thu, 18 May 2017 16:24:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IGOBPb013236; Thu, 18 May 2017 16:24:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181624.v4IGOBPb013236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 16:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318468 - in stable/11/release/doc/en_US.ISO8859-1: hardware readme X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 16:24:13 -0000 Author: gjb Date: Thu May 18 16:24:11 2017 New Revision: 318468 URL: https://svnweb.freebsd.org/changeset/base/318468 Log: Fix grammar nits. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 16:24:10 2017 (r318467) +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 16:24:11 2017 (r318468) @@ -555,7 +555,7 @@ The following Sun &ultrasparc; systems are not tested but - believed to be also supported by &os;: + believed to also be supported by &os;: @@ -581,7 +581,7 @@ The following Fujitsu &primepower; systems are not tested - but believed to be also supported by &os;: + but believed to also be supported by &os;: @@ -620,11 +620,11 @@ is highly recommended to try to keep the formatting of this section consistent. - We give manpage references using the &man entities where - possible. If a driver has no manpage (and consequently no + We give manual page references using the &man entities where + possible. If a driver has no manual page (and consequently no &man entity, we simply give the name of the driver). Please avoid doing &man entity conversions unless you - know for sure that an entity and manpage exist; sweeps through + know for sure that an entity and manual page exist; sweeps through this file to fix "missed" conversions are likely to break the build. --> Modified: stable/11/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu May 18 16:24:10 2017 (r318467) +++ stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu May 18 16:24:11 2017 (r318468) @@ -219,7 +219,7 @@ For any questions or general technical support issues, please send mail to the &a.questions;. - If you're tracking the &release.branch; development + If you are tracking the &release.branch; development efforts, you must join the &a.current;, in order to keep abreast of recent developments and changes that may affect the way you use and maintain the From owner-svn-src-all@freebsd.org Thu May 18 16:32:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0609D721CB; Thu, 18 May 2017 16:32:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F173689; Thu, 18 May 2017 16:32:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IGWfDi017173; Thu, 18 May 2017 16:32:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IGWf0E017172; Thu, 18 May 2017 16:32:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181632.v4IGWf0E017172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 16:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318469 - stable/11/release/doc/en_US.ISO8859-1/readme X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 16:32:42 -0000 Author: gjb Date: Thu May 18 16:32:41 2017 New Revision: 318469 URL: https://svnweb.freebsd.org/changeset/base/318469 Log: Prefer https://download.FreeBSD.org as the official release site. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu May 18 16:24:11 2017 (r318468) +++ stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu May 18 16:32:41 2017 (r318469) @@ -180,13 +180,21 @@ + HTTPS + + &os; releases may be downloaded via + HTTPS from https://download.FreeBSD.org/, + which is the official &os; release site. + + + FTP You can use FTP to retrieve &os; and any or all of its optional packages from ftp://ftp.FreeBSD.org/, - which is the official &os; release site, or any of its - mirrors. + or any of its mirrors. Lists of locations that mirror &os; can be found in the FTP From owner-svn-src-all@freebsd.org Thu May 18 16:43:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F171DD72519; Thu, 18 May 2017 16:43:31 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from apnoea.adamw.org (apnoea.adamw.org [104.225.5.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "apnoea.adamw.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 343A9CBA; Thu, 18 May 2017 16:43:30 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by apnoea.adamw.org (OpenSMTPD) with ESMTPSA id fae6499b TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 18 May 2017 10:43:29 -0600 (MDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318468 - in stable/11/release/doc/en_US.ISO8859-1: hardware readme From: Adam Weinberger In-Reply-To: <201705181624.v4IGOBPb013236@repo.freebsd.org> Date: Thu, 18 May 2017 10:43:28 -0600 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <83CC5C29-230F-4033-B2A6-90E81D403A79@adamw.org> References: <201705181624.v4IGOBPb013236@repo.freebsd.org> To: Glen Barber X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 16:43:32 -0000 > On 18 May, 2017, at 10:24, Glen Barber wrote: >=20 > Author: gjb > Date: Thu May 18 16:24:11 2017 > New Revision: 318468 > URL: https://svnweb.freebsd.org/changeset/base/318468 >=20 > Log: > Fix grammar nits. >=20 > Sponsored by: The FreeBSD Foundation >=20 > Modified: > stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > stable/11/release/doc/en_US.ISO8859-1/readme/article.xml >=20 > Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml = Thu May 18 16:24:10 2017 (r318467) > +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml = Thu May 18 16:24:11 2017 (r318468) > @@ -555,7 +555,7 @@ > >=20 > The following Sun &ultrasparc; systems are not tested but > - believed to be also supported by &os;: > + believed to also be supported by &os;: As long as we're picking grammar nits, you've split an infinitive there. = I think you want "believed also to be supported" or "believed to be = supported by &os; as well:". >=20 > > > @@ -581,7 +581,7 @@ > >=20 > The following Fujitsu &primepower; systems are not tested > - but believed to be also supported by &os;: > + but believed to also be supported by &os;: Same here. # Adam --=20 Adam Weinberger adamw@adamw.org https://www.adamw.org From owner-svn-src-all@freebsd.org Thu May 18 16:48:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CC76D7280D; Thu, 18 May 2017 16:48:26 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7086104F; Thu, 18 May 2017 16:48:25 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v4IGmLvg067012; Thu, 18 May 2017 09:48:21 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v4IGmLqr067011; Thu, 18 May 2017 09:48:21 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201705181648.v4IGmLqr067011@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r318441 - in head/etc: . cron.d In-Reply-To: <20170518130932.eo5clhki4za2vigz@ivaldir.net> To: Baptiste Daroussin Date: Thu, 18 May 2017 09:48:21 -0700 (PDT) CC: rgrimes@FreeBSD.org, Ngie Cooper , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Reply-To: rgrimes@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 16:48:26 -0000 > On Thu, May 18, 2017 at 02:56:31AM -0700, Rodney W. Grimes wrote: > > > Author: ngie > > > Date: Thu May 18 06:25:39 2017 > > > New Revision: 318441 > > > URL: https://svnweb.freebsd.org/changeset/base/318441 > > > > > > Log: > > > Handle the cron.d entry for MK_AT in cron conditionally > > > > > > Install /etc/cron.d/at if MK_AT != no, always using it, which tries > > > to run a non-existent program via cron(8) every 5 minutes with the > > > default /etc/crontab, prior to this commit. > > > > > > SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at > > > because atrun(8) executes programs, which may rely on environment > > > currently set via /etc/crontab. > > > > > > Noted by: bdrewery (in an internal review) > > > MFC after: 2 months > > > Relnotes: yes (may need to add environmental modifications to > > > /etc/cron.d/at) > > > Sponsored by: Dell EMC Isilon > > > > > > Added: > > > head/etc/cron.d/ > > > head/etc/cron.d/Makefile (contents, props changed) > > > head/etc/cron.d/at (contents, props changed) > > > Modified: > > > head/etc/Makefile > > > head/etc/crontab > > > > > > Modified: head/etc/Makefile > > > ============================================================================== > > > --- head/etc/Makefile Thu May 18 06:15:42 2017 (r318440) > > > +++ head/etc/Makefile Thu May 18 06:25:39 2017 (r318441) > > > @@ -8,6 +8,7 @@ FILESGROUPS= FILES > > > # No need as it is empty and just causes rebuilds since this file does so much. > > > UPDATE_DEPENDFILE= no > > > SUBDIR= \ > > > + cron.d \ > > > newsyslog.conf.d \ > > > syslog.d > > > > The thread on the newsyslog clearly shows that this is a contriversial change. > > > > I strongly object to further splitting of /etc/FOO into /etc/foo.d/FOO files > > to suite Dell/EMC/Isilon's needs. It is in conflict with the needs and > > desires of others. > > Has multiple people has stated, on the newsyslog thread. this is not a > DELL/EMC/Isilon need, this is also a requirement for plenty of use cases >From other mail in the newsyslog thread it was very evident that the newsyslog changes where driven by a specific need and desire of Dell/EMC/Isilon. And as others pointed out that was more or less in conflict with others needs and desires. I did not see any conclusion reached in that thread. > 1. Consistency > as a project we do support building WITHOUT_FOO there is no reason to install > syslog, cron configuration for FOO if the system was built without foo And there are very clean ways to do this WITHOUT the need to make this a bunch of seperate files. This actually creates an inconsistent system, do I manage crons FOO item with /etc/crontabl or /etc/cron.d/FOO? As I said lets do it one way or the other, but NOT a half baked some in one file and some others split into seperate files. Others expressed this exact some issue, why is this issue being ignored? I also stated that this could be done and meet the requirements of one file with conditionalized Makefile syntax it is a trivial matter to create a string of files to cat from the src/etc directory into the objdir with the right lines in it based on if {${MK_FOO} knobs. > 2. Packaging base > if one does not install at there is no need for the at crontab to be installed > (same reason as 1.) Lets cross that bridge when the package of base is done, and with a great deal more engineering than this simple hack. The configuration management of a packaged base is gona be a messy nightmare at best from what I am seeing, especially if this is the road to be taken. > 3. Large deployment of freebsd farms > Being able to administrate thousands of FreeBSD machines, one often ends up > using tools like puppet, chef, ansible, cfengine. When programmatically > handling configuration management it is way easier and safer to simple > add/removes files in a directory rather than mangling^Winplace editing files. This actually is breaking a massive deployment of both ansible and puppet based management tools. Again, how does splitting this into 2 files to manage make it any easier to manage? We now have to teach the management tools to deal with both /etc/crontab and /etc/cron.d/at if I want it to manage at. And this tool has to be taught that FreeBSD < r318441 uses one way and >=r318441 is another way. > 4. Ports/packages > On can provide easily sample configuration for cron, syslog (not only) and the > admin can decide to use it or not easily (ususally this is done by making > symlinks from the said file which would live in share/* into the .d directory. These files for ports/packages do not belong in /etc/cron.d but in /usr/local/etc/cron.d, I would fully support that as an addition if it does not exist, but that has nothing to do with /etc/crontab or /etc cron.d, or moving of 1 single /etc/crontab line to /etc/cron.d. > > This is not a new trend in FreeBSD: newsyslog, rc.conf, libmap and more. This IS a new trend in FreeBSD, the base system has always shipped with a minimal set of /etc/FOO files and not split them in to FOO.d. The system SUPPORTS foo.d but does not ship that as its base configuration. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu May 18 16:52:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD3E1D72A90 for ; Thu, 18 May 2017 16:52:07 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1E4C151A for ; Thu, 18 May 2017 16:52:07 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 04103c96-3bea-11e7-8c46-c35e37f62db1 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 04103c96-3bea-11e7-8c46-c35e37f62db1; Thu, 18 May 2017 16:49:54 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4IGouZ7001606; Thu, 18 May 2017 10:50:56 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1495126256.93532.14.camel@freebsd.org> Subject: Re: svn commit: r318441 - in head/etc: . cron.d From: Ian Lepore To: rgrimes@freebsd.org, Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 18 May 2017 10:50:56 -0600 In-Reply-To: <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net> References: <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 16:52:08 -0000 On Thu, 2017-05-18 at 02:56 -0700, Rodney W. Grimes wrote: > > > > Author: ngie > > Date: Thu May 18 06:25:39 2017 > > New Revision: 318441 > > URL: https://svnweb.freebsd.org/changeset/base/318441 > > > > Log: > >   Handle the cron.d entry for MK_AT in cron conditionally > >    > >   Install /etc/cron.d/at if MK_AT != no, always using it, which > > tries > >   to run a non-existent program via cron(8) every 5 minutes with > > the > >   default /etc/crontab, prior to this commit. > >    > >   SHELL and PATH are duplicated between /etc/crontab and > > /etc/cron.d/at > >   because atrun(8) executes programs, which may rely on environment > >   currently set via /etc/crontab. > >    > >   Noted by: bdrewery (in an internal review) > >   MFC after: 2 months > >   Relnotes: yes (may need to add environmental modifications > > to > >         /etc/cron.d/at) > >   Sponsored by: Dell EMC Isilon > > > > Added: > >   head/etc/cron.d/ > >   head/etc/cron.d/Makefile   (contents, props changed) > >   head/etc/cron.d/at   (contents, props changed) > > Modified: > >   head/etc/Makefile > >   head/etc/crontab > > > > Modified: head/etc/Makefile > > =================================================================== > > =========== > > --- head/etc/Makefile Thu May 18 06:15:42 2017 (r3184 > > 40) > > +++ head/etc/Makefile Thu May 18 06:25:39 2017 (r3184 > > 41) > > @@ -8,6 +8,7 @@ FILESGROUPS= FILES > >  # No need as it is empty and just causes rebuilds since this file > > does so much. > >  UPDATE_DEPENDFILE= no > >  SUBDIR= \ > > + cron.d \ > >   newsyslog.conf.d \ > >   syslog.d > The thread on the newsyslog clearly shows that this is a > contriversial change. > > I strongly object to further splitting of /etc/FOO into > /etc/foo.d/FOO files > to suite Dell/EMC/Isilon's needs.  It is in conflict with the needs > and > desires of others. > Actually, the newsyslog thread showed that 4 people supported Ngie's changes, and 4 people objected to them.  Not exactly a raging controversy.  Given how many people read this list, a pretty tepid response really. The objections seemed to boil down to:  1. It's not how we've done it for years; I don't like newfangled stuff.  2. It's strange to have some stuff in the old monolithic file and some in new little files in a directory.  3. It will be hard to update existing systems. I don't see any point in discussing #1 further (not because peoples' opinions don't matter, but rather because there will never be universal agreement no matter how much it's discussed). I think #2 has some validity, but not as an argument for stopping or undoing the changes, but more as a valid design issue to be discussed.  Do we need an "all or nothing" rule when it comes to changing existing config files to be fine-grained?  Or some other rule?  Right now I infer the rule Ngie is using to be "if you can disable a component with build/install controls, then its config should be fined-grained", and that strikes me as a workable rule, but not the only one possible. #3 seems like a strongly valid concern.  People following -current have agreed to take on some pain to do so, but when 12.0-release hits the streets there needs to be a way to upgrade existing systems without a lot of pain.  What can we do to make it easier? -- Ian From owner-svn-src-all@freebsd.org Thu May 18 16:53:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B206D72B20 for ; Thu, 18 May 2017 16:53:05 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E4EE16F9 for ; Thu, 18 May 2017 16:53:05 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 4ee24c93-3bea-11e7-8c46-c35e37f62db1 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 4ee24c93-3bea-11e7-8c46-c35e37f62db1; Thu, 18 May 2017 16:51:59 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4IGr2vo001612; Thu, 18 May 2017 10:53:02 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1495126382.93532.17.camel@freebsd.org> Subject: Re: svn commit: r318468 - in stable/11/release/doc/en_US.ISO8859-1: hardware readme From: Ian Lepore To: Adam Weinberger , Glen Barber Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Date: Thu, 18 May 2017 10:53:02 -0600 In-Reply-To: <83CC5C29-230F-4033-B2A6-90E81D403A79@adamw.org> References: <201705181624.v4IGOBPb013236@repo.freebsd.org> <83CC5C29-230F-4033-B2A6-90E81D403A79@adamw.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 16:53:05 -0000 On Thu, 2017-05-18 at 10:43 -0600, Adam Weinberger wrote: > > > > On 18 May, 2017, at 10:24, Glen Barber wrote: > > > > Author: gjb > > Date: Thu May 18 16:24:11 2017 > > New Revision: 318468 > > URL: https://svnweb.freebsd.org/changeset/base/318468 > > > > Log: > >  Fix grammar nits. > > > >  Sponsored by: The FreeBSD Foundation > > > > Modified: > >  stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > >  stable/11/release/doc/en_US.ISO8859-1/readme/article.xml > > > > Modified: stable/11/release/doc/en_US.ISO8859- > > 1/hardware/article.xml > > =================================================================== > > =========== > > --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > > Thu May 18 16:24:10 2017 (r318467) > > +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > > Thu May 18 16:24:11 2017 (r318468) > > @@ -555,7 +555,7 @@ > >        > > > >       The following Sun &ultrasparc; systems are not tested > > but > > - believed to be also supported by &os;: > > + believed to also be supported by &os;: > As long as we're picking grammar nits, you've split an infinitive > there. I think you want "believed also to be supported" or "believed > to be supported by &os; as well:". > > > > > > >        > > > > @@ -581,7 +581,7 @@ > >        > > > >       The following Fujitsu &primepower; systems are not > > tested > > - but believed to be also supported by &os;: > > + but believed to also be supported by &os;: > Same here. > > # Adam There is no rule of grammar forbidding split infinitives, and the style opinion which disfavored them for many years is itself no longer in favor.  Like the old "don't end a sentence with a preposition" this is just a thing many of us learned in school that turned out to be widespread prejudice, not an actual rule of grammar. -- Ian From owner-svn-src-all@freebsd.org Thu May 18 17:00:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D48C8D72E9F; Thu, 18 May 2017 17:00:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95F471B41; Thu, 18 May 2017 17:00:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 36C4210A7B9; Thu, 18 May 2017 13:00:24 -0400 (EDT) From: John Baldwin To: Baptiste Daroussin Cc: rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318441 - in head/etc: . cron.d Date: Thu, 18 May 2017 09:48:25 -0700 Message-ID: <2201156.H7EQSgYph9@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170518130932.eo5clhki4za2vigz@ivaldir.net> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net> <20170518130932.eo5clhki4za2vigz@ivaldir.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 18 May 2017 13:00:24 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:00:25 -0000 On Thursday, May 18, 2017 03:09:32 PM Baptiste Daroussin wrote: > On Thu, May 18, 2017 at 02:56:31AM -0700, Rodney W. Grimes wrote: > > > Author: ngie > > > Date: Thu May 18 06:25:39 2017 > > > New Revision: 318441 > > > URL: https://svnweb.freebsd.org/changeset/base/318441 > > > > > > Log: > > > Handle the cron.d entry for MK_AT in cron conditionally > > > > > > Install /etc/cron.d/at if MK_AT != no, always using it, which tries > > > to run a non-existent program via cron(8) every 5 minutes with the > > > default /etc/crontab, prior to this commit. > > > > > > SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at > > > because atrun(8) executes programs, which may rely on environment > > > currently set via /etc/crontab. > > > > > > Noted by: bdrewery (in an internal review) > > > MFC after: 2 months > > > Relnotes: yes (may need to add environmental modifications to > > > /etc/cron.d/at) > > > Sponsored by: Dell EMC Isilon > > > > > > Added: > > > head/etc/cron.d/ > > > head/etc/cron.d/Makefile (contents, props changed) > > > head/etc/cron.d/at (contents, props changed) > > > Modified: > > > head/etc/Makefile > > > head/etc/crontab > > > > > > Modified: head/etc/Makefile > > > ============================================================================== > > > --- head/etc/Makefile Thu May 18 06:15:42 2017 (r318440) > > > +++ head/etc/Makefile Thu May 18 06:25:39 2017 (r318441) > > > @@ -8,6 +8,7 @@ FILESGROUPS= FILES > > > # No need as it is empty and just causes rebuilds since this file does so much. > > > UPDATE_DEPENDFILE= no > > > SUBDIR= \ > > > + cron.d \ > > > newsyslog.conf.d \ > > > syslog.d > > > > The thread on the newsyslog clearly shows that this is a contriversial change. > > > > I strongly object to further splitting of /etc/FOO into /etc/foo.d/FOO files > > to suite Dell/EMC/Isilon's needs. It is in conflict with the needs and > > desires of others. > > Has multiple people has stated, on the newsyslog thread. this is not a > DELL/EMC/Isilon need, this is also a requirement for plenty of use cases > 1. Consistency > as a project we do support building WITHOUT_FOO there is no reason to install > syslog, cron configuration for FOO if the system was built without foo Though it doesn't _hurt_, and breaking POLA has to be worth it, not just because it looks nice. > 2. Packaging base > if one does not install at there is no need for the at crontab to be installed > (same reason as 1.) This is a viable reason except that it isn't fully baked yet. > 3. Large deployment of freebsd farms > Being able to administrate thousands of FreeBSD machines, one often ends up > using tools like puppet, chef, ansible, cfengine. When programmatically > handling configuration management it is way easier and safer to simple > add/removes files in a directory rather than mangling^Winplace editing files. There's nothing preventing you now from deploying split files and an empty global configuration file since the daemons support foo.d. You don't require that to change in upstream since you should be using some sort of VCS to manage your configuration as it is. > 4. Ports/packages > On can provide easily sample configuration for cron, syslog (not only) and the > admin can decide to use it or not easily (ususally this is done by making > symlinks from the said file which would live in share/* into the .d directory. > > This is not a new trend in FreeBSD: newsyslog, rc.conf, libmap and more. The support for broken out files has long been there, but the base system has not used them previously for default config shipped during a release. That is in fact a new trend. However, the current approach seems to be the absolute worst way to do this. If someone wants to use the existing base system image and modify it with config management, they now have to use a mix of styles (for some services edit a global config file for certain settings, but use a dedicated file for other settings for the same service, or for the same settings but a different service). It's also the worst case for humans trying to work with our system as the division between which services are broken out vs global is inconsistent and arbitrary. Once you split up the files you make a merge conflict for anyone trying to do an upgrade. If we do this piecemail then we create N merge conflicts for users to deal with as opposed to if you split it up all at once. Also, there wasn't a clear consensus (a mail to arch@ with "hey, we should switch to splitting up config files for reasons A and B and let's do this for 12.0 but not merge to stable so there is a clear flag day / sign post for users to manage upgrades". Instead there have been a couple of commits and any not-in-100%-agreement opinions are ignored. -- John Baldwin From owner-svn-src-all@freebsd.org Thu May 18 17:01:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADCB0D72F3C; Thu, 18 May 2017 17:01:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F6CD1D6A; Thu, 18 May 2017 17:01:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IH1QUO026203; Thu, 18 May 2017 17:01:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IH1QDu026202; Thu, 18 May 2017 17:01:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181701.v4IH1QDu026202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 17:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318470 - stable/11/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:01:27 -0000 Author: gjb Date: Thu May 18 17:01:26 2017 New Revision: 318470 URL: https://svnweb.freebsd.org/changeset/base/318470 Log: Further refine grammar. Submitted by: adamw Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 16:32:41 2017 (r318469) +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 17:01:26 2017 (r318470) @@ -555,7 +555,7 @@ The following Sun &ultrasparc; systems are not tested but - believed to also be supported by &os;: + believed to be supported by &os; as well: @@ -581,7 +581,7 @@ The following Fujitsu &primepower; systems are not tested - but believed to also be supported by &os;: + but believed to be supported by &os; as well: From owner-svn-src-all@freebsd.org Thu May 18 17:03:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1B8AD730F5; Thu, 18 May 2017 17:03:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B2B010A; Thu, 18 May 2017 17:03:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 5783E5A13; Thu, 18 May 2017 17:03:07 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Thu, 18 May 2017 17:03:05 +0000 From: Glen Barber To: Adam Weinberger Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r318468 - in stable/11/release/doc/en_US.ISO8859-1: hardware readme Message-ID: <20170518170305.GC49693@FreeBSD.org> References: <201705181624.v4IGOBPb013236@repo.freebsd.org> <83CC5C29-230F-4033-B2A6-90E81D403A79@adamw.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vOmOzSkFvhd7u8Ms" Content-Disposition: inline In-Reply-To: <83CC5C29-230F-4033-B2A6-90E81D403A79@adamw.org> X-Operating-System: FreeBSD 11.0-STABLE amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer X-Spidey-Sense: Uh oh, Peter logged in User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:03:08 -0000 --vOmOzSkFvhd7u8Ms Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 18, 2017 at 10:43:28AM -0600, Adam Weinberger wrote: > > On 18 May, 2017, at 10:24, Glen Barber wrote: > >=20 > > Author: gjb > > Date: Thu May 18 16:24:11 2017 > > New Revision: 318468 > > URL: https://svnweb.freebsd.org/changeset/base/318468 > >=20 > > Log: > > Fix grammar nits. > >=20 > > Sponsored by: The FreeBSD Foundation > >=20 > > Modified: > > stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > > stable/11/release/doc/en_US.ISO8859-1/readme/article.xml > >=20 > > Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May = 18 16:24:10 2017 (r318467) > > +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May = 18 16:24:11 2017 (r318468) > > @@ -555,7 +555,7 @@ > > > >=20 > > The following Sun &ultrasparc; systems are not tested but > > - believed to be also supported by &os;: > > + believed to also be supported by &os;: >=20 > As long as we're picking grammar nits, you've split an infinitive there. = I think you want "believed also to be supported" or "believed to be support= ed by &os; as well:". >=20 I like the wording from your second suggestion better anyway. Thanks. Glen --vOmOzSkFvhd7u8Ms Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAlkd08QACgkQAxRYpUeP 4pO1kQ/9GRlSHIL0Jn0RAr7AMCFyhEqII9rfTfTErW1ltDrVGLcVWiF83eiCT5SE zrGq6kyWL6abKQKIhFJ0+i27s6IwXBgZ7I3dVB1djrhdLEr5Tlhh3mHxT8BbvApQ 9aZWufOzISL+dLnwZl3MW0raOC0mSXhm8FLECWNZgBxh1CxjYu0A0PsL7nrXgE9b PNY927CvbdcASgmZEqxb6Nk7CDCMlTwTNDuzyDKwMB4pvxBgNtmHY8qPT6VeVAid vqmpsW9iP1meKcDC4wI4meWBnfOK6DwKNY3mrIeoTbQXCWc59V5j55Zsd/OX2TYn D3F/7oxOQ0LTWhfHSht1kAb3voqp+nrw6yGJHJK/okCOEae6Odlv6tF/VqmtPUMU G8LOetd7QZXHn4GzaEna+eFutw86jn9/dlnJSqhrpjLRRCOQ9A8j3YwpoIBrqVcq b21RkEtAzJ0u82Z0G2VohV6gFIV4cwPk2MaqafbHX2hXXtzf6j1+T0uiXc+aVJlC zJsD8KhcQ1uplD1bmo956bVG/NjQijC+7+ZSPLuNJ/remRRa7LPRwzNrPQmY4VEJ ZoCQ+DQEOw2bvpB7CbX6rq6GtcHhVXU/7SU2VtL/t6gEFC0PVUprI2Pko5r/o90r IC29pDT/CdYdoc8ApTjJmawIlfbeMw3dIpUVAu6AU6bhZfYkSp0= =j28E -----END PGP SIGNATURE----- --vOmOzSkFvhd7u8Ms-- From owner-svn-src-all@freebsd.org Thu May 18 17:09:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3472AD732BA; Thu, 18 May 2017 17:09:20 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from apnoea.adamw.org (apnoea.adamw.org [104.225.5.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "apnoea.adamw.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7813969E; Thu, 18 May 2017 17:09:18 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by apnoea.adamw.org (OpenSMTPD) with ESMTPSA id daae5adb TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 18 May 2017 11:09:17 -0600 (MDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318468 - in stable/11/release/doc/en_US.ISO8859-1: hardware readme From: Adam Weinberger In-Reply-To: <1495126382.93532.17.camel@freebsd.org> Date: Thu, 18 May 2017 11:09:15 -0600 Cc: Glen Barber , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-11@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201705181624.v4IGOBPb013236@repo.freebsd.org> <83CC5C29-230F-4033-B2A6-90E81D403A79@adamw.org> <1495126382.93532.17.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:09:20 -0000 > On 18 May, 2017, at 10:53, Ian Lepore wrote: >=20 > On Thu, 2017-05-18 at 10:43 -0600, Adam Weinberger wrote: >>>=20 >>> On 18 May, 2017, at 10:24, Glen Barber wrote: >>>=20 >>> Author: gjb >>> Date: Thu May 18 16:24:11 2017 >>> New Revision: 318468 >>> URL: https://svnweb.freebsd.org/changeset/base/318468 >>>=20 >>> Log: >>> Fix grammar nits. >>>=20 >>> Sponsored by: The FreeBSD Foundation >>>=20 >>> Modified: >>> stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml >>> stable/11/release/doc/en_US.ISO8859-1/readme/article.xml >>>=20 >>> Modified: stable/11/release/doc/en_US.ISO8859- >>> 1/hardware/article.xml >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml=09 >>> Thu May 18 16:24:10 2017 (r318467) >>> +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml=09 >>> Thu May 18 16:24:11 2017 (r318468) >>> @@ -555,7 +555,7 @@ >>> >>>=20 >>> The following Sun &ultrasparc; systems are not tested >>> but >>> - believed to be also supported by &os;: >>> + believed to also be supported by &os;: >> As long as we're picking grammar nits, you've split an infinitive >> there. I think you want "believed also to be supported" or "believed >> to be supported by &os; as well:". >>=20 >>>=20 >>>=20 >>> >>> >>> @@ -581,7 +581,7 @@ >>> >>>=20 >>> The following Fujitsu &primepower; systems are not >>> tested >>> - but believed to be also supported by &os;: >>> + but believed to also be supported by &os;: >> Same here. >>=20 >> # Adam >=20 > There is no rule of grammar forbidding split infinitives, and the = style > opinion which disfavored them for many years is itself no longer in > favor. Like the old "don't end a sentence with a preposition" this is > just a thing many of us learned in school that turned out to be > widespread prejudice, not an actual rule of grammar. I did not know that! If Mr. Gould's 6th grade English class was a lie, I = just don't know who to trust in this world anymore. # Adam --=20 Adam Weinberger adamw@adamw.org https://www.adamw.org From owner-svn-src-all@freebsd.org Thu May 18 17:16:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 468A7D735FA; Thu, 18 May 2017 17:16:00 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 210A2D8C; Thu, 18 May 2017 17:16:00 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IHFxNi033852; Thu, 18 May 2017 17:15:59 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IHFwwN033848; Thu, 18 May 2017 17:15:58 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <201705181715.v4IHFwwN033848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Thu, 18 May 2017 17:15:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318471 - in head/usr.bin/indent: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:16:00 -0000 Author: pstef Date: Thu May 18 17:15:58 2017 New Revision: 318471 URL: https://svnweb.freebsd.org/changeset/base/318471 Log: indent(1): Support binary integer literals. This was done by Romain Tartière for PR123553. I initially thought that it would break code like this: #define b00101010 -1 if (0 b00101010) ... by joining 0 and b00101010 together. However, the real problem with that patch was that once it saw a 0, it assumed that the number was base 2, 8 or 16, ignoring base 10 floating point numbers. I fixed that. I didn't copy the diagnostic part of the original patch as it seems out of scope of implementing binary integer literals formatting. PR: 123553 Submitted by: romain (original version) Approved by: pfg (mentor) Added: head/usr.bin/indent/tests/binary.0 (contents, props changed) head/usr.bin/indent/tests/binary.0.stdout (contents, props changed) Modified: head/usr.bin/indent/lexi.c head/usr.bin/indent/tests/Makefile Modified: head/usr.bin/indent/lexi.c ============================================================================== --- head/usr.bin/indent/lexi.c Thu May 18 17:01:26 2017 (r318470) +++ head/usr.bin/indent/lexi.c Thu May 18 17:15:58 2017 (r318471) @@ -169,19 +169,47 @@ lexi(void) struct templ *p; if (isdigit(*buf_ptr) || (buf_ptr[0] == '.' && isdigit(buf_ptr[1]))) { + enum base { + BASE_2, BASE_8, BASE_10, BASE_16 + }; int seendot = 0, seenexp = 0, seensfx = 0; - if (*buf_ptr == '0' && - (buf_ptr[1] == 'x' || buf_ptr[1] == 'X')) { + enum base in_base = BASE_10; + + if (*buf_ptr == '0') { + if (buf_ptr[1] == 'b' || buf_ptr[1] == 'B') + in_base = BASE_2; + else if (buf_ptr[1] == 'x' || buf_ptr[1] == 'X') + in_base = BASE_16; + else if (isdigit(buf_ptr[1])) + in_base = BASE_8; + } + switch (in_base) { + case BASE_2: + *e_token++ = *buf_ptr++; + *e_token++ = *buf_ptr++; + while (*buf_ptr == '0' || *buf_ptr == '1') { + CHECK_SIZE_TOKEN; + *e_token++ = *buf_ptr++; + } + break; + case BASE_8: + *e_token++ = *buf_ptr++; + while (*buf_ptr >= '0' && *buf_ptr <= '8') { + CHECK_SIZE_TOKEN; + *e_token++ = *buf_ptr++; + } + break; + case BASE_16: *e_token++ = *buf_ptr++; *e_token++ = *buf_ptr++; while (isxdigit(*buf_ptr)) { CHECK_SIZE_TOKEN; *e_token++ = *buf_ptr++; } - } - else + break; + case BASE_10: while (1) { if (*buf_ptr == '.') { if (seendot) @@ -204,6 +232,8 @@ lexi(void) } } } + break; + } while (1) { if (!(seensfx & 1) && (*buf_ptr == 'U' || *buf_ptr == 'u')) { CHECK_SIZE_TOKEN; Modified: head/usr.bin/indent/tests/Makefile ============================================================================== --- head/usr.bin/indent/tests/Makefile Thu May 18 17:01:26 2017 (r318470) +++ head/usr.bin/indent/tests/Makefile Thu May 18 17:15:58 2017 (r318471) @@ -2,6 +2,8 @@ PACKAGE= tests +${PACKAGE}FILES+= binary.0 +${PACKAGE}FILES+= binary.0.stdout ${PACKAGE}FILES+= comments.0 ${PACKAGE}FILES+= comments.0.stdout ${PACKAGE}FILES+= declarations.0 Added: head/usr.bin/indent/tests/binary.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/binary.0 Thu May 18 17:15:58 2017 (r318471) @@ -0,0 +1,10 @@ +/* $FreeBSD$ */ +#define b00101010 -1 +void t(void) { + unsigned a[] = {0b00101010, 0x00005678, 02, 17U}; + float x[] = {.7f, 0.7f}; + unsigned long ul[] = {0b00001111UL, 0x01010101UL, 02UL, 17UL}; + + if (0 b00101010) + return; +} Added: head/usr.bin/indent/tests/binary.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/binary.0.stdout Thu May 18 17:15:58 2017 (r318471) @@ -0,0 +1,12 @@ +/* $FreeBSD$ */ +#define b00101010 -1 +void +t(void) +{ + unsigned a[] = {0b00101010, 0x00005678, 02, 17U}; + float x[] = {.7f, 0.7f}; + unsigned long ul[] = {0b00001111UL, 0x01010101UL, 02UL, 17UL}; + + if (0 b00101010) + return; +} From owner-svn-src-all@freebsd.org Thu May 18 17:19:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2475CD7377C for ; Thu, 18 May 2017 17:19:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E934B109F for ; Thu, 18 May 2017 17:19:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22e.google.com with SMTP id e65so32376919ita.1 for ; Thu, 18 May 2017 10:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=aD0mN/W7FjdAduIvmpZtp/CryPe018KeHZVUyMfG8CM=; b=erZdMXQEcbGc0VowIEtTM1dSL4NnLfmXiKwW6d/ZiGpafOz8x/+/I1RW3i/jX1rIgU S7ZQ1NiXKcpQsoLQiQ9oAkHEyQolpgN0aorzWJkmBuEPCeUFBC9UlsQqNPmYwZiN50BL YSCGbU4at3rR93Vu34XbSKyIOJ1cSz6B1tA77aHxUXNely3je2t8DJykhBukTILvg8bY Urfzo9oQyEXCtCGhRKDbE2KfNVbgj15Qvhz4Vz5Q2lml52Jjh8+KACuek0FS2WcbDp0i MRDqMcMerIRC04GTWYdZQhgAKchL8ALIgzSU9uU5Lsb7EDGiWv8AZEYJho57wUmKRnOk qEJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=aD0mN/W7FjdAduIvmpZtp/CryPe018KeHZVUyMfG8CM=; b=fePRQVISPhp6ekb0LgXvCQ5fM1YGlgip3w0ddxMVfRAwo/gDysq5/JZCnUFHOsJ6QE IxInFEqIvBb3FKxPcmXQ40C/dLXwHsIzttN1Pyx2z4SidlW4yeGtgAoT0Ff8oIdX6KeC usvsRW40oMPexWGm2xgoINyDS0wwz+8Ws9PP98Cfa/E83iiPfoxWCuIBHvnLL/M1WD+P 4FX76AM/T12+DERK9eQJTwTa1FO6E2HNIvBHK5N0H1HoxOkK0vjLDd+NMwuMvWR4FGDP o6R6tbtL9WF9PsewPYeRkFluE6F3edHD06bVWHkA0MfLAZRRPjSn3Kj3jSUIYlF2v0dt h0yg== X-Gm-Message-State: AODbwcB+tyn3aew2VwBLQAIfwRAZmzG18ZZuWs5ER7vc+j/OdxV3H8Ug wllN7aHs9E92ZC2czKLATbxmN/gq7mU/ X-Received: by 10.36.44.14 with SMTP id i14mr24386705iti.103.1495127974032; Thu, 18 May 2017 10:19:34 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Thu, 18 May 2017 10:19:33 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:cdd4:9b25:be09:9f7d] In-Reply-To: <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Thu, 18 May 2017 11:19:33 -0600 X-Google-Sender-Auth: NsXvlxGjrESXeo6L3QrPY1n4KQ8 Message-ID: Subject: Re: svn commit: r318441 - in head/etc: . cron.d To: "Rodney W. Grimes" Cc: Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:19:35 -0000 On Thu, May 18, 2017 at 3:56 AM, Rodney W. Grimes wrote: >> Author: ngie >> Date: Thu May 18 06:25:39 2017 >> New Revision: 318441 >> URL: https://svnweb.freebsd.org/changeset/base/318441 >> >> Log: >> Handle the cron.d entry for MK_AT in cron conditionally >> >> Install /etc/cron.d/at if MK_AT != no, always using it, which tries >> to run a non-existent program via cron(8) every 5 minutes with the >> default /etc/crontab, prior to this commit. >> >> SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at >> because atrun(8) executes programs, which may rely on environment >> currently set via /etc/crontab. >> >> Noted by: bdrewery (in an internal review) >> MFC after: 2 months >> Relnotes: yes (may need to add environmental modifications to >> /etc/cron.d/at) >> Sponsored by: Dell EMC Isilon >> >> Added: >> head/etc/cron.d/ >> head/etc/cron.d/Makefile (contents, props changed) >> head/etc/cron.d/at (contents, props changed) >> Modified: >> head/etc/Makefile >> head/etc/crontab >> >> Modified: head/etc/Makefile >> ============================================================================== >> --- head/etc/Makefile Thu May 18 06:15:42 2017 (r318440) >> +++ head/etc/Makefile Thu May 18 06:25:39 2017 (r318441) >> @@ -8,6 +8,7 @@ FILESGROUPS= FILES >> # No need as it is empty and just causes rebuilds since this file does so much. >> UPDATE_DEPENDFILE= no >> SUBDIR= \ >> + cron.d \ >> newsyslog.conf.d \ >> syslog.d > > The thread on the newsyslog clearly shows that this is a contriversial change. > > I strongly object to further splitting of /etc/FOO into /etc/foo.d/FOO files > to suite Dell/EMC/Isilon's needs. It is in conflict with the needs and > desires of others. > > I especially object to it being done on a 1 of case, either completly split > the file or make it 1 file, but making it this miss match is just adding to > the work load of ansible and puppet task writting. You now have to mange > 2 config files rather than 1 for cron, and 7 for newsyslog instead of 1. In the vast majority of the cases so far, I'm convinced the changes are for the better and will make things like mergemaster / etcupate / etc easier on our users. Since the files are separate, and you almost never touch them, it's a net win. Consider this a strong encouragement to proceed. Warner >> Added: head/etc/cron.d/Makefile >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/etc/cron.d/Makefile Thu May 18 06:25:39 2017 (r318441) >> @@ -0,0 +1,11 @@ >> +# $FreeBSD$ >> + >> +.include >> + >> +.if ${MK_AT} != "no" >> +FILES+= at >> +.endif >> + >> +BINDIR= /etc/cron.d >> + >> +.include >> >> Added: head/etc/cron.d/at >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/etc/cron.d/at Thu May 18 06:25:39 2017 (r318441) >> @@ -0,0 +1,7 @@ >> +# $FreeBSD$ >> +# >> +SHELL=/bin/sh >> +PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin >> + >> +# See crontab(5) for field format. >> +*/5 * * * * root /usr/libexec/atrun >> >> Modified: head/etc/crontab >> ============================================================================== >> --- head/etc/crontab Thu May 18 06:15:42 2017 (r318440) >> +++ head/etc/crontab Thu May 18 06:25:39 2017 (r318441) >> @@ -7,8 +7,6 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin >> # >> #minute hour mday month wday who command >> # >> -*/5 * * * * root /usr/libexec/atrun >> -# >> # Save some entropy so that /dev/random can re-seed on boot. >> */11 * * * * operator /usr/libexec/save-entropy >> # >> >> > > -- > Rod Grimes rgrimes@freebsd.org > From owner-svn-src-all@freebsd.org Thu May 18 17:40:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04A50D73FEF; Thu, 18 May 2017 17:40:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBEA41FA5; Thu, 18 May 2017 17:40:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IHeUiG042262; Thu, 18 May 2017 17:40:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IHeUHA042257; Thu, 18 May 2017 17:40:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705181740.v4IHeUHA042257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 18 May 2017 17:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318472 - in stable/11: . share/mk tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:40:32 -0000 Author: emaste Date: Thu May 18 17:40:30 2017 New Revision: 318472 URL: https://svnweb.freebsd.org/changeset/base/318472 Log: MFC LLD changes and enable LLD as /usr/bin/ld on arm64 by default MFC r316629: do not require binutils port when using lld as ld r279908 added logic to Makefile.inc1 to automatically set CROSS_BINUTILS_PREFIX for architectures not supported by the in-tree binutils: arm64 when first introduced, and later riscv64 as well. LLVM's LLD linker is now included in the base system, and is enabled by default for arm64 and capable of linking world and kernel. Thus, avoid automatically setting CROSS_BINUTILS_PREFIX and requiring the binutils port if WITH_LLD_IS_LD is true. -- MFC r317608: revert r313473 (Disable LLD_IS_LD option combinations that fail) r316647 corrected the build of tblgen and libllvm as dependencies for LLD so undo the temporary seat-belt. We still want to extend the build infrastructure to automatically detect the case where the host LLD can be used instead of building a bootstrap LLD, and likely extend libllvmminimal to meet LLD's needs for cases where the build includes LLD but not Clang. -- MFC r316684: Make WITHOUT_TOOLCHAIN imply WITHOUT_LLD. LLD is a toolchain component. -- MFC r316647: Introduce LLD_BOOTSTRAP to control lld as bootstrap linker Add WITH_LLD_BOOTSTRAP and WITHOUT_LLD_BOOTSTRAP knobs, similar to the Clang bootstrap knobs. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10793 Added: stable/11/tools/build/options/WITHOUT_LLD_BOOTSTRAP - copied unchanged from r316647, head/tools/build/options/WITHOUT_LLD_BOOTSTRAP stable/11/tools/build/options/WITH_LLD_BOOTSTRAP - copied unchanged from r316647, head/tools/build/options/WITH_LLD_BOOTSTRAP Modified: stable/11/Makefile.inc1 stable/11/UPDATING stable/11/share/mk/src.opts.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Thu May 18 17:15:58 2017 (r318471) +++ stable/11/Makefile.inc1 Thu May 18 17:40:30 2017 (r318472) @@ -195,10 +195,11 @@ CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN .endif # If we do not have a bootstrap binutils (because the in-tree one does not # support the target architecture), provide a default cross-binutils prefix. -# This allows aarch64 builds, for example, to automatically use the -# aarch64-binutils port or package. +# This allows riscv64 builds, for example, to automatically use the +# riscv64-binutils port or package. .if !make(showconfig) .if !empty(BROKEN_OPTIONS:MBINUTILS_BOOTSTRAP) && \ + ${MK_LLD_BOOTSTRAP} == "no" && \ !defined(CROSS_BINUTILS_PREFIX) CROSS_BINUTILS_PREFIX=/usr/local/${TARGET_ARCH}-freebsd/bin/ .if !exists(${CROSS_BINUTILS_PREFIX}) @@ -1666,9 +1667,10 @@ ${_bt}-usr.bin/yacc: ${_bt}-lib/liby _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif -# We need to build tblgen when we're building clang either as -# the bootstrap compiler, or as the part of the normal build. -.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" +# We need to build tblgen when we're building clang or lld, either as +# bootstrap tools, or as the part of the normal build. +.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" || \ + ${MK_LLD_BOOTSTRAP} != "no" || ${MK_LLD} != "no" _clang_tblgen= \ lib/clang/libllvmminimal \ usr.bin/clang/llvm-tblgen \ @@ -1832,9 +1834,6 @@ _elftctools= lib/libelftc \ # cross-build on a FreeBSD 10 host: _elftctools+= usr.bin/addr2line .endif -.if ${MK_LLD_IS_LD} != "no" -_lld= usr.bin/clang/lld -.endif .elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no" # If cross-building with an external binutils we still need to build strip for # the target (for at least crunchide). @@ -1845,6 +1844,11 @@ _elftctools= lib/libelftc \ .if ${MK_CLANG_BOOTSTRAP} != "no" _clang= usr.bin/clang +.endif +.if ${MK_LLD_BOOTSTRAP} != "no" +_lld= usr.bin/clang/lld +.endif +.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no" _clang_libs= lib/clang .endif .if ${MK_GCC_BOOTSTRAP} != "no" Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Thu May 18 17:15:58 2017 (r318471) +++ stable/11/UPDATING Thu May 18 17:40:30 2017 (r318472) @@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITH the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20170518: + arm64 builds now use the base system LLD 4.0.0 linker by default, + instead of requiring that the aarch64-binutils port or package be + installed. To continue using aarch64-binutils, set + CROSS_BINUTILS_PREFIX=/usr/local/aarch64-freebsd/bin . + 20170511: The mmcsd.ko module now additionally depends on geom_flashmap.ko. Also, mmc.ko and mmcsd.ko need to be a matching pair built from the Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Thu May 18 17:15:58 2017 (r318471) +++ stable/11/share/mk/src.opts.mk Thu May 18 17:40:30 2017 (r318472) @@ -247,9 +247,9 @@ BROKEN_OPTIONS+=TESTS # "undefined ref BROKEN_OPTIONS+=CXX # "libcxxrt.so: undefined reference to `_Unwind_Resume_or_Rethrow'" .endif .if ${__T} == "aarch64" -__DEFAULT_YES_OPTIONS+=LLD_IS_LD +__DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .else -__DEFAULT_NO_OPTIONS+=LLD_IS_LD +__DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .endif .if ${__T} == "aarch64" || ${__T} == "amd64" __DEFAULT_YES_OPTIONS+=LLDB @@ -306,16 +306,6 @@ MK_LDNS_UTILS:= no MK_UNBOUND:= no .endif -.if ${MK_LLD} == "no" -MK_LLD_IS_LD:= no -.endif - -# LLD requires LLVM libraries, and we do not yet compare in-tree and host LLD -# versions to avoid building it if they are identical. -.if ${MK_LLD_IS_LD} != "no" -MK_SYSTEM_COMPILER:= no -.endif - .if ${MK_SOURCELESS} == "no" MK_SOURCELESS_HOST:= no MK_SOURCELESS_UCODE:= no @@ -383,6 +373,7 @@ MK_CLANG:= no MK_GCC:= no MK_GDB:= no MK_INCLUDES:= no +MK_LLD:= no MK_LLDB:= no .endif Copied: stable/11/tools/build/options/WITHOUT_LLD_BOOTSTRAP (from r316647, head/tools/build/options/WITHOUT_LLD_BOOTSTRAP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITHOUT_LLD_BOOTSTRAP Thu May 18 17:40:30 2017 (r318472, copy of r316647, head/tools/build/options/WITHOUT_LLD_BOOTSTRAP) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build the LLD linker during the bootstrap phase of +the build. +To be able to build the system, either Binutils or LLD bootstrap must be +enabled unless an alternate linker is provided via XLD. Copied: stable/11/tools/build/options/WITH_LLD_BOOTSTRAP (from r316647, head/tools/build/options/WITH_LLD_BOOTSTRAP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITH_LLD_BOOTSTRAP Thu May 18 17:40:30 2017 (r318472, copy of r316647, head/tools/build/options/WITH_LLD_BOOTSTRAP) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build the LLD linker during the bootstrap phase of the build. From owner-svn-src-all@freebsd.org Thu May 18 17:44:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20BD4D702F0; Thu, 18 May 2017 17:44:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D59AB785; Thu, 18 May 2017 17:44:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IHijXw046238; Thu, 18 May 2017 17:44:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IHijK6046237; Thu, 18 May 2017 17:44:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705181744.v4IHijK6046237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 18 May 2017 17:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318473 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:44:47 -0000 Author: emaste Date: Thu May 18 17:44:45 2017 New Revision: 318473 URL: https://svnweb.freebsd.org/changeset/base/318473 Log: regen src.conf(5) after r318472 Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Thu May 18 17:40:30 2017 (r318472) +++ stable/11/share/man/man5/src.conf.5 Thu May 18 17:44:45 2017 (r318473) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 15, 2017 +.Dd May 18, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -880,12 +880,6 @@ Set to not build LLVM's lld linker. .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_LLD_IS_LD -.El .It Va WITH_LLD Set to build LLVM's lld linker. .Pp @@ -901,6 +895,19 @@ Set to build the LLDB debugger. .Pp It is a default setting on amd64/amd64 and arm64/aarch64. +.It Va WITHOUT_LLD_BOOTSTRAP +Set to not build the LLD linker during the bootstrap phase of +the build. +To be able to build the system, either Binutils or LLD bootstrap must be +enabled unless an alternate linker is provided via XLD. +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_LLD_BOOTSTRAP +Set to build the LLD linker during the bootstrap phase of the build. +.Pp +It is a default setting on +arm64/aarch64. .It Va WITHOUT_LLD_IS_LD Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. .Pp @@ -911,14 +918,6 @@ Set to use LLVM's LLD as the system link .Pp It is a default setting on arm64/aarch64. -When set, the following options are also in effect: -.Pp -.Bl -inset -compact -.It Va WITHOUT_SYSTEM_COMPILER -(unless -.Va WITH_SYSTEM_COMPILER -is set explicitly) -.El .It Va WITHOUT_LLVM_LIBUNWIND Set to use GCC's stack unwinder (instead of LLVM's libunwind). .Pp @@ -1327,24 +1326,6 @@ The and .Va WITHOUT_GCC options control those. -.Pp -It is a default setting on -arm64/aarch64. -.It Va WITH_SYSTEM_COMPILER -Set to opportunistically skip building a cross-compiler during the -bootstrap phase of the build. -If the currently installed compiler matches the planned bootstrap compiler -type and revision, then it will not be built. -This does not prevent a compiler from being built for installation though, -only for building one for the build itself. -The -.Va WITHOUT_CLANG -and -.Va WITHOUT_GCC -options control those. -.Pp -It is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_TALK Set to not build or install .Xr talk 1 @@ -1421,6 +1402,8 @@ When set, it also enforces the following .It .Va WITHOUT_INCLUDES .It +.Va WITHOUT_LLD +.It .Va WITHOUT_LLDB .El .It Va WITHOUT_UNBOUND From owner-svn-src-all@freebsd.org Thu May 18 17:55:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5253D70690; Thu, 18 May 2017 17:55:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84A64D29; Thu, 18 May 2017 17:55:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IHtXSr050360; Thu, 18 May 2017 17:55:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IHtXKi050359; Thu, 18 May 2017 17:55:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705181755.v4IHtXKi050359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 18 May 2017 17:55:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318474 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:55:34 -0000 Author: emaste Date: Thu May 18 17:55:33 2017 New Revision: 318474 URL: https://svnweb.freebsd.org/changeset/base/318474 Log: makefs: drop WARNS back to 2 GCC warns about additional signed comparision issues compared to Clang. Drop WARNS for now until the underlying issue is fixed. Modified: head/usr.sbin/makefs/Makefile Modified: head/usr.sbin/makefs/Makefile ============================================================================== --- head/usr.sbin/makefs/Makefile Thu May 18 17:44:45 2017 (r318473) +++ head/usr.sbin/makefs/Makefile Thu May 18 17:55:33 2017 (r318474) @@ -14,7 +14,7 @@ SRCS= cd9660.c ffs.c \ walk.c MAN= makefs.8 -WARNS?= 3 +WARNS?= 2 .include "${SRCDIR}/cd9660/Makefile.inc" .include "${SRCDIR}/ffs/Makefile.inc" From owner-svn-src-all@freebsd.org Thu May 18 18:18:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A73C6D70CDA; Thu, 18 May 2017 18:18:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A1341A60; Thu, 18 May 2017 18:18:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IIIdMn058857; Thu, 18 May 2017 18:18:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IIIdL9058855; Thu, 18 May 2017 18:18:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181818.v4IIIdL9058855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 18:18:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318475 - stable/11/release/doc/en_US.ISO8859-1/installation X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 18:18:40 -0000 Author: gjb Date: Thu May 18 18:18:39 2017 New Revision: 318475 URL: https://svnweb.freebsd.org/changeset/base/318475 Log: Add the installation/article.xml for installation.html. This is not yet connected to the build. Sponsored by: The FreeBSD Foundation Added: stable/11/release/doc/en_US.ISO8859-1/installation/ stable/11/release/doc/en_US.ISO8859-1/installation/Makefile (contents, props changed) stable/11/release/doc/en_US.ISO8859-1/installation/article.xml (contents, props changed) Added: stable/11/release/doc/en_US.ISO8859-1/installation/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/release/doc/en_US.ISO8859-1/installation/Makefile Thu May 18 18:18:39 2017 (r318475) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +RELN_ROOT?= ${.CURDIR}/../.. +.ifdef NO_LANGCODE_IN_DESTDIR +DESTDIR?= ${DOCDIR}/installation +.else +DESTDIR?= ${DOCDIR}/en_US.ISO8859-1/installation +.endif + +DOC?= article +FORMATS?= html +INSTALL_COMPRESSED?= gz +INSTALL_ONLY_COMPRESSED?= + +# SGML content +SRCS+= article.xml + +.include "${RELN_ROOT}/share/mk/doc.relnotes.mk" +.include "${DOC_PREFIX}/share/mk/doc.project.mk" Added: stable/11/release/doc/en_US.ISO8859-1/installation/article.xml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/release/doc/en_US.ISO8859-1/installation/article.xml Thu May 18 18:18:39 2017 (r318475) @@ -0,0 +1,129 @@ + + +%release; + +]> + +
    + + + &os; &release.current; Installation + Instructions + + + The &os; Project + + + $FreeBSD$ + + + 2017 + The &os; Documentation + Project + + + + &tm-attrib.freebsd; + &tm-attrib.intel; + &tm-attrib.sparc; + &tm-attrib.general; + + + + This article gives some brief instructions on installing + &os; &release.current; and upgrading the systems running + earlier releases. + + + + + Installing &os; + + The Installing + &os; chapter of the &os; Handbook + provides more in-depth information about the installation + program itself, including a guided walk-through with + screenshots. + + + + Upgrading &os; + + If you are upgrading from a previous release of &os;, please + read upgrading + section in the Release Notes for notable + incompatibilities carefully. + + + Upgrading from Source + + The procedure for doing a source code based update is + described in and + . + + For SVN use the releng/&local.rel; + branch which will be where any upcoming Security Advisories or + Errata Notices will be applied. + + + + Upgrading Using <quote>&os; Update</quote> + + The &man.freebsd-update.8; utility supports binary + upgrades of &arch.i386; and &arch.amd64; systems running + earlier FreeBSD releases. Systems running + 10.3-RELEASE, + 11.0-RELEASE can upgrade as follows: + + &prompt.root; freebsd-update fetch +&prompt.root; freebsd-update install + + Now the &man.freebsd-update.8; utility can fetch bits + belonging to &release.current;. During this process + &man.freebsd-update.8; will ask for help in merging + configuration files. + + &prompt.root; freebsd-update upgrade -r &local.rel;-RELEASE + + &prompt.root; freebsd-update install + + The system must now be rebooted with the newly installed + kernel before the non-kernel components are updated. + + &prompt.root; shutdown -r now + + After rebooting, &man.freebsd-update.8; needs to be run + again to install the new userland components: + + &prompt.root; freebsd-update install + + At this point, users of systems being upgraded from + earlier &os; releases will be prompted by + &man.freebsd-update.8; to rebuild all third-party applications + (e.g., ports installed from the ports tree) due to updates in + system libraries. + + After updating installed third-party applications (and + again, only if &man.freebsd-update.8; printed a message + indicating that this was necessary), run + &man.freebsd-update.8; again so that it can delete the old (no + longer used) system libraries: + + &prompt.root; freebsd-update install + + Finally, reboot into &release.current; + + &prompt.root; shutdown -r now + + +
    From owner-svn-src-all@freebsd.org Thu May 18 18:24:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFC53D70F55; Thu, 18 May 2017 18:24:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 805A01F58; Thu, 18 May 2017 18:24:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IIOBDw062739; Thu, 18 May 2017 18:24:11 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IIOBSN062738; Thu, 18 May 2017 18:24:11 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705181824.v4IIOBSN062738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 18 May 2017 18:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318476 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 18:24:12 -0000 Author: markj Date: Thu May 18 18:24:11 2017 New Revision: 318476 URL: https://svnweb.freebsd.org/changeset/base/318476 Log: Avoid open-coding PRI_UNCHANGED. MFC after: 1 week Modified: head/sys/kern/kern_fail.c Modified: head/sys/kern/kern_fail.c ============================================================================== --- head/sys/kern/kern_fail.c Thu May 18 18:18:39 2017 (r318475) +++ head/sys/kern/kern_fail.c Thu May 18 18:24:11 2017 (r318476) @@ -612,7 +612,7 @@ fail_point_eval_nontrivial(struct fail_p break; case FAIL_POINT_YIELD: - kern_yield(-1); + kern_yield(PRI_UNCHANGED); break; case FAIL_POINT_DELAY: From owner-svn-src-all@freebsd.org Thu May 18 18:35:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1C46D712F8; Thu, 18 May 2017 18:35:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5952F8CD; Thu, 18 May 2017 18:35:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IIZE6a067064; Thu, 18 May 2017 18:35:14 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IIZEbq067062; Thu, 18 May 2017 18:35:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705181835.v4IIZEbq067062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 18 May 2017 18:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318478 - in head/sys: compat/linuxkpi/common/src dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 18:35:15 -0000 Author: markj Date: Thu May 18 18:35:14 2017 New Revision: 318478 URL: https://svnweb.freebsd.org/changeset/base/318478 Log: Fix a few uses of kern_yield() in the TTM and the LinuxKPI. kern_yield(0) effectively causes the calling thread to be rescheduled immediately since it resets the thread's priority to the highest possible value. This can cause livelocks when the pattern "while (!trylock()) kern_yield(0);" is used since the thread holding the lock may linger on the runqueue for the CPU on which the looping thread is running. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c head/sys/dev/drm2/ttm/ttm_bo_vm.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Thu May 18 18:33:33 2017 (r318477) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Thu May 18 18:35:14 2017 (r318478) @@ -435,7 +435,7 @@ linux_cdev_pager_populate(vm_object_t vm err = vmap->vm_ops->fault(vmap, &vmf); while (vmap->vm_pfn_count == 0 && err == VM_FAULT_NOPAGE) { - kern_yield(0); + kern_yield(PRI_USER); err = vmap->vm_ops->fault(vmap, &vmf); } } Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_vm.c Thu May 18 18:33:33 2017 (r318477) +++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Thu May 18 18:35:14 2017 (r318478) @@ -126,7 +126,7 @@ reserve: ret = ttm_bo_reserve(bo, false, false, false, 0); if (unlikely(ret != 0)) { if (ret == -EBUSY) { - kern_yield(0); + kern_yield(PRI_USER); goto reserve; } } @@ -139,7 +139,7 @@ reserve: case -EBUSY: case -ERESTARTSYS: case -EINTR: - kern_yield(0); + kern_yield(PRI_USER); goto reserve; default: retval = VM_PAGER_ERROR; From owner-svn-src-all@freebsd.org Thu May 18 18:37:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A337D715DF; Thu, 18 May 2017 18:37:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEBF5B03; Thu, 18 May 2017 18:37:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IIbJZp067174; Thu, 18 May 2017 18:37:19 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IIbJPt067173; Thu, 18 May 2017 18:37:19 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705181837.v4IIbJPt067173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 18 May 2017 18:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318479 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 18:37:21 -0000 Author: markj Date: Thu May 18 18:37:19 2017 New Revision: 318479 URL: https://svnweb.freebsd.org/changeset/base/318479 Log: Don't bother enqueuing a page immediately before freeing it. No functional change intended. MFC after: 1 week Modified: head/sys/dev/drm2/ttm/ttm_page_alloc.c Modified: head/sys/dev/drm2/ttm/ttm_page_alloc.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_page_alloc.c Thu May 18 18:35:14 2017 (r318478) +++ head/sys/dev/drm2/ttm/ttm_page_alloc.c Thu May 18 18:37:19 2017 (r318479) @@ -136,7 +136,7 @@ ttm_vm_page_free(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("ttm got unmanaged %p", m)); m->flags &= ~PG_FICTITIOUS; m->oflags |= VPO_UNMANAGED; - vm_page_unwire(m, PQ_INACTIVE); + vm_page_unwire(m, PQ_NONE); vm_page_free(m); } From owner-svn-src-all@freebsd.org Thu May 18 18:39:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46F3CD716CA; Thu, 18 May 2017 18:39:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 184EACAC; Thu, 18 May 2017 18:39:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IIdOgR067292; Thu, 18 May 2017 18:39:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IIdOWv067291; Thu, 18 May 2017 18:39:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705181839.v4IIdOWv067291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 18 May 2017 18:39:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318480 - stable/11/sys/boot/efi/loader X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 18:39:25 -0000 Author: markj Date: Thu May 18 18:39:23 2017 New Revision: 318480 URL: https://svnweb.freebsd.org/changeset/base/318480 Log: MFC r318193: Set the right variable when overriding the default console speed. Modified: stable/11/sys/boot/efi/loader/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/efi/loader/main.c ============================================================================== --- stable/11/sys/boot/efi/loader/main.c Thu May 18 18:37:19 2017 (r318479) +++ stable/11/sys/boot/efi/loader/main.c Thu May 18 18:39:23 2017 (r318480) @@ -314,7 +314,7 @@ main(int argc, CHAR16 *argv[]) } else { cpy16to8(&argv[i + 1][0], var, sizeof(var)); - setenv("comconsole_speedspeed", var, 1); + setenv("comconsole_speed", var, 1); } i++; break; From owner-svn-src-all@freebsd.org Thu May 18 18:42:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30685D71979; Thu, 18 May 2017 18:42:56 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03D7D128A; Thu, 18 May 2017 18:42:55 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x230.google.com with SMTP id o12so34405024iod.3; Thu, 18 May 2017 11:42:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=OpcCCWc/cLdJxbsrEMZR7iAuCNjcq596QXkG5b12/qM=; b=Mr/HFHIrKi58Z8z+Ubdr3l0LyhSQBcnTdHdjdR3j4Xh9yIahWGR4OZVVFM39DV0qgT r/IW6q2HcLk0TVw+e6PMT02Yc+lGJ7iyJ8ubinj2Y59BPcpYgN1AUuMxQ7oWR4Zf+n5E +w6AbdpIvS0JhMDqxYiJfps/XbMaSABnFVxdhY8CDBJ2UXJ8N9aGZWoQOR1mY38xBkN9 GCA0Ew/A+LrrKzeFSjQMyhoi8hYGCQHynpdv+T5e91FlTs8RnhOMDBV11W2QxFSGRXTs qcOTEx0sUerdPAoLndMZOZCikb9FFB/V2VVyXAemrVTuGoYXwQ3JPsLxfWf7ZEkJGlOJ 72aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=OpcCCWc/cLdJxbsrEMZR7iAuCNjcq596QXkG5b12/qM=; b=sK2fyQNCETI1Pk/wj+vRZEPBgx59xWr/BRPHu9EDmqY1DiFX5urbAKpbkPxYZa4/70 K9M43Dt573v/nmPUEQy1uQKoDKJta3lcYlgkP/TiLCFlMgzOIuM+V2pj3JDBKv42siDS TVFGkK0FNE8b6/vsK9QJxyeuBvDEWuoPXsYdUpnVzdCzPhWSXEsZqIgH23OtPudlth0V l62jgz24Ll6T/kQM1V1vNrqx9dF/5AWloBm8nQ9JiRM8jxoiBUhzz7BJuxqOAqIYJtjM +6YkRlgci4RKDvVSdawYPI01Spy5fwglBZUou/HqknFx30lc77pchNfJxPLG38ui2KjW xBUA== X-Gm-Message-State: AODbwcBV299dVkyw7FmvRxmCP5vuM+XKzHdrYljKKcLwzNj/RXcPJV0c WDibCS/rxZJapIkRDG66CyTKnzh9Bd3SvcA= X-Received: by 10.107.1.70 with SMTP id 67mr5932569iob.159.1495132975162; Thu, 18 May 2017 11:42:55 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.169.201 with HTTP; Thu, 18 May 2017 11:42:34 -0700 (PDT) In-Reply-To: <201705181755.v4IHtXKi050359@repo.freebsd.org> References: <201705181755.v4IHtXKi050359@repo.freebsd.org> From: Ed Maste Date: Thu, 18 May 2017 14:42:34 -0400 X-Google-Sender-Auth: pBN94yErrIBVw6UVbB4imPimgVc Message-ID: Subject: Re: svn commit: r318474 - head/usr.sbin/makefs To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 18:42:56 -0000 On 18 May 2017 at 13:55, Ed Maste wrote: > Author: emaste > Date: Thu May 18 17:55:33 2017 > New Revision: 318474 > URL: https://svnweb.freebsd.org/changeset/base/318474 > > Log: > makefs: drop WARNS back to 2 > > GCC warns about additional signed comparision issues compared to Clang. > Drop WARNS for now until the underlying issue is fixed. FYI the GCC warning came from the same blksize macro, but from the conditional expression this time. #define blksize(fs, ip, lbn) \ (((lbn) >= UFS_NDADDR || (ip)->i_size >= \ (uint64_t)smalllblktosize(fs, (lbn) + 1)) \ ? (fs)->fs_bsize \ : (fragroundup(fs, blkoff(fs, (ip)->i_size)))) (fs)->fs_bsize is a signed int, while fragroundup is unsigned (from i_size). > > Modified: > head/usr.sbin/makefs/Makefile > > Modified: head/usr.sbin/makefs/Makefile > ============================================================================== > --- head/usr.sbin/makefs/Makefile Thu May 18 17:44:45 2017 (r318473) > +++ head/usr.sbin/makefs/Makefile Thu May 18 17:55:33 2017 (r318474) > @@ -14,7 +14,7 @@ SRCS= cd9660.c ffs.c \ > walk.c > MAN= makefs.8 > > -WARNS?= 3 > +WARNS?= 2 > > .include "${SRCDIR}/cd9660/Makefile.inc" > .include "${SRCDIR}/ffs/Makefile.inc" > From owner-svn-src-all@freebsd.org Thu May 18 19:42:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D56A8D739C9; Thu, 18 May 2017 19:42:20 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2D1013AA; Thu, 18 May 2017 19:42:20 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IJgJbC095409; Thu, 18 May 2017 19:42:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IJgJhJ095408; Thu, 18 May 2017 19:42:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705181942.v4IJgJhJ095408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 19:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318481 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 19:42:20 -0000 Author: trasz Date: Thu May 18 19:42:19 2017 New Revision: 318481 URL: https://svnweb.freebsd.org/changeset/base/318481 Log: Language fixes. Submitted by: wblock MFC after: 2 weeks Modified: head/usr.bin/resizewin/resizewin.1 Modified: head/usr.bin/resizewin/resizewin.1 ============================================================================== --- head/usr.bin/resizewin/resizewin.1 Thu May 18 18:39:23 2017 (r318480) +++ head/usr.bin/resizewin/resizewin.1 Thu May 18 19:42:19 2017 (r318481) @@ -49,7 +49,7 @@ The following options are available: .Bl -tag -width ".Fl z" .It Fl z Do nothing unless the current kernel terminal size is zero. -This is useful when run from user's profile (shell startup) scripts: +This is useful when run from a user's profile (shell startup) scripts: querying the window size is required for serial lines, but not when logging in over the network, as protocols like TELNET or SSH already handle the terminal size by themselves. @@ -72,7 +72,7 @@ commands to set environment variables. .Pp The terminal is assumed to be VT100/ANSI compatible. The VT100/ANSI escape sequences are supported by virtually all modern -terminals; this include xterm, konsole, gnome-terminal, iTerm, +terminals, including xterm, konsole, gnome-terminal, iTerm, Terminal.app, and PuTTY. .Sh SEE ALSO .Xr stty 1 , From owner-svn-src-all@freebsd.org Thu May 18 19:47:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 241EBD73C25; Thu, 18 May 2017 19:47:48 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5C2716AD; Thu, 18 May 2017 19:47:47 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IJlkYL095698; Thu, 18 May 2017 19:47:46 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IJlhAq095668; Thu, 18 May 2017 19:47:43 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201705181947.v4IJlhAq095668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 18 May 2017 19:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318482 - in stable/11: contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/test_utils lib/libarchiv... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 19:47:48 -0000 Author: mm Date: Thu May 18 19:47:43 2017 New Revision: 318482 URL: https://svnweb.freebsd.org/changeset/base/318482 Log: MFC r317782,318181: MFC r317782 (mm): Sync libarchive with vendor Vendor changes (FreeBSD-related): PR 897: add test for ZIP archives with invalid EOCD headers PR 901: fix invalid renaming of sparse files OSS-Fuzz issue 497: remove fallback tree in LZX decoder OSS-Fuzz issue 527: rewrite expressions in lz4 filter OSS-Fuzz issue 577: fix integer overflow in cpio reader OSS-Fuzz issue 862: fix numerc parsing in mtree reader OSS-Fuzz issue 1097: fix undefined shift in rar reader cpio: various optimizations and memory leak fixes MFC r318181 (ngie) (2): cpio/tests/test_option_lz4: fix a use after free in the failure case Reported by: Coverity (2) Sponsored by: Dell EMC Isilon (2) Added: stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c - copied unchanged from r317782, head/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu - copied unchanged from r317782, head/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu Modified: stable/11/contrib/libarchive/cpio/cpio.c stable/11/contrib/libarchive/cpio/test/test_option_Z_upper.c stable/11/contrib/libarchive/cpio/test/test_option_a.c stable/11/contrib/libarchive/cpio/test/test_option_b64encode.c stable/11/contrib/libarchive/cpio/test/test_option_grzip.c stable/11/contrib/libarchive/cpio/test/test_option_lrzip.c stable/11/contrib/libarchive/cpio/test/test_option_lz4.c stable/11/contrib/libarchive/cpio/test/test_option_lzma.c stable/11/contrib/libarchive/cpio/test/test_option_lzop.c stable/11/contrib/libarchive/cpio/test/test_option_uuencode.c stable/11/contrib/libarchive/cpio/test/test_option_xz.c stable/11/contrib/libarchive/cpio/test/test_option_y.c stable/11/contrib/libarchive/cpio/test/test_option_z.c stable/11/contrib/libarchive/libarchive/archive_entry_sparse.c stable/11/contrib/libarchive/libarchive/archive_getdate.c stable/11/contrib/libarchive/libarchive/archive_openssl_hmac_private.h stable/11/contrib/libarchive/libarchive/archive_read.c stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/11/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_cab.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_cpio.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_mtree.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar.c stable/11/contrib/libarchive/libarchive/archive_string.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_pax.c stable/11/contrib/libarchive/libarchive/libarchive_changes.3 stable/11/contrib/libarchive/libarchive/test/test_read_format_mtree.c stable/11/contrib/libarchive/libarchive/test/test_write_format_pax.c stable/11/contrib/libarchive/libarchive/test/test_write_format_zip_compression_store.c stable/11/contrib/libarchive/libarchive/test/test_write_format_zip_large.c stable/11/contrib/libarchive/libarchive/xxhash.c stable/11/contrib/libarchive/test_utils/test_main.c stable/11/lib/libarchive/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libarchive/cpio/cpio.c ============================================================================== --- stable/11/contrib/libarchive/cpio/cpio.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/cpio.c Thu May 18 19:47:43 2017 (r318482) @@ -628,6 +628,7 @@ mode_out(struct cpio *cpio) blocks == 1 ? "block" : "blocks"); } archive_write_free(cpio->archive); + archive_entry_linkresolver_free(cpio->linkresolver); } static const char * @@ -1194,12 +1195,15 @@ mode_pass(struct cpio *cpio, const char struct lafe_line_reader *lr; const char *p; int r; + size_t destdir_len; /* Ensure target dir has a trailing '/' to simplify path surgery. */ - cpio->destdir = malloc(strlen(destdir) + 8); - strcpy(cpio->destdir, destdir); - if (destdir[strlen(destdir) - 1] != '/') - strcat(cpio->destdir, "/"); + destdir_len = strlen(destdir); + cpio->destdir = malloc(destdir_len + 8); + memcpy(cpio->destdir, destdir, destdir_len); + if (destdir_len == 0 || destdir[destdir_len - 1] != '/') + cpio->destdir[destdir_len++] = '/'; + cpio->destdir[destdir_len++] = '\0'; cpio->archive = archive_write_disk_new(); if (cpio->archive == NULL) @@ -1240,6 +1244,7 @@ mode_pass(struct cpio *cpio, const char } archive_write_free(cpio->archive); + free(cpio->pass_destpath); } /* Modified: stable/11/contrib/libarchive/cpio/test/test_option_Z_upper.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_Z_upper.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_Z_upper.c Thu May 18 19:47:43 2017 (r318482) @@ -43,17 +43,18 @@ DEFINE_TEST(test_option_Z_upper) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without compress support"); + free(p); return; } failure("-Z option is broken"); assertEqualInt(r, 0); - goto done; + free(p); + return; } free(p); /* Check that the archive file has a compress signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x1f\x9d", 2); -done: free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_a.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_a.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_a.c Thu May 18 19:47:43 2017 (r318482) @@ -96,7 +96,8 @@ DEFINE_TEST(test_option_a) test_create(); /* Sanity check; verify that atimes really do get modified. */ - assert((p = slurpfile(NULL, "f0")) != NULL); + p = slurpfile(NULL, "f0"); + assert(p != NULL); free(p); assertEqualInt(0, stat("f0", &st)); if (st.st_atime == files[0].atime_sec) { Modified: stable/11/contrib/libarchive/cpio/test/test_option_b64encode.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_b64encode.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_b64encode.c Thu May 18 19:47:43 2017 (r318482) @@ -42,6 +42,7 @@ DEFINE_TEST(test_option_b64encode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin-base64 644", 16); + free(p); /* Archive it with uuencode only. */ assertEqualInt(0, @@ -51,4 +52,5 @@ DEFINE_TEST(test_option_b64encode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin-base64 644", 16); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_grzip.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_grzip.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_grzip.c Thu May 18 19:47:43 2017 (r318482) @@ -44,9 +44,10 @@ DEFINE_TEST(test_option_grzip) systemf("echo f | %s -o --grzip >archive.out 2>archive.err", testprog)); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); /* Check that the archive file has an grzip signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "GRZipII\x00\x02\x04:)", 12); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_lrzip.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_lrzip.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_lrzip.c Thu May 18 19:47:43 2017 (r318482) @@ -44,9 +44,10 @@ DEFINE_TEST(test_option_lrzip) systemf("echo f | %s -o --lrzip >archive.out 2>archive.err", testprog)); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); /* Check that the archive file has an lzma signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "LRZI\x00", 5); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_lz4.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 18 19:47:43 2017 (r318482) @@ -43,6 +43,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without lz4 support"); + free(p); return; } /* POSIX permits different handling of the spawnp @@ -52,6 +53,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Can't launch") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } /* Some systems successfully spawn the new process, @@ -61,6 +63,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Can't write") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } /* On some systems the error won't be detected until closing @@ -68,14 +71,18 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Error closing") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } failure("--lz4 option is broken: %s", p); + free(p); assertEqualInt(r, 0); return; } + free(p); /* Check that the archive file has an lz4 signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x04\x22\x4d\x18", 4); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_lzma.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_lzma.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_lzma.c Thu May 18 19:47:43 2017 (r318482) @@ -43,14 +43,18 @@ DEFINE_TEST(test_option_lzma) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without lzma support"); + free(p); return; } failure("--lzma option is broken"); assertEqualInt(r, 0); + free(p); return; } + free(p); /* Check that the archive file has an lzma signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x5d\00\00", 3); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_lzop.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_lzop.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_lzop.c Thu May 18 19:47:43 2017 (r318482) @@ -39,7 +39,7 @@ DEFINE_TEST(test_option_lzop) r = systemf("echo f | %s -o --lzop >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canLzop()) { skipping("lzop is not supported on this platform"); @@ -53,4 +53,5 @@ DEFINE_TEST(test_option_lzop) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a", 9); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_uuencode.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_uuencode.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_uuencode.c Thu May 18 19:47:43 2017 (r318482) @@ -42,6 +42,7 @@ DEFINE_TEST(test_option_uuencode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin 644", 9); + free(p); /* Archive it with uuencode only. */ assertEqualInt(0, @@ -51,4 +52,5 @@ DEFINE_TEST(test_option_uuencode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin 644", 9); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_xz.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_xz.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_xz.c Thu May 18 19:47:43 2017 (r318482) @@ -44,14 +44,18 @@ DEFINE_TEST(test_option_xz) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without xz support"); + free(p); return; } + free(p); failure("--xz option is broken"); assertEqualInt(r, 0); return; } + free(p); /* Check that the archive file has an xz signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\xFD\x37\x7A\x58\x5A\x00", 6); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_y.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_y.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_y.c Thu May 18 19:47:43 2017 (r318482) @@ -38,7 +38,7 @@ DEFINE_TEST(test_option_y) r = systemf("echo f | %s -oy >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canBzip2()) { skipping("bzip2 is not supported on this platform"); @@ -46,14 +46,12 @@ DEFINE_TEST(test_option_y) } failure("-y option is broken"); assertEqualInt(r, 0); - goto done; + return; } assertTextFileContents("1 block\n", "archive.err"); /* Check that the archive file has a bzip2 signature. */ - free(p); p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "BZh9", 4); -done: free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_z.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_z.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_z.c Thu May 18 19:47:43 2017 (r318482) @@ -38,7 +38,7 @@ DEFINE_TEST(test_option_z) r = systemf("echo f | %s -oz >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canGzip()) { skipping("gzip is not supported on this platform"); @@ -52,4 +52,5 @@ DEFINE_TEST(test_option_z) p = slurpfile(&s, "archive.out"); assert(s > 4); assertEqualMem(p, "\x1f\x8b\x08\x00", 4); + free(p); } Modified: stable/11/contrib/libarchive/libarchive/archive_entry_sparse.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_entry_sparse.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_entry_sparse.c Thu May 18 19:47:43 2017 (r318482) @@ -51,7 +51,7 @@ archive_entry_sparse_clear(struct archiv void archive_entry_sparse_add_entry(struct archive_entry *entry, - int64_t offset, int64_t length) + la_int64_t offset, la_int64_t length) { struct ae_sparse *sp; @@ -135,7 +135,7 @@ archive_entry_sparse_reset(struct archiv int archive_entry_sparse_next(struct archive_entry * entry, - int64_t *offset, int64_t *length) + la_int64_t *offset, la_int64_t *length) { if (entry->sparse_p) { *offset = entry->sparse_p->offset; Modified: stable/11/contrib/libarchive/libarchive/archive_getdate.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_getdate.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_getdate.c Thu May 18 19:47:43 2017 (r318482) @@ -691,7 +691,7 @@ Convert(time_t Month, time_t Day, time_t time_t Hours, time_t Minutes, time_t Seconds, time_t Timezone, enum DSTMODE DSTmode) { - int DaysInMonth[12] = { + signed char DaysInMonth[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; time_t Julian; Modified: stable/11/contrib/libarchive/libarchive/archive_openssl_hmac_private.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_openssl_hmac_private.h Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_openssl_hmac_private.h Thu May 18 19:47:43 2017 (r318482) @@ -28,7 +28,7 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) #include /* malloc, free */ #include /* memset */ static inline HMAC_CTX *HMAC_CTX_new(void) Modified: stable/11/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read.c Thu May 18 19:47:43 2017 (r318482) @@ -881,7 +881,8 @@ archive_read_data(struct archive *_a, vo len = a->read_data_remaining; if (len > s) len = s; - memcpy(dest, a->read_data_block, len); + if (len) + memcpy(dest, a->read_data_block, len); s -= len; a->read_data_block += len; a->read_data_remaining -= len; Modified: stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Thu May 18 19:47:43 2017 (r318482) @@ -916,11 +916,10 @@ setup_sparse(struct archive_read_disk *a return (ARCHIVE_OK); /* Does filesystem support the reporting of hole ? */ - if (*fd < 0) { + if (*fd < 0) path = archive_read_disk_entry_setup_path(a, entry, fd); - if (path == NULL) - return (ARCHIVE_FAILED); - } + else + path = NULL; if (*fd >= 0) { #ifdef _PC_MIN_HOLE_SIZE @@ -931,6 +930,8 @@ setup_sparse(struct archive_read_disk *a if (initial_off != 0) lseek(*fd, 0, SEEK_SET); } else { + if (path == NULL) + return (ARCHIVE_FAILED); #ifdef _PC_MIN_HOLE_SIZE if (pathconf(path, _PC_MIN_HOLE_SIZE) <= 0) return (ARCHIVE_OK); Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c Thu May 18 19:47:43 2017 (r318482) @@ -494,7 +494,7 @@ lz4_filter_read_data_block(struct archiv if (read_buf == NULL) goto truncated_error; compressed_size = archive_le32dec(read_buf); - if ((compressed_size & ~(1 << 31)) > state->flags.block_maximum_size) + if ((compressed_size & 0x7fffffff) > state->flags.block_maximum_size) goto malformed_error; /* A compressed size == 0 means the end of stream blocks. */ if (compressed_size == 0) { @@ -504,8 +504,8 @@ lz4_filter_read_data_block(struct archiv checksum_size = state->flags.block_checksum; /* Check if the block is uncompressed. */ - if (compressed_size & (1 << 31)) { - compressed_size &= ~(1 << 31); + if (compressed_size & 0x80000000U) { + compressed_size &= 0x7fffffff; uncompressed_size = compressed_size; } else uncompressed_size = 0;/* Unknown yet. */ Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_cab.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_format_cab.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_format_cab.c Thu May 18 19:47:43 2017 (r318482) @@ -116,19 +116,11 @@ struct lzx_dec { * coding tree, which is a binary tree. But a use of a large * index table causes L1 cache read miss many times. */ -#define HTBL_BITS 10 int max_bits; - int shift_bits; int tbl_bits; int tree_used; - int tree_avail; /* Direct access table. */ uint16_t *tbl; - /* Binary tree table for extra bits over the direct access. */ - struct htree_t { - uint16_t left; - uint16_t right; - } *tree; } at, lt, mt, pt; int loop; @@ -352,7 +344,6 @@ static int lzx_huffman_init(struct huffm static void lzx_huffman_free(struct huffman *); static int lzx_make_huffman_table(struct huffman *); static inline int lzx_decode_huffman(struct huffman *, unsigned); -static int lzx_decode_huffman_tree(struct huffman *, unsigned, int); int @@ -3127,7 +3118,6 @@ getdata: static int lzx_huffman_init(struct huffman *hf, size_t len_size, int tbl_bits) { - int bits; if (hf->bitlen == NULL || hf->len_size != (int)len_size) { free(hf->bitlen); @@ -3138,21 +3128,11 @@ lzx_huffman_init(struct huffman *hf, siz } else memset(hf->bitlen, 0, len_size * sizeof(hf->bitlen[0])); if (hf->tbl == NULL) { - if (tbl_bits < HTBL_BITS) - bits = tbl_bits; - else - bits = HTBL_BITS; - hf->tbl = malloc(((size_t)1 << bits) * sizeof(hf->tbl[0])); + hf->tbl = malloc(((size_t)1 << tbl_bits) * sizeof(hf->tbl[0])); if (hf->tbl == NULL) return (ARCHIVE_FATAL); hf->tbl_bits = tbl_bits; } - if (hf->tree == NULL && tbl_bits > HTBL_BITS) { - hf->tree_avail = 1 << (tbl_bits - HTBL_BITS + 4); - hf->tree = malloc(hf->tree_avail * sizeof(hf->tree[0])); - if (hf->tree == NULL) - return (ARCHIVE_FATAL); - } return (ARCHIVE_OK); } @@ -3161,7 +3141,6 @@ lzx_huffman_free(struct huffman *hf) { free(hf->bitlen); free(hf->tbl); - free(hf->tree); } /* @@ -3174,7 +3153,7 @@ lzx_make_huffman_table(struct huffman *h const unsigned char *bitlen; int bitptn[17], weight[17]; int i, maxbits = 0, ptn, tbl_size, w; - int diffbits, len_avail; + int len_avail; /* * Initialize bit patterns. @@ -3205,28 +3184,11 @@ lzx_make_huffman_table(struct huffman *h weight[i] >>= ebits; } } - if (maxbits > HTBL_BITS) { - int htbl_max; - uint16_t *p; - - diffbits = maxbits - HTBL_BITS; - for (i = 1; i <= HTBL_BITS; i++) { - bitptn[i] >>= diffbits; - weight[i] >>= diffbits; - } - htbl_max = bitptn[HTBL_BITS] + - weight[HTBL_BITS] * hf->freq[HTBL_BITS]; - p = &(hf->tbl[htbl_max]); - while (p < &hf->tbl[1U<shift_bits = diffbits; /* * Make the table. */ - tbl_size = 1 << HTBL_BITS; + tbl_size = 1 << hf->tbl_bits; tbl = hf->tbl; bitlen = hf->bitlen; len_avail = hf->len_size; @@ -3234,120 +3196,32 @@ lzx_make_huffman_table(struct huffman *h for (i = 0; i < len_avail; i++) { uint16_t *p; int len, cnt; - uint16_t bit; - int extlen; - struct htree_t *ht; if (bitlen[i] == 0) continue; /* Get a bit pattern */ len = bitlen[i]; + if (len > tbl_size) + return (0); ptn = bitptn[len]; cnt = weight[len]; - if (len <= HTBL_BITS) { - /* Calculate next bit pattern */ - if ((bitptn[len] = ptn + cnt) > tbl_size) - return (0);/* Invalid */ - /* Update the table */ - p = &(tbl[ptn]); - while (--cnt >= 0) - p[cnt] = (uint16_t)i; - continue; - } - - /* - * A bit length is too big to be housed to a direct table, - * so we use a tree model for its extra bits. - */ - bitptn[len] = ptn + cnt; - bit = 1U << (diffbits -1); - extlen = len - HTBL_BITS; - - p = &(tbl[ptn >> diffbits]); - if (*p == 0) { - *p = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - if (*p < len_avail || - *p >= (len_avail + hf->tree_used)) - return (0);/* Invalid */ - ht = &(hf->tree[*p - len_avail]); - } - while (--extlen > 0) { - if (ptn & bit) { - if (ht->left < len_avail) { - ht->left = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - ht = &(hf->tree[ht->left - len_avail]); - } - } else { - if (ht->right < len_avail) { - ht->right = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - ht = &(hf->tree[ht->right - len_avail]); - } - } - bit >>= 1; - } - if (ptn & bit) { - if (ht->left != 0) - return (0);/* Invalid */ - ht->left = (uint16_t)i; - } else { - if (ht->right != 0) - return (0);/* Invalid */ - ht->right = (uint16_t)i; - } + /* Calculate next bit pattern */ + if ((bitptn[len] = ptn + cnt) > tbl_size) + return (0);/* Invalid */ + /* Update the table */ + p = &(tbl[ptn]); + while (--cnt >= 0) + p[cnt] = (uint16_t)i; } return (1); } -static int -lzx_decode_huffman_tree(struct huffman *hf, unsigned rbits, int c) -{ - struct htree_t *ht; - int extlen; - - ht = hf->tree; - extlen = hf->shift_bits; - while (c >= hf->len_size) { - c -= hf->len_size; - if (extlen-- <= 0 || c >= hf->tree_used) - return (0); - if (rbits & (1U << extlen)) - c = ht[c].left; - else - c = ht[c].right; - } - return (c); -} - static inline int lzx_decode_huffman(struct huffman *hf, unsigned rbits) { int c; - /* - * At first search an index table for a bit pattern. - * If it fails, search a huffman tree for. - */ - c = hf->tbl[rbits >> hf->shift_bits]; + c = hf->tbl[rbits]; if (c < hf->len_size) return (c); - /* This bit pattern needs to be found out at a huffman tree. */ - return (lzx_decode_huffman_tree(hf, rbits, c)); + return (0); } - Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_cpio.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Thu May 18 19:47:43 2017 (r318482) @@ -165,7 +165,7 @@ __FBSDID("$FreeBSD$"); struct links_entry { struct links_entry *next; struct links_entry *previous; - int links; + unsigned int links; dev_t dev; int64_t ino; char *name; Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Thu May 18 19:47:43 2017 (r318482) @@ -3021,8 +3021,9 @@ heap_add_entry(struct archive_read *a, s ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); + if (heap->allocated) + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); if (heap->files != NULL) free(heap->files); heap->files = new_pending_files; Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_mtree.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Thu May 18 19:47:43 2017 (r318482) @@ -130,9 +130,7 @@ static ssize_t readline(struct archive_r static int skip(struct archive_read *a); static int read_header(struct archive_read *, struct archive_entry *); -static int64_t mtree_atol10(char **); -static int64_t mtree_atol8(char **); -static int64_t mtree_atol(char **); +static int64_t mtree_atol(char **, int base); /* * There's no standard for TIME_T_MAX/TIME_T_MIN. So we compute them @@ -1418,7 +1416,7 @@ parse_device(dev_t *pdev, struct archive "Too many arguments"); return ARCHIVE_WARN; } - numbers[argc++] = (unsigned long)mtree_atol(&p); + numbers[argc++] = (unsigned long)mtree_atol(&p, 0); } if (argc < 2) { archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, @@ -1433,7 +1431,7 @@ parse_device(dev_t *pdev, struct archive } } else { /* file system raw value. */ - result = (dev_t)mtree_atol(&val); + result = (dev_t)mtree_atol(&val, 0); } *pdev = result; return ARCHIVE_OK; @@ -1513,7 +1511,7 @@ parse_keyword(struct archive_read *a, st case 'g': if (strcmp(key, "gid") == 0) { *parsed_kws |= MTREE_HAS_GID; - archive_entry_set_gid(entry, mtree_atol10(&val)); + archive_entry_set_gid(entry, mtree_atol(&val, 10)); break; } if (strcmp(key, "gname") == 0) { @@ -1523,7 +1521,7 @@ parse_keyword(struct archive_read *a, st } case 'i': if (strcmp(key, "inode") == 0) { - archive_entry_set_ino(entry, mtree_atol10(&val)); + archive_entry_set_ino(entry, mtree_atol(&val, 10)); break; } case 'l': @@ -1535,14 +1533,14 @@ parse_keyword(struct archive_read *a, st if (strcmp(key, "md5") == 0 || strcmp(key, "md5digest") == 0) break; if (strcmp(key, "mode") == 0) { - if (val[0] >= '0' && val[0] <= '9') { + if (val[0] >= '0' && val[0] <= '7') { *parsed_kws |= MTREE_HAS_PERM; archive_entry_set_perm(entry, - (mode_t)mtree_atol8(&val)); + (mode_t)mtree_atol(&val, 8)); } else { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, - "Symbolic mode \"%s\" unsupported", val); + "Symbolic or non-octal mode \"%s\" unsupported", val); return ARCHIVE_WARN; } break; @@ -1551,7 +1549,7 @@ parse_keyword(struct archive_read *a, st if (strcmp(key, "nlink") == 0) { *parsed_kws |= MTREE_HAS_NLINK; archive_entry_set_nlink(entry, - (unsigned int)mtree_atol10(&val)); + (unsigned int)mtree_atol(&val, 10)); break; } case 'r': @@ -1582,7 +1580,7 @@ parse_keyword(struct archive_read *a, st strcmp(key, "sha512digest") == 0) break; if (strcmp(key, "size") == 0) { - archive_entry_set_size(entry, mtree_atol10(&val)); + archive_entry_set_size(entry, mtree_atol(&val, 10)); break; } case 't': @@ -1601,13 +1599,13 @@ parse_keyword(struct archive_read *a, st long ns = 0; *parsed_kws |= MTREE_HAS_MTIME; - m = mtree_atol10(&val); + m = mtree_atol(&val, 10); /* Replicate an old mtree bug: * 123456789.1 represents 123456789 * seconds and 1 nanosecond. */ if (*val == '.') { ++val; - ns = (long)mtree_atol10(&val); + ns = (long)mtree_atol(&val, 10); if (ns < 0) ns = 0; else if (ns > 999999999) @@ -1670,7 +1668,7 @@ parse_keyword(struct archive_read *a, st case 'u': if (strcmp(key, "uid") == 0) { *parsed_kws |= MTREE_HAS_UID; - archive_entry_set_uid(entry, mtree_atol10(&val)); + archive_entry_set_uid(entry, mtree_atol(&val, 10)); break; } if (strcmp(key, "uname") == 0) { @@ -1825,77 +1823,9 @@ parse_escapes(char *src, struct mtree_en *dest = '\0'; } -/* - * Note that this implementation does not (and should not!) obey - * locale settings; you cannot simply substitute strtol here, since - * it does obey locale. - */ -static int64_t -mtree_atol8(char **p) -{ - int64_t l, limit, last_digit_limit; - int digit, base; - - base = 8; - limit = INT64_MAX / base; - last_digit_limit = INT64_MAX % base; - - l = 0; - digit = **p - '0'; - while (digit >= 0 && digit < base) { - if (l>limit || (l == limit && digit > last_digit_limit)) { - l = INT64_MAX; /* Truncate on overflow. */ - break; - } - l = (l * base) + digit; - digit = *++(*p) - '0'; - } - return (l); -} - -/* - * Note that this implementation does not (and should not!) obey - * locale settings; you cannot simply substitute strtol here, since - * it does obey locale. - * - * Convert the number pointed to by 'p' into a 64-bit signed integer. - * On return, 'p' points to the first non-digit following the number. - * On overflow, the function returns INT64_MIN or INT64_MAX. - */ -static int64_t -mtree_atol10(char **p) -{ - const int base = 10; - const int64_t limit = INT64_MAX / base; - const int64_t last_digit_limit = INT64_MAX % base; - int64_t l; - int sign; - - if (**p == '-') { - sign = -1; - ++(*p); - } else { - sign = 1; - } - - l = 0; - while (**p >= '0' && **p < '0' + base) { - int digit = **p - '0'; - if (l > limit || (l == limit && digit > last_digit_limit)) { - while (**p >= '0' && **p < '0' + base) { - ++(*p); - } - return (sign < 0) ? INT64_MIN : INT64_MAX; - } - l = (l * base) + digit; - ++(*p); - } - return (sign < 0) ? -l : l; -} - /* Parse a hex digit. */ static int -parsehex(char c) +parsedigit(char c) { if (c >= '0' && c <= '9') return c - '0'; @@ -1913,45 +1843,50 @@ parsehex(char c) * it does obey locale. */ static int64_t -mtree_atol16(char **p) +mtree_atol(char **p, int base) { - int64_t l, limit, last_digit_limit; - int base, digit, sign; + int64_t l, limit; + int digit, last_digit_limit; - base = 16; + if (base == 0) { + if (**p != '0') + base = 10; + else if ((*p)[1] == 'x' || (*p)[1] == 'X') { + *p += 2; + base = 16; + } else { + base = 8; + } + } if (**p == '-') { - sign = -1; - limit = ((uint64_t)(INT64_MAX) + 1) / base; - last_digit_limit = ((uint64_t)(INT64_MAX) + 1) % base; + limit = INT64_MIN / base; + last_digit_limit = INT64_MIN % base; ++(*p); + + l = 0; + digit = parsedigit(**p); + while (digit >= 0 && digit < base) { + if (l < limit || (l == limit && digit > last_digit_limit)) + return INT64_MIN; + l = (l * base) - digit; + digit = parsedigit(*++(*p)); + } + return l; } else { - sign = 1; limit = INT64_MAX / base; last_digit_limit = INT64_MAX % base; - } - l = 0; - digit = parsehex(**p); - while (digit >= 0 && digit < base) { - if (l > limit || (l == limit && digit > last_digit_limit)) - return (sign < 0) ? INT64_MIN : INT64_MAX; - l = (l * base) + digit; - digit = parsehex(*++(*p)); - } - return (sign < 0) ? -l : l; -} - -static int64_t -mtree_atol(char **p) -{ - if (**p != '0') - return mtree_atol10(p); - if ((*p)[1] == 'x' || (*p)[1] == 'X') { - *p += 2; - return mtree_atol16(p); + l = 0; + digit = parsedigit(**p); + while (digit >= 0 && digit < base) { + if (l > limit || (l == limit && digit > last_digit_limit)) + return INT64_MAX; + l = (l * base) + digit; + digit = parsedigit(*++(*p)); + } + return l; } - return mtree_atol8(p); } /* Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar.c Thu May 18 19:47:43 2017 (r318482) @@ -1750,7 +1750,7 @@ read_exttime(const char *p, struct rar * return (-1); for (j = 0; j < count; j++) { - rem = ((*p) << 16) | (rem >> 8); + rem = (((unsigned)(unsigned char)*p) << 16) | (rem >> 8); p++; } tm = localtime(&t); Modified: stable/11/contrib/libarchive/libarchive/archive_string.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_string.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_string.c Thu May 18 19:47:43 2017 (r318482) @@ -202,7 +202,8 @@ archive_string_append(struct archive_str { if (archive_string_ensure(as, as->length + s + 1) == NULL) return (NULL); - memmove(as->s + as->length, p, s); + if (s) + memmove(as->s + as->length, p, s); as->length += s; as->s[as->length] = 0; return (as); Modified: stable/11/contrib/libarchive/libarchive/archive_write_set_format_pax.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_write_set_format_pax.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_write_set_format_pax.c Thu May 18 19:47:43 2017 (r318482) @@ -1196,8 +1196,12 @@ archive_write_pax_header(struct archive_ "GNU.sparse.major", 1); add_pax_attr_int(&(pax->pax_header), "GNU.sparse.minor", 0); + /* + * Make sure to store the original path, since + * truncation to ustar limit happened already. + */ add_pax_attr(&(pax->pax_header), - "GNU.sparse.name", entry_name.s); + "GNU.sparse.name", path); add_pax_attr_int(&(pax->pax_header), "GNU.sparse.realsize", archive_entry_size(entry_main)); @@ -1650,13 +1654,14 @@ build_pax_attribute_name(char *dest, con * GNU PAX Format 1.0 requires the special name, which pattern is: * /GNUSparseFile./ * + * Since reproducable archives are more important, use 0 as pid. + * * This function is used for only Sparse file, a file type of which * is regular file. */ static char * build_gnu_sparse_name(char *dest, const char *src) { - char buff[64]; const char *p; /* Handle the null filename case. */ @@ -1682,15 +1687,9 @@ build_gnu_sparse_name(char *dest, const break; } -#if HAVE_GETPID && 0 /* Disable this as pax attribute name. */ - sprintf(buff, "GNUSparseFile.%d", getpid()); -#else - /* If the platform can't fetch the pid, don't include it. */ - strcpy(buff, "GNUSparseFile"); -#endif /* General case: build a ustar-compatible name adding * "/GNUSparseFile/". */ - build_ustar_entry_name(dest, src, p - src, buff); + build_ustar_entry_name(dest, src, p - src, "GNUSparseFile.0"); return (dest); } Modified: stable/11/contrib/libarchive/libarchive/libarchive_changes.3 ============================================================================== --- stable/11/contrib/libarchive/libarchive/libarchive_changes.3 Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/libarchive_changes.3 Thu May 18 19:47:43 2017 (r318482) @@ -28,6 +28,7 @@ .Dt LIBARCHIVE_CHANGES 3 .Os .Sh NAME +.Nm libarchive_changes .Nd changes in libarchive interface .\" .Sh CHANGES IN LIBARCHIVE 3 Modified: stable/11/contrib/libarchive/libarchive/test/test_read_format_mtree.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/test/test_read_format_mtree.c Thu May 18 19:42:19 2017 (r318481) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu May 18 19:50:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28CEBD73CDC; Thu, 18 May 2017 19:50:20 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA71C1831; Thu, 18 May 2017 19:50:19 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IJoIto095879; Thu, 18 May 2017 19:50:18 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IJoFqk095849; Thu, 18 May 2017 19:50:15 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201705181950.v4IJoFqk095849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 18 May 2017 19:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318483 - in stable/10: contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/test_utils lib/libarchiv... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 19:50:20 -0000 Author: mm Date: Thu May 18 19:50:15 2017 New Revision: 318483 URL: https://svnweb.freebsd.org/changeset/base/318483 Log: MFC r317782,318181: MFC r317782 (mm): Sync libarchive with vendor Vendor changes (FreeBSD-related): PR 897: add test for ZIP archives with invalid EOCD headers PR 901: fix invalid renaming of sparse files OSS-Fuzz issue 497: remove fallback tree in LZX decoder OSS-Fuzz issue 527: rewrite expressions in lz4 filter OSS-Fuzz issue 577: fix integer overflow in cpio reader OSS-Fuzz issue 862: fix numerc parsing in mtree reader OSS-Fuzz issue 1097: fix undefined shift in rar reader cpio: various optimizations and memory leak fixes MFC r318181 (ngie) (2): cpio/tests/test_option_lz4: fix a use after free in the failure case Reported by: Coverity (2) Sponsored by: Dell EMC Isilon (2) Added: stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c - copied unchanged from r317782, head/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu - copied unchanged from r317782, head/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu Modified: stable/10/contrib/libarchive/cpio/cpio.c stable/10/contrib/libarchive/cpio/test/test_option_Z_upper.c stable/10/contrib/libarchive/cpio/test/test_option_a.c stable/10/contrib/libarchive/cpio/test/test_option_b64encode.c stable/10/contrib/libarchive/cpio/test/test_option_grzip.c stable/10/contrib/libarchive/cpio/test/test_option_lrzip.c stable/10/contrib/libarchive/cpio/test/test_option_lz4.c stable/10/contrib/libarchive/cpio/test/test_option_lzma.c stable/10/contrib/libarchive/cpio/test/test_option_lzop.c stable/10/contrib/libarchive/cpio/test/test_option_uuencode.c stable/10/contrib/libarchive/cpio/test/test_option_xz.c stable/10/contrib/libarchive/cpio/test/test_option_y.c stable/10/contrib/libarchive/cpio/test/test_option_z.c stable/10/contrib/libarchive/libarchive/archive_entry_sparse.c stable/10/contrib/libarchive/libarchive/archive_getdate.c stable/10/contrib/libarchive/libarchive/archive_openssl_hmac_private.h stable/10/contrib/libarchive/libarchive/archive_read.c stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/10/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_cab.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_mtree.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_rar.c stable/10/contrib/libarchive/libarchive/archive_string.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_pax.c stable/10/contrib/libarchive/libarchive/libarchive_changes.3 stable/10/contrib/libarchive/libarchive/test/test_read_format_mtree.c stable/10/contrib/libarchive/libarchive/test/test_write_format_pax.c stable/10/contrib/libarchive/libarchive/test/test_write_format_zip_compression_store.c stable/10/contrib/libarchive/libarchive/test/test_write_format_zip_large.c stable/10/contrib/libarchive/libarchive/xxhash.c stable/10/contrib/libarchive/test_utils/test_main.c stable/10/lib/libarchive/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/cpio/cpio.c ============================================================================== --- stable/10/contrib/libarchive/cpio/cpio.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/cpio.c Thu May 18 19:50:15 2017 (r318483) @@ -628,6 +628,7 @@ mode_out(struct cpio *cpio) blocks == 1 ? "block" : "blocks"); } archive_write_free(cpio->archive); + archive_entry_linkresolver_free(cpio->linkresolver); } static const char * @@ -1194,12 +1195,15 @@ mode_pass(struct cpio *cpio, const char struct lafe_line_reader *lr; const char *p; int r; + size_t destdir_len; /* Ensure target dir has a trailing '/' to simplify path surgery. */ - cpio->destdir = malloc(strlen(destdir) + 8); - strcpy(cpio->destdir, destdir); - if (destdir[strlen(destdir) - 1] != '/') - strcat(cpio->destdir, "/"); + destdir_len = strlen(destdir); + cpio->destdir = malloc(destdir_len + 8); + memcpy(cpio->destdir, destdir, destdir_len); + if (destdir_len == 0 || destdir[destdir_len - 1] != '/') + cpio->destdir[destdir_len++] = '/'; + cpio->destdir[destdir_len++] = '\0'; cpio->archive = archive_write_disk_new(); if (cpio->archive == NULL) @@ -1240,6 +1244,7 @@ mode_pass(struct cpio *cpio, const char } archive_write_free(cpio->archive); + free(cpio->pass_destpath); } /* Modified: stable/10/contrib/libarchive/cpio/test/test_option_Z_upper.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_Z_upper.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_Z_upper.c Thu May 18 19:50:15 2017 (r318483) @@ -43,17 +43,18 @@ DEFINE_TEST(test_option_Z_upper) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without compress support"); + free(p); return; } failure("-Z option is broken"); assertEqualInt(r, 0); - goto done; + free(p); + return; } free(p); /* Check that the archive file has a compress signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x1f\x9d", 2); -done: free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_a.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_a.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_a.c Thu May 18 19:50:15 2017 (r318483) @@ -96,7 +96,8 @@ DEFINE_TEST(test_option_a) test_create(); /* Sanity check; verify that atimes really do get modified. */ - assert((p = slurpfile(NULL, "f0")) != NULL); + p = slurpfile(NULL, "f0"); + assert(p != NULL); free(p); assertEqualInt(0, stat("f0", &st)); if (st.st_atime == files[0].atime_sec) { Modified: stable/10/contrib/libarchive/cpio/test/test_option_b64encode.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_b64encode.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_b64encode.c Thu May 18 19:50:15 2017 (r318483) @@ -42,6 +42,7 @@ DEFINE_TEST(test_option_b64encode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin-base64 644", 16); + free(p); /* Archive it with uuencode only. */ assertEqualInt(0, @@ -51,4 +52,5 @@ DEFINE_TEST(test_option_b64encode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin-base64 644", 16); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_grzip.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_grzip.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_grzip.c Thu May 18 19:50:15 2017 (r318483) @@ -44,9 +44,10 @@ DEFINE_TEST(test_option_grzip) systemf("echo f | %s -o --grzip >archive.out 2>archive.err", testprog)); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); /* Check that the archive file has an grzip signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "GRZipII\x00\x02\x04:)", 12); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_lrzip.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_lrzip.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_lrzip.c Thu May 18 19:50:15 2017 (r318483) @@ -44,9 +44,10 @@ DEFINE_TEST(test_option_lrzip) systemf("echo f | %s -o --lrzip >archive.out 2>archive.err", testprog)); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); /* Check that the archive file has an lzma signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "LRZI\x00", 5); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_lz4.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 18 19:50:15 2017 (r318483) @@ -43,6 +43,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without lz4 support"); + free(p); return; } /* POSIX permits different handling of the spawnp @@ -52,6 +53,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Can't launch") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } /* Some systems successfully spawn the new process, @@ -61,6 +63,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Can't write") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } /* On some systems the error won't be detected until closing @@ -68,14 +71,18 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Error closing") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } failure("--lz4 option is broken: %s", p); + free(p); assertEqualInt(r, 0); return; } + free(p); /* Check that the archive file has an lz4 signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x04\x22\x4d\x18", 4); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_lzma.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_lzma.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_lzma.c Thu May 18 19:50:15 2017 (r318483) @@ -43,14 +43,18 @@ DEFINE_TEST(test_option_lzma) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without lzma support"); + free(p); return; } failure("--lzma option is broken"); assertEqualInt(r, 0); + free(p); return; } + free(p); /* Check that the archive file has an lzma signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x5d\00\00", 3); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_lzop.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_lzop.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_lzop.c Thu May 18 19:50:15 2017 (r318483) @@ -39,7 +39,7 @@ DEFINE_TEST(test_option_lzop) r = systemf("echo f | %s -o --lzop >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canLzop()) { skipping("lzop is not supported on this platform"); @@ -53,4 +53,5 @@ DEFINE_TEST(test_option_lzop) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a", 9); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_uuencode.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_uuencode.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_uuencode.c Thu May 18 19:50:15 2017 (r318483) @@ -42,6 +42,7 @@ DEFINE_TEST(test_option_uuencode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin 644", 9); + free(p); /* Archive it with uuencode only. */ assertEqualInt(0, @@ -51,4 +52,5 @@ DEFINE_TEST(test_option_uuencode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin 644", 9); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_xz.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_xz.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_xz.c Thu May 18 19:50:15 2017 (r318483) @@ -44,14 +44,18 @@ DEFINE_TEST(test_option_xz) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without xz support"); + free(p); return; } + free(p); failure("--xz option is broken"); assertEqualInt(r, 0); return; } + free(p); /* Check that the archive file has an xz signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\xFD\x37\x7A\x58\x5A\x00", 6); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_y.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_y.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_y.c Thu May 18 19:50:15 2017 (r318483) @@ -38,7 +38,7 @@ DEFINE_TEST(test_option_y) r = systemf("echo f | %s -oy >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canBzip2()) { skipping("bzip2 is not supported on this platform"); @@ -46,14 +46,12 @@ DEFINE_TEST(test_option_y) } failure("-y option is broken"); assertEqualInt(r, 0); - goto done; + return; } assertTextFileContents("1 block\n", "archive.err"); /* Check that the archive file has a bzip2 signature. */ - free(p); p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "BZh9", 4); -done: free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_z.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_z.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_z.c Thu May 18 19:50:15 2017 (r318483) @@ -38,7 +38,7 @@ DEFINE_TEST(test_option_z) r = systemf("echo f | %s -oz >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canGzip()) { skipping("gzip is not supported on this platform"); @@ -52,4 +52,5 @@ DEFINE_TEST(test_option_z) p = slurpfile(&s, "archive.out"); assert(s > 4); assertEqualMem(p, "\x1f\x8b\x08\x00", 4); + free(p); } Modified: stable/10/contrib/libarchive/libarchive/archive_entry_sparse.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_entry_sparse.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_entry_sparse.c Thu May 18 19:50:15 2017 (r318483) @@ -51,7 +51,7 @@ archive_entry_sparse_clear(struct archiv void archive_entry_sparse_add_entry(struct archive_entry *entry, - int64_t offset, int64_t length) + la_int64_t offset, la_int64_t length) { struct ae_sparse *sp; @@ -135,7 +135,7 @@ archive_entry_sparse_reset(struct archiv int archive_entry_sparse_next(struct archive_entry * entry, - int64_t *offset, int64_t *length) + la_int64_t *offset, la_int64_t *length) { if (entry->sparse_p) { *offset = entry->sparse_p->offset; Modified: stable/10/contrib/libarchive/libarchive/archive_getdate.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_getdate.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_getdate.c Thu May 18 19:50:15 2017 (r318483) @@ -691,7 +691,7 @@ Convert(time_t Month, time_t Day, time_t time_t Hours, time_t Minutes, time_t Seconds, time_t Timezone, enum DSTMODE DSTmode) { - int DaysInMonth[12] = { + signed char DaysInMonth[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; time_t Julian; Modified: stable/10/contrib/libarchive/libarchive/archive_openssl_hmac_private.h ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_openssl_hmac_private.h Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_openssl_hmac_private.h Thu May 18 19:50:15 2017 (r318483) @@ -28,7 +28,7 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) #include /* malloc, free */ #include /* memset */ static inline HMAC_CTX *HMAC_CTX_new(void) Modified: stable/10/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read.c Thu May 18 19:50:15 2017 (r318483) @@ -881,7 +881,8 @@ archive_read_data(struct archive *_a, vo len = a->read_data_remaining; if (len > s) len = s; - memcpy(dest, a->read_data_block, len); + if (len) + memcpy(dest, a->read_data_block, len); s -= len; a->read_data_block += len; a->read_data_remaining -= len; Modified: stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Thu May 18 19:50:15 2017 (r318483) @@ -916,11 +916,10 @@ setup_sparse(struct archive_read_disk *a return (ARCHIVE_OK); /* Does filesystem support the reporting of hole ? */ - if (*fd < 0) { + if (*fd < 0) path = archive_read_disk_entry_setup_path(a, entry, fd); - if (path == NULL) - return (ARCHIVE_FAILED); - } + else + path = NULL; if (*fd >= 0) { #ifdef _PC_MIN_HOLE_SIZE @@ -931,6 +930,8 @@ setup_sparse(struct archive_read_disk *a if (initial_off != 0) lseek(*fd, 0, SEEK_SET); } else { + if (path == NULL) + return (ARCHIVE_FAILED); #ifdef _PC_MIN_HOLE_SIZE if (pathconf(path, _PC_MIN_HOLE_SIZE) <= 0) return (ARCHIVE_OK); Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c Thu May 18 19:50:15 2017 (r318483) @@ -494,7 +494,7 @@ lz4_filter_read_data_block(struct archiv if (read_buf == NULL) goto truncated_error; compressed_size = archive_le32dec(read_buf); - if ((compressed_size & ~(1 << 31)) > state->flags.block_maximum_size) + if ((compressed_size & 0x7fffffff) > state->flags.block_maximum_size) goto malformed_error; /* A compressed size == 0 means the end of stream blocks. */ if (compressed_size == 0) { @@ -504,8 +504,8 @@ lz4_filter_read_data_block(struct archiv checksum_size = state->flags.block_checksum; /* Check if the block is uncompressed. */ - if (compressed_size & (1 << 31)) { - compressed_size &= ~(1 << 31); + if (compressed_size & 0x80000000U) { + compressed_size &= 0x7fffffff; uncompressed_size = compressed_size; } else uncompressed_size = 0;/* Unknown yet. */ Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_cab.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_cab.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_cab.c Thu May 18 19:50:15 2017 (r318483) @@ -116,19 +116,11 @@ struct lzx_dec { * coding tree, which is a binary tree. But a use of a large * index table causes L1 cache read miss many times. */ -#define HTBL_BITS 10 int max_bits; - int shift_bits; int tbl_bits; int tree_used; - int tree_avail; /* Direct access table. */ uint16_t *tbl; - /* Binary tree table for extra bits over the direct access. */ - struct htree_t { - uint16_t left; - uint16_t right; - } *tree; } at, lt, mt, pt; int loop; @@ -352,7 +344,6 @@ static int lzx_huffman_init(struct huffm static void lzx_huffman_free(struct huffman *); static int lzx_make_huffman_table(struct huffman *); static inline int lzx_decode_huffman(struct huffman *, unsigned); -static int lzx_decode_huffman_tree(struct huffman *, unsigned, int); int @@ -3127,7 +3118,6 @@ getdata: static int lzx_huffman_init(struct huffman *hf, size_t len_size, int tbl_bits) { - int bits; if (hf->bitlen == NULL || hf->len_size != (int)len_size) { free(hf->bitlen); @@ -3138,21 +3128,11 @@ lzx_huffman_init(struct huffman *hf, siz } else memset(hf->bitlen, 0, len_size * sizeof(hf->bitlen[0])); if (hf->tbl == NULL) { - if (tbl_bits < HTBL_BITS) - bits = tbl_bits; - else - bits = HTBL_BITS; - hf->tbl = malloc(((size_t)1 << bits) * sizeof(hf->tbl[0])); + hf->tbl = malloc(((size_t)1 << tbl_bits) * sizeof(hf->tbl[0])); if (hf->tbl == NULL) return (ARCHIVE_FATAL); hf->tbl_bits = tbl_bits; } - if (hf->tree == NULL && tbl_bits > HTBL_BITS) { - hf->tree_avail = 1 << (tbl_bits - HTBL_BITS + 4); - hf->tree = malloc(hf->tree_avail * sizeof(hf->tree[0])); - if (hf->tree == NULL) - return (ARCHIVE_FATAL); - } return (ARCHIVE_OK); } @@ -3161,7 +3141,6 @@ lzx_huffman_free(struct huffman *hf) { free(hf->bitlen); free(hf->tbl); - free(hf->tree); } /* @@ -3174,7 +3153,7 @@ lzx_make_huffman_table(struct huffman *h const unsigned char *bitlen; int bitptn[17], weight[17]; int i, maxbits = 0, ptn, tbl_size, w; - int diffbits, len_avail; + int len_avail; /* * Initialize bit patterns. @@ -3205,28 +3184,11 @@ lzx_make_huffman_table(struct huffman *h weight[i] >>= ebits; } } - if (maxbits > HTBL_BITS) { - int htbl_max; - uint16_t *p; - - diffbits = maxbits - HTBL_BITS; - for (i = 1; i <= HTBL_BITS; i++) { - bitptn[i] >>= diffbits; - weight[i] >>= diffbits; - } - htbl_max = bitptn[HTBL_BITS] + - weight[HTBL_BITS] * hf->freq[HTBL_BITS]; - p = &(hf->tbl[htbl_max]); - while (p < &hf->tbl[1U<shift_bits = diffbits; /* * Make the table. */ - tbl_size = 1 << HTBL_BITS; + tbl_size = 1 << hf->tbl_bits; tbl = hf->tbl; bitlen = hf->bitlen; len_avail = hf->len_size; @@ -3234,120 +3196,32 @@ lzx_make_huffman_table(struct huffman *h for (i = 0; i < len_avail; i++) { uint16_t *p; int len, cnt; - uint16_t bit; - int extlen; - struct htree_t *ht; if (bitlen[i] == 0) continue; /* Get a bit pattern */ len = bitlen[i]; + if (len > tbl_size) + return (0); ptn = bitptn[len]; cnt = weight[len]; - if (len <= HTBL_BITS) { - /* Calculate next bit pattern */ - if ((bitptn[len] = ptn + cnt) > tbl_size) - return (0);/* Invalid */ - /* Update the table */ - p = &(tbl[ptn]); - while (--cnt >= 0) - p[cnt] = (uint16_t)i; - continue; - } - - /* - * A bit length is too big to be housed to a direct table, - * so we use a tree model for its extra bits. - */ - bitptn[len] = ptn + cnt; - bit = 1U << (diffbits -1); - extlen = len - HTBL_BITS; - - p = &(tbl[ptn >> diffbits]); - if (*p == 0) { - *p = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - if (*p < len_avail || - *p >= (len_avail + hf->tree_used)) - return (0);/* Invalid */ - ht = &(hf->tree[*p - len_avail]); - } - while (--extlen > 0) { - if (ptn & bit) { - if (ht->left < len_avail) { - ht->left = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - ht = &(hf->tree[ht->left - len_avail]); - } - } else { - if (ht->right < len_avail) { - ht->right = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - ht = &(hf->tree[ht->right - len_avail]); - } - } - bit >>= 1; - } - if (ptn & bit) { - if (ht->left != 0) - return (0);/* Invalid */ - ht->left = (uint16_t)i; - } else { - if (ht->right != 0) - return (0);/* Invalid */ - ht->right = (uint16_t)i; - } + /* Calculate next bit pattern */ + if ((bitptn[len] = ptn + cnt) > tbl_size) + return (0);/* Invalid */ + /* Update the table */ + p = &(tbl[ptn]); + while (--cnt >= 0) + p[cnt] = (uint16_t)i; } return (1); } -static int -lzx_decode_huffman_tree(struct huffman *hf, unsigned rbits, int c) -{ - struct htree_t *ht; - int extlen; - - ht = hf->tree; - extlen = hf->shift_bits; - while (c >= hf->len_size) { - c -= hf->len_size; - if (extlen-- <= 0 || c >= hf->tree_used) - return (0); - if (rbits & (1U << extlen)) - c = ht[c].left; - else - c = ht[c].right; - } - return (c); -} - static inline int lzx_decode_huffman(struct huffman *hf, unsigned rbits) { int c; - /* - * At first search an index table for a bit pattern. - * If it fails, search a huffman tree for. - */ - c = hf->tbl[rbits >> hf->shift_bits]; + c = hf->tbl[rbits]; if (c < hf->len_size) return (c); - /* This bit pattern needs to be found out at a huffman tree. */ - return (lzx_decode_huffman_tree(hf, rbits, c)); + return (0); } - Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Thu May 18 19:50:15 2017 (r318483) @@ -165,7 +165,7 @@ __FBSDID("$FreeBSD$"); struct links_entry { struct links_entry *next; struct links_entry *previous; - int links; + unsigned int links; dev_t dev; int64_t ino; char *name; Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Thu May 18 19:50:15 2017 (r318483) @@ -3021,8 +3021,9 @@ heap_add_entry(struct archive_read *a, s ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); + if (heap->allocated) + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); if (heap->files != NULL) free(heap->files); heap->files = new_pending_files; Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_mtree.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Thu May 18 19:50:15 2017 (r318483) @@ -130,9 +130,7 @@ static ssize_t readline(struct archive_r static int skip(struct archive_read *a); static int read_header(struct archive_read *, struct archive_entry *); -static int64_t mtree_atol10(char **); -static int64_t mtree_atol8(char **); -static int64_t mtree_atol(char **); +static int64_t mtree_atol(char **, int base); /* * There's no standard for TIME_T_MAX/TIME_T_MIN. So we compute them @@ -1418,7 +1416,7 @@ parse_device(dev_t *pdev, struct archive "Too many arguments"); return ARCHIVE_WARN; } - numbers[argc++] = (unsigned long)mtree_atol(&p); + numbers[argc++] = (unsigned long)mtree_atol(&p, 0); } if (argc < 2) { archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, @@ -1433,7 +1431,7 @@ parse_device(dev_t *pdev, struct archive } } else { /* file system raw value. */ - result = (dev_t)mtree_atol(&val); + result = (dev_t)mtree_atol(&val, 0); } *pdev = result; return ARCHIVE_OK; @@ -1513,7 +1511,7 @@ parse_keyword(struct archive_read *a, st case 'g': if (strcmp(key, "gid") == 0) { *parsed_kws |= MTREE_HAS_GID; - archive_entry_set_gid(entry, mtree_atol10(&val)); + archive_entry_set_gid(entry, mtree_atol(&val, 10)); break; } if (strcmp(key, "gname") == 0) { @@ -1523,7 +1521,7 @@ parse_keyword(struct archive_read *a, st } case 'i': if (strcmp(key, "inode") == 0) { - archive_entry_set_ino(entry, mtree_atol10(&val)); + archive_entry_set_ino(entry, mtree_atol(&val, 10)); break; } case 'l': @@ -1535,14 +1533,14 @@ parse_keyword(struct archive_read *a, st if (strcmp(key, "md5") == 0 || strcmp(key, "md5digest") == 0) break; if (strcmp(key, "mode") == 0) { - if (val[0] >= '0' && val[0] <= '9') { + if (val[0] >= '0' && val[0] <= '7') { *parsed_kws |= MTREE_HAS_PERM; archive_entry_set_perm(entry, - (mode_t)mtree_atol8(&val)); + (mode_t)mtree_atol(&val, 8)); } else { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, - "Symbolic mode \"%s\" unsupported", val); + "Symbolic or non-octal mode \"%s\" unsupported", val); return ARCHIVE_WARN; } break; @@ -1551,7 +1549,7 @@ parse_keyword(struct archive_read *a, st if (strcmp(key, "nlink") == 0) { *parsed_kws |= MTREE_HAS_NLINK; archive_entry_set_nlink(entry, - (unsigned int)mtree_atol10(&val)); + (unsigned int)mtree_atol(&val, 10)); break; } case 'r': @@ -1582,7 +1580,7 @@ parse_keyword(struct archive_read *a, st strcmp(key, "sha512digest") == 0) break; if (strcmp(key, "size") == 0) { - archive_entry_set_size(entry, mtree_atol10(&val)); + archive_entry_set_size(entry, mtree_atol(&val, 10)); break; } case 't': @@ -1601,13 +1599,13 @@ parse_keyword(struct archive_read *a, st long ns = 0; *parsed_kws |= MTREE_HAS_MTIME; - m = mtree_atol10(&val); + m = mtree_atol(&val, 10); /* Replicate an old mtree bug: * 123456789.1 represents 123456789 * seconds and 1 nanosecond. */ if (*val == '.') { ++val; - ns = (long)mtree_atol10(&val); + ns = (long)mtree_atol(&val, 10); if (ns < 0) ns = 0; else if (ns > 999999999) @@ -1670,7 +1668,7 @@ parse_keyword(struct archive_read *a, st case 'u': if (strcmp(key, "uid") == 0) { *parsed_kws |= MTREE_HAS_UID; - archive_entry_set_uid(entry, mtree_atol10(&val)); + archive_entry_set_uid(entry, mtree_atol(&val, 10)); break; } if (strcmp(key, "uname") == 0) { @@ -1825,77 +1823,9 @@ parse_escapes(char *src, struct mtree_en *dest = '\0'; } -/* - * Note that this implementation does not (and should not!) obey - * locale settings; you cannot simply substitute strtol here, since - * it does obey locale. - */ -static int64_t -mtree_atol8(char **p) -{ - int64_t l, limit, last_digit_limit; - int digit, base; - - base = 8; - limit = INT64_MAX / base; - last_digit_limit = INT64_MAX % base; - - l = 0; - digit = **p - '0'; - while (digit >= 0 && digit < base) { - if (l>limit || (l == limit && digit > last_digit_limit)) { - l = INT64_MAX; /* Truncate on overflow. */ - break; - } - l = (l * base) + digit; - digit = *++(*p) - '0'; - } - return (l); -} - -/* - * Note that this implementation does not (and should not!) obey - * locale settings; you cannot simply substitute strtol here, since - * it does obey locale. - * - * Convert the number pointed to by 'p' into a 64-bit signed integer. - * On return, 'p' points to the first non-digit following the number. - * On overflow, the function returns INT64_MIN or INT64_MAX. - */ -static int64_t -mtree_atol10(char **p) -{ - const int base = 10; - const int64_t limit = INT64_MAX / base; - const int64_t last_digit_limit = INT64_MAX % base; - int64_t l; - int sign; - - if (**p == '-') { - sign = -1; - ++(*p); - } else { - sign = 1; - } - - l = 0; - while (**p >= '0' && **p < '0' + base) { - int digit = **p - '0'; - if (l > limit || (l == limit && digit > last_digit_limit)) { - while (**p >= '0' && **p < '0' + base) { - ++(*p); - } - return (sign < 0) ? INT64_MIN : INT64_MAX; - } - l = (l * base) + digit; - ++(*p); - } - return (sign < 0) ? -l : l; -} - /* Parse a hex digit. */ static int -parsehex(char c) +parsedigit(char c) { if (c >= '0' && c <= '9') return c - '0'; @@ -1913,45 +1843,50 @@ parsehex(char c) * it does obey locale. */ static int64_t -mtree_atol16(char **p) +mtree_atol(char **p, int base) { - int64_t l, limit, last_digit_limit; - int base, digit, sign; + int64_t l, limit; + int digit, last_digit_limit; - base = 16; + if (base == 0) { + if (**p != '0') + base = 10; + else if ((*p)[1] == 'x' || (*p)[1] == 'X') { + *p += 2; + base = 16; + } else { + base = 8; + } + } if (**p == '-') { - sign = -1; - limit = ((uint64_t)(INT64_MAX) + 1) / base; - last_digit_limit = ((uint64_t)(INT64_MAX) + 1) % base; + limit = INT64_MIN / base; + last_digit_limit = INT64_MIN % base; ++(*p); + + l = 0; + digit = parsedigit(**p); + while (digit >= 0 && digit < base) { + if (l < limit || (l == limit && digit > last_digit_limit)) + return INT64_MIN; + l = (l * base) - digit; + digit = parsedigit(*++(*p)); + } + return l; } else { - sign = 1; limit = INT64_MAX / base; last_digit_limit = INT64_MAX % base; - } - l = 0; - digit = parsehex(**p); - while (digit >= 0 && digit < base) { - if (l > limit || (l == limit && digit > last_digit_limit)) - return (sign < 0) ? INT64_MIN : INT64_MAX; - l = (l * base) + digit; - digit = parsehex(*++(*p)); - } - return (sign < 0) ? -l : l; -} - -static int64_t -mtree_atol(char **p) -{ - if (**p != '0') - return mtree_atol10(p); - if ((*p)[1] == 'x' || (*p)[1] == 'X') { - *p += 2; - return mtree_atol16(p); + l = 0; + digit = parsedigit(**p); + while (digit >= 0 && digit < base) { + if (l > limit || (l == limit && digit > last_digit_limit)) + return INT64_MAX; + l = (l * base) + digit; + digit = parsedigit(*++(*p)); + } + return l; } - return mtree_atol8(p); } /* Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_rar.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_rar.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_rar.c Thu May 18 19:50:15 2017 (r318483) @@ -1750,7 +1750,7 @@ read_exttime(const char *p, struct rar * return (-1); for (j = 0; j < count; j++) { - rem = ((*p) << 16) | (rem >> 8); + rem = (((unsigned)(unsigned char)*p) << 16) | (rem >> 8); p++; } tm = localtime(&t); Modified: stable/10/contrib/libarchive/libarchive/archive_string.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_string.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_string.c Thu May 18 19:50:15 2017 (r318483) @@ -202,7 +202,8 @@ archive_string_append(struct archive_str { if (archive_string_ensure(as, as->length + s + 1) == NULL) return (NULL); - memmove(as->s + as->length, p, s); + if (s) + memmove(as->s + as->length, p, s); as->length += s; as->s[as->length] = 0; return (as); Modified: stable/10/contrib/libarchive/libarchive/archive_write_set_format_pax.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_write_set_format_pax.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_write_set_format_pax.c Thu May 18 19:50:15 2017 (r318483) @@ -1196,8 +1196,12 @@ archive_write_pax_header(struct archive_ "GNU.sparse.major", 1); add_pax_attr_int(&(pax->pax_header), "GNU.sparse.minor", 0); + /* + * Make sure to store the original path, since + * truncation to ustar limit happened already. + */ add_pax_attr(&(pax->pax_header), - "GNU.sparse.name", entry_name.s); + "GNU.sparse.name", path); add_pax_attr_int(&(pax->pax_header), "GNU.sparse.realsize", archive_entry_size(entry_main)); @@ -1650,13 +1654,14 @@ build_pax_attribute_name(char *dest, con * GNU PAX Format 1.0 requires the special name, which pattern is: * /GNUSparseFile./ * + * Since reproducable archives are more important, use 0 as pid. + * * This function is used for only Sparse file, a file type of which * is regular file. */ static char * build_gnu_sparse_name(char *dest, const char *src) { - char buff[64]; const char *p; /* Handle the null filename case. */ @@ -1682,15 +1687,9 @@ build_gnu_sparse_name(char *dest, const break; } -#if HAVE_GETPID && 0 /* Disable this as pax attribute name. */ - sprintf(buff, "GNUSparseFile.%d", getpid()); -#else - /* If the platform can't fetch the pid, don't include it. */ - strcpy(buff, "GNUSparseFile"); -#endif /* General case: build a ustar-compatible name adding * "/GNUSparseFile/". */ - build_ustar_entry_name(dest, src, p - src, buff); + build_ustar_entry_name(dest, src, p - src, "GNUSparseFile.0"); return (dest); } Modified: stable/10/contrib/libarchive/libarchive/libarchive_changes.3 ============================================================================== --- stable/10/contrib/libarchive/libarchive/libarchive_changes.3 Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/libarchive_changes.3 Thu May 18 19:50:15 2017 (r318483) @@ -28,6 +28,7 @@ .Dt LIBARCHIVE_CHANGES 3 .Os .Sh NAME +.Nm libarchive_changes .Nd changes in libarchive interface .\" .Sh CHANGES IN LIBARCHIVE 3 Modified: stable/10/contrib/libarchive/libarchive/test/test_read_format_mtree.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/test/test_read_format_mtree.c Thu May 18 19:47:43 2017 (r318482) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu May 18 20:29:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC343D73882; Thu, 18 May 2017 20:29:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94E6C1056; Thu, 18 May 2017 20:29:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKTlIf012532; Thu, 18 May 2017 20:29:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKTlFU012531; Thu, 18 May 2017 20:29:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182029.v4IKTlFU012531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318485 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:29:49 -0000 Author: trasz Date: Thu May 18 20:29:47 2017 New Revision: 318485 URL: https://svnweb.freebsd.org/changeset/base/318485 Log: MFC r316941: Don't try to write out bufs that have already failed with ENXIO. This fixes some panics after disconnecting mounted disks. Modified: stable/11/sys/kern/vfs_bio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Thu May 18 20:15:35 2017 (r318484) +++ stable/11/sys/kern/vfs_bio.c Thu May 18 20:29:47 2017 (r318485) @@ -2303,18 +2303,28 @@ brelse(struct buf *bp) bdirty(bp); } if (bp->b_iocmd == BIO_WRITE && (bp->b_ioflags & BIO_ERROR) && + (bp->b_error != ENXIO || !LIST_EMPTY(&bp->b_dep)) && !(bp->b_flags & B_INVAL)) { /* - * Failed write, redirty. Must clear BIO_ERROR to prevent - * pages from being scrapped. + * Failed write, redirty. All errors except ENXIO (which + * means the device is gone) are expected to be potentially + * transient - underlying media might work if tried again + * after EIO, and memory might be available after an ENOMEM. + * + * Do this also for buffers that failed with ENXIO, but have + * non-empty dependencies - the soft updates code might need + * to access the buffer to untangle them. + * + * Must clear BIO_ERROR to prevent pages from being scrapped. */ bp->b_ioflags &= ~BIO_ERROR; bdirty(bp); } else if ((bp->b_flags & (B_NOCACHE | B_INVAL)) || (bp->b_ioflags & BIO_ERROR) || (bp->b_bufsize <= 0)) { /* - * Either a failed read I/O or we were asked to free or not - * cache the buffer. + * Either a failed read I/O, or we were asked to free or not + * cache the buffer, or we failed to write to a device that's + * no longer present. */ bp->b_flags |= B_INVAL; if (!LIST_EMPTY(&bp->b_dep)) From owner-svn-src-all@freebsd.org Thu May 18 20:31:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DE46D73960; Thu, 18 May 2017 20:31:11 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBA0C12BA; Thu, 18 May 2017 20:31:10 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKV9rX012828; Thu, 18 May 2017 20:31:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKV94V012827; Thu, 18 May 2017 20:31:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182031.v4IKV94V012827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318486 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:31:11 -0000 Author: trasz Date: Thu May 18 20:31:09 2017 New Revision: 318486 URL: https://svnweb.freebsd.org/changeset/base/318486 Log: MFC r317212: Mention GEOM_MOUNTVER. Modified: stable/11/share/man/man4/geom.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/geom.4 ============================================================================== --- stable/11/share/man/man4/geom.4 Thu May 18 20:29:47 2017 (r318485) +++ stable/11/share/man/man4/geom.4 Thu May 18 20:31:09 2017 (r318486) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2015 +.Dd April 20, 2017 .Dt GEOM 4 .Os .Sh NAME @@ -55,6 +55,7 @@ .Cd options GEOM_MAP .Cd options GEOM_MBR .Cd options GEOM_MIRROR +.Cd options GEOM_MOUNTVER .Cd options GEOM_MULTIPATH .Cd options GEOM_NOP .Cd options GEOM_PART_APM From owner-svn-src-all@freebsd.org Thu May 18 20:32:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18204D73AF5; Thu, 18 May 2017 20:32:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC1A5174A; Thu, 18 May 2017 20:32:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKWCYf016827; Thu, 18 May 2017 20:32:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKWC3j016826; Thu, 18 May 2017 20:32:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182032.v4IKWC3j016826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318487 - stable/11/usr.bin/tip/tip X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:32:14 -0000 Author: trasz Date: Thu May 18 20:32:12 2017 New Revision: 318487 URL: https://svnweb.freebsd.org/changeset/base/318487 Log: MFC r317280: Add basic example to the cu(1) man page. Srsly, folks, you don't need to install minicom for this... Modified: stable/11/usr.bin/tip/tip/cu.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/tip/tip/cu.1 ============================================================================== --- stable/11/usr.bin/tip/tip/cu.1 Thu May 18 20:31:09 2017 (r318486) +++ stable/11/usr.bin/tip/tip/cu.1 Thu May 18 20:32:12 2017 (r318487) @@ -30,7 +30,7 @@ .\" @(#)tip.1 8.4 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd September 1, 2006 +.Dd April 22, 2017 .Dt CU 1 .Os .Sh NAME @@ -494,6 +494,11 @@ line access log lock file to avoid conflicts with .Xr uucp 1 Pq Pa ports/net/freebsd-uucp .El +.Sh EXAMPLES +Connect to the first USB serial port at the speed of 115200 baud: +.Bd -literal -offset indent +cu -s 115200 -l /dev/cuaU0 +.Ed .Sh SEE ALSO .Xr tip 1 .Sh HISTORY From owner-svn-src-all@freebsd.org Thu May 18 20:34:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 511D7D73B7E; Thu, 18 May 2017 20:34:27 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D10A1923; Thu, 18 May 2017 20:34:27 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKYQPE016996; Thu, 18 May 2017 20:34:26 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKYQKe016995; Thu, 18 May 2017 20:34:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182034.v4IKYQKe016995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318488 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:34:27 -0000 Author: trasz Date: Thu May 18 20:34:25 2017 New Revision: 318488 URL: https://svnweb.freebsd.org/changeset/base/318488 Log: MFC r317348: Make it possible to terminate "show lockedbufs" by pressing "q". Modified: stable/11/sys/kern/vfs_bio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Thu May 18 20:32:12 2017 (r318487) +++ stable/11/sys/kern/vfs_bio.c Thu May 18 20:34:25 2017 (r318488) @@ -4923,6 +4923,8 @@ DB_SHOW_COMMAND(lockedbufs, lockedbufs) if (BUF_ISLOCKED(bp)) { db_show_buffer((uintptr_t)bp, 1, 0, NULL); db_printf("\n"); + if (db_pager_quit) + break; } } } From owner-svn-src-all@freebsd.org Thu May 18 20:36:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5A13D73C77; Thu, 18 May 2017 20:36:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CCFA1B8D; Thu, 18 May 2017 20:36:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKa7X0017114; Thu, 18 May 2017 20:36:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKa7SF017112; Thu, 18 May 2017 20:36:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182036.v4IKa7SF017112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318489 - stable/11/usr.sbin/fstyp X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:36:09 -0000 Author: trasz Date: Thu May 18 20:36:07 2017 New Revision: 318489 URL: https://svnweb.freebsd.org/changeset/base/318489 Log: MFC r317459: Make fstyp(8) recognize exFAT even without the -u option. While it's not directly mountable with mount(8), it's something that's mountable - differently from GELI or zpools. Modified: stable/11/usr.sbin/fstyp/fstyp.8 stable/11/usr.sbin/fstyp/fstyp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/fstyp/fstyp.8 ============================================================================== --- stable/11/usr.sbin/fstyp/fstyp.8 Thu May 18 20:34:25 2017 (r318488) +++ stable/11/usr.sbin/fstyp/fstyp.8 Thu May 18 20:36:07 2017 (r318489) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 13, 2017 +.Dd April 26, 2017 .Dt FSTYP 8 .Os .Sh NAME @@ -43,7 +43,7 @@ The .Nm utility is used to determine the filesystem type on a given device. -It can recognize ISO-9660, Ext2, FAT, NTFS, and UFS filesystems. +It can recognize ISO-9660, exFAT, Ext2, FAT, NTFS, and UFS filesystems. When the .Fl u flag is specified, @@ -51,7 +51,7 @@ flag is specified, also recognizes certain additional metadata formats that cannot be handled using .Xr mount 8 , -such as exFAT filesystems, +such as .Xr geli 8 providers, and ZFS pools. Modified: stable/11/usr.sbin/fstyp/fstyp.c ============================================================================== --- stable/11/usr.sbin/fstyp/fstyp.c Thu May 18 20:34:25 2017 (r318488) +++ stable/11/usr.sbin/fstyp/fstyp.c Thu May 18 20:36:07 2017 (r318489) @@ -57,7 +57,7 @@ static struct { bool unmountable; } fstypes[] = { { "cd9660", &fstyp_cd9660, false }, - { "exfat", &fstyp_exfat, true }, + { "exfat", &fstyp_exfat, false }, { "ext2fs", &fstyp_ext2fs, false }, { "geli", &fstyp_geli, true }, { "msdosfs", &fstyp_msdosfs, false }, From owner-svn-src-all@freebsd.org Thu May 18 20:37:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1293D73CF9; Thu, 18 May 2017 20:37:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A110F1CE7; Thu, 18 May 2017 20:37:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKbluc017218; Thu, 18 May 2017 20:37:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKblU3017217; Thu, 18 May 2017 20:37:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182037.v4IKblU3017217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318490 - stable/11/etc/autofs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:37:48 -0000 Author: trasz Date: Thu May 18 20:37:47 2017 New Revision: 318490 URL: https://svnweb.freebsd.org/changeset/base/318490 Log: MFC r317803: Enable automounting of exFAT media. With fstyp(8) being updated to detect exfat in base r312003, it seems like a good time to add support for auto-mounting SDXC cards -- which use exfat by default. The user will need to locally compile and install sysutils/fusefs-exfat for this to succeed; logs a message to that effect when not installed. PR: 218743 Submitted by: eborisch+FreeBSD@gmail.com Modified: stable/11/etc/autofs/special_media Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/autofs/special_media ============================================================================== --- stable/11/etc/autofs/special_media Thu May 18 20:36:07 2017 (r318489) +++ stable/11/etc/autofs/special_media Thu May 18 20:37:47 2017 (r318490) @@ -39,6 +39,15 @@ print_map_entry() { _p="$2" case "${_fstype}" in + "exfat") + if [ -f "/usr/local/sbin/mount.exfat" ]; then + echo "-mountprog=/usr/local/sbin/mount.exfat,fstype=${_fstype},nosuid :/dev/${_p}" + else + /usr/bin/logger -p info -t "special_media[$$]" \ + "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-exfat first" + exit 1 + fi + ;; "ntfs") if [ -f "/usr/local/bin/ntfs-3g" ]; then echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid :/dev/${_p}" From owner-svn-src-all@freebsd.org Thu May 18 20:40:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA86ED73DB6; Thu, 18 May 2017 20:40:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A1441E93; Thu, 18 May 2017 20:40:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKen5h017417; Thu, 18 May 2017 20:40:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKenmG017415; Thu, 18 May 2017 20:40:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182040.v4IKenmG017415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:40:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318491 - in stable/11/sbin: kldconfig kldload X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:40:50 -0000 Author: trasz Date: Thu May 18 20:40:49 2017 New Revision: 318491 URL: https://svnweb.freebsd.org/changeset/base/318491 Log: MFC r317517: Advertise kldxref(8) a little better. Modified: stable/11/sbin/kldconfig/kldconfig.8 stable/11/sbin/kldload/kldload.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/kldconfig/kldconfig.8 ============================================================================== --- stable/11/sbin/kldconfig/kldconfig.8 Thu May 18 20:37:47 2017 (r318490) +++ stable/11/sbin/kldconfig/kldconfig.8 Thu May 18 20:40:49 2017 (r318491) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 15, 2001 +.Dd April 27, 2017 .Dt KLDCONFIG 8 .Os .Sh NAME @@ -98,6 +98,7 @@ The default module search path used by t .Sh SEE ALSO .Xr kldload 2 , .Xr kldload 8 , +.Xr kldxref 8 , .Xr sysctl 8 .Sh HISTORY The Modified: stable/11/sbin/kldload/kldload.8 ============================================================================== --- stable/11/sbin/kldload/kldload.8 Thu May 18 20:37:47 2017 (r318490) +++ stable/11/sbin/kldload/kldload.8 Thu May 18 20:40:49 2017 (r318491) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2012 +.Dd April 27, 2017 .Dt KLDLOAD 8 .Os .Sh NAME @@ -116,7 +116,8 @@ Modules may also be auto-loaded through .Xr security 7 , .Xr kldconfig 8 , .Xr kldstat 8 , -.Xr kldunload 8 +.Xr kldunload 8 , +.Xr kldxref 8 .Sh HISTORY The .Nm From owner-svn-src-all@freebsd.org Thu May 18 20:41:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB72FD73E1E; Thu, 18 May 2017 20:41:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 934BA1F9; Thu, 18 May 2017 20:41:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKftfg020342; Thu, 18 May 2017 20:41:55 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKftlZ020338; Thu, 18 May 2017 20:41:55 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182041.v4IKftlZ020338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318492 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:41:57 -0000 Author: trasz Date: Thu May 18 20:41:55 2017 New Revision: 318492 URL: https://svnweb.freebsd.org/changeset/base/318492 Log: MFC r317460: Add some .Xrs to USB serial driver man pages. Modified: stable/11/share/man/man4/ubser.4 stable/11/share/man/man4/ucom.4 stable/11/share/man/man4/ucycom.4 stable/11/share/man/man4/uipaq.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/ubser.4 ============================================================================== --- stable/11/share/man/man4/ubser.4 Thu May 18 20:40:49 2017 (r318491) +++ stable/11/share/man/man4/ubser.4 Thu May 18 20:41:55 2017 (r318492) @@ -60,6 +60,7 @@ driver provides support for the BWCT con .El .Sh SEE ALSO .Xr tty 4 , +.Xr ucom 4 , .Xr usb 4 .Sh HISTORY The Modified: stable/11/share/man/man4/ucom.4 ============================================================================== --- stable/11/share/man/man4/ucom.4 Thu May 18 20:40:49 2017 (r318491) +++ stable/11/share/man/man4/ucom.4 Thu May 18 20:41:55 2017 (r318492) @@ -99,8 +99,15 @@ Capture pulses on the DCD line. .Sh SEE ALSO .Xr tty 4 , .Xr uark 4 , +.Xr ubsa 4 , +.Xr ubser 4 , .Xr uchcom 4 , +.Xr ucycom 4 , +.Xr ufoma 4 , .Xr uftdi 4 , +.Xr uhso 4 , +.\".Xr ugensa 4 , +.Xr uipaq 4 , .Xr umcs 4 , .Xr umct 4 , .Xr umodem 4 , Modified: stable/11/share/man/man4/ucycom.4 ============================================================================== --- stable/11/share/man/man4/ucycom.4 Thu May 18 20:40:49 2017 (r318491) +++ stable/11/share/man/man4/ucycom.4 Thu May 18 20:41:55 2017 (r318492) @@ -73,6 +73,7 @@ DeLorme Earthmate USB GPS receiver .El .Sh SEE ALSO .Xr tty 4 , +.Xr ucom 4 , .Xr usb 4 .Sh HISTORY The Modified: stable/11/share/man/man4/uipaq.4 ============================================================================== --- stable/11/share/man/man4/uipaq.4 Thu May 18 20:40:49 2017 (r318491) +++ stable/11/share/man/man4/uipaq.4 Thu May 18 20:41:55 2017 (r318492) @@ -82,7 +82,6 @@ driver which makes it behave like a .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , -.Xr uhub 4 , .Xr usb 4 .Sh HISTORY The From owner-svn-src-all@freebsd.org Thu May 18 20:45:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 486C1D7301B; Thu, 18 May 2017 20:45:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12027618; Thu, 18 May 2017 20:45:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKjBvC021314; Thu, 18 May 2017 20:45:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKj9YD021293; Thu, 18 May 2017 20:45:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182045.v4IKj9YD021293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318493 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:45:12 -0000 Author: trasz Date: Thu May 18 20:45:09 2017 New Revision: 318493 URL: https://svnweb.freebsd.org/changeset/base/318493 Log: MFC r317463: Add information about device nodes to man pages for USB serial drivers. MFC r318016: Fix mistake introduced to uart(4) man page in r317463. MFC r318017: Fix device paths for USB serial adapters: the formatting strings contain "%u", differently from eg uart(4) which uses "%r". Modified: stable/11/share/man/man4/u3g.4 stable/11/share/man/man4/uark.4 stable/11/share/man/man4/uart.4 stable/11/share/man/man4/ubsa.4 stable/11/share/man/man4/ubser.4 stable/11/share/man/man4/uchcom.4 stable/11/share/man/man4/ucom.4 stable/11/share/man/man4/ucycom.4 stable/11/share/man/man4/uftdi.4 stable/11/share/man/man4/uipaq.4 stable/11/share/man/man4/umcs.4 stable/11/share/man/man4/umct.4 stable/11/share/man/man4/umodem.4 stable/11/share/man/man4/umoscom.4 stable/11/share/man/man4/uplcom.4 stable/11/share/man/man4/uslcom.4 stable/11/share/man/man4/uvisor.4 stable/11/share/man/man4/uvscom.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/u3g.4 ============================================================================== --- stable/11/share/man/man4/u3g.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/u3g.4 Thu May 18 20:45:09 2017 (r318493) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 26, 2013 +.Dd April 26, 2017 .Dt U3G 4 .Os .Sh NAME @@ -97,6 +97,20 @@ See .Xr usbconfig 8 and .Xr usb_quirk 4 . +.Sh FILES +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* +for callin ports +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU*.* +for callout ports +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uark.4 ============================================================================== --- stable/11/share/man/man4/uark.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uark.4 Thu May 18 20:45:09 2017 (r318493) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UARK 4 .Os .Sh NAME @@ -57,6 +57,20 @@ KQ-U8A Data Cable .It Skymaster USB to RS232 .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uart.4 ============================================================================== --- stable/11/share/man/man4/uart.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uart.4 Thu May 18 20:45:09 2017 (r318493) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 9, 2015 +.Dd April 26, 2017 .Dt UART 4 .Os .Sh NAME @@ -226,7 +226,7 @@ level signal at up to 12 volts. A connection to header pins or an edge-connector on an embedded board is typically a TTL signal at 3.3 or 5 volts. .Sh FILES -.Bl -tag -width ".Pa /dev/ttyu?.init" -compact +.Bl -tag -width "/dev/ttyu?.init" -compact .It Pa /dev/ttyu? for callin ports .It Pa /dev/ttyu?.init Modified: stable/11/share/man/man4/ubsa.4 ============================================================================== --- stable/11/share/man/man4/ubsa.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/ubsa.4 Thu May 18 20:45:09 2017 (r318493) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UBSA 4 .Os .Sh NAME @@ -81,6 +81,20 @@ GoHubs GoCOM232 .It Peracom single port serial adapter .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/ubser.4 ============================================================================== --- stable/11/share/man/man4/ubser.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/ubser.4 Thu May 18 20:45:09 2017 (r318493) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UBSER 4 .Os .Sh NAME @@ -55,8 +55,18 @@ The .Nm driver provides support for the BWCT console management serial adapters. .Sh FILES -.Bl -tag -width ".Pa /dev/ttyy??" -compact -.It Pa /dev/ttyy?? +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* +for callin ports +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU*.* +for callout ports +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock +corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO .Xr tty 4 , Modified: stable/11/share/man/man4/uchcom.4 ============================================================================== --- stable/11/share/man/man4/uchcom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uchcom.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UCHCOM 4 .Os .Sh NAME @@ -70,6 +70,20 @@ driver supports the following adapters: .It HL USB-RS232 .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/ucom.4 ============================================================================== --- stable/11/share/man/man4/ucom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/ucom.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2015 +.Dd April 26, 2017 .Dt UCOM 4 .Os .Sh NAME @@ -92,9 +92,18 @@ Capture pulses on the CTS line. Capture pulses on the DCD line. .El .Sh FILES -.Bl -tag -width ".Pa /dev/cuaU?" -.It Pa /dev/cuaU? -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO .Xr tty 4 , Modified: stable/11/share/man/man4/ucycom.4 ============================================================================== --- stable/11/share/man/man4/ucycom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/ucycom.4 Thu May 18 20:45:09 2017 (r318493) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UCYCOM 4 .Os .Sh NAME @@ -71,6 +71,20 @@ Cypress USB to RS232 bridge chips: .It DeLorme Earthmate USB GPS receiver .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uftdi.4 ============================================================================== --- stable/11/share/man/man4/uftdi.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uftdi.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 6, 2015 +.Dd April 26, 2017 .Dt UFTDI 4 .Os .Sh NAME @@ -242,6 +242,20 @@ Buffalo PC-OP-RS / Kurouto-shikou KURO-R .It Prologix GPIB-USB Controller .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uipaq.4 ============================================================================== --- stable/11/share/man/man4/uipaq.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uipaq.4 Thu May 18 20:45:09 2017 (r318493) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UIPAQ 4 .Os .Sh NAME @@ -79,6 +79,20 @@ The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/umcs.4 ============================================================================== --- stable/11/share/man/man4/umcs.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/umcs.4 Thu May 18 20:45:09 2017 (r318493) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd April 26, 2017 .Dt UMCS 4 .Os .Sh NAME @@ -80,6 +80,20 @@ ST Lab U-360 two-port serial USB adapter .It ST Lab U-400 four-port serial USB adapter .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* +for callin ports +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU*.* +for callout ports +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/umct.4 ============================================================================== --- stable/11/share/man/man4/umct.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/umct.4 Thu May 18 20:45:09 2017 (r318493) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UMCT 4 .Os .Sh NAME @@ -78,6 +78,20 @@ Magic Control Technology USB-232 .It Sitecom USB-232 .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/umodem.4 ============================================================================== --- stable/11/share/man/man4/umodem.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/umodem.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 6, 2012 +.Dd April 26, 2017 .Dt UMODEM 4 .Os .Sh NAME @@ -95,6 +95,20 @@ Sony Ericsson W810i phone .It Sonim XP5300 Force .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/umoscom.4 ============================================================================== --- stable/11/share/man/man4/umoscom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/umoscom.4 Thu May 18 20:45:09 2017 (r318493) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2014 +.Dd April 26, 2017 .Dt UMOSCOM 4 .Os .Sh NAME @@ -56,6 +56,20 @@ The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uplcom.4 ============================================================================== --- stable/11/share/man/man4/uplcom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uplcom.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2012 +.Dd April 26, 2017 .Dt UPLCOM 4 .Os .Sh NAME @@ -180,6 +180,20 @@ YC-Cable USB-Serial Adapter .It Zeagle N2iTion3 Diving Computer .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uslcom.4 ============================================================================== --- stable/11/share/man/man4/uslcom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uslcom.4 Thu May 18 20:45:09 2017 (r318493) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2012 +.Dd April 26, 2017 .Dt USLCOM 4 .Os .Sh NAME @@ -192,6 +192,20 @@ WMR RIGblaster Plug&Play and RIGtalk RT1 .It Zephyr Bioharness .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uvisor.4 ============================================================================== --- stable/11/share/man/man4/uvisor.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uvisor.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UVISOR 4 .Os .Sh NAME @@ -118,6 +118,20 @@ Sony Clie S360 .It Sony Clie TJ37 .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uvscom.4 ============================================================================== --- stable/11/share/man/man4/uvscom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uvscom.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UVSCOM 4 .Os .Sh NAME @@ -77,6 +77,19 @@ The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , From owner-svn-src-all@freebsd.org Thu May 18 20:46:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB6CBD730E0; Thu, 18 May 2017 20:46:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87960817; Thu, 18 May 2017 20:46:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKkLZ7021443; Thu, 18 May 2017 20:46:21 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKkLKg021436; Thu, 18 May 2017 20:46:21 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705182046.v4IKkLKg021436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 18 May 2017 20:46:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318494 - in stable/11/sys/dev: mmc sdhci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:46:22 -0000 Author: marius Date: Thu May 18 20:46:20 2017 New Revision: 318494 URL: https://svnweb.freebsd.org/changeset/base/318494 Log: MFC: r315598 o Add support for eMMC DDR bus speed mode up to 52 MHz to sdhci(4) and mmc(4). Given that support for DDR52 is not denoted by SDHCI capability registers, availability of that timing is indicated by a new quirk SDHCI_QUIRK_MMC_DDR52 and only enabled for Intel SDHCI controllers so far. Compared to 50 MHz at SDR high speed typically yielding ~45 MB/s read throughput with the eMMC chips tested, read performance goes up to ~80 MB/s at DDR52. As a side-effect, this change also fixes communication with some eMMC devices at SDR high speed mode due to the signaling voltage and UHS bits in the SDHCI controller no longer being left in an inappropriate state. o In sdhci(4), add two tunables hw.sdhci.quirk_clear as well as hw.sdhci.quirk_set, which (when hooked up in the front-end) allow to set/clear sdhci(4) quirks for debugging and testing purposes. However, especially for SDHCI controllers on the PCI bus which have no specific support code so far and, thus, are picked up as generic SDHCI controllers, hw.sdhci.quirk_set allows for setting the necessary quirks (if required). o In mmc(4), check and handle the return values of some more function calls instead of assuming that everything went right. In case failures actually are not problematic, indicate that by casting the return value to void. Modified: stable/11/sys/dev/mmc/bridge.h stable/11/sys/dev/mmc/mmc.c stable/11/sys/dev/mmc/mmcbr_if.m stable/11/sys/dev/mmc/mmcbrvar.h stable/11/sys/dev/mmc/mmcreg.h stable/11/sys/dev/sdhci/sdhci.c stable/11/sys/dev/sdhci/sdhci.h stable/11/sys/dev/sdhci/sdhci_acpi.c stable/11/sys/dev/sdhci/sdhci_if.m stable/11/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mmc/bridge.h ============================================================================== --- stable/11/sys/dev/mmc/bridge.h Thu May 18 20:45:09 2017 (r318493) +++ stable/11/sys/dev/mmc/bridge.h Thu May 18 20:46:20 2017 (r318494) @@ -89,6 +89,10 @@ enum mmc_vdd { vdd_330, vdd_340, vdd_350, vdd_360 }; +enum mmc_vccq { + vccq_120 = 0, vccq_180, vccq_330 +}; + enum mmc_power_mode { power_off = 0, power_up, power_on }; @@ -105,18 +109,28 @@ enum mmc_bus_width { bus_width_1 = 0, bus_width_4 = 2, bus_width_8 = 3 }; +enum mmc_drv_type { + drv_type_b = 0, drv_type_a, drv_type_c, drv_type_d +}; + enum mmc_bus_timing { - bus_timing_normal = 0, bus_timing_hs + bus_timing_normal = 0, bus_timing_hs, bus_timing_uhs_sdr12, + bus_timing_uhs_sdr25, bus_timing_uhs_sdr50, bus_timing_uhs_ddr50, + bus_timing_uhs_sdr104, bus_timing_mmc_ddr52, bus_timing_mmc_hs200, + bus_timing_mmc_hs400, bus_timing_mmc_hs400es, bus_timing_max = + bus_timing_mmc_hs400es }; struct mmc_ios { uint32_t clock; /* Speed of the clock in Hz to move data */ enum mmc_vdd vdd; /* Voltage to apply to the power pins */ + enum mmc_vccq vccq; /* Voltage to use for signaling */ enum mmc_bus_mode bus_mode; enum mmc_chip_select chip_select; enum mmc_bus_width bus_width; enum mmc_power_mode power_mode; enum mmc_bus_timing timing; + enum mmc_drv_type drv_type; }; enum mmc_card_mode { @@ -134,6 +148,28 @@ struct mmc_host { #define MMC_CAP_HSPEED (1 << 2) /* Can do High Speed transfers */ #define MMC_CAP_BOOT_NOACC (1 << 4) /* Cannot access boot partitions */ #define MMC_CAP_WAIT_WHILE_BUSY (1 << 5) /* Host waits for busy responses */ +#define MMC_CAP_UHS_SDR12 (1 << 6) /* Can do UHS SDR12 */ +#define MMC_CAP_UHS_SDR25 (1 << 7) /* Can do UHS SDR25 */ +#define MMC_CAP_UHS_SDR50 (1 << 8) /* Can do UHS SDR50 */ +#define MMC_CAP_UHS_SDR104 (1 << 9) /* Can do UHS SDR104 */ +#define MMC_CAP_UHS_DDR50 (1 << 10) /* Can do UHS DDR50 */ +#define MMC_CAP_MMC_DDR52_120 (1 << 11) /* Can do eMMC DDR52 at 1.2 V */ +#define MMC_CAP_MMC_DDR52_180 (1 << 12) /* Can do eMMC DDR52 at 1.8 V */ +#define MMC_CAP_MMC_DDR52 (MMC_CAP_MMC_DDR52_120 | MMC_CAP_MMC_DDR52_180) +#define MMC_CAP_MMC_HS200_120 (1 << 13) /* Can do eMMC HS200 at 1.2 V */ +#define MMC_CAP_MMC_HS200_180 (1 << 14) /* Can do eMMC HS200 at 1.8 V */ +#define MMC_CAP_MMC_HS200 (MMC_CAP_MMC_HS200_120| MMC_CAP_MMC_HS200_180) +#define MMC_CAP_MMC_HS400_120 (1 << 15) /* Can do eMMC HS400 at 1.2 V */ +#define MMC_CAP_MMC_HS400_180 (1 << 16) /* Can do eMMC HS400 at 1.8 V */ +#define MMC_CAP_MMC_HS400 (MMC_CAP_MMC_HS400_120 | MMC_CAP_MMC_HS400_180) +#define MMC_CAP_MMC_HSX00_120 (MMC_CAP_MMC_HS200_120 | MMC_CAP_MMC_HS400_120) +#define MMC_CAP_MMC_ENH_STROBE (1 << 17) /* Can do eMMC Enhanced Strobe */ +#define MMC_CAP_SIGNALING_120 (1 << 18) /* Can do signaling at 1.2 V */ +#define MMC_CAP_SIGNALING_180 (1 << 19) /* Can do signaling at 1.8 V */ +#define MMC_CAP_SIGNALING_330 (1 << 20) /* Can do signaling at 3.3 V */ +#define MMC_CAP_DRIVER_TYPE_A (1 << 21) /* Can do Driver Type A */ +#define MMC_CAP_DRIVER_TYPE_C (1 << 22) /* Can do Driver Type C */ +#define MMC_CAP_DRIVER_TYPE_D (1 << 23) /* Can do Driver Type D */ enum mmc_card_mode mode; struct mmc_ios ios; /* Current state of the host */ }; @@ -141,7 +177,7 @@ struct mmc_host { extern driver_t mmc_driver; extern devclass_t mmc_devclass; -#define MMC_VERSION 2 +#define MMC_VERSION 3 #define MMC_DECLARE_BRIDGE(name) \ DRIVER_MODULE(mmc, name, mmc_driver, mmc_devclass, NULL, NULL); \ Modified: stable/11/sys/dev/mmc/mmc.c ============================================================================== --- stable/11/sys/dev/mmc/mmc.c Thu May 18 20:45:09 2017 (r318493) +++ stable/11/sys/dev/mmc/mmc.c Thu May 18 20:46:20 2017 (r318494) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2006 Bernd Walter. All rights reserved. * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2017 Marius Strobl * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -75,6 +76,8 @@ __FBSDID("$FreeBSD$"); #include "mmcbr_if.h" #include "mmcbus_if.h" +CTASSERT(bus_timing_max <= sizeof(uint32_t) * NBBY); + /* * Per-card data */ @@ -92,9 +95,11 @@ struct mmc_ivars { struct mmc_sd_status sd_status; /* SD_STATUS decoded */ u_char read_only; /* True when the device is read-only */ u_char bus_width; /* Bus width to use */ - u_char timing; /* Bus timing support */ u_char high_cap; /* High Capacity card (block addressed) */ uint32_t sec_count; /* Card capacity in 512byte blocks */ + uint32_t timings; /* Mask of bus timings supported */ + uint32_t vccq_120; /* Mask of bus timings at VCCQ of 1.2 V */ + uint32_t vccq_180; /* Mask of bus timings at VCCQ of 1.8 V */ uint32_t tran_speed; /* Max speed in normal mode */ uint32_t hs_tran_speed; /* Max speed in high speed mode */ uint32_t erase_sector; /* Card native erase sector size */ @@ -105,8 +110,6 @@ struct mmc_ivars { #define CMD_RETRIES 3 -#define CARD_ID_FREQUENCY 400000 /* Spec requires 400kHz max during ID phase. */ - static SYSCTL_NODE(_hw, OID_AUTO, mmc, CTLFLAG_RD, NULL, "mmc driver"); static int mmc_debug; @@ -180,12 +183,15 @@ static int mmc_send_op_cond(struct mmc_s uint32_t *rocr); static int mmc_send_relative_addr(struct mmc_softc *sc, uint32_t *resp); static int mmc_set_blocklen(struct mmc_softc *sc, uint32_t len); -static int mmc_set_card_bus_width(struct mmc_softc *sc, - struct mmc_ivars *ivar); +static int mmc_set_card_bus_width(struct mmc_softc *sc, struct mmc_ivars *ivar); +static int mmc_set_power_class(struct mmc_softc *sc, struct mmc_ivars *ivar); static int mmc_set_relative_addr(struct mmc_softc *sc, uint16_t resp); static int mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, - int timing); + enum mmc_bus_timing timing); static int mmc_test_bus_width(struct mmc_softc *sc); +static uint32_t mmc_timing_to_dtr(struct mmc_ivars *ivar, + enum mmc_bus_timing timing); +static const char *mmc_timing_to_string(enum mmc_bus_timing timing); static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries); static int mmc_wait_for_req(struct mmc_softc *sc, struct mmc_request *req); @@ -264,8 +270,8 @@ mmc_acquire_bus(device_t busdev, device_ { struct mmc_softc *sc; struct mmc_ivars *ivar; - int err; - int rca; + int err, rca; + enum mmc_bus_timing timing; err = MMCBR_ACQUIRE_HOST(device_get_parent(busdev), busdev); if (err) @@ -287,16 +293,44 @@ mmc_acquire_bus(device_t busdev, device_ ivar = device_get_ivars(dev); rca = ivar->rca; if (sc->last_rca != rca) { - mmc_select_card(sc, rca); + if (mmc_select_card(sc, rca) != MMC_ERR_NONE) { + device_printf(sc->dev, "Card at relative " + "address %d failed to select.\n", rca); + return (ENXIO); + } sc->last_rca = rca; + timing = mmcbr_get_timing(busdev); /* Prepare bus width for the new card. */ if (bootverbose || mmc_debug) { device_printf(busdev, - "setting bus width to %d bits\n", + "setting bus width to %d bits %s timing\n", (ivar->bus_width == bus_width_4) ? 4 : - (ivar->bus_width == bus_width_8) ? 8 : 1); + (ivar->bus_width == bus_width_8) ? 8 : 1, + mmc_timing_to_string(timing)); + } + if (mmc_set_card_bus_width(sc, ivar) != MMC_ERR_NONE) { + device_printf(sc->dev, "Card at relative " + "address %d failed to set bus width.\n", + rca); + return (ENXIO); + } + if (isset(&ivar->vccq_120, timing)) + mmcbr_set_vccq(busdev, vccq_120); + else if (isset(&ivar->vccq_180, timing)) + mmcbr_set_vccq(busdev, vccq_180); + else + mmcbr_set_vccq(busdev, vccq_330); + if (mmcbr_switch_vccq(busdev) != 0) { + device_printf(sc->dev, "Failed to set VCCQ " + "for card at relative address %d.\n", rca); + return (ENXIO); + } + if (mmc_set_power_class(sc, ivar) != MMC_ERR_NONE) { + device_printf(sc->dev, "Card at relative " + "address %d failed to set power class.\n", + rca); + return (ENXIO); } - mmc_set_card_bus_width(sc, ivar); mmcbr_set_bus_width(busdev, ivar->bus_width); mmcbr_update_ios(busdev); } @@ -524,6 +558,7 @@ static void mmc_power_up(struct mmc_softc *sc) { device_t dev; + enum mmc_vccq vccq; dev = sc->dev; mmcbr_set_vdd(dev, mmc_highest_voltage(mmcbr_get_host_ocr(dev))); @@ -533,9 +568,14 @@ mmc_power_up(struct mmc_softc *sc) mmcbr_set_power_mode(dev, power_up); mmcbr_set_clock(dev, 0); mmcbr_update_ios(dev); + for (vccq = vccq_330; ; vccq--) { + mmcbr_set_vccq(dev, vccq); + if (mmcbr_switch_vccq(dev) == 0 || vccq == vccq_120) + break; + } mmc_ms_delay(1); - mmcbr_set_clock(dev, CARD_ID_FREQUENCY); + mmcbr_set_clock(dev, SD_MMC_CARD_ID_FREQUENCY); mmcbr_set_timing(dev, bus_timing_normal); mmcbr_set_power_mode(dev, power_on); mmcbr_update_ios(dev); @@ -631,10 +671,30 @@ mmc_set_card_bus_width(struct mmc_softc value = EXT_CSD_BUS_WIDTH_1; break; case bus_width_4: - value = EXT_CSD_BUS_WIDTH_4; + switch (mmcbr_get_timing(sc->dev)) { + case bus_timing_mmc_ddr52: + case bus_timing_mmc_hs200: + case bus_timing_mmc_hs400: + case bus_timing_mmc_hs400es: + value = EXT_CSD_BUS_WIDTH_4_DDR; + break; + default: + value = EXT_CSD_BUS_WIDTH_4; + break; + } break; case bus_width_8: - value = EXT_CSD_BUS_WIDTH_8; + switch (mmcbr_get_timing(sc->dev)) { + case bus_timing_mmc_ddr52: + case bus_timing_mmc_hs200: + case bus_timing_mmc_hs400: + case bus_timing_mmc_hs400es: + value = EXT_CSD_BUS_WIDTH_8_DDR; + break; + default: + value = EXT_CSD_BUS_WIDTH_8; + break; + } break; default: return (MMC_ERR_INVALID); @@ -647,23 +707,96 @@ mmc_set_card_bus_width(struct mmc_softc } static int -mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, int timing) +mmc_set_power_class(struct mmc_softc *sc, struct mmc_ivars *ivar) { - u_char switch_res[64]; - uint8_t value; - int err; + device_t dev; + const uint8_t *ext_csd; + uint32_t clock; + uint8_t value; - switch (timing) { - case bus_timing_normal: - value = 0; + dev = sc->dev; + if (mmcbr_get_mode(dev) != mode_mmc || ivar->csd.spec_vers < 4) + return (MMC_ERR_NONE); + + value = 0; + ext_csd = ivar->raw_ext_csd; + clock = mmcbr_get_clock(dev); + switch (1 << mmcbr_get_vdd(dev)) { + case MMC_OCR_LOW_VOLTAGE: + if (clock <= MMC_TYPE_HS_26_MAX) + value = ext_csd[EXT_CSD_PWR_CL_26_195]; + else if (clock <= MMC_TYPE_HS_52_MAX) { + if (mmcbr_get_timing(dev) >= bus_timing_mmc_ddr52 && + ivar->bus_width >= bus_width_4) + value = ext_csd[EXT_CSD_PWR_CL_52_195_DDR]; + else + value = ext_csd[EXT_CSD_PWR_CL_52_195]; + } else if (clock <= MMC_TYPE_HS200_HS400ES_MAX) + value = ext_csd[EXT_CSD_PWR_CL_200_195]; break; - case bus_timing_hs: - value = 1; + case MMC_OCR_270_280: + case MMC_OCR_280_290: + case MMC_OCR_290_300: + case MMC_OCR_300_310: + case MMC_OCR_310_320: + case MMC_OCR_320_330: + case MMC_OCR_330_340: + case MMC_OCR_340_350: + case MMC_OCR_350_360: + if (clock <= MMC_TYPE_HS_26_MAX) + value = ext_csd[EXT_CSD_PWR_CL_26_360]; + else if (clock <= MMC_TYPE_HS_52_MAX) { + if (mmcbr_get_timing(dev) == bus_timing_mmc_ddr52 && + ivar->bus_width >= bus_width_4) + value = ext_csd[EXT_CSD_PWR_CL_52_360_DDR]; + else + value = ext_csd[EXT_CSD_PWR_CL_52_360]; + } else if (clock <= MMC_TYPE_HS200_HS400ES_MAX) { + if (ivar->bus_width == bus_width_8) + value = ext_csd[EXT_CSD_PWR_CL_200_360_DDR]; + else + value = ext_csd[EXT_CSD_PWR_CL_200_360]; + } break; default: + device_printf(dev, "No power class support for VDD 0x%x\n", + 1 << mmcbr_get_vdd(dev)); return (MMC_ERR_INVALID); } + + if (ivar->bus_width == bus_width_8) + value = (value & EXT_CSD_POWER_CLASS_8BIT_MASK) >> + EXT_CSD_POWER_CLASS_8BIT_SHIFT; + else + value = (value & EXT_CSD_POWER_CLASS_4BIT_MASK) >> + EXT_CSD_POWER_CLASS_4BIT_SHIFT; + + if (value == 0) + return (MMC_ERR_NONE); + + return (mmc_switch(dev, dev, ivar->rca, EXT_CSD_CMD_SET_NORMAL, + EXT_CSD_POWER_CLASS, value, ivar->cmd6_time, true)); +} + +static int +mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, + enum mmc_bus_timing timing) +{ + u_char switch_res[64]; + uint8_t value; + int err; + if (mmcbr_get_mode(sc->dev) == mode_sd) { + switch (timing) { + case bus_timing_normal: + value = SD_SWITCH_NORMAL_MODE; + break; + case bus_timing_hs: + value = SD_SWITCH_HS_MODE; + break; + default: + return (MMC_ERR_INVALID); + } err = mmc_sd_switch(sc, SD_SWITCH_MODE_SET, SD_SWITCH_GROUP1, value, switch_res); if (err != MMC_ERR_NONE) @@ -673,6 +806,17 @@ mmc_set_timing(struct mmc_softc *sc, str mmcbr_set_timing(sc->dev, timing); mmcbr_update_ios(sc->dev); } else { + switch (timing) { + case bus_timing_normal: + value = EXT_CSD_HS_TIMING_BC; + break; + case bus_timing_hs: + case bus_timing_mmc_ddr52: + value = EXT_CSD_HS_TIMING_HS; + break; + default: + return (MMC_ERR_INVALID); + } err = mmc_switch(sc->dev, sc->dev, ivar->rca, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, value, ivar->cmd6_time, false); @@ -1166,19 +1310,82 @@ mmc_set_blocklen(struct mmc_softc *sc, u return (err); } +static uint32_t +mmc_timing_to_dtr(struct mmc_ivars *ivar, enum mmc_bus_timing timing) +{ + + switch (timing) { + case bus_timing_normal: + return (ivar->tran_speed); + case bus_timing_hs: + return (ivar->hs_tran_speed); + case bus_timing_uhs_sdr12: + return (SD_SDR12_MAX); + case bus_timing_uhs_sdr25: + return (SD_SDR25_MAX); + case bus_timing_uhs_ddr50: + return (SD_DDR50_MAX); + case bus_timing_uhs_sdr50: + return (SD_SDR50_MAX); + case bus_timing_uhs_sdr104: + return (SD_SDR104_MAX); + case bus_timing_mmc_ddr52: + return (MMC_TYPE_DDR52_MAX); + case bus_timing_mmc_hs200: + case bus_timing_mmc_hs400: + case bus_timing_mmc_hs400es: + return (MMC_TYPE_HS200_HS400ES_MAX); + } + return (0); +} + +static const char * +mmc_timing_to_string(enum mmc_bus_timing timing) +{ + + switch (timing) { + case bus_timing_normal: + return ("normal speed"); + case bus_timing_hs: + return ("high speed"); + case bus_timing_uhs_sdr12: + case bus_timing_uhs_sdr25: + case bus_timing_uhs_sdr50: + case bus_timing_uhs_sdr104: + return ("single data rate"); + case bus_timing_uhs_ddr50: + case bus_timing_mmc_ddr52: + return ("dual data rate"); + case bus_timing_mmc_hs200: + return ("HS200"); + case bus_timing_mmc_hs400: + return ("HS400"); + case bus_timing_mmc_hs400es: + return ("HS400 with enhanced strobe"); + } + return (""); +} + static void mmc_log_card(device_t dev, struct mmc_ivars *ivar, int newcard) { + enum mmc_bus_timing max_timing, timing; device_printf(dev, "Card at relative address 0x%04x%s:\n", ivar->rca, newcard ? " added" : ""); device_printf(dev, " card: %s\n", ivar->card_id_string); - device_printf(dev, " bus: %ubit, %uMHz%s\n", + max_timing = bus_timing_normal; + for (timing = bus_timing_max; timing > bus_timing_normal; timing--) { + if (isset(&ivar->timings, timing)) { + max_timing = timing; + break; + } + } + device_printf(dev, " bus: %ubit, %uMHz (%s timing)\n", (ivar->bus_width == bus_width_1 ? 1 : (ivar->bus_width == bus_width_4 ? 4 : 8)), - (ivar->timing == bus_timing_hs ? - ivar->hs_tran_speed : ivar->tran_speed) / 1000000, - ivar->timing == bus_timing_hs ? ", high speed timing" : ""); + mmc_timing_to_dtr(ivar, timing) / 1000000, + mmc_timing_to_string(timing)); device_printf(dev, " memory: %u blocks, erase sector %u blocks%s\n", ivar->sec_count, ivar->erase_sector, ivar->read_only ? ", read-only" : ""); @@ -1192,10 +1399,11 @@ mmc_discover_cards(struct mmc_softc *sc) struct mmc_ivars *ivar = NULL; device_t *devlist; device_t child; - int err, i, devcount, newcard; + int devcount, err, host_caps, i, newcard; uint32_t resp, sec_count, status; uint16_t rca = 2; + host_caps = mmcbr_get_caps(sc->dev); if (bootverbose || mmc_debug) device_printf(sc->dev, "Probing cards\n"); while (1) { @@ -1235,14 +1443,24 @@ mmc_discover_cards(struct mmc_softc *sc) if (mmcbr_get_ro(sc->dev)) ivar->read_only = 1; ivar->bus_width = bus_width_1; - ivar->timing = bus_timing_normal; + setbit(&ivar->timings, bus_timing_normal); ivar->mode = mmcbr_get_mode(sc->dev); if (ivar->mode == mode_sd) { mmc_decode_cid_sd(ivar->raw_cid, &ivar->cid); - mmc_send_relative_addr(sc, &resp); + err = mmc_send_relative_addr(sc, &resp); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error getting RCA %d\n", err); + break; + } ivar->rca = resp >> 16; /* Get card CSD. */ - mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + err = mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error getting CSD %d\n", err); + break; + } if (bootverbose || mmc_debug) device_printf(sc->dev, "%sard detected (CSD %08x%08x%08x%08x)\n", @@ -1271,18 +1489,29 @@ mmc_discover_cards(struct mmc_softc *sc) } /* Get card SCR. Card must be selected to fetch it. */ - mmc_select_card(sc, ivar->rca); - mmc_app_send_scr(sc, ivar->rca, ivar->raw_scr); + err = mmc_select_card(sc, ivar->rca); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error selecting card %d\n", err); + break; + } + err = mmc_app_send_scr(sc, ivar->rca, ivar->raw_scr); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error reading SCR %d\n", err); + break; + } mmc_app_decode_scr(ivar->raw_scr, &ivar->scr); /* Get card switch capabilities (command class 10). */ if ((ivar->scr.sda_vsn >= 1) && (ivar->csd.ccc & (1 << 10))) { - mmc_sd_switch(sc, SD_SWITCH_MODE_CHECK, + err = mmc_sd_switch(sc, SD_SWITCH_MODE_CHECK, SD_SWITCH_GROUP1, SD_SWITCH_NOCHANGE, switch_res); - if (switch_res[13] & (1 << SD_SWITCH_HS_MODE)) { - ivar->timing = bus_timing_hs; - ivar->hs_tran_speed = SD_MAX_HS; + if (err == MMC_ERR_NONE && + switch_res[13] & (1 << SD_SWITCH_HS_MODE)) { + setbit(&ivar->timings, bus_timing_hs); + ivar->hs_tran_speed = SD_HS_MAX; } } @@ -1299,8 +1528,9 @@ mmc_discover_cards(struct mmc_softc *sc) * it is still nice to get that right. */ mmc_select_card(sc, 0); - mmc_select_card(sc, ivar->rca); - mmc_app_sd_status(sc, ivar->rca, ivar->raw_sd_status); + (void)mmc_select_card(sc, ivar->rca); + (void)mmc_app_sd_status(sc, ivar->rca, + ivar->raw_sd_status); mmc_app_decode_sd_status(ivar->raw_sd_status, &ivar->sd_status); if (ivar->sd_status.au_size != 0) { @@ -1308,7 +1538,7 @@ mmc_discover_cards(struct mmc_softc *sc) 16 << ivar->sd_status.au_size; } /* Find max supported bus width. */ - if ((mmcbr_get_caps(sc->dev) & MMC_CAP_4_BIT_DATA) && + if ((host_caps & MMC_CAP_4_BIT_DATA) && (ivar->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) ivar->bus_width = bus_width_4; @@ -1338,9 +1568,17 @@ mmc_discover_cards(struct mmc_softc *sc) return; } ivar->rca = rca++; - mmc_set_relative_addr(sc, ivar->rca); + err = mmc_set_relative_addr(sc, ivar->rca); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error setting RCA %d\n", err); + break; + } /* Get card CSD. */ - mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + err = mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error getting CSD %d\n", err); + break; + } if (bootverbose || mmc_debug) device_printf(sc->dev, "%sard detected (CSD %08x%08x%08x%08x)\n", @@ -1366,7 +1604,12 @@ mmc_discover_cards(struct mmc_softc *sc) break; } - mmc_select_card(sc, ivar->rca); + err = mmc_select_card(sc, ivar->rca); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error selecting card %d\n", + err); + break; + } /* Only MMC >= 4.x devices support EXT_CSD. */ if (ivar->csd.spec_vers >= 4) { @@ -1386,16 +1629,28 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->sec_count = sec_count; ivar->high_cap = 1; } - /* Get card speed in high speed mode. */ - ivar->timing = bus_timing_hs; - if (ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] - & EXT_CSD_CARD_TYPE_52) - ivar->hs_tran_speed = MMC_TYPE_52_MAX_HS; - else if (ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] - & EXT_CSD_CARD_TYPE_26) - ivar->hs_tran_speed = MMC_TYPE_26_MAX_HS; - else - ivar->hs_tran_speed = ivar->tran_speed; + /* Get device speeds beyond normal mode. */ + if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_HS_52) != 0) { + setbit(&ivar->timings, bus_timing_hs); + ivar->hs_tran_speed = MMC_TYPE_HS_52_MAX; + } else if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_HS_26) != 0) { + setbit(&ivar->timings, bus_timing_hs); + ivar->hs_tran_speed = MMC_TYPE_HS_26_MAX; + } + if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_DDR_52_1_2V) != 0 && + (host_caps & MMC_CAP_SIGNALING_120) != 0) { + setbit(&ivar->timings, bus_timing_mmc_ddr52); + setbit(&ivar->vccq_120, bus_timing_mmc_ddr52); + } + if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_DDR_52_1_8V) != 0 && + (host_caps & MMC_CAP_SIGNALING_180) != 0) { + setbit(&ivar->timings, bus_timing_mmc_ddr52); + setbit(&ivar->vccq_180, bus_timing_mmc_ddr52); + } /* * Determine generic switch timeout (provided in * units of 10 ms), defaulting to 500 ms. @@ -1422,9 +1677,6 @@ mmc_discover_cards(struct mmc_softc *sc) break; } } - } else { - ivar->bus_width = bus_width_1; - ivar->timing = bus_timing_normal; } /* @@ -1548,7 +1800,7 @@ mmc_go_discovery(struct mmc_softc *sc) mmc_idle_cards(sc); } else { mmcbr_set_bus_mode(dev, opendrain); - mmcbr_set_clock(dev, CARD_ID_FREQUENCY); + mmcbr_set_clock(dev, SD_MMC_CARD_ID_FREQUENCY); mmcbr_update_ios(dev); /* XXX recompute vdd based on new cards? */ } @@ -1587,42 +1839,59 @@ mmc_calculate_clock(struct mmc_softc *sc { device_t *kids; struct mmc_ivars *ivar; - int i, f_max, max_dtr, max_hs_dtr, max_timing, nkid; - - f_max = mmcbr_get_f_max(sc->dev); - max_dtr = max_hs_dtr = f_max; - if (mmcbr_get_caps(sc->dev) & MMC_CAP_HSPEED) + int host_caps, i, nkid; + uint32_t dtr, max_dtr; + enum mmc_bus_timing max_timing, timing; + bool changed; + + max_dtr = mmcbr_get_f_max(sc->dev); + host_caps = mmcbr_get_caps(sc->dev); + if ((host_caps & MMC_CAP_MMC_DDR52) != 0) + max_timing = bus_timing_mmc_ddr52; + else if ((host_caps & MMC_CAP_HSPEED) != 0) max_timing = bus_timing_hs; else max_timing = bus_timing_normal; if (device_get_children(sc->dev, &kids, &nkid) != 0) panic("can't get children"); - for (i = 0; i < nkid; i++) { - ivar = device_get_ivars(kids[i]); - if (ivar->timing < max_timing) - max_timing = ivar->timing; - if (ivar->tran_speed < max_dtr) - max_dtr = ivar->tran_speed; - if (ivar->hs_tran_speed < max_hs_dtr) - max_hs_dtr = ivar->hs_tran_speed; - } + do { + changed = false; + for (i = 0; i < nkid; i++) { + ivar = device_get_ivars(kids[i]); + if (isclr(&ivar->timings, max_timing)) { + for (timing = max_timing; timing >= + bus_timing_normal; timing--) { + if (isset(&ivar->timings, timing)) { + max_timing = timing; + break; + } + } + changed = true; + } + dtr = mmc_timing_to_dtr(ivar, max_timing); + if (dtr < max_dtr) { + max_dtr = dtr; + changed = true; + } + } + } while (changed == true); if (bootverbose || mmc_debug) { device_printf(sc->dev, - "setting transfer rate to %d.%03dMHz%s\n", + "setting transfer rate to %d.%03dMHz (%s timing)\n", max_dtr / 1000000, (max_dtr / 1000) % 1000, - max_timing == bus_timing_hs ? " (high speed timing)" : ""); + mmc_timing_to_string(max_timing)); } for (i = 0; i < nkid; i++) { ivar = device_get_ivars(kids[i]); - if (ivar->timing == bus_timing_normal) + if ((ivar->timings & ~(1 << bus_timing_normal)) == 0) continue; - mmc_select_card(sc, ivar->rca); - mmc_set_timing(sc, ivar, max_timing); + if (mmc_select_card(sc, ivar->rca) != MMC_ERR_NONE || + mmc_set_timing(sc, ivar, max_timing) != MMC_ERR_NONE) + device_printf(sc->dev, "Card at relative address %d " + "failed to set timing.\n", ivar->rca); } mmc_select_card(sc, 0); free(kids, M_TEMP); - if (max_timing == bus_timing_hs) - max_dtr = max_hs_dtr; mmcbr_set_clock(sc->dev, max_dtr); mmcbr_update_ios(sc->dev); return (max_dtr); Modified: stable/11/sys/dev/mmc/mmcbr_if.m ============================================================================== --- stable/11/sys/dev/mmc/mmcbr_if.m Thu May 18 20:45:09 2017 (r318493) +++ stable/11/sys/dev/mmc/mmcbr_if.m Thu May 18 20:46:20 2017 (r318494) @@ -65,6 +65,18 @@ INTERFACE mmcbr; # +# Default implementations of some methods. +# +CODE { + static int + null_switch_vccq(device_t brdev __unused, device_t reqdev __unused) + { + + return (0); + } +}; + +# # Called by the mmcbus to set up the IO pins correctly, the common/core # supply voltage (VDD/VCC) to use for the device, the clock frequency, the # type of SPI chip select, power mode and bus width. @@ -75,6 +87,14 @@ METHOD int update_ios { }; # +# Called by the mmcbus to switch the signaling voltage (VCCQ). +# +METHOD int switch_vccq { + device_t brdev; + device_t reqdev; +} DEFAULT null_switch_vccq; + +# # Called by the mmcbus or its children to schedule a mmc request. These # requests are queued. Time passes. The bridge then gets notification # of the status of the request, who then notifies the requesting device Modified: stable/11/sys/dev/mmc/mmcbrvar.h ============================================================================== --- stable/11/sys/dev/mmc/mmcbrvar.h Thu May 18 20:45:09 2017 (r318493) +++ stable/11/sys/dev/mmc/mmcbrvar.h Thu May 18 20:46:20 2017 (r318494) @@ -71,6 +71,7 @@ enum mmcbr_device_ivars { MMCBR_IVAR_OCR, MMCBR_IVAR_POWER_MODE, MMCBR_IVAR_VDD, + MMCBR_IVAR_VCCQ, MMCBR_IVAR_CAPS, MMCBR_IVAR_TIMING, MMCBR_IVAR_MAX_DATA, @@ -94,6 +95,7 @@ MMCBR_ACCESSOR(mode, MODE, int) MMCBR_ACCESSOR(ocr, OCR, int) MMCBR_ACCESSOR(power_mode, POWER_MODE, int) MMCBR_ACCESSOR(vdd, VDD, int) +MMCBR_ACCESSOR(vccq, VCCQ, int) MMCBR_ACCESSOR(caps, CAPS, int) MMCBR_ACCESSOR(timing, TIMING, int) MMCBR_ACCESSOR(max_data, MAX_DATA, int) @@ -107,6 +109,13 @@ mmcbr_update_ios(device_t dev) } static int __inline +mmcbr_switch_vccq(device_t dev) +{ + + return (MMCBR_SWITCH_VCCQ(device_get_parent(dev), dev)); +} + +static int __inline mmcbr_get_ro(device_t dev) { Modified: stable/11/sys/dev/mmc/mmcreg.h ============================================================================== --- stable/11/sys/dev/mmc/mmcreg.h Thu May 18 20:45:09 2017 (r318493) +++ stable/11/sys/dev/mmc/mmcreg.h Thu May 18 20:46:20 2017 (r318494) @@ -209,11 +209,11 @@ struct mmc_request { #define MMC_SET_BLOCKLEN 16 #define MMC_READ_SINGLE_BLOCK 17 #define MMC_READ_MULTIPLE_BLOCK 18 - /* reserved: 19 */ +#define MMC_SEND_TUNING_BLOCK 19 +#define MMC_SEND_TUNING_BLOCK_HS200 21 /* Class 3: Stream write commands */ #define MMC_WRITE_DAT_UNTIL_STOP 20 - /* reserved: 21 */ /* reserved: 22 */ /* Class 4: Block oriented write commands */ @@ -304,16 +304,28 @@ struct mmc_request { #define EXT_CSD_ERASE_GRP_DEF 175 /* R/W */ #define EXT_CSD_PART_CONFIG 179 /* R/W */ #define EXT_CSD_BUS_WIDTH 183 /* R/W */ +#define EXT_CSD_STROBE_SUPPORT 184 /* RO */ #define EXT_CSD_HS_TIMING 185 /* R/W */ +#define EXT_CSD_POWER_CLASS 187 /* R/W */ #define EXT_CSD_CARD_TYPE 196 /* RO */ +#define EXT_CSD_DRIVER_STRENGTH 197 /* RO */ #define EXT_CSD_REV 192 /* RO */ #define EXT_CSD_PART_SWITCH_TO 199 /* RO */ +#define EXT_CSD_PWR_CL_52_195 200 /* RO */ +#define EXT_CSD_PWR_CL_26_195 201 /* RO */ +#define EXT_CSD_PWR_CL_52_360 202 /* RO */ +#define EXT_CSD_PWR_CL_26_360 203 /* RO */ #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ #define EXT_CSD_HC_WP_GRP_SIZE 221 /* RO */ #define EXT_CSD_ERASE_TO_MULT 223 /* RO */ #define EXT_CSD_ERASE_GRP_SIZE 224 /* RO */ #define EXT_CSD_BOOT_SIZE_MULT 226 /* RO */ +#define EXT_CSD_PWR_CL_200_195 236 /* RO */ +#define EXT_CSD_PWR_CL_200_360 237 /* RO */ +#define EXT_CSD_PWR_CL_52_195_DDR 238 /* RO */ +#define EXT_CSD_PWR_CL_52_360_DDR 239 /* RO */ #define EXT_CSD_GEN_CMD6_TIME 248 /* RO */ +#define EXT_CSD_PWR_CL_200_360_DDR 253 /* RO */ /* * EXT_CSD field definitions @@ -363,15 +375,38 @@ struct mmc_request { #define EXT_CSD_CMD_SET_SECURE 2 #define EXT_CSD_CMD_SET_CPSECURE 4 -#define EXT_CSD_CARD_TYPE_26 1 -#define EXT_CSD_CARD_TYPE_52 2 +#define EXT_CSD_HS_TIMING_BC 0 +#define EXT_CSD_HS_TIMING_HS 1 +#define EXT_CSD_HS_TIMING_DDR200 2 +#define EXT_CSD_HS_TIMING_DDR400 3 +#define EXT_CSD_HS_TIMING_DRV_STR_SHIFT 4 + +#define EXT_CSD_POWER_CLASS_8BIT_MASK 0xf0 +#define EXT_CSD_POWER_CLASS_8BIT_SHIFT 4 +#define EXT_CSD_POWER_CLASS_4BIT_MASK 0x0f +#define EXT_CSD_POWER_CLASS_4BIT_SHIFT 0 + +#define EXT_CSD_CARD_TYPE_HS_26 0x0001 +#define EXT_CSD_CARD_TYPE_HS_52 0x0002 +#define EXT_CSD_CARD_TYPE_DDR_52_1_8V 0x0004 +#define EXT_CSD_CARD_TYPE_DDR_52_1_2V 0x0008 +#define EXT_CSD_CARD_TYPE_HS200_1_8V 0x0010 +#define EXT_CSD_CARD_TYPE_HS200_1_2V 0x0020 +#define EXT_CSD_CARD_TYPE_HS400_1_8V 0x0040 +#define EXT_CSD_CARD_TYPE_HS400_1_2V 0x0080 +#define EXT_CSD_CARD_TYPE_HS400ES 0x0100 #define EXT_CSD_BUS_WIDTH_1 0 #define EXT_CSD_BUS_WIDTH_4 1 #define EXT_CSD_BUS_WIDTH_8 2 - -#define MMC_TYPE_26_MAX_HS 26000000 -#define MMC_TYPE_52_MAX_HS 52000000 +#define EXT_CSD_BUS_WIDTH_4_DDR 5 +#define EXT_CSD_BUS_WIDTH_8_DDR 6 +#define EXT_CSD_BUS_WIDTH_ES 0x80 + +#define MMC_TYPE_HS_26_MAX 26000000 +#define MMC_TYPE_HS_52_MAX 52000000 +#define MMC_TYPE_DDR52_MAX 52000000 +#define MMC_TYPE_HS200_HS400ES_MAX 200000000 /* * SD bus widths @@ -387,12 +422,23 @@ struct mmc_request { #define SD_SWITCH_GROUP1 0 #define SD_SWITCH_NORMAL_MODE 0 #define SD_SWITCH_HS_MODE 1 +#define SD_SWITCH_SDR50_MODE 2 +#define SD_SWITCH_SDR104_MODE 3 +#define SD_SWITCH_DDR50 4 #define SD_SWITCH_NOCHANGE 0xF #define SD_CLR_CARD_DETECT 0 #define SD_SET_CARD_DETECT 1 -#define SD_MAX_HS 50000000 +#define SD_HS_MAX 50000000 +#define SD_DDR50_MAX 50000000 +#define SD_SDR12_MAX 25000000 +#define SD_SDR25_MAX 50000000 +#define SD_SDR50_MAX 100000000 +#define SD_SDR104_MAX 208000000 + +/* Specifications require 400 kHz max. during ID phase. */ +#define SD_MMC_CARD_ID_FREQUENCY 400000 /* OCR bits */ @@ -429,6 +475,12 @@ struct mmc_request { #define MMC_OCR_340_350 (1U << 22) /* Vdd voltage 3.40 ~ 3.50 */ #define MMC_OCR_350_360 (1U << 23) /* Vdd voltage 3.50 ~ 3.60 */ #define MMC_OCR_MAX_VOLTAGE_SHIFT 23 +#define MMC_OCR_S18R (1U << 24) /* Switching to 1.8 V requested (SD) */ +#define MMC_OCR_S18A MMC_OCR_S18R /* Switching to 1.8 V accepted (SD) */ +#define MMC_OCR_XPC (1U << 28) /* SDXC Power Control */ +#define MMC_OCR_ACCESS_MODE_BYTE (0U << 29) /* Access Mode Byte (MMC) */ +#define MMC_OCR_ACCESS_MODE_SECT (1U << 29) /* Access Mode Sector (MMC) */ +#define MMC_OCR_ACCESS_MODE_MASK (3U << 29) #define MMC_OCR_CCS (1u << 30) /* Card Capacity status (SD vs SDHC) */ #define MMC_OCR_CARD_BUSY (1U << 31) /* Card Power up status */ Modified: stable/11/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci.c Thu May 18 20:45:09 2017 (r318493) +++ stable/11/sys/dev/sdhci/sdhci.c Thu May 18 20:46:20 2017 (r318494) @@ -57,6 +57,12 @@ SYSCTL_NODE(_hw, OID_AUTO, sdhci, CTLFLA static int sdhci_debug; SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RWTUN, &sdhci_debug, 0, "Debug level"); +u_int sdhci_quirk_clear = 0; +SYSCTL_INT(_hw_sdhci, OID_AUTO, quirk_clear, CTLFLAG_RWTUN, &sdhci_quirk_clear, + 0, "Mask of quirks to clear"); +u_int sdhci_quirk_set = 0; +SYSCTL_INT(_hw_sdhci, OID_AUTO, quirk_set, CTLFLAG_RWTUN, &sdhci_quirk_set, 0, + "Mask of quirks to set"); #define RD1(slot, off) SDHCI_READ_1((slot)->bus, (slot), (off)) #define RD2(slot, off) SDHCI_READ_2((slot)->bus, (slot), (off)) @@ -78,6 +84,10 @@ static void sdhci_card_poll(void *); static void sdhci_card_task(void *, int); /* helper routines */ +static void sdhci_dumpregs(struct sdhci_slot *slot); +static int slot_printf(struct sdhci_slot *slot, const char * fmt, ...) + __printflike(2, 3); + #define SDHCI_LOCK(_slot) mtx_lock(&(_slot)->mtx) #define SDHCI_UNLOCK(_slot) mtx_unlock(&(_slot)->mtx) #define SDHCI_LOCK_INIT(_slot) \ @@ -581,7 +591,7 @@ sdhci_card_poll(void *arg) int sdhci_init_slot(device_t dev, struct sdhci_slot *slot, int num) { - uint32_t caps, freq; + uint32_t caps, caps2, freq, host_caps; int err; SDHCI_LOCK_INIT(slot); @@ -625,10 +635,16 @@ sdhci_init_slot(device_t dev, struct sdh sdhci_init(slot); slot->version = (RD2(slot, SDHCI_HOST_VERSION) >> SDHCI_SPEC_VER_SHIFT) & SDHCI_SPEC_VER_MASK; - if (slot->quirks & SDHCI_QUIRK_MISSING_CAPS) + if (slot->quirks & SDHCI_QUIRK_MISSING_CAPS) { caps = slot->caps; - else + caps2 = slot->caps2; + } else { caps = RD4(slot, SDHCI_CAPABILITIES); + if (slot->version >= SDHCI_SPEC_300) + caps2 = RD4(slot, SDHCI_CAPABILITIES2); + else + caps2 = 0; + } /* Calculate base clock frequency. */ if (slot->version >= SDHCI_SPEC_300) freq = (caps & SDHCI_CLOCK_V3_BASE_MASK) >> @@ -684,15 +700,45 @@ sdhci_init_slot(device_t dev, struct sdh device_printf(dev, "Hardware doesn't report any " "support voltages.\n"); } - slot->host.caps = MMC_CAP_4_BIT_DATA; + host_caps = MMC_CAP_4_BIT_DATA; if (caps & SDHCI_CAN_DO_8BITBUS) - slot->host.caps |= MMC_CAP_8_BIT_DATA; + host_caps |= MMC_CAP_8_BIT_DATA; if (caps & SDHCI_CAN_DO_HISPD) - slot->host.caps |= MMC_CAP_HSPEED; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu May 18 20:46:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84B06D73137; Thu, 18 May 2017 20:46:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 492DA84D; Thu, 18 May 2017 20:46:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKkSOP021508; Thu, 18 May 2017 20:46:28 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKkRrZ021500; Thu, 18 May 2017 20:46:27 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705182046.v4IKkRrZ021500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 18 May 2017 20:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318495 - in stable/10/sys/dev: mmc sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:46:29 -0000 Author: marius Date: Thu May 18 20:46:27 2017 New Revision: 318495 URL: https://svnweb.freebsd.org/changeset/base/318495 Log: MFC: r315598 o Add support for eMMC DDR bus speed mode up to 52 MHz to sdhci(4) and mmc(4). Given that support for DDR52 is not denoted by SDHCI capability registers, availability of that timing is indicated by a new quirk SDHCI_QUIRK_MMC_DDR52 and only enabled for Intel SDHCI controllers so far. Compared to 50 MHz at SDR high speed typically yielding ~45 MB/s read throughput with the eMMC chips tested, read performance goes up to ~80 MB/s at DDR52. As a side-effect, this change also fixes communication with some eMMC devices at SDR high speed mode due to the signaling voltage and UHS bits in the SDHCI controller no longer being left in an inappropriate state. o In sdhci(4), add two tunables hw.sdhci.quirk_clear as well as hw.sdhci.quirk_set, which (when hooked up in the front-end) allow to set/clear sdhci(4) quirks for debugging and testing purposes. However, especially for SDHCI controllers on the PCI bus which have no specific support code so far and, thus, are picked up as generic SDHCI controllers, hw.sdhci.quirk_set allows for setting the necessary quirks (if required). o In mmc(4), check and handle the return values of some more function calls instead of assuming that everything went right. In case failures actually are not problematic, indicate that by casting the return value to void. Modified: stable/10/sys/dev/mmc/bridge.h stable/10/sys/dev/mmc/mmc.c stable/10/sys/dev/mmc/mmcbr_if.m stable/10/sys/dev/mmc/mmcbrvar.h stable/10/sys/dev/mmc/mmcreg.h stable/10/sys/dev/sdhci/sdhci.c stable/10/sys/dev/sdhci/sdhci.h stable/10/sys/dev/sdhci/sdhci_acpi.c stable/10/sys/dev/sdhci/sdhci_if.m stable/10/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mmc/bridge.h ============================================================================== --- stable/10/sys/dev/mmc/bridge.h Thu May 18 20:46:20 2017 (r318494) +++ stable/10/sys/dev/mmc/bridge.h Thu May 18 20:46:27 2017 (r318495) @@ -89,6 +89,10 @@ enum mmc_vdd { vdd_330, vdd_340, vdd_350, vdd_360 }; +enum mmc_vccq { + vccq_120 = 0, vccq_180, vccq_330 +}; + enum mmc_power_mode { power_off = 0, power_up, power_on }; @@ -105,18 +109,28 @@ enum mmc_bus_width { bus_width_1 = 0, bus_width_4 = 2, bus_width_8 = 3 }; +enum mmc_drv_type { + drv_type_b = 0, drv_type_a, drv_type_c, drv_type_d +}; + enum mmc_bus_timing { - bus_timing_normal = 0, bus_timing_hs + bus_timing_normal = 0, bus_timing_hs, bus_timing_uhs_sdr12, + bus_timing_uhs_sdr25, bus_timing_uhs_sdr50, bus_timing_uhs_ddr50, + bus_timing_uhs_sdr104, bus_timing_mmc_ddr52, bus_timing_mmc_hs200, + bus_timing_mmc_hs400, bus_timing_mmc_hs400es, bus_timing_max = + bus_timing_mmc_hs400es }; struct mmc_ios { uint32_t clock; /* Speed of the clock in Hz to move data */ enum mmc_vdd vdd; /* Voltage to apply to the power pins */ + enum mmc_vccq vccq; /* Voltage to use for signaling */ enum mmc_bus_mode bus_mode; enum mmc_chip_select chip_select; enum mmc_bus_width bus_width; enum mmc_power_mode power_mode; enum mmc_bus_timing timing; + enum mmc_drv_type drv_type; }; enum mmc_card_mode { @@ -134,6 +148,28 @@ struct mmc_host { #define MMC_CAP_HSPEED (1 << 2) /* Can do High Speed transfers */ #define MMC_CAP_BOOT_NOACC (1 << 4) /* Cannot access boot partitions */ #define MMC_CAP_WAIT_WHILE_BUSY (1 << 5) /* Host waits for busy responses */ +#define MMC_CAP_UHS_SDR12 (1 << 6) /* Can do UHS SDR12 */ +#define MMC_CAP_UHS_SDR25 (1 << 7) /* Can do UHS SDR25 */ +#define MMC_CAP_UHS_SDR50 (1 << 8) /* Can do UHS SDR50 */ +#define MMC_CAP_UHS_SDR104 (1 << 9) /* Can do UHS SDR104 */ +#define MMC_CAP_UHS_DDR50 (1 << 10) /* Can do UHS DDR50 */ +#define MMC_CAP_MMC_DDR52_120 (1 << 11) /* Can do eMMC DDR52 at 1.2 V */ +#define MMC_CAP_MMC_DDR52_180 (1 << 12) /* Can do eMMC DDR52 at 1.8 V */ +#define MMC_CAP_MMC_DDR52 (MMC_CAP_MMC_DDR52_120 | MMC_CAP_MMC_DDR52_180) +#define MMC_CAP_MMC_HS200_120 (1 << 13) /* Can do eMMC HS200 at 1.2 V */ +#define MMC_CAP_MMC_HS200_180 (1 << 14) /* Can do eMMC HS200 at 1.8 V */ +#define MMC_CAP_MMC_HS200 (MMC_CAP_MMC_HS200_120| MMC_CAP_MMC_HS200_180) +#define MMC_CAP_MMC_HS400_120 (1 << 15) /* Can do eMMC HS400 at 1.2 V */ +#define MMC_CAP_MMC_HS400_180 (1 << 16) /* Can do eMMC HS400 at 1.8 V */ +#define MMC_CAP_MMC_HS400 (MMC_CAP_MMC_HS400_120 | MMC_CAP_MMC_HS400_180) +#define MMC_CAP_MMC_HSX00_120 (MMC_CAP_MMC_HS200_120 | MMC_CAP_MMC_HS400_120) +#define MMC_CAP_MMC_ENH_STROBE (1 << 17) /* Can do eMMC Enhanced Strobe */ +#define MMC_CAP_SIGNALING_120 (1 << 18) /* Can do signaling at 1.2 V */ +#define MMC_CAP_SIGNALING_180 (1 << 19) /* Can do signaling at 1.8 V */ +#define MMC_CAP_SIGNALING_330 (1 << 20) /* Can do signaling at 3.3 V */ +#define MMC_CAP_DRIVER_TYPE_A (1 << 21) /* Can do Driver Type A */ +#define MMC_CAP_DRIVER_TYPE_C (1 << 22) /* Can do Driver Type C */ +#define MMC_CAP_DRIVER_TYPE_D (1 << 23) /* Can do Driver Type D */ enum mmc_card_mode mode; struct mmc_ios ios; /* Current state of the host */ }; @@ -141,7 +177,7 @@ struct mmc_host { extern driver_t mmc_driver; extern devclass_t mmc_devclass; -#define MMC_VERSION 2 +#define MMC_VERSION 3 #define MMC_DECLARE_BRIDGE(name) \ DRIVER_MODULE(mmc, name, mmc_driver, mmc_devclass, NULL, NULL); \ Modified: stable/10/sys/dev/mmc/mmc.c ============================================================================== --- stable/10/sys/dev/mmc/mmc.c Thu May 18 20:46:20 2017 (r318494) +++ stable/10/sys/dev/mmc/mmc.c Thu May 18 20:46:27 2017 (r318495) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2006 Bernd Walter. All rights reserved. * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2017 Marius Strobl * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -75,6 +76,8 @@ __FBSDID("$FreeBSD$"); #include "mmcbr_if.h" #include "mmcbus_if.h" +CTASSERT(bus_timing_max <= sizeof(uint32_t) * NBBY); + /* * Per-card data */ @@ -92,9 +95,11 @@ struct mmc_ivars { struct mmc_sd_status sd_status; /* SD_STATUS decoded */ u_char read_only; /* True when the device is read-only */ u_char bus_width; /* Bus width to use */ - u_char timing; /* Bus timing support */ u_char high_cap; /* High Capacity card (block addressed) */ uint32_t sec_count; /* Card capacity in 512byte blocks */ + uint32_t timings; /* Mask of bus timings supported */ + uint32_t vccq_120; /* Mask of bus timings at VCCQ of 1.2 V */ + uint32_t vccq_180; /* Mask of bus timings at VCCQ of 1.8 V */ uint32_t tran_speed; /* Max speed in normal mode */ uint32_t hs_tran_speed; /* Max speed in high speed mode */ uint32_t erase_sector; /* Card native erase sector size */ @@ -105,8 +110,6 @@ struct mmc_ivars { #define CMD_RETRIES 3 -#define CARD_ID_FREQUENCY 400000 /* Spec requires 400kHz max during ID phase. */ - static SYSCTL_NODE(_hw, OID_AUTO, mmc, CTLFLAG_RD, NULL, "mmc driver"); static int mmc_debug; @@ -181,12 +184,15 @@ static int mmc_send_op_cond(struct mmc_s uint32_t *rocr); static int mmc_send_relative_addr(struct mmc_softc *sc, uint32_t *resp); static int mmc_set_blocklen(struct mmc_softc *sc, uint32_t len); -static int mmc_set_card_bus_width(struct mmc_softc *sc, - struct mmc_ivars *ivar); +static int mmc_set_card_bus_width(struct mmc_softc *sc, struct mmc_ivars *ivar); +static int mmc_set_power_class(struct mmc_softc *sc, struct mmc_ivars *ivar); static int mmc_set_relative_addr(struct mmc_softc *sc, uint16_t resp); static int mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, - int timing); + enum mmc_bus_timing timing); static int mmc_test_bus_width(struct mmc_softc *sc); +static uint32_t mmc_timing_to_dtr(struct mmc_ivars *ivar, + enum mmc_bus_timing timing); +static const char *mmc_timing_to_string(enum mmc_bus_timing timing); static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries); static int mmc_wait_for_req(struct mmc_softc *sc, struct mmc_request *req); @@ -265,8 +271,8 @@ mmc_acquire_bus(device_t busdev, device_ { struct mmc_softc *sc; struct mmc_ivars *ivar; - int err; - int rca; + int err, rca; + enum mmc_bus_timing timing; err = MMCBR_ACQUIRE_HOST(device_get_parent(busdev), busdev); if (err) @@ -288,16 +294,44 @@ mmc_acquire_bus(device_t busdev, device_ ivar = device_get_ivars(dev); rca = ivar->rca; if (sc->last_rca != rca) { - mmc_select_card(sc, rca); + if (mmc_select_card(sc, rca) != MMC_ERR_NONE) { + device_printf(sc->dev, "Card at relative " + "address %d failed to select.\n", rca); + return (ENXIO); + } sc->last_rca = rca; + timing = mmcbr_get_timing(busdev); /* Prepare bus width for the new card. */ if (bootverbose || mmc_debug) { device_printf(busdev, - "setting bus width to %d bits\n", + "setting bus width to %d bits %s timing\n", (ivar->bus_width == bus_width_4) ? 4 : - (ivar->bus_width == bus_width_8) ? 8 : 1); + (ivar->bus_width == bus_width_8) ? 8 : 1, + mmc_timing_to_string(timing)); + } + if (mmc_set_card_bus_width(sc, ivar) != MMC_ERR_NONE) { + device_printf(sc->dev, "Card at relative " + "address %d failed to set bus width.\n", + rca); + return (ENXIO); + } + if (isset(&ivar->vccq_120, timing)) + mmcbr_set_vccq(busdev, vccq_120); + else if (isset(&ivar->vccq_180, timing)) + mmcbr_set_vccq(busdev, vccq_180); + else + mmcbr_set_vccq(busdev, vccq_330); + if (mmcbr_switch_vccq(busdev) != 0) { + device_printf(sc->dev, "Failed to set VCCQ " + "for card at relative address %d.\n", rca); + return (ENXIO); + } + if (mmc_set_power_class(sc, ivar) != MMC_ERR_NONE) { + device_printf(sc->dev, "Card at relative " + "address %d failed to set power class.\n", + rca); + return (ENXIO); } - mmc_set_card_bus_width(sc, ivar); mmcbr_set_bus_width(busdev, ivar->bus_width); mmcbr_update_ios(busdev); } @@ -525,6 +559,7 @@ static void mmc_power_up(struct mmc_softc *sc) { device_t dev; + enum mmc_vccq vccq; dev = sc->dev; mmcbr_set_vdd(dev, mmc_highest_voltage(mmcbr_get_host_ocr(dev))); @@ -534,9 +569,14 @@ mmc_power_up(struct mmc_softc *sc) mmcbr_set_power_mode(dev, power_up); mmcbr_set_clock(dev, 0); mmcbr_update_ios(dev); + for (vccq = vccq_330; ; vccq--) { + mmcbr_set_vccq(dev, vccq); + if (mmcbr_switch_vccq(dev) == 0 || vccq == vccq_120) + break; + } mmc_ms_delay(1); - mmcbr_set_clock(dev, CARD_ID_FREQUENCY); + mmcbr_set_clock(dev, SD_MMC_CARD_ID_FREQUENCY); mmcbr_set_timing(dev, bus_timing_normal); mmcbr_set_power_mode(dev, power_on); mmcbr_update_ios(dev); @@ -632,10 +672,30 @@ mmc_set_card_bus_width(struct mmc_softc value = EXT_CSD_BUS_WIDTH_1; break; case bus_width_4: - value = EXT_CSD_BUS_WIDTH_4; + switch (mmcbr_get_timing(sc->dev)) { + case bus_timing_mmc_ddr52: + case bus_timing_mmc_hs200: + case bus_timing_mmc_hs400: + case bus_timing_mmc_hs400es: + value = EXT_CSD_BUS_WIDTH_4_DDR; + break; + default: + value = EXT_CSD_BUS_WIDTH_4; + break; + } break; case bus_width_8: - value = EXT_CSD_BUS_WIDTH_8; + switch (mmcbr_get_timing(sc->dev)) { + case bus_timing_mmc_ddr52: + case bus_timing_mmc_hs200: + case bus_timing_mmc_hs400: + case bus_timing_mmc_hs400es: + value = EXT_CSD_BUS_WIDTH_8_DDR; + break; + default: + value = EXT_CSD_BUS_WIDTH_8; + break; + } break; default: return (MMC_ERR_INVALID); @@ -648,23 +708,96 @@ mmc_set_card_bus_width(struct mmc_softc } static int -mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, int timing) +mmc_set_power_class(struct mmc_softc *sc, struct mmc_ivars *ivar) { - u_char switch_res[64]; - uint8_t value; - int err; + device_t dev; + const uint8_t *ext_csd; + uint32_t clock; + uint8_t value; - switch (timing) { - case bus_timing_normal: - value = 0; + dev = sc->dev; + if (mmcbr_get_mode(dev) != mode_mmc || ivar->csd.spec_vers < 4) + return (MMC_ERR_NONE); + + value = 0; + ext_csd = ivar->raw_ext_csd; + clock = mmcbr_get_clock(dev); + switch (1 << mmcbr_get_vdd(dev)) { + case MMC_OCR_LOW_VOLTAGE: + if (clock <= MMC_TYPE_HS_26_MAX) + value = ext_csd[EXT_CSD_PWR_CL_26_195]; + else if (clock <= MMC_TYPE_HS_52_MAX) { + if (mmcbr_get_timing(dev) >= bus_timing_mmc_ddr52 && + ivar->bus_width >= bus_width_4) + value = ext_csd[EXT_CSD_PWR_CL_52_195_DDR]; + else + value = ext_csd[EXT_CSD_PWR_CL_52_195]; + } else if (clock <= MMC_TYPE_HS200_HS400ES_MAX) + value = ext_csd[EXT_CSD_PWR_CL_200_195]; break; - case bus_timing_hs: - value = 1; + case MMC_OCR_270_280: + case MMC_OCR_280_290: + case MMC_OCR_290_300: + case MMC_OCR_300_310: + case MMC_OCR_310_320: + case MMC_OCR_320_330: + case MMC_OCR_330_340: + case MMC_OCR_340_350: + case MMC_OCR_350_360: + if (clock <= MMC_TYPE_HS_26_MAX) + value = ext_csd[EXT_CSD_PWR_CL_26_360]; + else if (clock <= MMC_TYPE_HS_52_MAX) { + if (mmcbr_get_timing(dev) == bus_timing_mmc_ddr52 && + ivar->bus_width >= bus_width_4) + value = ext_csd[EXT_CSD_PWR_CL_52_360_DDR]; + else + value = ext_csd[EXT_CSD_PWR_CL_52_360]; + } else if (clock <= MMC_TYPE_HS200_HS400ES_MAX) { + if (ivar->bus_width == bus_width_8) + value = ext_csd[EXT_CSD_PWR_CL_200_360_DDR]; + else + value = ext_csd[EXT_CSD_PWR_CL_200_360]; + } break; default: + device_printf(dev, "No power class support for VDD 0x%x\n", + 1 << mmcbr_get_vdd(dev)); return (MMC_ERR_INVALID); } + + if (ivar->bus_width == bus_width_8) + value = (value & EXT_CSD_POWER_CLASS_8BIT_MASK) >> + EXT_CSD_POWER_CLASS_8BIT_SHIFT; + else + value = (value & EXT_CSD_POWER_CLASS_4BIT_MASK) >> + EXT_CSD_POWER_CLASS_4BIT_SHIFT; + + if (value == 0) + return (MMC_ERR_NONE); + + return (mmc_switch(dev, dev, ivar->rca, EXT_CSD_CMD_SET_NORMAL, + EXT_CSD_POWER_CLASS, value, ivar->cmd6_time, true)); +} + +static int +mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, + enum mmc_bus_timing timing) +{ + u_char switch_res[64]; + uint8_t value; + int err; + if (mmcbr_get_mode(sc->dev) == mode_sd) { + switch (timing) { + case bus_timing_normal: + value = SD_SWITCH_NORMAL_MODE; + break; + case bus_timing_hs: + value = SD_SWITCH_HS_MODE; + break; + default: + return (MMC_ERR_INVALID); + } err = mmc_sd_switch(sc, SD_SWITCH_MODE_SET, SD_SWITCH_GROUP1, value, switch_res); if (err != MMC_ERR_NONE) @@ -674,6 +807,17 @@ mmc_set_timing(struct mmc_softc *sc, str mmcbr_set_timing(sc->dev, timing); mmcbr_update_ios(sc->dev); } else { + switch (timing) { + case bus_timing_normal: + value = EXT_CSD_HS_TIMING_BC; + break; + case bus_timing_hs: + case bus_timing_mmc_ddr52: + value = EXT_CSD_HS_TIMING_HS; + break; + default: + return (MMC_ERR_INVALID); + } err = mmc_switch(sc->dev, sc->dev, ivar->rca, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, value, ivar->cmd6_time, false); @@ -1167,19 +1311,82 @@ mmc_set_blocklen(struct mmc_softc *sc, u return (err); } +static uint32_t +mmc_timing_to_dtr(struct mmc_ivars *ivar, enum mmc_bus_timing timing) +{ + + switch (timing) { + case bus_timing_normal: + return (ivar->tran_speed); + case bus_timing_hs: + return (ivar->hs_tran_speed); + case bus_timing_uhs_sdr12: + return (SD_SDR12_MAX); + case bus_timing_uhs_sdr25: + return (SD_SDR25_MAX); + case bus_timing_uhs_ddr50: + return (SD_DDR50_MAX); + case bus_timing_uhs_sdr50: + return (SD_SDR50_MAX); + case bus_timing_uhs_sdr104: + return (SD_SDR104_MAX); + case bus_timing_mmc_ddr52: + return (MMC_TYPE_DDR52_MAX); + case bus_timing_mmc_hs200: + case bus_timing_mmc_hs400: + case bus_timing_mmc_hs400es: + return (MMC_TYPE_HS200_HS400ES_MAX); + } + return (0); +} + +static const char * +mmc_timing_to_string(enum mmc_bus_timing timing) +{ + + switch (timing) { + case bus_timing_normal: + return ("normal speed"); + case bus_timing_hs: + return ("high speed"); + case bus_timing_uhs_sdr12: + case bus_timing_uhs_sdr25: + case bus_timing_uhs_sdr50: + case bus_timing_uhs_sdr104: + return ("single data rate"); + case bus_timing_uhs_ddr50: + case bus_timing_mmc_ddr52: + return ("dual data rate"); + case bus_timing_mmc_hs200: + return ("HS200"); + case bus_timing_mmc_hs400: + return ("HS400"); + case bus_timing_mmc_hs400es: + return ("HS400 with enhanced strobe"); + } + return (""); +} + static void mmc_log_card(device_t dev, struct mmc_ivars *ivar, int newcard) { + enum mmc_bus_timing max_timing, timing; device_printf(dev, "Card at relative address 0x%04x%s:\n", ivar->rca, newcard ? " added" : ""); device_printf(dev, " card: %s\n", ivar->card_id_string); - device_printf(dev, " bus: %ubit, %uMHz%s\n", + max_timing = bus_timing_normal; + for (timing = bus_timing_max; timing > bus_timing_normal; timing--) { + if (isset(&ivar->timings, timing)) { + max_timing = timing; + break; + } + } + device_printf(dev, " bus: %ubit, %uMHz (%s timing)\n", (ivar->bus_width == bus_width_1 ? 1 : (ivar->bus_width == bus_width_4 ? 4 : 8)), - (ivar->timing == bus_timing_hs ? - ivar->hs_tran_speed : ivar->tran_speed) / 1000000, - ivar->timing == bus_timing_hs ? ", high speed timing" : ""); + mmc_timing_to_dtr(ivar, timing) / 1000000, + mmc_timing_to_string(timing)); device_printf(dev, " memory: %u blocks, erase sector %u blocks%s\n", ivar->sec_count, ivar->erase_sector, ivar->read_only ? ", read-only" : ""); @@ -1193,10 +1400,11 @@ mmc_discover_cards(struct mmc_softc *sc) struct mmc_ivars *ivar = NULL; device_t *devlist; device_t child; - int err, i, devcount, newcard; + int devcount, err, host_caps, i, newcard; uint32_t resp, sec_count, status; uint16_t rca = 2; + host_caps = mmcbr_get_caps(sc->dev); if (bootverbose || mmc_debug) device_printf(sc->dev, "Probing cards\n"); while (1) { @@ -1236,14 +1444,24 @@ mmc_discover_cards(struct mmc_softc *sc) if (mmcbr_get_ro(sc->dev)) ivar->read_only = 1; ivar->bus_width = bus_width_1; - ivar->timing = bus_timing_normal; + setbit(&ivar->timings, bus_timing_normal); ivar->mode = mmcbr_get_mode(sc->dev); if (ivar->mode == mode_sd) { mmc_decode_cid_sd(ivar->raw_cid, &ivar->cid); - mmc_send_relative_addr(sc, &resp); + err = mmc_send_relative_addr(sc, &resp); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error getting RCA %d\n", err); + break; + } ivar->rca = resp >> 16; /* Get card CSD. */ - mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + err = mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error getting CSD %d\n", err); + break; + } if (bootverbose || mmc_debug) device_printf(sc->dev, "%sard detected (CSD %08x%08x%08x%08x)\n", @@ -1272,18 +1490,29 @@ mmc_discover_cards(struct mmc_softc *sc) } /* Get card SCR. Card must be selected to fetch it. */ - mmc_select_card(sc, ivar->rca); - mmc_app_send_scr(sc, ivar->rca, ivar->raw_scr); + err = mmc_select_card(sc, ivar->rca); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error selecting card %d\n", err); + break; + } + err = mmc_app_send_scr(sc, ivar->rca, ivar->raw_scr); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error reading SCR %d\n", err); + break; + } mmc_app_decode_scr(ivar->raw_scr, &ivar->scr); /* Get card switch capabilities (command class 10). */ if ((ivar->scr.sda_vsn >= 1) && (ivar->csd.ccc & (1 << 10))) { - mmc_sd_switch(sc, SD_SWITCH_MODE_CHECK, + err = mmc_sd_switch(sc, SD_SWITCH_MODE_CHECK, SD_SWITCH_GROUP1, SD_SWITCH_NOCHANGE, switch_res); - if (switch_res[13] & (1 << SD_SWITCH_HS_MODE)) { - ivar->timing = bus_timing_hs; - ivar->hs_tran_speed = SD_MAX_HS; + if (err == MMC_ERR_NONE && + switch_res[13] & (1 << SD_SWITCH_HS_MODE)) { + setbit(&ivar->timings, bus_timing_hs); + ivar->hs_tran_speed = SD_HS_MAX; } } @@ -1300,8 +1529,9 @@ mmc_discover_cards(struct mmc_softc *sc) * it is still nice to get that right. */ mmc_select_card(sc, 0); - mmc_select_card(sc, ivar->rca); - mmc_app_sd_status(sc, ivar->rca, ivar->raw_sd_status); + (void)mmc_select_card(sc, ivar->rca); + (void)mmc_app_sd_status(sc, ivar->rca, + ivar->raw_sd_status); mmc_app_decode_sd_status(ivar->raw_sd_status, &ivar->sd_status); if (ivar->sd_status.au_size != 0) { @@ -1309,7 +1539,7 @@ mmc_discover_cards(struct mmc_softc *sc) 16 << ivar->sd_status.au_size; } /* Find max supported bus width. */ - if ((mmcbr_get_caps(sc->dev) & MMC_CAP_4_BIT_DATA) && + if ((host_caps & MMC_CAP_4_BIT_DATA) && (ivar->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) ivar->bus_width = bus_width_4; @@ -1339,9 +1569,17 @@ mmc_discover_cards(struct mmc_softc *sc) return; } ivar->rca = rca++; - mmc_set_relative_addr(sc, ivar->rca); + err = mmc_set_relative_addr(sc, ivar->rca); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error setting RCA %d\n", err); + break; + } /* Get card CSD. */ - mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + err = mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error getting CSD %d\n", err); + break; + } if (bootverbose || mmc_debug) device_printf(sc->dev, "%sard detected (CSD %08x%08x%08x%08x)\n", @@ -1367,7 +1605,12 @@ mmc_discover_cards(struct mmc_softc *sc) break; } - mmc_select_card(sc, ivar->rca); + err = mmc_select_card(sc, ivar->rca); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error selecting card %d\n", + err); + break; + } /* Only MMC >= 4.x devices support EXT_CSD. */ if (ivar->csd.spec_vers >= 4) { @@ -1387,16 +1630,28 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->sec_count = sec_count; ivar->high_cap = 1; } - /* Get card speed in high speed mode. */ - ivar->timing = bus_timing_hs; - if (ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] - & EXT_CSD_CARD_TYPE_52) - ivar->hs_tran_speed = MMC_TYPE_52_MAX_HS; - else if (ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] - & EXT_CSD_CARD_TYPE_26) - ivar->hs_tran_speed = MMC_TYPE_26_MAX_HS; - else - ivar->hs_tran_speed = ivar->tran_speed; + /* Get device speeds beyond normal mode. */ + if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_HS_52) != 0) { + setbit(&ivar->timings, bus_timing_hs); + ivar->hs_tran_speed = MMC_TYPE_HS_52_MAX; + } else if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_HS_26) != 0) { + setbit(&ivar->timings, bus_timing_hs); + ivar->hs_tran_speed = MMC_TYPE_HS_26_MAX; + } + if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_DDR_52_1_2V) != 0 && + (host_caps & MMC_CAP_SIGNALING_120) != 0) { + setbit(&ivar->timings, bus_timing_mmc_ddr52); + setbit(&ivar->vccq_120, bus_timing_mmc_ddr52); + } + if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_DDR_52_1_8V) != 0 && + (host_caps & MMC_CAP_SIGNALING_180) != 0) { + setbit(&ivar->timings, bus_timing_mmc_ddr52); + setbit(&ivar->vccq_180, bus_timing_mmc_ddr52); + } /* * Determine generic switch timeout (provided in * units of 10 ms), defaulting to 500 ms. @@ -1423,9 +1678,6 @@ mmc_discover_cards(struct mmc_softc *sc) break; } } - } else { - ivar->bus_width = bus_width_1; - ivar->timing = bus_timing_normal; } /* @@ -1549,7 +1801,7 @@ mmc_go_discovery(struct mmc_softc *sc) mmc_idle_cards(sc); } else { mmcbr_set_bus_mode(dev, opendrain); - mmcbr_set_clock(dev, CARD_ID_FREQUENCY); + mmcbr_set_clock(dev, SD_MMC_CARD_ID_FREQUENCY); mmcbr_update_ios(dev); /* XXX recompute vdd based on new cards? */ } @@ -1588,42 +1840,59 @@ mmc_calculate_clock(struct mmc_softc *sc { device_t *kids; struct mmc_ivars *ivar; - int i, f_max, max_dtr, max_hs_dtr, max_timing, nkid; - - f_max = mmcbr_get_f_max(sc->dev); - max_dtr = max_hs_dtr = f_max; - if (mmcbr_get_caps(sc->dev) & MMC_CAP_HSPEED) + int host_caps, i, nkid; + uint32_t dtr, max_dtr; + enum mmc_bus_timing max_timing, timing; + bool changed; + + max_dtr = mmcbr_get_f_max(sc->dev); + host_caps = mmcbr_get_caps(sc->dev); + if ((host_caps & MMC_CAP_MMC_DDR52) != 0) + max_timing = bus_timing_mmc_ddr52; + else if ((host_caps & MMC_CAP_HSPEED) != 0) max_timing = bus_timing_hs; else max_timing = bus_timing_normal; if (device_get_children(sc->dev, &kids, &nkid) != 0) panic("can't get children"); - for (i = 0; i < nkid; i++) { - ivar = device_get_ivars(kids[i]); - if (ivar->timing < max_timing) - max_timing = ivar->timing; - if (ivar->tran_speed < max_dtr) - max_dtr = ivar->tran_speed; - if (ivar->hs_tran_speed < max_hs_dtr) - max_hs_dtr = ivar->hs_tran_speed; - } + do { + changed = false; + for (i = 0; i < nkid; i++) { + ivar = device_get_ivars(kids[i]); + if (isclr(&ivar->timings, max_timing)) { + for (timing = max_timing; timing >= + bus_timing_normal; timing--) { + if (isset(&ivar->timings, timing)) { + max_timing = timing; + break; + } + } + changed = true; + } + dtr = mmc_timing_to_dtr(ivar, max_timing); + if (dtr < max_dtr) { + max_dtr = dtr; + changed = true; + } + } + } while (changed == true); if (bootverbose || mmc_debug) { device_printf(sc->dev, - "setting transfer rate to %d.%03dMHz%s\n", + "setting transfer rate to %d.%03dMHz (%s timing)\n", max_dtr / 1000000, (max_dtr / 1000) % 1000, - max_timing == bus_timing_hs ? " (high speed timing)" : ""); + mmc_timing_to_string(max_timing)); } for (i = 0; i < nkid; i++) { ivar = device_get_ivars(kids[i]); - if (ivar->timing == bus_timing_normal) + if ((ivar->timings & ~(1 << bus_timing_normal)) == 0) continue; - mmc_select_card(sc, ivar->rca); - mmc_set_timing(sc, ivar, max_timing); + if (mmc_select_card(sc, ivar->rca) != MMC_ERR_NONE || + mmc_set_timing(sc, ivar, max_timing) != MMC_ERR_NONE) + device_printf(sc->dev, "Card at relative address %d " + "failed to set timing.\n", ivar->rca); } mmc_select_card(sc, 0); free(kids, M_TEMP); - if (max_timing == bus_timing_hs) - max_dtr = max_hs_dtr; mmcbr_set_clock(sc->dev, max_dtr); mmcbr_update_ios(sc->dev); return (max_dtr); Modified: stable/10/sys/dev/mmc/mmcbr_if.m ============================================================================== --- stable/10/sys/dev/mmc/mmcbr_if.m Thu May 18 20:46:20 2017 (r318494) +++ stable/10/sys/dev/mmc/mmcbr_if.m Thu May 18 20:46:27 2017 (r318495) @@ -65,6 +65,18 @@ INTERFACE mmcbr; # +# Default implementations of some methods. +# +CODE { + static int + null_switch_vccq(device_t brdev __unused, device_t reqdev __unused) + { + + return (0); + } +}; + +# # Called by the mmcbus to set up the IO pins correctly, the common/core # supply voltage (VDD/VCC) to use for the device, the clock frequency, the # type of SPI chip select, power mode and bus width. @@ -75,6 +87,14 @@ METHOD int update_ios { }; # +# Called by the mmcbus to switch the signaling voltage (VCCQ). +# +METHOD int switch_vccq { + device_t brdev; + device_t reqdev; +} DEFAULT null_switch_vccq; + +# # Called by the mmcbus or its children to schedule a mmc request. These # requests are queued. Time passes. The bridge then gets notification # of the status of the request, who then notifies the requesting device Modified: stable/10/sys/dev/mmc/mmcbrvar.h ============================================================================== --- stable/10/sys/dev/mmc/mmcbrvar.h Thu May 18 20:46:20 2017 (r318494) +++ stable/10/sys/dev/mmc/mmcbrvar.h Thu May 18 20:46:27 2017 (r318495) @@ -71,6 +71,7 @@ enum mmcbr_device_ivars { MMCBR_IVAR_OCR, MMCBR_IVAR_POWER_MODE, MMCBR_IVAR_VDD, + MMCBR_IVAR_VCCQ, MMCBR_IVAR_CAPS, MMCBR_IVAR_TIMING, MMCBR_IVAR_MAX_DATA, @@ -94,6 +95,7 @@ MMCBR_ACCESSOR(mode, MODE, int) MMCBR_ACCESSOR(ocr, OCR, int) MMCBR_ACCESSOR(power_mode, POWER_MODE, int) MMCBR_ACCESSOR(vdd, VDD, int) +MMCBR_ACCESSOR(vccq, VCCQ, int) MMCBR_ACCESSOR(caps, CAPS, int) MMCBR_ACCESSOR(timing, TIMING, int) MMCBR_ACCESSOR(max_data, MAX_DATA, int) @@ -107,6 +109,13 @@ mmcbr_update_ios(device_t dev) } static int __inline +mmcbr_switch_vccq(device_t dev) +{ + + return (MMCBR_SWITCH_VCCQ(device_get_parent(dev), dev)); +} + +static int __inline mmcbr_get_ro(device_t dev) { Modified: stable/10/sys/dev/mmc/mmcreg.h ============================================================================== --- stable/10/sys/dev/mmc/mmcreg.h Thu May 18 20:46:20 2017 (r318494) +++ stable/10/sys/dev/mmc/mmcreg.h Thu May 18 20:46:27 2017 (r318495) @@ -209,11 +209,11 @@ struct mmc_request { #define MMC_SET_BLOCKLEN 16 #define MMC_READ_SINGLE_BLOCK 17 #define MMC_READ_MULTIPLE_BLOCK 18 - /* reserved: 19 */ +#define MMC_SEND_TUNING_BLOCK 19 +#define MMC_SEND_TUNING_BLOCK_HS200 21 /* Class 3: Stream write commands */ #define MMC_WRITE_DAT_UNTIL_STOP 20 - /* reserved: 21 */ /* reserved: 22 */ /* Class 4: Block oriented write commands */ @@ -304,16 +304,28 @@ struct mmc_request { #define EXT_CSD_ERASE_GRP_DEF 175 /* R/W */ #define EXT_CSD_PART_CONFIG 179 /* R/W */ #define EXT_CSD_BUS_WIDTH 183 /* R/W */ +#define EXT_CSD_STROBE_SUPPORT 184 /* RO */ #define EXT_CSD_HS_TIMING 185 /* R/W */ +#define EXT_CSD_POWER_CLASS 187 /* R/W */ #define EXT_CSD_CARD_TYPE 196 /* RO */ +#define EXT_CSD_DRIVER_STRENGTH 197 /* RO */ #define EXT_CSD_REV 192 /* RO */ #define EXT_CSD_PART_SWITCH_TO 199 /* RO */ +#define EXT_CSD_PWR_CL_52_195 200 /* RO */ +#define EXT_CSD_PWR_CL_26_195 201 /* RO */ +#define EXT_CSD_PWR_CL_52_360 202 /* RO */ +#define EXT_CSD_PWR_CL_26_360 203 /* RO */ #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ #define EXT_CSD_HC_WP_GRP_SIZE 221 /* RO */ #define EXT_CSD_ERASE_TO_MULT 223 /* RO */ #define EXT_CSD_ERASE_GRP_SIZE 224 /* RO */ #define EXT_CSD_BOOT_SIZE_MULT 226 /* RO */ +#define EXT_CSD_PWR_CL_200_195 236 /* RO */ +#define EXT_CSD_PWR_CL_200_360 237 /* RO */ +#define EXT_CSD_PWR_CL_52_195_DDR 238 /* RO */ +#define EXT_CSD_PWR_CL_52_360_DDR 239 /* RO */ #define EXT_CSD_GEN_CMD6_TIME 248 /* RO */ +#define EXT_CSD_PWR_CL_200_360_DDR 253 /* RO */ /* * EXT_CSD field definitions @@ -363,15 +375,38 @@ struct mmc_request { #define EXT_CSD_CMD_SET_SECURE 2 #define EXT_CSD_CMD_SET_CPSECURE 4 -#define EXT_CSD_CARD_TYPE_26 1 -#define EXT_CSD_CARD_TYPE_52 2 +#define EXT_CSD_HS_TIMING_BC 0 +#define EXT_CSD_HS_TIMING_HS 1 +#define EXT_CSD_HS_TIMING_DDR200 2 +#define EXT_CSD_HS_TIMING_DDR400 3 +#define EXT_CSD_HS_TIMING_DRV_STR_SHIFT 4 + +#define EXT_CSD_POWER_CLASS_8BIT_MASK 0xf0 +#define EXT_CSD_POWER_CLASS_8BIT_SHIFT 4 +#define EXT_CSD_POWER_CLASS_4BIT_MASK 0x0f +#define EXT_CSD_POWER_CLASS_4BIT_SHIFT 0 + +#define EXT_CSD_CARD_TYPE_HS_26 0x0001 +#define EXT_CSD_CARD_TYPE_HS_52 0x0002 +#define EXT_CSD_CARD_TYPE_DDR_52_1_8V 0x0004 +#define EXT_CSD_CARD_TYPE_DDR_52_1_2V 0x0008 +#define EXT_CSD_CARD_TYPE_HS200_1_8V 0x0010 +#define EXT_CSD_CARD_TYPE_HS200_1_2V 0x0020 +#define EXT_CSD_CARD_TYPE_HS400_1_8V 0x0040 +#define EXT_CSD_CARD_TYPE_HS400_1_2V 0x0080 +#define EXT_CSD_CARD_TYPE_HS400ES 0x0100 #define EXT_CSD_BUS_WIDTH_1 0 #define EXT_CSD_BUS_WIDTH_4 1 #define EXT_CSD_BUS_WIDTH_8 2 - -#define MMC_TYPE_26_MAX_HS 26000000 -#define MMC_TYPE_52_MAX_HS 52000000 +#define EXT_CSD_BUS_WIDTH_4_DDR 5 +#define EXT_CSD_BUS_WIDTH_8_DDR 6 +#define EXT_CSD_BUS_WIDTH_ES 0x80 + +#define MMC_TYPE_HS_26_MAX 26000000 +#define MMC_TYPE_HS_52_MAX 52000000 +#define MMC_TYPE_DDR52_MAX 52000000 +#define MMC_TYPE_HS200_HS400ES_MAX 200000000 /* * SD bus widths @@ -387,12 +422,23 @@ struct mmc_request { #define SD_SWITCH_GROUP1 0 #define SD_SWITCH_NORMAL_MODE 0 #define SD_SWITCH_HS_MODE 1 +#define SD_SWITCH_SDR50_MODE 2 +#define SD_SWITCH_SDR104_MODE 3 +#define SD_SWITCH_DDR50 4 #define SD_SWITCH_NOCHANGE 0xF #define SD_CLR_CARD_DETECT 0 #define SD_SET_CARD_DETECT 1 -#define SD_MAX_HS 50000000 +#define SD_HS_MAX 50000000 +#define SD_DDR50_MAX 50000000 +#define SD_SDR12_MAX 25000000 +#define SD_SDR25_MAX 50000000 +#define SD_SDR50_MAX 100000000 +#define SD_SDR104_MAX 208000000 + +/* Specifications require 400 kHz max. during ID phase. */ +#define SD_MMC_CARD_ID_FREQUENCY 400000 /* OCR bits */ @@ -429,6 +475,12 @@ struct mmc_request { #define MMC_OCR_340_350 (1U << 22) /* Vdd voltage 3.40 ~ 3.50 */ #define MMC_OCR_350_360 (1U << 23) /* Vdd voltage 3.50 ~ 3.60 */ #define MMC_OCR_MAX_VOLTAGE_SHIFT 23 +#define MMC_OCR_S18R (1U << 24) /* Switching to 1.8 V requested (SD) */ +#define MMC_OCR_S18A MMC_OCR_S18R /* Switching to 1.8 V accepted (SD) */ +#define MMC_OCR_XPC (1U << 28) /* SDXC Power Control */ +#define MMC_OCR_ACCESS_MODE_BYTE (0U << 29) /* Access Mode Byte (MMC) */ +#define MMC_OCR_ACCESS_MODE_SECT (1U << 29) /* Access Mode Sector (MMC) */ +#define MMC_OCR_ACCESS_MODE_MASK (3U << 29) #define MMC_OCR_CCS (1u << 30) /* Card Capacity status (SD vs SDHC) */ #define MMC_OCR_CARD_BUSY (1U << 31) /* Card Power up status */ Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Thu May 18 20:46:20 2017 (r318494) +++ stable/10/sys/dev/sdhci/sdhci.c Thu May 18 20:46:27 2017 (r318495) @@ -58,6 +58,12 @@ static int sdhci_debug; TUNABLE_INT("hw.sdhci.debug", &sdhci_debug); SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RWTUN, &sdhci_debug, 0, "Debug level"); +u_int sdhci_quirk_clear = 0; +SYSCTL_INT(_hw_sdhci, OID_AUTO, quirk_clear, CTLFLAG_RWTUN, &sdhci_quirk_clear, + 0, "Mask of quirks to clear"); +u_int sdhci_quirk_set = 0; +SYSCTL_INT(_hw_sdhci, OID_AUTO, quirk_set, CTLFLAG_RWTUN, &sdhci_quirk_set, 0, + "Mask of quirks to set"); #define RD1(slot, off) SDHCI_READ_1((slot)->bus, (slot), (off)) #define RD2(slot, off) SDHCI_READ_2((slot)->bus, (slot), (off)) @@ -79,6 +85,10 @@ static void sdhci_card_poll(void *); static void sdhci_card_task(void *, int); /* helper routines */ +static void sdhci_dumpregs(struct sdhci_slot *slot); +static int slot_printf(struct sdhci_slot *slot, const char * fmt, ...) + __printflike(2, 3); + #define SDHCI_LOCK(_slot) mtx_lock(&(_slot)->mtx) #define SDHCI_UNLOCK(_slot) mtx_unlock(&(_slot)->mtx) #define SDHCI_LOCK_INIT(_slot) \ @@ -582,7 +592,7 @@ sdhci_card_poll(void *arg) int sdhci_init_slot(device_t dev, struct sdhci_slot *slot, int num) { - uint32_t caps, freq; + uint32_t caps, caps2, freq, host_caps; int err; SDHCI_LOCK_INIT(slot); @@ -626,10 +636,16 @@ sdhci_init_slot(device_t dev, struct sdh sdhci_init(slot); slot->version = (RD2(slot, SDHCI_HOST_VERSION) >> SDHCI_SPEC_VER_SHIFT) & SDHCI_SPEC_VER_MASK; - if (slot->quirks & SDHCI_QUIRK_MISSING_CAPS) + if (slot->quirks & SDHCI_QUIRK_MISSING_CAPS) { caps = slot->caps; - else + caps2 = slot->caps2; + } else { caps = RD4(slot, SDHCI_CAPABILITIES); + if (slot->version >= SDHCI_SPEC_300) + caps2 = RD4(slot, SDHCI_CAPABILITIES2); + else + caps2 = 0; + } /* Calculate base clock frequency. */ if (slot->version >= SDHCI_SPEC_300) freq = (caps & SDHCI_CLOCK_V3_BASE_MASK) >> @@ -685,15 +701,45 @@ sdhci_init_slot(device_t dev, struct sdh device_printf(dev, "Hardware doesn't report any " "support voltages.\n"); } - slot->host.caps = MMC_CAP_4_BIT_DATA; + host_caps = MMC_CAP_4_BIT_DATA; if (caps & SDHCI_CAN_DO_8BITBUS) - slot->host.caps |= MMC_CAP_8_BIT_DATA; + host_caps |= MMC_CAP_8_BIT_DATA; if (caps & SDHCI_CAN_DO_HISPD) - slot->host.caps |= MMC_CAP_HSPEED; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu May 18 21:00:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 378DAD73734; Thu, 18 May 2017 21:00:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEF321059; Thu, 18 May 2017 21:00:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IL0pe2026310; Thu, 18 May 2017 21:00:51 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IL0oET026308; Thu, 18 May 2017 21:00:50 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705182100.v4IL0oET026308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 18 May 2017 21:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318496 - stable/11/sys/dev/sdhci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:00:52 -0000 Author: marius Date: Thu May 18 21:00:50 2017 New Revision: 318496 URL: https://svnweb.freebsd.org/changeset/base/318496 Log: MFC: r318282 - Unlike as in the PCI case, when attached to ACPI, Intel Bay Trail and Braswell eMMC and SDXC controllers share the same IDs. Like in the PCI case, Braswell eMMC needs the SDHCI_QUIRK_DATA_TIMEOUT_1MHZ quirk (see r311794 for the corresponding change to the sdhci(4) PCI PCI front-end), though. However, due to the shared ACPI IDs, this is trickier to do. - Intel Apollo Lake eMMC and SDXC controllers are affected by the APL18 ("Using 32-bit Addressing Mode With SD/eMMC Controller May Lead to Unpredictable System Behavior") silicon bug. When this erratum hits, typically both SDHCI and XHCI controllers wedge. According to Intel, using ADMA2 with 64-bit addressing and 96-bit descriptors serves as a workaround. Until such times when sdhci(4) has ADMA2 support, flag DMA as broken for affected interfaces. This turns out to work around the problem, too, at the cost of performance. - In the sdhci(4) ACPI front-end, probe the Intel Apollo Lake eMMC and SDXC controllers, too. Modified: stable/11/sys/dev/sdhci/sdhci_acpi.c stable/11/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sdhci/sdhci_acpi.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci_acpi.c Thu May 18 20:46:27 2017 (r318495) +++ stable/11/sys/dev/sdhci/sdhci_acpi.c Thu May 18 21:00:50 2017 (r318496) @@ -57,25 +57,39 @@ static const struct sdhci_acpi_device { const char *desc; u_int quirks; } sdhci_acpi_devices[] = { - { "80860F14", 1, "Intel Bay Trail eMMC 4.5 Controller", + { "80860F14", 1, "Intel Bay Trail/Braswell eMMC 4.5/4.5.1 Controller", SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | SDHCI_QUIRK_INTEL_POWER_UP_RESET | SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_MMC_DDR52 | SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, - { "80860F14", 3, "Intel Bay Trail SDXC Controller", + { "80860F14", 3, "Intel Bay Trail/Braswell SDXC Controller", SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, - { "80860F16", 0, "Intel Bay Trail SDXC Controller", + { "80860F16", 0, "Intel Bay Trail/Braswell SDXC Controller", SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, + { "80865ACA", 0, "Intel Apollo Lake SDXC Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ + SDHCI_QUIRK_WAIT_WHILE_BUSY | + SDHCI_QUIRK_PRESET_VALUE_BROKEN }, + { "80865ACC", 0, "Intel Apollo Lake eMMC 5.0 Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ + SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | + SDHCI_QUIRK_INTEL_POWER_UP_RESET | + SDHCI_QUIRK_WAIT_WHILE_BUSY | + SDHCI_QUIRK_MMC_DDR52 | + SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | + SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { NULL, 0, NULL, 0} }; static char *sdhci_ids[] = { "80860F14", "80860F16", + "80865ACA", + "80865ACC", NULL }; @@ -249,6 +263,11 @@ sdhci_acpi_attach(device_t dev) return (ENOMEM); } + /* Intel Braswell eMMC 4.5.1 controller quirk */ + if (strcmp(acpi_dev->hid, "80860F14") == 0 && acpi_dev->uid == 1 && + SDHCI_READ_4(dev, &sc->slot, SDHCI_CAPABILITIES) == 0x446cc8b2 && + SDHCI_READ_4(dev, &sc->slot, SDHCI_CAPABILITIES2) == 0x00000807) + sc->quirks |= SDHCI_QUIRK_DATA_TIMEOUT_1MHZ; sc->quirks &= ~sdhci_quirk_clear; sc->quirks |= sdhci_quirk_set; sc->slot.quirks = sc->quirks; Modified: stable/11/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci_pci.c Thu May 18 20:46:27 2017 (r318495) +++ stable/11/sys/dev/sdhci/sdhci_pci.c Thu May 18 21:00:50 2017 (r318496) @@ -132,9 +132,11 @@ static const struct sdhci_device { SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { 0x5aca8086, 0xffff, "Intel Apollo Lake SDXC Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { 0x5acc8086, 0xffff, "Intel Apollo Lake eMMC 5.0 Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | SDHCI_QUIRK_INTEL_POWER_UP_RESET | SDHCI_QUIRK_WAIT_WHILE_BUSY | @@ -340,6 +342,7 @@ sdhci_pci_attach(device_t dev) } sc->quirks &= ~sdhci_quirk_clear; sc->quirks |= sdhci_quirk_set; + /* Some controllers need to be bumped into the right mode. */ if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY) sdhci_lower_frequency(dev); From owner-svn-src-all@freebsd.org Thu May 18 21:00:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D3EAD7375B; Thu, 18 May 2017 21:00:55 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 009CD1066; Thu, 18 May 2017 21:00:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IL0sGh026358; Thu, 18 May 2017 21:00:54 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IL0rPP026356; Thu, 18 May 2017 21:00:53 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705182100.v4IL0rPP026356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 18 May 2017 21:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318497 - stable/10/sys/dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:00:55 -0000 Author: marius Date: Thu May 18 21:00:53 2017 New Revision: 318497 URL: https://svnweb.freebsd.org/changeset/base/318497 Log: MFC: r318282 - Unlike as in the PCI case, when attached to ACPI, Intel Bay Trail and Braswell eMMC and SDXC controllers share the same IDs. Like in the PCI case, Braswell eMMC needs the SDHCI_QUIRK_DATA_TIMEOUT_1MHZ quirk (see r311794 for the corresponding change to the sdhci(4) PCI PCI front-end), though. However, due to the shared ACPI IDs, this is trickier to do. - Intel Apollo Lake eMMC and SDXC controllers are affected by the APL18 ("Using 32-bit Addressing Mode With SD/eMMC Controller May Lead to Unpredictable System Behavior") silicon bug. When this erratum hits, typically both SDHCI and XHCI controllers wedge. According to Intel, using ADMA2 with 64-bit addressing and 96-bit descriptors serves as a workaround. Until such times when sdhci(4) has ADMA2 support, flag DMA as broken for affected interfaces. This turns out to work around the problem, too, at the cost of performance. - In the sdhci(4) ACPI front-end, probe the Intel Apollo Lake eMMC and SDXC controllers, too. Modified: stable/10/sys/dev/sdhci/sdhci_acpi.c stable/10/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sdhci/sdhci_acpi.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_acpi.c Thu May 18 21:00:50 2017 (r318496) +++ stable/10/sys/dev/sdhci/sdhci_acpi.c Thu May 18 21:00:53 2017 (r318497) @@ -57,25 +57,39 @@ static const struct sdhci_acpi_device { const char *desc; u_int quirks; } sdhci_acpi_devices[] = { - { "80860F14", 1, "Intel Bay Trail eMMC 4.5 Controller", + { "80860F14", 1, "Intel Bay Trail/Braswell eMMC 4.5/4.5.1 Controller", SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | SDHCI_QUIRK_INTEL_POWER_UP_RESET | SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_MMC_DDR52 | SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, - { "80860F14", 3, "Intel Bay Trail SDXC Controller", + { "80860F14", 3, "Intel Bay Trail/Braswell SDXC Controller", SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, - { "80860F16", 0, "Intel Bay Trail SDXC Controller", + { "80860F16", 0, "Intel Bay Trail/Braswell SDXC Controller", SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, + { "80865ACA", 0, "Intel Apollo Lake SDXC Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ + SDHCI_QUIRK_WAIT_WHILE_BUSY | + SDHCI_QUIRK_PRESET_VALUE_BROKEN }, + { "80865ACC", 0, "Intel Apollo Lake eMMC 5.0 Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ + SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | + SDHCI_QUIRK_INTEL_POWER_UP_RESET | + SDHCI_QUIRK_WAIT_WHILE_BUSY | + SDHCI_QUIRK_MMC_DDR52 | + SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | + SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { NULL, 0, NULL, 0} }; static char *sdhci_ids[] = { "80860F14", "80860F16", + "80865ACA", + "80865ACC", NULL }; @@ -249,6 +263,11 @@ sdhci_acpi_attach(device_t dev) return (ENOMEM); } + /* Intel Braswell eMMC 4.5.1 controller quirk */ + if (strcmp(acpi_dev->hid, "80860F14") == 0 && acpi_dev->uid == 1 && + SDHCI_READ_4(dev, &sc->slot, SDHCI_CAPABILITIES) == 0x446cc8b2 && + SDHCI_READ_4(dev, &sc->slot, SDHCI_CAPABILITIES2) == 0x00000807) + sc->quirks |= SDHCI_QUIRK_DATA_TIMEOUT_1MHZ; sc->quirks &= ~sdhci_quirk_clear; sc->quirks |= sdhci_quirk_set; sc->slot.quirks = sc->quirks; Modified: stable/10/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_pci.c Thu May 18 21:00:50 2017 (r318496) +++ stable/10/sys/dev/sdhci/sdhci_pci.c Thu May 18 21:00:53 2017 (r318497) @@ -132,9 +132,11 @@ static const struct sdhci_device { SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { 0x5aca8086, 0xffff, "Intel Apollo Lake SDXC Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { 0x5acc8086, 0xffff, "Intel Apollo Lake eMMC 5.0 Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | SDHCI_QUIRK_INTEL_POWER_UP_RESET | SDHCI_QUIRK_WAIT_WHILE_BUSY | @@ -341,6 +343,7 @@ sdhci_pci_attach(device_t dev) } sc->quirks &= ~sdhci_quirk_clear; sc->quirks |= sdhci_quirk_set; + /* Some controllers need to be bumped into the right mode. */ if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY) sdhci_lower_frequency(dev); From owner-svn-src-all@freebsd.org Thu May 18 21:09:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53E26D73A84; Thu, 18 May 2017 21:09:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 256AC167B; Thu, 18 May 2017 21:09:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IL9PUB030404; Thu, 18 May 2017 21:09:25 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IL9Pck030403; Thu, 18 May 2017 21:09:25 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705182109.v4IL9Pck030403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 18 May 2017 21:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318498 - stable/11/sys/dev/usb/controller X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:09:26 -0000 Author: marius Date: Thu May 18 21:09:24 2017 New Revision: 318498 URL: https://svnweb.freebsd.org/changeset/base/318498 Log: MFC: r314345, r318276 - Add ID for NEC uPD720202 xHCI controller. - Describe Intel Apollo Lake and Braswell USB 3.0 controllers. Modified: stable/11/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/11/sys/dev/usb/controller/xhci_pci.c Thu May 18 21:00:53 2017 (r318497) +++ stable/11/sys/dev/usb/controller/xhci_pci.c Thu May 18 21:09:24 2017 (r318498) @@ -100,6 +100,8 @@ xhci_pci_match(device_t self) case 0x01941033: return ("NEC uPD720200 USB 3.0 controller"); + case 0x00151912: + return ("NEC uPD720202 USB 3.0 controller"); case 0x10001b73: return ("Fresco Logic FL1000G USB 3.0 controller"); @@ -114,6 +116,10 @@ xhci_pci_match(device_t self) case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); + case 0x22b58086: + return ("Intel Braswell USB 3.0 controller"); + case 0x5aa88086: + return ("Intel Apollo Lake USB 3.0 controller"); case 0x8c318086: return ("Intel Lynx Point USB 3.0 controller"); case 0x8cb18086: From owner-svn-src-all@freebsd.org Thu May 18 21:09:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7861AD73ABD; Thu, 18 May 2017 21:09:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49EA116B3; Thu, 18 May 2017 21:09:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IL9VZK030454; Thu, 18 May 2017 21:09:31 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IL9V9l030453; Thu, 18 May 2017 21:09:31 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705182109.v4IL9V9l030453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 18 May 2017 21:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318499 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:09:32 -0000 Author: marius Date: Thu May 18 21:09:31 2017 New Revision: 318499 URL: https://svnweb.freebsd.org/changeset/base/318499 Log: MFC: r314345, r318276 - Add ID for NEC uPD720202 xHCI controller. - Describe Intel Apollo Lake and Braswell USB 3.0 controllers. Modified: stable/10/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Thu May 18 21:09:24 2017 (r318498) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Thu May 18 21:09:31 2017 (r318499) @@ -100,6 +100,8 @@ xhci_pci_match(device_t self) case 0x01941033: return ("NEC uPD720200 USB 3.0 controller"); + case 0x00151912: + return ("NEC uPD720202 USB 3.0 controller"); case 0x10001b73: return ("Fresco Logic FL1000G USB 3.0 controller"); @@ -114,6 +116,10 @@ xhci_pci_match(device_t self) case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); + case 0x22b58086: + return ("Intel Braswell USB 3.0 controller"); + case 0x5aa88086: + return ("Intel Apollo Lake USB 3.0 controller"); case 0x8c318086: return ("Intel Lynx Point USB 3.0 controller"); case 0x8cb18086: From owner-svn-src-all@freebsd.org Thu May 18 21:23:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A876FD6F2AC; Thu, 18 May 2017 21:23:40 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7962174E; Thu, 18 May 2017 21:23:40 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ILNdEM038659; Thu, 18 May 2017 21:23:39 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ILNdsB038658; Thu, 18 May 2017 21:23:39 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201705182123.v4ILNdsB038658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Thu, 18 May 2017 21:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318500 - stable/11/sys/dev/atkbdc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:23:40 -0000 Author: wulf Date: Thu May 18 21:23:39 2017 New Revision: 318500 URL: https://svnweb.freebsd.org/changeset/base/318500 Log: MFC r317811: Fix triple-finger taps reported as double-finger for Elan hw v.4 touchpads Wait for all advertised head packets after status packet have been received. This fixes rare but quite annoying issue in Elan hw v.4 touchpads support when triple-finger taps are reported as double-finger taps under several circumstances. MFC r317812: Reduce default tap_min_queue size for Elan touchpads Elan hw v.4 touchpads often sends touchpad release packet right after touchpad touch one. Most probably this happens due to PS/2 limited bandwith. Reducing of tap_min_queue size to 1 makes multifinger tap detection more reliable in this case. MFC r317813: Adjust Elantech palm width threshold to nearly match synaptics defaults MFC r317814: psm(4): reduce cursor jumping on palm detection This is done with discarding pointer movements rather then mouse packets MFC r317815: Enable palm detection on two finger touches for multitouch trackpads. MFC r317816: Report 3-rd and 4-th fingers as first finger for Elan hw v.2 and v.3 as Linux does. It should not affect gesture processing in current state as it ignores finger coords on 3-finger tap detection but it should make evdev reports looking more Linux-alike. MFC r317817: Set predefined logical touchpad sizes for several ancient Elan hw v.2 models. This change is based on Linux driver. Determine logical trace size. It used for calculation of touch sizes in surface units for MT-protocol type B evdev reports. MFC r317818: psm(4): Remove sys/libkern.h header inclusion It is already included via sys/systm.h MFC r317819: Reduce synaptics touch sensitivity Increase hw.psm.synaptics.min_pressure default value from 16 to 32 to nearly match Linux driver (30-35 hysteresis loop). This makes libinput tap detection more reliable. Modified: stable/11/sys/dev/atkbdc/psm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/atkbdc/psm.c ============================================================================== --- stable/11/sys/dev/atkbdc/psm.c Thu May 18 21:09:31 2017 (r318499) +++ stable/11/sys/dev/atkbdc/psm.c Thu May 18 21:23:39 2017 (r318500) @@ -81,7 +81,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -300,6 +299,8 @@ typedef struct elantechhw { int dpmmy; int ntracesx; int ntracesy; + int dptracex; + int dptracey; int issemimt; int isclickpad; int hascrc; @@ -366,6 +367,7 @@ enum { typedef struct elantechaction { finger_t fingers[ELANTECH_MAX_FINGERS]; int mask; + int mask_v4wait; } elantechaction_t; /* driver control block */ @@ -3016,13 +3018,15 @@ proc_synaptics(struct psm_softc *sc, pac ms->button = touchpad_buttons; + psmgestures(sc, &f[0], nfingers, ms); + for (id = 0; id < PSM_FINGERS; id++) + psmsmoother(sc, &f[id], id, ms, x, y); + /* Palm detection doesn't terminate the current action. */ - if (!psmpalmdetect(sc, &f[0], nfingers)) { - psmgestures(sc, &f[0], nfingers, ms); - for (id = 0; id < PSM_FINGERS; id++) - psmsmoother(sc, &f[id], id, ms, x, y); - } else { - VLOG(2, (LOG_DEBUG, "synaptics: palm detected! (%d)\n", f[0].w)); + if (psmpalmdetect(sc, &f[0], nfingers)) { + *x = *y = *z = 0; + ms->button = ms->obutton; + return (0); } ms->button |= extended_buttons | guest_buttons; @@ -3062,8 +3066,9 @@ static int psmpalmdetect(struct psm_softc *sc, finger_t *f, int nfingers) { if (!( - ((sc->synhw.capMultiFinger || - sc->synhw.capAdvancedGestures) && nfingers > 1) || + ((sc->synhw.capMultiFinger || sc->synhw.capAdvancedGestures) && + !sc->synhw.capReportsV && nfingers > 1) || + (sc->synhw.capReportsV && nfingers > 2) || (sc->synhw.capPalmDetect && f->w <= sc->syninfo.max_width) || (!sc->synhw.capPalmDetect && f->p <= sc->syninfo.max_pressure) || (sc->synhw.capPen && f->flags & PSM_FINGER_IS_PEN))) { @@ -3076,6 +3081,7 @@ psmpalmdetect(struct psm_softc *sc, fing * [min_pressure; max_pressure] * - pen aren't supported but PSM_FINGER_IS_PEN is set */ + VLOG(2, (LOG_DEBUG, "synaptics: palm detected! (%d)\n", f->w)); return (1); } return (0); @@ -3767,27 +3773,30 @@ proc_elantech(struct psm_softc *sc, pack nfingers = (pb->ipacket[0] & 0xc0) >> 6; if (nfingers == 3 && (pb->ipacket[3] & 0x80)) nfingers = 4; - mask = (1 << nfingers) - 1; - fn = ELANTECH_FINGER_SET_XYP(pb); + if (nfingers == 0) { + mask = (1 << nfingers) - 1; /* = 0x00 */ + break; + } + + /* Map 3-rd and 4-th fingers to first finger */ + mask = (1 << 1) - 1; /* = 0x01 */ + f[0] = ELANTECH_FINGER_SET_XYP(pb); if (sc->elanhw.haspressure) { - fn.w = ((pb->ipacket[0] & 0x30) >> 2) | + f[0].w = ((pb->ipacket[0] & 0x30) >> 2) | ((pb->ipacket[3] & 0x30) >> 4); } else { - fn.p = PSM_FINGER_DEFAULT_P; - fn.w = PSM_FINGER_DEFAULT_W; + f[0].p = PSM_FINGER_DEFAULT_P; + f[0].w = PSM_FINGER_DEFAULT_W; } /* * HW v2 dont report exact finger positions when 3 or more - * fingers are on touchpad. Use reported value as fingers - * position as it is required for tap detection + * fingers are on touchpad. */ if (nfingers > 2) - fn.flags = PSM_FINGER_FUZZY; + f[0].flags = PSM_FINGER_FUZZY; - for (id = 0; id < imin(nfingers, ELANTECH_MAX_FINGERS); id++) - f[id] = fn; break; case ELANTECH_PKT_V2_2FINGER: /*HW V2. Two finger touch */ @@ -3833,8 +3842,12 @@ proc_elantech(struct psm_softc *sc, pack * ------------------------------------------- */ nfingers = (pb->ipacket[0] & 0xc0) >> 6; - mask = (1 << nfingers) - 1; - id = nfingers - 1; + /* Map 3-rd finger to first finger */ + id = nfingers > 2 ? 0 : nfingers - 1; + mask = (1 << (id + 1)) - 1; + + if (nfingers == 0) + break; fn = ELANTECH_FINGER_SET_XYP(pb); fn.w = ((pb->ipacket[0] & 0x30) >> 2) | @@ -3842,15 +3855,11 @@ proc_elantech(struct psm_softc *sc, pack /* * HW v3 dont report exact finger positions when 3 or more - * fingers are on touchpad. Use reported value as fingers - * position as it is required for tap detection + * fingers are on touchpad. */ if (nfingers > 1) fn.flags = PSM_FINGER_FUZZY; - for (id = 0; id < imin(nfingers, ELANTECH_MAX_FINGERS); id++) - f[id] = fn; - if (nfingers == 2) { if (ELANTECH_PKT_IS_V3_HEAD(pb, sc->elanhw.hascrc)) { sc->elanaction.fingers[0] = fn; @@ -3858,6 +3867,7 @@ proc_elantech(struct psm_softc *sc, pack } else f[0] = sc->elanaction.fingers[0]; } + f[id] = fn; break; case ELANTECH_PKT_V4_STATUS: /* HW Version 4. Status packet */ @@ -3879,9 +3889,15 @@ proc_elantech(struct psm_softc *sc, pack mask = pb->ipacket[1] & 0x1f; nfingers = bitcount(mask); + if (sc->elanaction.mask_v4wait != 0) + VLOG(3, (LOG_DEBUG, "elantech: HW v4 status packet" + " when not all previous head packets received\n")); + + /* Bitmap of fingers to receive before gesture processing */ + sc->elanaction.mask_v4wait = mask & ~sc->elanaction.mask; + /* Skip "new finger is on touchpad" packets */ - if ((sc->elanaction.mask & mask) == sc->elanaction.mask && - (mask & ~sc->elanaction.mask)) { + if (sc->elanaction.mask_v4wait) { sc->elanaction.mask = mask; return (0); } @@ -3906,11 +3922,33 @@ proc_elantech(struct psm_softc *sc, pack mask = sc->elanaction.mask; nfingers = bitcount(mask); id = ((pb->ipacket[3] & 0xe0) >> 5) - 1; + fn = ELANTECH_FINGER_SET_XYP(pb); + fn.w =(pb->ipacket[0] & 0xf0) >> 4; + + if (id < 0) + return (0); - if (id >= 0 && id < ELANTECH_MAX_FINGERS) { - f[id] = ELANTECH_FINGER_SET_XYP(pb); - f[id].w = (pb->ipacket[0] & 0xf0) >> 4; + /* Packet is finger position update. Report it */ + if (sc->elanaction.mask_v4wait == 0) { + if (id < ELANTECH_MAX_FINGERS) + f[id] = fn; + break; } + + /* Remove finger from waiting bitmap and store into context */ + sc->elanaction.mask_v4wait &= ~(1 << id); + if (id < ELANTECH_MAX_FINGERS) + sc->elanaction.fingers[id] = fn; + + /* Wait for other fingers if needed */ + if (sc->elanaction.mask_v4wait != 0) + return (0); + + /* All new fingers are received. Report them from context */ + for (id = 0; id < ELANTECH_MAX_FINGERS; id++) + if (sc->elanaction.mask & (1 << id)) + f[id] = sc->elanaction.fingers[id]; + break; case ELANTECH_PKT_V4_MOTION: /* HW Version 4. Motion packet */ @@ -4006,20 +4044,14 @@ proc_elantech(struct psm_softc *sc, pack ms->button = touchpad_button | trackpoint_button; - /* Palm detection doesn't terminate the current action. */ - if (!psmpalmdetect(sc, &f[0], nfingers)) { - /* Send finger 1 position to gesture processor */ - if (PSM_FINGER_IS_SET(f[0]) || PSM_FINGER_IS_SET(f[1]) || - nfingers == 0) - psmgestures(sc, &f[0], imin(nfingers, 3), ms); - /* Send fingers positions to movement smoothers */ - for (id = 0; id < PSM_FINGERS; id++) - if (PSM_FINGER_IS_SET(f[id]) || !(mask & (1 << id))) - psmsmoother(sc, &f[id], id, ms, x, y); - } else { - VLOG(2, (LOG_DEBUG, "elantech: palm detected! (%d)\n", - f[0].w)); - } + /* Send finger 1 position to gesture processor */ + if (PSM_FINGER_IS_SET(f[0]) || PSM_FINGER_IS_SET(f[1]) || + nfingers == 0) + psmgestures(sc, &f[0], imin(nfingers, 3), ms); + /* Send fingers positions to movement smoothers */ + for (id = 0; id < PSM_FINGERS; id++) + if (PSM_FINGER_IS_SET(f[id]) || !(mask & (1 << id))) + psmsmoother(sc, &f[id], id, ms, x, y); /* Store current finger positions in action context */ for (id = 0; id < ELANTECH_MAX_FINGERS; id++) { @@ -4030,6 +4062,13 @@ proc_elantech(struct psm_softc *sc, pack } sc->elanaction.mask = mask; + /* Palm detection doesn't terminate the current action. */ + if (psmpalmdetect(sc, &f[0], nfingers)) { + *x = *y = *z = 0; + ms->button = ms->obutton; + return (0); + } + /* Use the extra buttons as a scrollwheel */ if (ms->button & MOUSE_BUTTON4DOWN) *z = -1; @@ -5054,7 +5093,7 @@ synaptics_sysctl_create_tree(struct psm_ "Enable two finger scrolling"); /* hw.psm.synaptics.min_pressure. */ - sc->syninfo.min_pressure = 16; + sc->syninfo.min_pressure = 32; SYSCTL_ADD_PROC(&sc->syninfo.sysctl_ctx, SYSCTL_CHILDREN(sc->syninfo.sysctl_tree), OID_AUTO, "min_pressure", CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_ANYBODY, @@ -6155,7 +6194,10 @@ elantech_init_synaptics(struct psm_softc sc->synhw.capPassthrough = sc->elanhw.hastrackpoint; sc->synhw.capClickPad = sc->elanhw.isclickpad; sc->synhw.capMultiFinger = 1; - sc->synhw.capAdvancedGestures = 1; + if (sc->elanhw.issemimt) + sc->synhw.capAdvancedGestures = 1; + else + sc->synhw.capReportsV = 1; sc->synhw.capPalmDetect = 1; sc->synhw.capPen = 0; sc->synhw.capReportsMax = 1; @@ -6189,6 +6231,12 @@ elantech_init_synaptics(struct psm_softc /* Disable finger detection pressure threshold */ sc->syninfo.min_pressure = 1; + /* Adjust palm width to nearly match synaptics w=10 */ + sc->syninfo.max_width = 7; + + /* Elans often report double & triple taps as single event */ + sc->syninfo.tap_min_queue = 1; + /* Use full area of touchpad */ sc->syninfo.margin_top = 0; sc->syninfo.margin_right = 0; @@ -6233,8 +6281,17 @@ enable_elantech(struct psm_softc *sc, en static const int ic2hw[] = /*IC: 0 1 2 3 4 5 6 7 8 9 a b c d e f */ { 0, 0, 2, 0, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0 }; + static const int fw_sizes[][3] = { + /* FW.vers MaxX MaxY */ + { 0x020030, 1152, 768 }, + { 0x020800, 1152, 768 }, + { 0x020b00, 1152, 768 }, + { 0x040215, 900, 500 }, + { 0x040216, 819, 405 }, + { 0x040219, 900, 500 }, + }; elantechhw_t elanhw; - int icversion, hwversion, dptracex, dptracey, id, resp[3], dpix, dpiy; + int icversion, hwversion, xtr, i, id, resp[3], dpix, dpiy; KBDC kbdc = sc->kbdc; VLOG(3, (LOG_DEBUG, "elantech: BEGIN init\n")); @@ -6285,8 +6342,8 @@ enable_elantech(struct psm_softc *sc, en return (FALSE); } - elanhw.ntracesx = resp[1] - 1; - elanhw.ntracesy = resp[2] - 1; + elanhw.ntracesx = imax(resp[1], 3); + elanhw.ntracesy = imax(resp[2], 3); elanhw.hastrackpoint = (resp[0] & 0x80) != 0; /* Get the touchpad resolution */ @@ -6320,24 +6377,35 @@ enable_elantech(struct psm_softc *sc, en * On HW v.3 touchpads it should be done after switching hardware * to real resolution mode (by setting bit 3 of reg10) */ + elanhw.dptracex = elanhw.dptracey = 64; + for (i = 0; i < nitems(fw_sizes); i++) { + if (elanhw.fwversion == fw_sizes[i][0]) { + elanhw.sizex = fw_sizes[i][1]; + elanhw.sizey = fw_sizes[i][2]; + goto found; + } + } if (elantech_cmd(kbdc, hwversion, ELANTECH_FW_ID, resp) != 0) { printf(" Failed to read touchpad size\n"); elanhw.sizex = 10000; /* Arbitrary high values to */ elanhw.sizey = 10000; /* prevent clipping in smoother */ } else if (hwversion == 2) { - dptracex = dptracey = 64; if ((elanhw.fwversion >> 16) == 0x14 && (resp[1] & 0x10) && !elantech_cmd(kbdc, hwversion, ELANTECH_SAMPLE, resp)) { - dptracex = resp[1] / 2; - dptracey = resp[2] / 2; + elanhw.dptracex = resp[1] / 2; + elanhw.dptracey = resp[2] / 2; } - elanhw.sizex = (elanhw.ntracesx - 1) * dptracex; - elanhw.sizey = (elanhw.ntracesy - 1) * dptracey; + xtr = ((elanhw.fwversion >> 8) == 0x0208) ? 1 : 2; + elanhw.sizex = (elanhw.ntracesx - xtr) * elanhw.dptracex; + elanhw.sizey = (elanhw.ntracesy - xtr) * elanhw.dptracey; } else { elanhw.sizex = (resp[0] & 0x0f) << 8 | resp[1]; elanhw.sizey = (resp[0] & 0xf0) << 4 | resp[2]; + xtr = (elanhw.sizex % (elanhw.ntracesx - 2) == 0) ? 2 : 1; + elanhw.dptracex = elanhw.sizex / (elanhw.ntracesx - xtr); + elanhw.dptracey = elanhw.sizey / (elanhw.ntracesy - xtr); } - +found: if (verbose >= 2) { printf(" Model information:\n"); printf(" MaxX: %d\n", elanhw.sizex); @@ -6346,6 +6414,8 @@ enable_elantech(struct psm_softc *sc, en printf(" DpmmY: %d\n", elanhw.dpmmy); printf(" TracesX: %d\n", elanhw.ntracesx); printf(" TracesY: %d\n", elanhw.ntracesy); + printf(" DptraceX: %d\n", elanhw.dptracex); + printf(" DptraceY: %d\n", elanhw.dptracey); printf(" SemiMT: %d\n", elanhw.issemimt); printf(" Clickpad: %d\n", elanhw.isclickpad); printf(" Trackpoint: %d\n", elanhw.hastrackpoint); From owner-svn-src-all@freebsd.org Thu May 18 21:24:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E233DD6F385; Thu, 18 May 2017 21:24:30 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C115B8C7; Thu, 18 May 2017 21:24:30 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id EC8512E58; Thu, 18 May 2017 21:24:29 +0000 (UTC) Date: Thu, 18 May 2017 23:24:29 +0200 From: Baptiste Daroussin To: John Baldwin Cc: rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318441 - in head/etc: . cron.d Message-ID: <20170518212429.rugl6vnv5d2b2hpb@ivaldir.net> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net> <20170518130932.eo5clhki4za2vigz@ivaldir.net> <2201156.H7EQSgYph9@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="plhgbr6l2qpe7eme" Content-Disposition: inline In-Reply-To: <2201156.H7EQSgYph9@ralph.baldwin.cx> User-Agent: NeoMutt/20170428 (1.8.2) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:24:31 -0000 --plhgbr6l2qpe7eme Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 18, 2017 at 09:48:25AM -0700, John Baldwin wrote: > On Thursday, May 18, 2017 03:09:32 PM Baptiste Daroussin wrote: > > On Thu, May 18, 2017 at 02:56:31AM -0700, Rodney W. Grimes wrote: > > > > Author: ngie > > > > Date: Thu May 18 06:25:39 2017 > > > > New Revision: 318441 > > > > URL: https://svnweb.freebsd.org/changeset/base/318441 > > > >=20 > > > > Log: > > > > Handle the cron.d entry for MK_AT in cron conditionally > > > > =20 > > > > Install /etc/cron.d/at if MK_AT !=3D no, always using it, which t= ries > > > > to run a non-existent program via cron(8) every 5 minutes with the > > > > default /etc/crontab, prior to this commit. > > > > =20 > > > > SHELL and PATH are duplicated between /etc/crontab and /etc/cron.= d/at > > > > because atrun(8) executes programs, which may rely on environment > > > > currently set via /etc/crontab. > > > > =20 > > > > Noted by: bdrewery (in an internal review) > > > > MFC after: 2 months > > > > Relnotes: yes (may need to add environmental modifications to > > > > /etc/cron.d/at) > > > > Sponsored by: Dell EMC Isilon > > > >=20 > > > > Added: > > > > head/etc/cron.d/ > > > > head/etc/cron.d/Makefile (contents, props changed) > > > > head/etc/cron.d/at (contents, props changed) > > > > Modified: > > > > head/etc/Makefile > > > > head/etc/crontab > > > >=20 > > > > Modified: head/etc/Makefile > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > > > --- head/etc/Makefile Thu May 18 06:15:42 2017 (r318440) > > > > +++ head/etc/Makefile Thu May 18 06:25:39 2017 (r318441) > > > > @@ -8,6 +8,7 @@ FILESGROUPS=3D FILES > > > > # No need as it is empty and just causes rebuilds since this file = does so much. > > > > UPDATE_DEPENDFILE=3D no > > > > SUBDIR=3D \ > > > > + cron.d \ > > > > newsyslog.conf.d \ > > > > syslog.d > > >=20 > > > The thread on the newsyslog clearly shows that this is a contriversia= l change. > > >=20 > > > I strongly object to further splitting of /etc/FOO into /etc/foo.d/FO= O files > > > to suite Dell/EMC/Isilon's needs. It is in conflict with the needs a= nd > > > desires of others. > >=20 > > Has multiple people has stated, on the newsyslog thread. this is not a > > DELL/EMC/Isilon need, this is also a requirement for plenty of use cases > > 1. Consistency > > as a project we do support building WITHOUT_FOO there is no reason to= install > > syslog, cron configuration for FOO if the system was built without foo >=20 > Though it doesn't _hurt_, and breaking POLA has to be worth it, not just > because it looks nice. >=20 > > 2. Packaging base > > if one does not install at there is no need for the at crontab to be = installed > > (same reason as 1.) >=20 > This is a viable reason except that it isn't fully baked yet. >=20 > > 3. Large deployment of freebsd farms > > Being able to administrate thousands of FreeBSD machines, one often e= nds up > > using tools like puppet, chef, ansible, cfengine. When programmatical= ly > > handling configuration management it is way easier and safer to simple > > add/removes files in a directory rather than mangling^Winplace editin= g files. >=20 > There's nothing preventing you now from deploying split files and an empty > global configuration file since the daemons support foo.d. You don't req= uire > that to change in upstream since you should be using some sort of VCS to > manage your configuration as it is. >=20 > > 4. Ports/packages > > On can provide easily sample configuration for cron, syslog (not only= ) and the > > admin can decide to use it or not easily (ususally this is done by ma= king > > symlinks from the said file which would live in share/* into the .d d= irectory. > >=20 > > This is not a new trend in FreeBSD: newsyslog, rc.conf, libmap and more. >=20 > The support for broken out files has long been there, but the base system= has > not used them previously for default config shipped during a release. Th= at > is in fact a new trend. >=20 > However, the current approach seems to be the absolute worst way to do th= is. > If someone wants to use the existing base system image and modify it with > config management, they now have to use a mix of styles (for some services > edit a global config file for certain settings, but use a dedicated file = for > other settings for the same service, or for the same settings but a diffe= rent > service). It's also the worst case for humans trying to work with our sy= stem > as the division between which services are broken out vs global is > inconsistent and arbitrary. >=20 > Once you split up the files you make a merge conflict for anyone trying t= o do > an upgrade. If we do this piecemail then we create N merge conflicts for= users > to deal with as opposed to if you split it up all at once. >=20 > Also, there wasn't a clear consensus (a mail to arch@ with "hey, we should > switch to splitting up config files for reasons A and B and let's do this= for > 12.0 but not merge to stable so there is a clear flag day / sign post for= users > to manage upgrades". Instead there have been a couple of commits and any > not-in-100%-agreement opinions are ignored. >=20 That's true, another thing is the way it is done, there is no simple way to disable the at cron from an admin point of view rather than rm /etc/cron.d= /at for an end user which an upgrade will bring back. Bapt --plhgbr6l2qpe7eme Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlkeEQkACgkQY4mL3PG3 PlpEQQ/9EXMRc61538j3jaOjXNgWkwpZojKwebrudlrNLTAmUSbDIunl0n6HG/4B VE5M0xP19SM9GSV4nDxd/rKZty/Ybn2NBqB8pePRJTxcSX96qI1ZjBK/7xsIHsAk BbiPNFr+yZwOZt8C9zlKCNOX2EZ4YILS6onHEJV6oGbLK5ORdpo8EnLfNcwsNqiX yk9CmZ3E56lJ1t/YeX6hd/vgLMBh0Ur/eVoFQl8SjzXuAeLAa9thrd1utkrSOknY CLwbRteHTvOvrudIT6R83ODwdvVApImHpXFQDW6lezlwTbmy1fLoiEZBy94KmzOv NJXgdmZ2dgmCgen9YhHaKeHwgZZgfsoP5Ee5wAUsf5bzQ4ucp+y9VZwDn5Ew1Jr7 5bsxmX70hMZ/KgvhhIcP+PRIvMpUU7sTTCxdUlt3LopA/B66oXW2EFQ/Hh4o4oGv cEt5r29mez+Rf/k7rc2vEMGl031N08+bY9GrrSGUIwPiQAkdlhM00lqNhnYKeYfU 3Axe2NO7vguO1Jpl7dDZWBtGvt0LSMeVh/hpKLNkEnBIBA/0/FVW8Xm24IAyCWr0 8ElR1Az4d/zVJZt2Wo0gPYtS/rQHt+pt5muONTUnNWG3a/eVfnMSboBfUE0+zUOh l+UY5ULFz5cv4QqZf+7dMytj8YC7CR96ZDgVTcCIGgrxYArFvBQ= =nA5v -----END PGP SIGNATURE----- --plhgbr6l2qpe7eme-- From owner-svn-src-all@freebsd.org Thu May 18 21:27:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21795D6F45D; Thu, 18 May 2017 21:27:25 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id CD888A51; Thu, 18 May 2017 21:27:24 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id B30FB1BD74; Fri, 19 May 2017 00:27:20 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id fGesGcTLBgKv; Fri, 19 May 2017 00:27:16 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id BDDAC1BD6E; Fri, 19 May 2017 00:27:16 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id 68285574ABD; Fri, 19 May 2017 00:27:13 +0300 (MSK) X-Virus-Scanned: amavisd-new at cicgroup.ru Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id DNIzAvbcvEA8; Fri, 19 May 2017 00:27:10 +0300 (MSK) Received: from localhost (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTPA id 88B29574A91; Fri, 19 May 2017 00:27:10 +0300 (MSK) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 19 May 2017 00:27:10 +0300 From: Vladimir Kondratyev To: Vladimir Kondratyev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org, owner-src-committers@freebsd.org Subject: Re: svn commit: r318500 - stable/11/sys/dev/atkbdc In-Reply-To: <201705182123.v4ILNdsB038658@repo.freebsd.org> References: <201705182123.v4ILNdsB038658@repo.freebsd.org> Message-ID: X-Sender: vladimir@kondratyev.su User-Agent: Roundcube Webmail/1.2.2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:27:25 -0000 On 2017-05-19 00:23, Vladimir Kondratyev wrote: > Author: wulf > Date: Thu May 18 21:23:39 2017 > New Revision: 318500 > URL: https://svnweb.freebsd.org/changeset/base/318500 > > Log: > MFC r317811: > > ... > > MFC r317819: > Approved by: gonzo (mentor) -- WBR Vladimir Kondratyev From owner-svn-src-all@freebsd.org Thu May 18 21:27:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4274D6F4D6 for ; Thu, 18 May 2017 21:27:53 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6E47B96 for ; Thu, 18 May 2017 21:27:53 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: b228e9ad-3c10-11e7-8c46-c35e37f62db1 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id b228e9ad-3c10-11e7-8c46-c35e37f62db1; Thu, 18 May 2017 21:26:47 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4ILRnjN002133; Thu, 18 May 2017 15:27:49 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1495142869.89384.18.camel@freebsd.org> Subject: Re: svn commit: r318441 - in head/etc: . cron.d From: Ian Lepore To: Baptiste Daroussin , John Baldwin Cc: rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Date: Thu, 18 May 2017 15:27:49 -0600 In-Reply-To: <20170518212429.rugl6vnv5d2b2hpb@ivaldir.net> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net> <20170518130932.eo5clhki4za2vigz@ivaldir.net> <2201156.H7EQSgYph9@ralph.baldwin.cx> <20170518212429.rugl6vnv5d2b2hpb@ivaldir.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:27:53 -0000 On Thu, 2017-05-18 at 23:24 +0200, Baptiste Daroussin wrote: > On Thu, May 18, 2017 at 09:48:25AM -0700, John Baldwin wrote: > > > > On Thursday, May 18, 2017 03:09:32 PM Baptiste Daroussin wrote: > > > > > > On Thu, May 18, 2017 at 02:56:31AM -0700, Rodney W. Grimes wrote: > > > > > > > > > > > > > > > > > [...] > > The support for broken out files has long been there, but the base > > system has > > not used them previously for default config shipped during a > > release.  That > > is in fact a new trend. > > > > However, the current approach seems to be the absolute worst way to > > do this. > > If someone wants to use the existing base system image and modify > > it with > > config management, they now have to use a mix of styles (for some > > services > > edit a global config file for certain settings, but use a dedicated > > file for > > other settings for the same service, or for the same settings but a > > different > > service).  It's also the worst case for humans trying to work with > > our system > > as the division between which services are broken out vs global is > > inconsistent and arbitrary. > > > > Once you split up the files you make a merge conflict for anyone > > trying to do > > an upgrade.  If we do this piecemail then we create N merge > > conflicts for users > > to deal with as opposed to if you split it up all at once. > > > > Also, there wasn't a clear consensus (a mail to arch@ with "hey, we > > should > > switch to splitting up config files for reasons A and B and let's > > do this for > > 12.0 but not merge to stable so there is a clear flag day / sign > > post for users > > to manage upgrades".  Instead there have been a couple of commits > > and any > > not-in-100%-agreement opinions are ignored. > > > That's true, another thing is the way it is done, there is no simple > way to > disable the at cron from an admin point of view  rather than rm > /etc/cron.d/at > for an end user which an upgrade will bring back. > > Bapt Would you not just comment out or delete the line, exactly as you would do in the main /etc/crontab? -- Ian From owner-svn-src-all@freebsd.org Thu May 18 21:29:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34B67D6F603; Thu, 18 May 2017 21:29:13 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E901CDA8; Thu, 18 May 2017 21:29:12 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 1A8A03215; Thu, 18 May 2017 21:29:12 +0000 (UTC) Date: Thu, 18 May 2017 23:29:11 +0200 From: Baptiste Daroussin To: Ian Lepore Cc: John Baldwin , rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318441 - in head/etc: . cron.d Message-ID: <20170518212911.mstgmzbydsv7oind@ivaldir.net> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net> <20170518130932.eo5clhki4za2vigz@ivaldir.net> <2201156.H7EQSgYph9@ralph.baldwin.cx> <20170518212429.rugl6vnv5d2b2hpb@ivaldir.net> <1495142869.89384.18.camel@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3mk2o7g3rtz22ydu" Content-Disposition: inline In-Reply-To: <1495142869.89384.18.camel@freebsd.org> User-Agent: NeoMutt/20170428 (1.8.2) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:29:13 -0000 --3mk2o7g3rtz22ydu Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 18, 2017 at 03:27:49PM -0600, Ian Lepore wrote: > On Thu, 2017-05-18 at 23:24 +0200, Baptiste Daroussin wrote: > > On Thu, May 18, 2017 at 09:48:25AM -0700, John Baldwin wrote: > > >=20 > > > On Thursday, May 18, 2017 03:09:32 PM Baptiste Daroussin wrote: > > > >=20 > > > > On Thu, May 18, 2017 at 02:56:31AM -0700, Rodney W. Grimes wrote: > > > > >=20 > > > > > >=20 > > > > > >=20 > > > > [...] > > > The support for broken out files has long been there, but the base > > > system has > > > not used them previously for default config shipped during a > > > release.=A0=A0That > > > is in fact a new trend. > > >=20 > > > However, the current approach seems to be the absolute worst way to > > > do this. > > > If someone wants to use the existing base system image and modify > > > it with > > > config management, they now have to use a mix of styles (for some > > > services > > > edit a global config file for certain settings, but use a dedicated > > > file for > > > other settings for the same service, or for the same settings but a > > > different > > > service).=A0=A0It's also the worst case for humans trying to work with > > > our system > > > as the division between which services are broken out vs global is > > > inconsistent and arbitrary. > > >=20 > > > Once you split up the files you make a merge conflict for anyone > > > trying to do > > > an upgrade.=A0=A0If we do this piecemail then we create N merge > > > conflicts for users > > > to deal with as opposed to if you split it up all at once. > > >=20 > > > Also, there wasn't a clear consensus (a mail to arch@ with "hey, we > > > should > > > switch to splitting up config files for reasons A and B and let's > > > do this for > > > 12.0 but not merge to stable so there is a clear flag day / sign > > > post for users > > > to manage upgrades".=A0=A0Instead there have been a couple of commits > > > and any > > > not-in-100%-agreement opinions are ignored. > > >=20 > > That's true, another thing is the way it is done, there is no simple > > way to > > disable the at cron from an admin point of view=A0=A0rather than rm > > /etc/cron.d/at > > for an end user which an upgrade will bring back. > >=20 > > Bapt >=20 > Would you not just comment out or delete the line, exactly as you would > do in the main /etc/crontab? Right but with a .d directory I would expect to just remove/add files/symli= nks rather than editing it, which defeat the point of the .d Bapt --3mk2o7g3rtz22ydu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlkeEicACgkQY4mL3PG3 Plqw3hAA3I6Ii8MRR4r9vPjAdy5TbyA75eDgyMnyBAlVpyFuFXY8isxVo8q+n8HE FyggrevSV92QM9bJxFp4aqDDr/IMuyNkRbq4WoVLOwQqOweEggI26Fj2gno0wrwa 1OsCKzcVS2bLJ+dvWoLXb9WJevoBE+jdblUToFSebi/P9zGDshMkoaAZpwN7nK1K K2swi5zJsb1Xjmz2hnpMcktDuXr9C3bsHRhsq54g6LZPmiS/Nfl698FZQR2e+fPP l74R0OLpGyiVfJ7AGzFM9Fngv7R9M85LU/9dCcBzvhmiHHXAIxSGn9q0JaxIq2TL q/GKIiKwGazB8aU9mbbfcsuPxOlJcFPJEFl6UZ/kWG+11TO8N71QfJMnn6R5um+a ACjEzA0z2E/Ut81fX+B5d56GCfbKEyYj/ODaMst4tfMwWzTrw1Vc0GrTyM38EdLG vC/nTTr2fbULqs5FwdK32hMSQfzdPonQst4D8gtZ9YLvBQ2ALtc3iVG025o6iaJN ajgUgD0/ncRAC5KP/9gDdbaRfTvoEVQWO4i3JVHotckDvfXjTgJjmgzI1eHSu1v7 iTdokuDlIX0wup0fGjUw2i9/cusF0ehUHijhORLdkFAiIvXunPcZ5ihZhHtLtGxq 9ss6eN5npl/zWIjLTtCFMOG7wixgctv0FePnfVk3QiBN060dgw4= =bc2S -----END PGP SIGNATURE----- --3mk2o7g3rtz22ydu-- From owner-svn-src-all@freebsd.org Thu May 18 21:34:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B851D6F8E4 for ; Thu, 18 May 2017 21:34:42 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C6701327 for ; Thu, 18 May 2017 21:34:41 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: a5f2b807-3c11-11e7-8c46-c35e37f62db1 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id a5f2b807-3c11-11e7-8c46-c35e37f62db1; Thu, 18 May 2017 21:33:36 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4ILYcCf002153; Thu, 18 May 2017 15:34:39 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1495143278.89384.24.camel@freebsd.org> Subject: Re: svn commit: r318441 - in head/etc: . cron.d From: Ian Lepore To: Baptiste Daroussin Cc: John Baldwin , rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Date: Thu, 18 May 2017 15:34:38 -0600 In-Reply-To: <20170518212911.mstgmzbydsv7oind@ivaldir.net> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net> <20170518130932.eo5clhki4za2vigz@ivaldir.net> <2201156.H7EQSgYph9@ralph.baldwin.cx> <20170518212429.rugl6vnv5d2b2hpb@ivaldir.net> <20170518212911.mstgmzbydsv7oind@ivaldir.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:34:42 -0000 On Thu, 2017-05-18 at 23:29 +0200, Baptiste Daroussin wrote: > On Thu, May 18, 2017 at 03:27:49PM -0600, Ian Lepore wrote: > > > > On Thu, 2017-05-18 at 23:24 +0200, Baptiste Daroussin wrote: > > > > > > On Thu, May 18, 2017 at 09:48:25AM -0700, John Baldwin wrote: > > > > > > > > > > > > On Thursday, May 18, 2017 03:09:32 PM Baptiste Daroussin wrote: > > > > > > > > > > > > > > > On Thu, May 18, 2017 at 02:56:31AM -0700, Rodney W. Grimes > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [...] > > > > The support for broken out files has long been there, but the > > > > base > > > > system has > > > > not used them previously for default config shipped during a > > > > release.  That > > > > is in fact a new trend. > > > > > > > > However, the current approach seems to be the absolute worst > > > > way to > > > > do this. > > > > If someone wants to use the existing base system image and > > > > modify > > > > it with > > > > config management, they now have to use a mix of styles (for > > > > some > > > > services > > > > edit a global config file for certain settings, but use a > > > > dedicated > > > > file for > > > > other settings for the same service, or for the same settings > > > > but a > > > > different > > > > service).  It's also the worst case for humans trying to work > > > > with > > > > our system > > > > as the division between which services are broken out vs global > > > > is > > > > inconsistent and arbitrary. > > > > > > > > Once you split up the files you make a merge conflict for > > > > anyone > > > > trying to do > > > > an upgrade.  If we do this piecemail then we create N merge > > > > conflicts for users > > > > to deal with as opposed to if you split it up all at once. > > > > > > > > Also, there wasn't a clear consensus (a mail to arch@ with > > > > "hey, we > > > > should > > > > switch to splitting up config files for reasons A and B and > > > > let's > > > > do this for > > > > 12.0 but not merge to stable so there is a clear flag day / > > > > sign > > > > post for users > > > > to manage upgrades".  Instead there have been a couple of > > > > commits > > > > and any > > > > not-in-100%-agreement opinions are ignored. > > > > > > > That's true, another thing is the way it is done, there is no > > > simple > > > way to > > > disable the at cron from an admin point of view  rather than rm > > > /etc/cron.d/at > > > for an end user which an upgrade will bring back. > > > > > > Bapt > > Would you not just comment out or delete the line, exactly as you > > would > > do in the main /etc/crontab? > Right but with a .d directory I would expect to just remove/add > files/symlinks > rather than editing it, which defeat the point of the .d > > Bapt Hrm, I don't see any conflict between "this fine-grained file holds config for just one component" and "edit the file if you want to change the config".  That is, making the file fine-grained is to make editing it EASIER (for a human or a program), not to eliminate editing it. I do see how thinking that deleting the file (or renaming it to file.no or something) would seem like the right thing to do.  How can we fix that? -- Ian From owner-svn-src-all@freebsd.org Thu May 18 21:36:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BC6AD6F975; Thu, 18 May 2017 21:36:24 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18B031531; Thu, 18 May 2017 21:36:24 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 3F5FD3567; Thu, 18 May 2017 21:36:23 +0000 (UTC) Date: Thu, 18 May 2017 23:36:23 +0200 From: Baptiste Daroussin To: Ian Lepore Cc: John Baldwin , rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318441 - in head/etc: . cron.d Message-ID: <20170518213622.r66gzsjlvj76ujli@ivaldir.net> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net> <20170518130932.eo5clhki4za2vigz@ivaldir.net> <2201156.H7EQSgYph9@ralph.baldwin.cx> <20170518212429.rugl6vnv5d2b2hpb@ivaldir.net> <20170518212911.mstgmzbydsv7oind@ivaldir.net> <1495143278.89384.24.camel@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3iqfx6deqp4ggs2f" Content-Disposition: inline In-Reply-To: <1495143278.89384.24.camel@freebsd.org> User-Agent: NeoMutt/20170428 (1.8.2) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:36:24 -0000 --3iqfx6deqp4ggs2f Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 18, 2017 at 03:34:38PM -0600, Ian Lepore wrote: > On Thu, 2017-05-18 at 23:29 +0200, Baptiste Daroussin wrote: > > On Thu, May 18, 2017 at 03:27:49PM -0600, Ian Lepore wrote: > > >=20 > > > On Thu, 2017-05-18 at 23:24 +0200, Baptiste Daroussin wrote: > > > >=20 > > > > On Thu, May 18, 2017 at 09:48:25AM -0700, John Baldwin wrote: > > > > >=20 > > > > >=20 > > > > > On Thursday, May 18, 2017 03:09:32 PM Baptiste Daroussin wrote: > > > > > >=20 > > > > > >=20 > > > > > > On Thu, May 18, 2017 at 02:56:31AM -0700, Rodney W. Grimes > > > > > > wrote: > > > > > > >=20 > > > > > > >=20 > > > > > > > >=20 > > > > > > > >=20 > > > > > > > >=20 > > > > > > [...] > > > > > The support for broken out files has long been there, but the > > > > > base > > > > > system has > > > > > not used them previously for default config shipped during a > > > > > release.=A0=A0That > > > > > is in fact a new trend. > > > > >=20 > > > > > However, the current approach seems to be the absolute worst > > > > > way to > > > > > do this. > > > > > If someone wants to use the existing base system image and > > > > > modify > > > > > it with > > > > > config management, they now have to use a mix of styles (for > > > > > some > > > > > services > > > > > edit a global config file for certain settings, but use a > > > > > dedicated > > > > > file for > > > > > other settings for the same service, or for the same settings > > > > > but a > > > > > different > > > > > service).=A0=A0It's also the worst case for humans trying to work > > > > > with > > > > > our system > > > > > as the division between which services are broken out vs global > > > > > is > > > > > inconsistent and arbitrary. > > > > >=20 > > > > > Once you split up the files you make a merge conflict for > > > > > anyone > > > > > trying to do > > > > > an upgrade.=A0=A0If we do this piecemail then we create N merge > > > > > conflicts for users > > > > > to deal with as opposed to if you split it up all at once. > > > > >=20 > > > > > Also, there wasn't a clear consensus (a mail to arch@ with > > > > > "hey, we > > > > > should > > > > > switch to splitting up config files for reasons A and B and > > > > > let's > > > > > do this for > > > > > 12.0 but not merge to stable so there is a clear flag day / > > > > > sign > > > > > post for users > > > > > to manage upgrades".=A0=A0Instead there have been a couple of > > > > > commits > > > > > and any > > > > > not-in-100%-agreement opinions are ignored. > > > > >=20 > > > > That's true, another thing is the way it is done, there is no > > > > simple > > > > way to > > > > disable the at cron from an admin point of view=A0=A0rather than rm > > > > /etc/cron.d/at > > > > for an end user which an upgrade will bring back. > > > >=20 > > > > Bapt > > > Would you not just comment out or delete the line, exactly as you > > > would > > > do in the main /etc/crontab? > > Right but with a .d directory I would expect to just remove/add > > files/symlinks > > rather than editing it, which defeat the point of the .d > >=20 > > Bapt >=20 > Hrm, I don't see any conflict between "this fine-grained file holds > config for just one component" and "edit the file if you want to change > the config". =A0That is, making the file fine-grained is to make editing > it EASIER (for a human or a program), not to eliminate editing it. >=20 > I do see how thinking that deleting the file (or renaming it to file.no > or something) would seem like the right thing to do. =A0How can we fix > that? >=20 For now I don't know :) I'm thinking about it Bapt --3iqfx6deqp4ggs2f Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlkeE9YACgkQY4mL3PG3 PlolkQ//VfPKh64vfEONbmuYcBPM4G/7xBo6qDjq8lh4avpqNUw1oz2p1rfF5xh7 H3FD0Md1UfAM4Iw9uXCfOujO5Gkk1+hUD2jjlnGJd57HRKoUzlJ+ra1EivYKJTWa CUmCcEr2QXEU7dtKw1s9z5BGFTQaHZkRdRT4oUlgn3RJ9j0XLWyr2fOH6BKsEMxX 1O5YAwe5/Ph8L0TlF04m80G+l8Ca/ojfB7V2qwRqW7ClLhmT8IRAcaaC1uNZOTl3 a0HekNLhbKukInzgGzoMBlG3ilO68YT0JNX/npMSNvB0ZDS7b4mbNtHw8W2kQq1s kjrkkP2w2r0GXZW+lmnd6djeaRifwvM/fp+I9FU4QXkbxzXY50Iw6aw1pXBqVVbM Gqehdj8i+HffluoOsEdg26k08CfH1S1oDmQDoU1RNMClZODOQfqNtRxzpST4KwXk /WeWZszYo7abvE6pzuF5N8L2qiCmnK1U1z9nuGWqrsfd6ZuHJJ5tnRTC4XnE9NvJ u8OJHxFZWs+G1PLSaCZ7IszHh5Hn4mlEPT6x7OqH4zge46n6YJOBHcl1B/DRgHBb orynU4/oyXA+sav/Ekl4MiiHFTGgWkeCJ4DEKZnSdG8Tw8Bf01wn+4AuAkhCv5CE m5Ov2k+fNUeMWC2xHGHxj0z1hKZte7Tg/r96MSItu8PMKgBPwFQ= =hk5v -----END PGP SIGNATURE----- --3iqfx6deqp4ggs2f-- From owner-svn-src-all@freebsd.org Thu May 18 21:36:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AD47D6F9F9; Thu, 18 May 2017 21:36:59 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id 07050169B; Thu, 18 May 2017 21:36:59 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from sweettea.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 34D575646B; Thu, 18 May 2017 16:36:58 -0500 (CDT) Subject: Re: svn commit: r318441 - in head/etc: . cron.d To: Ian Lepore , Baptiste Daroussin Cc: John Baldwin , rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <201705180956.v4I9uVpQ065465@pdx.rh.CN85.dnsmgr.net> <20170518130932.eo5clhki4za2vigz@ivaldir.net> <2201156.H7EQSgYph9@ralph.baldwin.cx> <20170518212429.rugl6vnv5d2b2hpb@ivaldir.net> <20170518212911.mstgmzbydsv7oind@ivaldir.net> <1495143278.89384.24.camel@freebsd.org> From: Eric van Gyzen Message-ID: <10f3d402-f392-d4ed-cc47-76296f0ef4e7@vangyzen.net> Date: Thu, 18 May 2017 16:36:57 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: <1495143278.89384.24.camel@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:36:59 -0000 On 05/18/2017 16:34, Ian Lepore wrote: > On Thu, 2017-05-18 at 23:29 +0200, Baptiste Daroussin wrote: >> On Thu, May 18, 2017 at 03:27:49PM -0600, Ian Lepore wrote: >>> >>> On Thu, 2017-05-18 at 23:24 +0200, Baptiste Daroussin wrote: >>>> >>>> On Thu, May 18, 2017 at 09:48:25AM -0700, John Baldwin wrote: >>>>> >>>>> >>>>> On Thursday, May 18, 2017 03:09:32 PM Baptiste Daroussin wrote: >>>>>> >>>>>> >>>>>> On Thu, May 18, 2017 at 02:56:31AM -0700, Rodney W. Grimes >>>>>> wrote: >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>> [...] >>>>> The support for broken out files has long been there, but the >>>>> base >>>>> system has >>>>> not used them previously for default config shipped during a >>>>> release. That >>>>> is in fact a new trend. >>>>> >>>>> However, the current approach seems to be the absolute worst >>>>> way to >>>>> do this. >>>>> If someone wants to use the existing base system image and >>>>> modify >>>>> it with >>>>> config management, they now have to use a mix of styles (for >>>>> some >>>>> services >>>>> edit a global config file for certain settings, but use a >>>>> dedicated >>>>> file for >>>>> other settings for the same service, or for the same settings >>>>> but a >>>>> different >>>>> service). It's also the worst case for humans trying to work >>>>> with >>>>> our system >>>>> as the division between which services are broken out vs global >>>>> is >>>>> inconsistent and arbitrary. >>>>> >>>>> Once you split up the files you make a merge conflict for >>>>> anyone >>>>> trying to do >>>>> an upgrade. If we do this piecemail then we create N merge >>>>> conflicts for users >>>>> to deal with as opposed to if you split it up all at once. >>>>> >>>>> Also, there wasn't a clear consensus (a mail to arch@ with >>>>> "hey, we >>>>> should >>>>> switch to splitting up config files for reasons A and B and >>>>> let's >>>>> do this for >>>>> 12.0 but not merge to stable so there is a clear flag day / >>>>> sign >>>>> post for users >>>>> to manage upgrades". Instead there have been a couple of >>>>> commits >>>>> and any >>>>> not-in-100%-agreement opinions are ignored. >>>>> >>>> That's true, another thing is the way it is done, there is no >>>> simple >>>> way to >>>> disable the at cron from an admin point of view rather than rm >>>> /etc/cron.d/at >>>> for an end user which an upgrade will bring back. >>>> >>>> Bapt >>> Would you not just comment out or delete the line, exactly as you >>> would >>> do in the main /etc/crontab? >> Right but with a .d directory I would expect to just remove/add >> files/symlinks >> rather than editing it, which defeat the point of the .d >> >> Bapt > > Hrm, I don't see any conflict between "this fine-grained file holds > config for just one component" and "edit the file if you want to change > the config". That is, making the file fine-grained is to make editing > it EASIER (for a human or a program), not to eliminate editing it. > > I do see how thinking that deleting the file (or renaming it to file.no > or something) would seem like the right thing to do. How can we fix > that? How would an upgrade bring back /etc/cron.d/at if the end-user deleted it? Eric From owner-svn-src-all@freebsd.org Thu May 18 21:44:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E9D3D6FC63; Thu, 18 May 2017 21:44:16 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C1101B68; Thu, 18 May 2017 21:44:15 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ILiF7t046858; Thu, 18 May 2017 21:44:15 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ILiEOs046856; Thu, 18 May 2017 21:44:14 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705182144.v4ILiEOs046856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 18 May 2017 21:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318501 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:44:16 -0000 Author: jilles Date: Thu May 18 21:44:14 2017 New Revision: 318501 URL: https://svnweb.freebsd.org/changeset/base/318501 Log: sh: Ensure memout.bufsize matches allocated buffer, if it exists. Modified: head/bin/sh/eval.c head/bin/sh/output.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Thu May 18 21:23:39 2017 (r318500) +++ head/bin/sh/eval.c Thu May 18 21:44:14 2017 (r318501) @@ -1081,8 +1081,6 @@ evalcommand(union node *cmd, int flags, mode = (cmdentry.u.index == EXECCMD)? 0 : REDIR_PUSH; if (flags == EV_BACKCMD) { memout.nextc = memout.buf; - memout.bufend = memout.buf; - memout.bufsize = 64; mode |= REDIR_BACKQ; } savecmdname = commandname; @@ -1139,6 +1137,7 @@ cmddone: memout.buf = NULL; memout.nextc = NULL; memout.bufend = NULL; + memout.bufsize = 64; } if (cmdentry.u.index != EXECCMD) popredir(); Modified: head/bin/sh/output.c ============================================================================== --- head/bin/sh/output.c Thu May 18 21:23:39 2017 (r318500) +++ head/bin/sh/output.c Thu May 18 21:44:14 2017 (r318501) @@ -73,7 +73,7 @@ static int doformat_wr(void *, const cha struct output output = {NULL, NULL, NULL, OUTBUFSIZ, 1, 0}; struct output errout = {NULL, NULL, NULL, 256, 2, 0}; -struct output memout = {NULL, NULL, NULL, 0, MEM_OUT, 0}; +struct output memout = {NULL, NULL, NULL, 64, MEM_OUT, 0}; struct output *out1 = &output; struct output *out2 = &errout; @@ -208,7 +208,7 @@ outbin(const void *data, size_t len, str void emptyoutbuf(struct output *dest) { - int offset; + int offset, newsize; if (dest->buf == NULL) { INTOFF; @@ -218,10 +218,11 @@ emptyoutbuf(struct output *dest) INTON; } else if (dest->fd == MEM_OUT) { offset = dest->nextc - dest->buf; + newsize = dest->bufsize << 1; INTOFF; - dest->bufsize <<= 1; - dest->buf = ckrealloc(dest->buf, dest->bufsize); - dest->bufend = dest->buf + dest->bufsize; + dest->buf = ckrealloc(dest->buf, newsize); + dest->bufsize = newsize; + dest->bufend = dest->buf + newsize; dest->nextc = dest->buf + offset; INTON; } else { From owner-svn-src-all@freebsd.org Thu May 18 22:10:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11764D73263; Thu, 18 May 2017 22:10:06 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5F8D6F1; Thu, 18 May 2017 22:10:05 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IMA4X9054970; Thu, 18 May 2017 22:10:04 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IMA48d054969; Thu, 18 May 2017 22:10:04 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705182210.v4IMA48d054969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 18 May 2017 22:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318502 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 22:10:06 -0000 Author: jilles Date: Thu May 18 22:10:04 2017 New Revision: 318502 URL: https://svnweb.freebsd.org/changeset/base/318502 Log: sh: Keep output buffer across builtins. Allocating and deallocating repeatedly the 1024-byte buffer for stdout from builtins costs CPU time for little or no benefit. A simple loop containing builtins that write to a file descriptor, such as i=0; while [ "$i" -lt 1000000 ]; do printf .; i=$((i+1)); done >/dev/null is over 10% faster in a simple benchmark on an amd64 virtual machine. Modified: head/bin/sh/output.c Modified: head/bin/sh/output.c ============================================================================== --- head/bin/sh/output.c Thu May 18 21:44:14 2017 (r318501) +++ head/bin/sh/output.c Thu May 18 22:10:04 2017 (r318502) @@ -254,14 +254,7 @@ flushout(struct output *dest) void freestdout(void) { - INTOFF; - if (output.buf) { - ckfree(output.buf); - output.nextc = NULL; - output.buf = NULL; - output.bufend = NULL; - } - INTON; + output.nextc = output.buf; } From owner-svn-src-all@freebsd.org Thu May 18 22:50:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9491BD717D3; Thu, 18 May 2017 22:50:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E37C61931; Thu, 18 May 2017 22:50:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IMoGd5071083; Thu, 18 May 2017 22:50:16 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IMoG2V071082; Thu, 18 May 2017 22:50:16 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201705182250.v4IMoG2V071082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 18 May 2017 22:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r318503 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 22:50:31 -0000 Author: pfg Date: Thu May 18 22:50:16 2017 New Revision: 318503 URL: https://svnweb.freebsd.org/changeset/base/318503 Log: Release Piotr Stephaniak from mentorship. He is doing pretty well on his own so lets get out of the way. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Thu May 18 22:10:04 2017 (r318502) +++ svnadmin/conf/mentors Thu May 18 22:50:16 2017 (r318503) @@ -23,7 +23,6 @@ kadesai ken Co-mentor: scottl, ambrisk mahrens mckusick peterj jhb Co-mentor: grog phil theraven Co-mentor: sjg -pstef pfg rgrimes grehan slm ken Co-mentor: scottl, ambrisko stevek sjg From owner-svn-src-all@freebsd.org Thu May 18 23:41:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD421D739A4; Thu, 18 May 2017 23:41:19 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89E841307; Thu, 18 May 2017 23:41:19 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4INfIsV091477; Thu, 18 May 2017 23:41:18 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4INfIaf091476; Thu, 18 May 2017 23:41:18 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705182341.v4INfIaf091476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Thu, 18 May 2017 23:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318504 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 23:41:19 -0000 Author: rpokala Date: Thu May 18 23:41:18 2017 New Revision: 318504 URL: https://svnweb.freebsd.org/changeset/base/318504 Log: Persistently store NIC's hardware MAC address, and add a way to retrive it jhb pointed out that (struct ifnet) is part of the network driver KBI, and thus the offsets of internal fields must not change. Therefore, move the new "if_hw_addr" field to the end, and consume one of the "if_pspare"s; that's what they're there for. The new field replaces the *last* element of that array; that way, offsetof(if_pspare) and offsetof(if_ispare) are unchanged compared to before r318397. PR: 194386 Reviewed by: jhb Pointyhat to: rpokala Sponsored by: Panasas Modified: stable/11/sys/net/if_var.h Modified: stable/11/sys/net/if_var.h ============================================================================== --- stable/11/sys/net/if_var.h Thu May 18 22:50:16 2017 (r318503) +++ stable/11/sys/net/if_var.h Thu May 18 23:41:18 2017 (r318504) @@ -241,7 +241,6 @@ struct ifnet { struct ifmultihead if_multiaddrs; /* multicast addresses configured */ int if_amcount; /* number of all-multicast requests */ struct ifaddr *if_addr; /* pointer to link-level address */ - void *if_hw_addr; /* hardware link-level address */ const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */ struct rwlock if_afdata_lock; void *if_afdata[AF_MAX]; @@ -312,7 +311,8 @@ struct ifnet { * that structure can be enhanced without changing the kernel * binary interface. */ - void *if_pspare[4]; /* packet pacing / general use */ + void *if_pspare[3]; /* packet pacing / general use */ + void *if_hw_addr; /* hardware link-level address */ int if_ispare[4]; /* packet pacing / general use */ }; From owner-svn-src-all@freebsd.org Thu May 18 23:41:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63B24D73A0D; Thu, 18 May 2017 23:41:35 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32310146F; Thu, 18 May 2017 23:41:35 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4INfYGM091541; Thu, 18 May 2017 23:41:34 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4INfYTM091540; Thu, 18 May 2017 23:41:34 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705182341.v4INfYTM091540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Thu, 18 May 2017 23:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318505 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 23:41:35 -0000 Author: rpokala Date: Thu May 18 23:41:34 2017 New Revision: 318505 URL: https://svnweb.freebsd.org/changeset/base/318505 Log: Persistently store NIC's hardware MAC address, and add a way to retrive it jhb pointed out that (struct ifnet) is part of the network driver KBI, and thus the offsets of internal fields must not change. Therefore, move the new "if_hw_addr" field to the end, and consume one of the "if_pspare"s; that's what they're there for. Because netmap on stable/10 uses "if_pspare[0]", the new field replaces the *last* element of that array; that way, offsetof(if_pspare) is unchanged compared to before r318430. PR: 194386 Reviewed by: jhb Pointyhat to: rpokala Sponsored by: Panasas Modified: stable/10/sys/net/if_var.h Modified: stable/10/sys/net/if_var.h ============================================================================== --- stable/10/sys/net/if_var.h Thu May 18 23:41:18 2017 (r318504) +++ stable/10/sys/net/if_var.h Thu May 18 23:41:34 2017 (r318505) @@ -200,7 +200,6 @@ struct ifnet { (struct ifnet *, struct vnet *, char *); struct vnet *if_home_vnet; /* where this ifnet originates from */ struct ifaddr *if_addr; /* pointer to link-level address */ - void *if_hw_addr; /* hardware link-level address */ void *if_llsoftc; /* link layer softc */ int if_drv_flags; /* driver-managed status flags */ struct ifaltq if_snd; /* output queue (includes altq) */ @@ -260,7 +259,8 @@ struct ifnet { */ u_int if_hw_tsomaxsegcount; /* TSO maximum segment count */ u_int if_hw_tsomaxsegsize; /* TSO maximum segment size in bytes */ - void *if_pspare[8]; /* 1 netmap, 7 TDB */ + void *if_pspare[7]; /* 1 netmap, 6 TDB */ + void *if_hw_addr; /* hardware link-level address */ }; typedef void if_init_f_t(void *); From owner-svn-src-all@freebsd.org Thu May 18 23:52:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0ED0ED73E55; Thu, 18 May 2017 23:52:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE16A1A76; Thu, 18 May 2017 23:52:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4INqSIL099302; Thu, 18 May 2017 23:52:28 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4INqSbQ099301; Thu, 18 May 2017 23:52:28 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201705182352.v4INqSbQ099301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 18 May 2017 23:52:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318506 - stable/11/sys/dev/vt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 23:52:30 -0000 Author: jkim Date: Thu May 18 23:52:28 2017 New Revision: 318506 URL: https://svnweb.freebsd.org/changeset/base/318506 Log: MFC: r317171, r317173, r317560, r317561, r318326 Always clear borders when the terminal is flushed. PR: 202288 Modified: stable/11/sys/dev/vt/vt_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/vt_core.c ============================================================================== --- stable/11/sys/dev/vt/vt_core.c Thu May 18 23:41:34 2017 (r318505) +++ stable/11/sys/dev/vt/vt_core.c Thu May 18 23:52:28 2017 (r318506) @@ -1147,6 +1147,36 @@ vt_mark_mouse_position_as_dirty(struct v } #endif +static void +vt_set_border(struct vt_device *vd, const term_rect_t *area, + const term_color_t c) +{ + vd_drawrect_t *drawrect = vd->vd_driver->vd_drawrect; + + if (drawrect == NULL) + return; + + /* Top bar */ + if (area->tr_begin.tp_row > 0) + drawrect(vd, 0, 0, vd->vd_width - 1, + area->tr_begin.tp_row - 1, 1, c); + + /* Left bar */ + if (area->tr_begin.tp_col > 0) + drawrect(vd, 0, area->tr_begin.tp_row, + area->tr_begin.tp_col - 1, area->tr_end.tp_row - 1, 1, c); + + /* Right bar */ + if (area->tr_end.tp_col < vd->vd_width) + drawrect(vd, area->tr_end.tp_col, area->tr_begin.tp_row, + vd->vd_width - 1, area->tr_end.tp_row - 1, 1, c); + + /* Bottom bar */ + if (area->tr_end.tp_row < vd->vd_height) + drawrect(vd, 0, area->tr_end.tp_row, vd->vd_width - 1, + vd->vd_height - 1, 1, c); +} + static int vt_flush(struct vt_device *vd) { @@ -1212,6 +1242,7 @@ vt_flush(struct vt_device *vd) if (vd->vd_flags & VDF_INVALID) { vd->vd_flags &= ~VDF_INVALID; + vt_set_border(vd, &vw->vw_draw_area, TC_BLACK); vt_termrect(vd, vf, &tarea); if (vt_draw_logo_cpus) vtterm_draw_cpu_logos(vd); @@ -1527,45 +1558,6 @@ vtterm_opened(struct terminal *tm, int o } static int -vt_set_border(struct vt_window *vw, term_color_t c) -{ - struct vt_device *vd = vw->vw_device; - - if (vd->vd_driver->vd_drawrect == NULL) - return (ENOTSUP); - - /* Top bar. */ - if (vw->vw_draw_area.tr_begin.tp_row > 0) - vd->vd_driver->vd_drawrect(vd, - 0, 0, - vd->vd_width - 1, vw->vw_draw_area.tr_begin.tp_row - 1, - 1, c); - - /* Left bar. */ - if (vw->vw_draw_area.tr_begin.tp_col > 0) - vd->vd_driver->vd_drawrect(vd, - 0, 0, - vw->vw_draw_area.tr_begin.tp_col - 1, vd->vd_height - 1, - 1, c); - - /* Right bar. */ - if (vw->vw_draw_area.tr_end.tp_col < vd->vd_width) - vd->vd_driver->vd_drawrect(vd, - vw->vw_draw_area.tr_end.tp_col - 1, 0, - vd->vd_width - 1, vd->vd_height - 1, - 1, c); - - /* Bottom bar. */ - if (vw->vw_draw_area.tr_end.tp_row < vd->vd_height) - vd->vd_driver->vd_drawrect(vd, - 0, vw->vw_draw_area.tr_end.tp_row - 1, - vd->vd_width - 1, vd->vd_height - 1, - 1, c); - - return (0); -} - -static int vt_change_font(struct vt_window *vw, struct vt_font *vf) { struct vt_device *vd = vw->vw_device; @@ -1630,7 +1622,6 @@ vt_change_font(struct vt_window *vw, str /* Force a full redraw the next timer tick. */ if (vd->vd_curwindow == vw) { - vt_set_border(vw, TC_BLACK); vd->vd_flags |= VDF_INVALID; vt_resume_flush_timer(vw->vw_device, 0); } From owner-svn-src-all@freebsd.org Fri May 19 00:00:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6B80D732BD; Fri, 19 May 2017 00:00:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3F251DC7; Fri, 19 May 2017 00:00:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J00cfr099707; Fri, 19 May 2017 00:00:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J00cqM099703; Fri, 19 May 2017 00:00:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705190000.v4J00cqM099703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 00:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318507 - in stable/11: . gnu/usr.bin/groff/tmac lib/clang sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 00:00:39 -0000 Author: gjb Date: Fri May 19 00:00:38 2017 New Revision: 318507 URL: https://svnweb.freebsd.org/changeset/base/318507 Log: Update stable/11 from 11.0-STABLE to 11.1-PRERELEASE, marking the official start of the code slush. Set the default mdoc(7) version to 11.1, and update the clang(1) TARGET_TRIPLE to reflect 11.1. While here, add missing FreeBSD major versions to mdoc(7). Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/Makefile.inc1 stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in stable/11/lib/clang/llvm.build.mk stable/11/sys/conf/newvers.sh Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Thu May 18 23:52:28 2017 (r318506) +++ stable/11/Makefile.inc1 Fri May 19 00:00:38 2017 (r318507) @@ -596,7 +596,7 @@ XCXXFLAGS+= -isystem ${WORLDTMP}/usr/inc .endif .else TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.1 XCFLAGS+= -target ${TARGET_TRIPLE} .endif XCFLAGS+= --sysroot=${WORLDTMP} Modified: stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in ============================================================================== --- stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in Thu May 18 23:52:28 2017 (r318506) +++ stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in Fri May 19 00:00:38 2017 (r318507) @@ -50,7 +50,7 @@ .ds doc-str-Lb-libstdthreads C11 Threads Library (libstdthreads, \-lstdthreads) . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~11.0 +.ds doc-default-operating-system FreeBSD\~11.1 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-2.2.9 2.2.9 @@ -62,7 +62,10 @@ .ds doc-operating-system-FreeBSD-9.3 9.3 .ds doc-operating-system-FreeBSD-10.0 10.0 .ds doc-operating-system-FreeBSD-10.1 10.1 +.ds doc-operating-system-FreeBSD-10.2 10.2 +.ds doc-operating-system-FreeBSD-10.3 10.3 .ds doc-operating-system-FreeBSD-11.0 11.0 +.ds doc-operating-system-FreeBSD-11.1 11.1 . .\" Definitions for other *BSDs not (yet) in doc-common .ds doc-operating-system-NetBSD-7.0 7.0 Modified: stable/11/lib/clang/llvm.build.mk ============================================================================== --- stable/11/lib/clang/llvm.build.mk Thu May 18 23:52:28 2017 (r318506) +++ stable/11/lib/clang/llvm.build.mk Fri May 19 00:00:38 2017 (r318507) @@ -31,7 +31,7 @@ TARGET_ABI= gnueabi .else TARGET_ABI= unknown .endif -OS_VERSION= freebsd11.0 +OS_VERSION= freebsd11.1 TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${TARGET_ABI}-${OS_VERSION} BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-unknown-${OS_VERSION} Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu May 18 23:52:28 2017 (r318506) +++ stable/11/sys/conf/newvers.sh Fri May 19 00:00:38 2017 (r318507) @@ -43,8 +43,8 @@ # included if the tree is modified. TYPE="FreeBSD" -REVISION="11.0" -BRANCH="STABLE" +REVISION="11.1" +BRANCH="PRERELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri May 19 00:25:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39A0CD73B2B; Fri, 19 May 2017 00:25:11 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 099CCEC2; Fri, 19 May 2017 00:25:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J0PALo011833; Fri, 19 May 2017 00:25:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J0PAwu011832; Fri, 19 May 2017 00:25:10 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705190025.v4J0PAwu011832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 19 May 2017 00:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318508 - head/cddl/usr.sbin/dtrace/tests/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 00:25:11 -0000 Author: markj Date: Fri May 19 00:25:09 2017 New Revision: 318508 URL: https://svnweb.freebsd.org/changeset/base/318508 Log: Remove the EXFAIL annotation for tests which pass as of r309596. Reported by: bdrewery Sponsored by: Dell EMC Isilon Modified: head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Modified: head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Fri May 19 00:00:38 2017 (r318507) +++ head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Fri May 19 00:25:09 2017 (r318508) @@ -139,11 +139,6 @@ exclude EXFAIL common/pid/tst.newprobes. exclude EXFAIL common/pid/tst.provregex2.ksh exclude EXFAIL common/pid/tst.provregex4.ksh -# libproc doesn't properly handle probe sites that correspond to multiple -# symbols. -exclude EXFAIL common/pid/tst.weak1.d -exclude EXFAIL common/pid/tst.weak2.d - # This test checks for a leading tab on a line before #define. That is illegal # on Solaris, but the clang pre-processor on FreeBSD is happy with code like # that. From owner-svn-src-all@freebsd.org Fri May 19 00:33:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CAD4D71011; Fri, 19 May 2017 00:33:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E30814CA; Fri, 19 May 2017 00:33:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J0XmHn015774; Fri, 19 May 2017 00:33:48 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J0Xm6n015773; Fri, 19 May 2017 00:33:48 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705190033.v4J0Xm6n015773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 19 May 2017 00:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318509 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 00:33:49 -0000 Author: vangyzen Date: Fri May 19 00:33:48 2017 New Revision: 318509 URL: https://svnweb.freebsd.org/changeset/base/318509 Log: MFC r318354 (by cem) Correct page frame mask constant used in pmap_change_attr_locked This was introduced in r290156. It's present in 11.0, but not any 10.x release unless someone decided to MFC it. It affects ordinary pages right above the DMAP limit, which is effectively system memory rounded up to a 1 GB (3rd level superpage) boundary (or up to a minimum of 4 GB, on small systems). Sponsored by: Dell EMC Modified: stable/11/sys/amd64/amd64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri May 19 00:25:09 2017 (r318508) +++ stable/11/sys/amd64/amd64/pmap.c Fri May 19 00:33:48 2017 (r318509) @@ -6727,7 +6727,7 @@ pmap_change_attr_locked(vm_offset_t va, changed = TRUE; } if (tmpva >= VM_MIN_KERNEL_ADDRESS && - (*pte & PG_PS_FRAME) < dmaplimit) { + (*pte & PG_FRAME) < dmaplimit) { if (pa_start == pa_end) { /* Start physical address run. */ pa_start = *pte & PG_FRAME; From owner-svn-src-all@freebsd.org Fri May 19 00:43:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 821EBD712F1; Fri, 19 May 2017 00:43:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A68D1999; Fri, 19 May 2017 00:43:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J0hoQw019763; Fri, 19 May 2017 00:43:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J0hoCl019762; Fri, 19 May 2017 00:43:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705190043.v4J0hoCl019762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 19 May 2017 00:43:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318510 - stable/11/contrib/libstdc++/config/abi/pre X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 00:43:51 -0000 Author: emaste Date: Fri May 19 00:43:49 2017 New Revision: 318510 URL: https://svnweb.freebsd.org/changeset/base/318510 Log: MFC r317159: libstdc++: fix symbol version script for LLD LLD is less tolerant of inconsistencies in the symbol version script. - Add a ; on the last entry in a version block - Remove duplicated symbols, retaining those in the earliest block Modified: stable/11/contrib/libstdc++/config/abi/pre/gnu.ver Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libstdc++/config/abi/pre/gnu.ver ============================================================================== --- stable/11/contrib/libstdc++/config/abi/pre/gnu.ver Fri May 19 00:33:48 2017 (r318509) +++ stable/11/contrib/libstdc++/config/abi/pre/gnu.ver Fri May 19 00:43:49 2017 (r318510) @@ -121,7 +121,7 @@ GLIBCXX_3.4 { std::__moneypunct_cache*; std::__numpunct_cache*; std::__timepunct_cache*; - __gnu_debug::_Error_formatter* + __gnu_debug::_Error_formatter*; }; # Names not in an 'extern' block are mangled names. @@ -604,34 +604,6 @@ GLIBCXX_3.4.4 { } GLIBCXX_3.4.3; GLIBCXX_3.4.5 { - - # std::string - _ZNKSs11_M_disjunctEPKc; - _ZNKSs15_M_check_lengthE[jm][jm]PKc; - _ZNSs4_Rep26_M_set_length_and_sharableE*; - _ZNSs7_M_copyEPcPKc[jm]; - _ZNSs7_M_moveEPcPKc[jm]; - _ZNSs9_M_assignEPc[jm]c; - - # std::wstring - _ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw; - _ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthE[jm][jm]PKc; - _ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableE*; - _ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKw[jm]; - _ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKw[jm]; - _ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPw[jm]w; - - _ZNKSt13basic_fstreamI[cw]St11char_traitsI[cw]EE7is_openEv; - _ZNKSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE7is_openEv; - _ZNKSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE7is_openEv; - - _ZNSi6ignoreE[ilv]; - _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreE[ilv]; - - _ZNSt11char_traitsI[cw]E2eqERK[cw]S2_; - - _ZNSt19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEppEv; - } GLIBCXX_3.4.4; GLIBCXX_3.4.6 { @@ -643,8 +615,6 @@ GLIBCXX_3.4.6 { _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE9showmanycEv; - _ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv; - _ZN9__gnu_cxx6__poolILb1EE13_M_initializeEv; } GLIBCXX_3.4.5; From owner-svn-src-all@freebsd.org Fri May 19 01:18:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8795D719F1; Fri, 19 May 2017 01:18:31 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mail-pg0-x22e.google.com (mail-pg0-x22e.google.com [IPv6:2607:f8b0:400e:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 92A75942; Fri, 19 May 2017 01:18:31 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by mail-pg0-x22e.google.com with SMTP id x64so30472748pgd.3; Thu, 18 May 2017 18:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=4tz9rXCMmxtEUksoEkeSQ5mYhtAFal6Uhe4IqTj6oX4=; b=qgwBw/czWAVyrIpyrA1jFYL6WpS649jATJxAIU1RXWYUOhZ7Y5Sns2DXguFAoWEayD fSfm9drgqm9Fdt/4mmm/rRZZj1MAaLLFTTFbKkj4rIq+GYKQ7UmgHAtBDGj60g6NZRT0 WvzO7iaIwXiX+lSYdFXLcErhgqgvmfl/Vr3E5iUQagOKLgh8+Ywk5gpRNVnpYwjn7qZ2 VqWr6O0AS89gAjysHGw7rMj+sxAziU08a92qJjaslsUjpPlJ2sx4rRSYsqJhLFnzp3xk 1K2cFRRtn59KLGJNf8VuMir19Mn2rutp1TQC+hM5K6Ljv/6rBUobypbYlxLAD4SsO4pB 3lpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=4tz9rXCMmxtEUksoEkeSQ5mYhtAFal6Uhe4IqTj6oX4=; b=auPCQ85OpJRg02aubr82YgHKXWLJCrVjxlkcf3hjGaDedbHaqv2pxo9jiEnu5MAOSY 0w+1TJYNd8iEycWpUkgjlbER65E4JcRU9B30U2PKamd+egnFPPBfx4wzwzRVzkLoaGFQ ZsZnkI1HZfOAimGn/W7cp78NCRWGSLm0J6m/jE0A0dMqpHxNp+jZDXWypWXXyuVC9/fI R6VBhtv5NPm/9KVjYhXfNTIzGv7P6ha938u01WJUpcv2np2p9aY5MPyGkGR54EHbamDE xQmiaKObS+ahhgjSE1BKqpuPiAzAnowz90pbxWWoj0PxA/dRVsrHsF2x5gbrNVQwHEST ygwg== X-Gm-Message-State: AODbwcBHGzXkyy9m/PJjl5Rh60/TcE0AK/7vo4nSOV1c0tL40bc0d5rg Gb2xvUBXQ0rcu0cFSLQ1urUBzbLG0g== X-Received: by 10.99.115.73 with SMTP id d9mr2114201pgn.5.1495156711153; Thu, 18 May 2017 18:18:31 -0700 (PDT) MIME-Version: 1.0 Sender: sepherosa@gmail.com Received: by 10.100.160.112 with HTTP; Thu, 18 May 2017 18:18:30 -0700 (PDT) In-Reply-To: References: <201609010632.u816WZUj025186@repo.freebsd.org> <20170518140403.GA54405@lath.RINET.ru> <355478da-ed4d-60bb-bb4e-144a694e28b8@selasky.org> <20170518150030.GA55481@lath.RINET.ru> From: Sepherosa Ziehau Date: Fri, 19 May 2017 09:18:30 +0800 X-Google-Sender-Auth: G66Gd5S2gDp2rc1bE4OHC96Sxsc Message-ID: Subject: Re: svn commit: r305177 - head/sys/net To: Hans Petter Selasky Cc: Oleg Bulyzhin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, araujo@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 01:18:31 -0000 Oh, my fault. I will revert it. On Thu, May 18, 2017 at 11:11 PM, Hans Petter Selasky wrote: > On 05/18/17 17:00, Oleg Bulyzhin wrote: >> >> On Thu, May 18, 2017 at 04:25:01PM +0200, Hans Petter Selasky wrote: >>> >>> On 05/18/17 16:04, Oleg Bulyzhin wrote: >>>> >>>> On Thu, Sep 01, 2016 at 06:32:35AM +0000, Sepherosa Ziehau wrote: >>>>> >>>>> Author: sephe >>>>> Date: Thu Sep 1 06:32:35 2016 >>>>> New Revision: 305177 >>>>> URL: https://svnweb.freebsd.org/changeset/base/305177 >>>>> >>>>> Log: >>>>> net/vlan: Shift for pri is 13 (pri mask 0xe000) not 1. >>>>> Reviewed by: araujo, hps >>>>> MFC after: 1 week >>>>> Sponsored by: Microsoft >>>>> Differential Revision: https://reviews.freebsd.org/D7710 >>>>> >>>>> Modified: >>>>> head/sys/net/ethernet.h >>>>> >>>>> Modified: head/sys/net/ethernet.h >>>>> >>>>> ============================================================================== >>>>> --- head/sys/net/ethernet.h Thu Sep 1 06:05:08 2016 >>>>> (r305176) >>>>> +++ head/sys/net/ethernet.h Thu Sep 1 06:32:35 2016 >>>>> (r305177) >>>>> @@ -92,7 +92,7 @@ struct ether_vlan_header { >>>>> #define EVL_PRIOFTAG(tag) (((tag) >> 13) & 7) >>>>> #define EVL_CFIOFTAG(tag) (((tag) >> 12) & 1) >>>>> #define EVL_MAKETAG(vlid, pri, cfi) >>>>> \ >>>>> - ((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & >>>>> EVL_VLID_MASK)) >>>>> + ((((((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & >>>>> EVL_VLID_MASK)) >>>>> /* >>>>> * NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length >>>>> fields. >>>> >>>> >>>> Please revert this one. It's just plain wrong and previous one was ok. >>>> >>> >>> Hi, >>> >>> Can you explain a bit more what is wrong? >>> >>>> If you care about readability it should be: >>>> ((((pri) & 7) << 13) | (((cfi) & 1) << 12) | ((vlid) & EVL_VLID_MASK)) >>> >>> >>> Isn't this exactly what the patch is doing? -R ??? >> >> >> Current version is shifting pri out of uint16. If you examine parentheses: >> pri is shifted left 13, then 12. >> Original version did it right (shift 1, then 12 (total 13)). >> > > Hi Oleg, > > I see. The VLAN priority is then always zero after this change. > > I'll let Sepherosa handle the revert and/or readability update. > > --HPS -- Tomorrow Will Never Die From owner-svn-src-all@freebsd.org Fri May 19 01:23:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19F33D71C77; Fri, 19 May 2017 01:23:08 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3AC3D9B; Fri, 19 May 2017 01:23:07 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J1N6Jm036519; Fri, 19 May 2017 01:23:06 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J1N699036517; Fri, 19 May 2017 01:23:06 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201705190123.v4J1N699036517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Fri, 19 May 2017 01:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318511 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 01:23:08 -0000 Author: truckman Date: Fri May 19 01:23:06 2017 New Revision: 318511 URL: https://svnweb.freebsd.org/changeset/base/318511 Log: The result of right shifting a negative signed value is implementation defined. On machines without arithmetic shift instructions, zero bits may be shifted in from the left, giving a large positive result instead of the desired divide-by power-of-2. Fix this by operating on the absolute value and compensating for the possible negation later. Reverse the order of the underflow/overflow tests and the exponential decay calculation to avoid the possibility of an erroneous overflow detection if p is a sufficiently small non-negative value. Also check for negative values of prob before doing the exponential decay to avoid another instance of of right shifting a negative value. Tested by: Rasool Al-Saadi MFC after: 1 week Modified: head/sys/netpfil/ipfw/dn_aqm_pie.c head/sys/netpfil/ipfw/dn_sched_fq_pie.c Modified: head/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- head/sys/netpfil/ipfw/dn_aqm_pie.c Fri May 19 00:43:49 2017 (r318510) +++ head/sys/netpfil/ipfw/dn_aqm_pie.c Fri May 19 01:23:06 2017 (r318511) @@ -206,6 +206,7 @@ calculate_drop_prob(void *x) int64_t p, prob, oldprob; struct dn_aqm_pie_parms *pprms; struct pie_status *pst = (struct pie_status *) x; + int p_isneg; pprms = pst->parms; prob = pst->drop_prob; @@ -221,6 +222,12 @@ calculate_drop_prob(void *x) ((int64_t)pst->current_qdelay - (int64_t)pprms->qdelay_ref); p +=(int64_t) pprms->beta * ((int64_t)pst->current_qdelay - (int64_t)pst->qdelay_old); + + /* take absolute value so right shift result is well defined */ + p_isneg = p < 0; + if (p_isneg) { + p = -p; + } /* We PIE_MAX_PROB shift by 12-bits to increase the division precision */ p *= (PIE_MAX_PROB << 12) / AQM_TIME_1S; @@ -243,37 +250,47 @@ calculate_drop_prob(void *x) oldprob = prob; - /* Cap Drop adjustment */ - if ((pprms->flags & PIE_CAPDROP_ENABLED) && prob >= PIE_MAX_PROB / 10 - && p > PIE_MAX_PROB / 50 ) - p = PIE_MAX_PROB / 50; + if (p_isneg) { + prob = prob - p; - prob = prob + p; - - /* decay the drop probability exponentially */ - if (pst->current_qdelay == 0 && pst->qdelay_old == 0) - /* 0.98 ~= 1- 1/64 */ - prob = prob - (prob >> 6); + /* check for multiplication underflow */ + if (prob > oldprob) { + prob= 0; + D("underflow"); + } + } else { + /* Cap Drop adjustment */ + if ((pprms->flags & PIE_CAPDROP_ENABLED) && + prob >= PIE_MAX_PROB / 10 && + p > PIE_MAX_PROB / 50 ) { + p = PIE_MAX_PROB / 50; + } + prob = prob + p; - /* check for multiplication overflow/underflow */ - if (p>0) { + /* check for multiplication overflow */ if (proboldprob) { - prob= 0; - D("underflow"); - } - /* make drop probability between 0 and PIE_MAX_PROB*/ - if (prob < 0) + /* + * decay the drop probability exponentially + * and restrict it to range 0 to PIE_MAX_PROB + */ + if (prob < 0) { prob = 0; - else if (prob > PIE_MAX_PROB) - prob = PIE_MAX_PROB; + } else { + if (pst->current_qdelay == 0 && pst->qdelay_old == 0) { + /* 0.98 ~= 1- 1/64 */ + prob = prob - (prob >> 6); + } + + if (prob > PIE_MAX_PROB) { + prob = PIE_MAX_PROB; + } + } pst->drop_prob = prob; Modified: head/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- head/sys/netpfil/ipfw/dn_sched_fq_pie.c Fri May 19 00:43:49 2017 (r318510) +++ head/sys/netpfil/ipfw/dn_sched_fq_pie.c Fri May 19 01:23:06 2017 (r318511) @@ -377,6 +377,7 @@ fq_calculate_drop_prob(void *x) struct dn_aqm_pie_parms *pprms; int64_t p, prob, oldprob; aqm_time_t now; + int p_isneg; now = AQM_UNOW; pprms = pst->parms; @@ -393,6 +394,12 @@ fq_calculate_drop_prob(void *x) ((int64_t)pst->current_qdelay - (int64_t)pprms->qdelay_ref); p +=(int64_t) pprms->beta * ((int64_t)pst->current_qdelay - (int64_t)pst->qdelay_old); + + /* take absolute value so right shift result is well defined */ + p_isneg = p < 0; + if (p_isneg) { + p = -p; + } /* We PIE_MAX_PROB shift by 12-bits to increase the division precision */ p *= (PIE_MAX_PROB << 12) / AQM_TIME_1S; @@ -415,37 +422,47 @@ fq_calculate_drop_prob(void *x) oldprob = prob; - /* Cap Drop adjustment */ - if ((pprms->flags & PIE_CAPDROP_ENABLED) && prob >= PIE_MAX_PROB / 10 - && p > PIE_MAX_PROB / 50 ) - p = PIE_MAX_PROB / 50; + if (p_isneg) { + prob = prob - p; - prob = prob + p; - - /* decay the drop probability exponentially */ - if (pst->current_qdelay == 0 && pst->qdelay_old == 0) - /* 0.98 ~= 1- 1/64 */ - prob = prob - (prob >> 6); + /* check for multiplication underflow */ + if (prob > oldprob) { + prob= 0; + D("underflow"); + } + } else { + /* Cap Drop adjustment */ + if ((pprms->flags & PIE_CAPDROP_ENABLED) && + prob >= PIE_MAX_PROB / 10 && + p > PIE_MAX_PROB / 50 ) { + p = PIE_MAX_PROB / 50; + } + prob = prob + p; - /* check for multiplication over/under flow */ - if (p>0) { + /* check for multiplication overflow */ if (proboldprob) { - prob= 0; - D("underflow"); - } - /* make drop probability between 0 and PIE_MAX_PROB*/ - if (prob < 0) + /* + * decay the drop probability exponentially + * and restrict it to range 0 to PIE_MAX_PROB + */ + if (prob < 0) { prob = 0; - else if (prob > PIE_MAX_PROB) - prob = PIE_MAX_PROB; + } else { + if (pst->current_qdelay == 0 && pst->qdelay_old == 0) { + /* 0.98 ~= 1- 1/64 */ + prob = prob - (prob >> 6); + } + + if (prob > PIE_MAX_PROB) { + prob = PIE_MAX_PROB; + } + } pst->drop_prob = prob; From owner-svn-src-all@freebsd.org Fri May 19 01:42:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34C5FD743EC; Fri, 19 May 2017 01:42:33 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05194191D; Fri, 19 May 2017 01:42:32 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J1gW8w044603; Fri, 19 May 2017 01:42:32 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J1gWKn044602; Fri, 19 May 2017 01:42:32 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705190142.v4J1gWKn044602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 19 May 2017 01:42:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318512 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 01:42:33 -0000 Author: sephe Date: Fri May 19 01:42:31 2017 New Revision: 318512 URL: https://svnweb.freebsd.org/changeset/base/318512 Log: net/vlan: Revert 305177 Miss read the parentheses. Reported by: oleg@ Reviewed by: hps@ MFC after: 3 days Sponsored by: Microsoft Modified: head/sys/net/ethernet.h Modified: head/sys/net/ethernet.h ============================================================================== --- head/sys/net/ethernet.h Fri May 19 01:23:06 2017 (r318511) +++ head/sys/net/ethernet.h Fri May 19 01:42:31 2017 (r318512) @@ -92,7 +92,7 @@ struct ether_vlan_header { #define EVL_PRIOFTAG(tag) (((tag) >> 13) & 7) #define EVL_CFIOFTAG(tag) (((tag) >> 12) & 1) #define EVL_MAKETAG(vlid, pri, cfi) \ - ((((((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) + ((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) /* * NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields. From owner-svn-src-all@freebsd.org Fri May 19 02:12:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D23DAD749C7; Fri, 19 May 2017 02:12:11 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1DA87AE; Fri, 19 May 2017 02:12:11 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J2CA54057156; Fri, 19 May 2017 02:12:10 GMT (envelope-from rgrimes@FreeBSD.org) Received: (from rgrimes@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J2CAmR057155; Fri, 19 May 2017 02:12:10 GMT (envelope-from rgrimes@FreeBSD.org) Message-Id: <201705190212.v4J2CAmR057155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rgrimes set sender to rgrimes@FreeBSD.org using -f From: "Rodney W. Grimes" Date: Fri, 19 May 2017 02:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318513 - in stable: 10/usr.sbin/rmt 11/usr.sbin/rmt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 02:12:11 -0000 Author: rgrimes Date: Fri May 19 02:12:10 2017 New Revision: 318513 URL: https://svnweb.freebsd.org/changeset/base/318513 Log: MFC r314693 Change /etc/rmt symlink from absolute to relative path, correcting the mistake made in r6499 Approved by: grehan (mentor) Modified: stable/11/usr.sbin/rmt/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/rmt/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/11/usr.sbin/rmt/Makefile ============================================================================== --- stable/11/usr.sbin/rmt/Makefile Fri May 19 01:42:31 2017 (r318512) +++ stable/11/usr.sbin/rmt/Makefile Fri May 19 02:12:10 2017 (r318513) @@ -7,6 +7,6 @@ MAN= rmt.8 # called from /usr/src/etc/Makefile etc-rmt: rm -f ${DESTDIR}/etc/rmt - ln -s ${BINDIR}/rmt ${DESTDIR}/etc/rmt + ln -s ..${BINDIR}/rmt ${DESTDIR}/etc/rmt .include From owner-svn-src-all@freebsd.org Fri May 19 02:12:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2426D749C2; Fri, 19 May 2017 02:12:11 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 711287AD; Fri, 19 May 2017 02:12:11 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J2CAgc057150; Fri, 19 May 2017 02:12:10 GMT (envelope-from rgrimes@FreeBSD.org) Received: (from rgrimes@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J2CAEn057149; Fri, 19 May 2017 02:12:10 GMT (envelope-from rgrimes@FreeBSD.org) Message-Id: <201705190212.v4J2CAEn057149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rgrimes set sender to rgrimes@FreeBSD.org using -f From: "Rodney W. Grimes" Date: Fri, 19 May 2017 02:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318513 - in stable: 10/usr.sbin/rmt 11/usr.sbin/rmt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 02:12:11 -0000 Author: rgrimes Date: Fri May 19 02:12:10 2017 New Revision: 318513 URL: https://svnweb.freebsd.org/changeset/base/318513 Log: MFC r314693 Change /etc/rmt symlink from absolute to relative path, correcting the mistake made in r6499 Approved by: grehan (mentor) Modified: stable/10/usr.sbin/rmt/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/rmt/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/10/usr.sbin/rmt/Makefile ============================================================================== --- stable/10/usr.sbin/rmt/Makefile Fri May 19 01:42:31 2017 (r318512) +++ stable/10/usr.sbin/rmt/Makefile Fri May 19 02:12:10 2017 (r318513) @@ -7,6 +7,6 @@ MAN= rmt.8 # called from /usr/src/etc/Makefile etc-rmt: rm -f ${DESTDIR}/etc/rmt - ln -s ${BINDIR}/rmt ${DESTDIR}/etc/rmt + ln -s ..${BINDIR}/rmt ${DESTDIR}/etc/rmt .include From owner-svn-src-all@freebsd.org Fri May 19 04:44:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 353D2D72A59; Fri, 19 May 2017 04:44:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0240712D7; Fri, 19 May 2017 04:44:15 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J4iEpW018397; Fri, 19 May 2017 04:44:14 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J4iEJ1018396; Fri, 19 May 2017 04:44:14 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705190444.v4J4iEJ1018396@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 19 May 2017 04:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318514 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 04:44:16 -0000 Author: delphij Date: Fri May 19 04:44:14 2017 New Revision: 318514 URL: https://svnweb.freebsd.org/changeset/base/318514 Log: Use size_t. Inspired by: OpenBSD src/lib/libc/stdlib/qsort.c,v 1.11 Modified: head/lib/libc/stdlib/qsort.c Modified: head/lib/libc/stdlib/qsort.c ============================================================================== --- head/lib/libc/stdlib/qsort.c Fri May 19 02:12:10 2017 (r318513) +++ head/lib/libc/stdlib/qsort.c Fri May 19 04:44:14 2017 (r318514) @@ -41,7 +41,7 @@ typedef int cmp_t(void *, const void * typedef int cmp_t(const void *, const void *); #endif static inline char *med3(char *, char *, char *, cmp_t *, void *); -static inline void swapfunc(char *, char *, int, int, int); +static inline void swapfunc(char *, char *, size_t, int, int); #define MIN(a, b) ((a) < (b) ? a : b) @@ -49,7 +49,7 @@ static inline void swapfunc(char *, cha * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". */ #define swapcode(TYPE, parmi, parmj, n) { \ - long i = (n) / sizeof (TYPE); \ + size_t i = (n) / sizeof (TYPE); \ TYPE *pi = (TYPE *) (parmi); \ TYPE *pj = (TYPE *) (parmj); \ do { \ @@ -64,7 +64,7 @@ static inline void swapfunc(char *, cha es % sizeof(TYPE) ? 2 : es == sizeof(TYPE) ? 0 : 1; static inline void -swapfunc( char *a, char *b, int n, int swaptype_long, int swaptype_int) +swapfunc(char *a, char *b, size_t n, int swaptype_long, int swaptype_int) { if (swaptype_long <= 1) swapcode(long, a, b, n) From owner-svn-src-all@freebsd.org Fri May 19 04:59:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A144DD72DC4; Fri, 19 May 2017 04:59:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CDF717B4; Fri, 19 May 2017 04:59:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J4xCGw022615; Fri, 19 May 2017 04:59:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J4xCqq022614; Fri, 19 May 2017 04:59:12 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705190459.v4J4xCqq022614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 19 May 2017 04:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318515 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 04:59:13 -0000 Author: delphij Date: Fri May 19 04:59:12 2017 New Revision: 318515 URL: https://svnweb.freebsd.org/changeset/base/318515 Log: The current qsort(3) implementation ignores the sizes of partitions, and always perform recursion on the left partition, then use a tail call to handle the right partition. In the worst case this could require O(N) levels of recursions. Reduce the possible recursion level to log2(N) by always recursing on the smaller partition instead. Obtained from: PostgreSQL 9d6077abf9d6efd992a59f05ef5aba981ea32096 Modified: head/lib/libc/stdlib/qsort.c Modified: head/lib/libc/stdlib/qsort.c ============================================================================== --- head/lib/libc/stdlib/qsort.c Fri May 19 04:44:14 2017 (r318514) +++ head/lib/libc/stdlib/qsort.c Fri May 19 04:59:12 2017 (r318515) @@ -117,7 +117,7 @@ qsort(void *a, size_t n, size_t es, cmp_ #endif { char *pa, *pb, *pc, *pd, *pl, *pm, *pn; - size_t d, r; + size_t d1, d2; int cmp_result; int swaptype_long, swaptype_int, swap_cnt; @@ -137,7 +137,8 @@ loop: SWAPINIT(long, a, es); pl = a; pn = (char *)a + (n - 1) * es; if (n > 40) { - d = (n / 8) * es; + size_t d = (n / 8) * es; + pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk); pm = med3(pm - d, pm, pm + d, cmp, thunk); pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); @@ -182,21 +183,43 @@ loop: SWAPINIT(long, a, es); } pn = (char *)a + n * es; - r = MIN(pa - (char *)a, pb - pa); - vecswap(a, pb - r, r); - r = MIN(pd - pc, pn - pd - es); - vecswap(pb, pn - r, r); - if ((r = pb - pa) > es) + d1 = MIN(pa - (char *)a, pb - pa); + vecswap(a, pb - d1, d1); + d1 = MIN(pd - pc, pn - pd - es); + vecswap(pb, pn - d1, d1); + + d1 = pb - pa; + d2 = pd - pc; + if (d1 <= d2) { + /* Recurse on left partition, then iterate on right partition */ + if (d1 > es) { #ifdef I_AM_QSORT_R - qsort_r(a, r / es, es, thunk, cmp); + qsort_r(a, d1 / es, es, thunk, cmp); #else - qsort(a, r / es, es, cmp); + qsort(a, d1 / es, es, cmp); #endif - if ((r = pd - pc) > es) { - /* Iterate rather than recurse to save stack space */ - a = pn - r; - n = r / es; - goto loop; + } + if (d2 > es) { + /* Iterate rather than recurse to save stack space */ + /* qsort(pn - d2, d2 / es, es, cmp); */ + a = pn - d2; + n = d2 / es; + goto loop; + } + } else { + /* Recurse on right partition, then iterate on left partition */ + if (d2 > es) { +#ifdef I_AM_QSORT_R + qsort_r(pn - d2, d2 / es, es, thunk, cmp); +#else + qsort(pn - d2, d2 / es, es, cmp); +#endif + } + if (d1 > es) { + /* Iterate rather than recurse to save stack space */ + /* qsort(a, d1 / es, es, cmp); */ + n = d1 / es; + goto loop; + } } -/* qsort(pn - r, r / es, es, cmp);*/ } From owner-svn-src-all@freebsd.org Fri May 19 05:12:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F838D733C4; Fri, 19 May 2017 05:12:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6ED9B84; Fri, 19 May 2017 05:12:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J5CwbH030583; Fri, 19 May 2017 05:12:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J5Cwgf030582; Fri, 19 May 2017 05:12:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705190512.v4J5Cwgf030582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 19 May 2017 05:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318516 - head/cddl/contrib/opensolaris/lib/libzpool/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 05:12:59 -0000 Author: mav Date: Fri May 19 05:12:58 2017 New Revision: 318516 URL: https://svnweb.freebsd.org/changeset/base/318516 Log: Fix time handling in cv_timedwait_hires(). pthread_cond_timedwait() receives absolute time, not relative. Passing wrong time there caused two threads of zdb to spin in a tight loop. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 19 04:59:12 2017 (r318515) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 19 05:12:58 2017 (r318516) @@ -368,7 +368,7 @@ cv_timedwait_hires(kcondvar_t *cv, kmute int flag) { int error; - timestruc_t ts; + timespec_t ts; hrtime_t delta; ASSERT(flag == 0 || flag == CALLOUT_FLAG_ABSOLUTE); @@ -381,8 +381,13 @@ top: if (delta <= 0) return (-1); - ts.tv_sec = delta / NANOSEC; - ts.tv_nsec = delta % NANOSEC; + clock_gettime(CLOCK_REALTIME, &ts); + ts.tv_sec += delta / NANOSEC; + ts.tv_nsec += delta % NANOSEC; + if (ts.tv_nsec >= NANOSEC) { + ts.tv_sec++; + ts.tv_nsec -= NANOSEC; + } ASSERT(mutex_owner(mp) == curthread); mp->m_owner = NULL; From owner-svn-src-all@freebsd.org Fri May 19 06:37:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F5F2D74ACD; Fri, 19 May 2017 06:37:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C7D29C5; Fri, 19 May 2017 06:37:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J6bGc0062717; Fri, 19 May 2017 06:37:16 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J6bG4s062716; Fri, 19 May 2017 06:37:16 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705190637.v4J6bG4s062716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 19 May 2017 06:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318517 - head/sys/libkern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 06:37:17 -0000 Author: delphij Date: Fri May 19 06:37:16 2017 New Revision: 318517 URL: https://svnweb.freebsd.org/changeset/base/318517 Log: Sync qsort.c with userland r318515. (Note that MIN macro is removed in favor of sys/param.h's version). PR: 213922 Modified: head/sys/libkern/qsort.c Modified: head/sys/libkern/qsort.c ============================================================================== --- head/sys/libkern/qsort.c Fri May 19 05:12:58 2017 (r318516) +++ head/sys/libkern/qsort.c Fri May 19 06:37:16 2017 (r318517) @@ -33,51 +33,57 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef I_AM_QSORT_R -typedef int cmp_t(void *, const void *, const void *); +#ifdef I_AM_QSORT_R +typedef int cmp_t(void *, const void *, const void *); #else -typedef int cmp_t(const void *, const void *); +typedef int cmp_t(const void *, const void *); #endif -static __inline char *med3(char *, char *, char *, cmp_t *, void *); -static __inline void swapfunc(char *, char *, int, int); - -#define min(a, b) (a) < (b) ? (a) : (b) +static inline char *med3(char *, char *, char *, cmp_t *, void *); +static inline void swapfunc(char *, char *, size_t, int, int); /* * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". */ -#define swapcode(TYPE, parmi, parmj, n) { \ - long i = (n) / sizeof (TYPE); \ - TYPE *pi = (TYPE *) (parmi); \ - TYPE *pj = (TYPE *) (parmj); \ +#define swapcode(TYPE, parmi, parmj, n) { \ + size_t i = (n) / sizeof (TYPE); \ + TYPE *pi = (TYPE *) (parmi); \ + TYPE *pj = (TYPE *) (parmj); \ do { \ - TYPE t = *pi; \ + TYPE t = *pi; \ *pi++ = *pj; \ *pj++ = t; \ - } while (--i > 0); \ + } while (--i > 0); \ } -#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ - es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; +#define SWAPINIT(TYPE, a, es) swaptype_ ## TYPE = \ + ((char *)a - (char *)0) % sizeof(TYPE) || \ + es % sizeof(TYPE) ? 2 : es == sizeof(TYPE) ? 0 : 1; -static __inline void -swapfunc(char *a, char *b, int n, int swaptype) +static inline void +swapfunc(char *a, char *b, size_t n, int swaptype_long, int swaptype_int) { - if(swaptype <= 1) + if (swaptype_long <= 1) swapcode(long, a, b, n) + else if (swaptype_int <= 1) + swapcode(int, a, b, n) else swapcode(char, a, b, n) } -#define swap(a, b) \ - if (swaptype == 0) { \ +#define swap(a, b) \ + if (swaptype_long == 0) { \ long t = *(long *)(a); \ *(long *)(a) = *(long *)(b); \ *(long *)(b) = t; \ + } else if (swaptype_int == 0) { \ + int t = *(int *)(a); \ + *(int *)(a) = *(int *)(b); \ + *(int *)(b) = t; \ } else \ - swapfunc(a, b, es, swaptype) + swapfunc(a, b, es, swaptype_long, swaptype_int) -#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) +#define vecswap(a, b, n) \ + if ((n) > 0) swapfunc(a, b, n, swaptype_long, swaptype_int) #ifdef I_AM_QSORT_R #define CMP(t, x, y) (cmp((t), (x), (y))) @@ -85,16 +91,16 @@ swapfunc(char *a, char *b, int n, int sw #define CMP(t, x, y) (cmp((x), (y))) #endif -static __inline char * +static inline char * med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk -#ifndef I_AM_QSORT_R +#ifndef I_AM_QSORT_R __unused #endif ) { return CMP(thunk, a, b) < 0 ? (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) - :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); + :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); } #ifdef I_AM_QSORT_R @@ -107,13 +113,17 @@ qsort(void *a, size_t n, size_t es, cmp_ #endif { char *pa, *pb, *pc, *pd, *pl, *pm, *pn; - int d, r, swaptype, swap_cnt; + size_t d1, d2; + int cmp_result; + int swaptype_long, swaptype_int, swap_cnt; -loop: SWAPINIT(a, es); +loop: SWAPINIT(long, a, es); + SWAPINIT(int, a, es); swap_cnt = 0; if (n < 7) { for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) - for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0; + for (pl = pm; + pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) swap(pl, pl - es); return; @@ -123,7 +133,8 @@ loop: SWAPINIT(a, es); pl = a; pn = (char *)a + (n - 1) * es; if (n > 40) { - d = (n / 8) * es; + size_t d = (n / 8) * es; + pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk); pm = med3(pm - d, pm, pm + d, cmp, thunk); pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); @@ -135,16 +146,16 @@ loop: SWAPINIT(a, es); pc = pd = (char *)a + (n - 1) * es; for (;;) { - while (pb <= pc && (r = CMP(thunk, pb, a)) <= 0) { - if (r == 0) { + while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) { + if (cmp_result == 0) { swap_cnt = 1; swap(pa, pb); pa += es; } pb += es; } - while (pb <= pc && (r = CMP(thunk, pc, a)) >= 0) { - if (r == 0) { + while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) { + if (cmp_result == 0) { swap_cnt = 1; swap(pc, pd); pd -= es; @@ -160,27 +171,51 @@ loop: SWAPINIT(a, es); } if (swap_cnt == 0) { /* Switch to insertion sort */ for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) - for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0; + for (pl = pm; + pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) swap(pl, pl - es); return; } pn = (char *)a + n * es; - r = min(pa - (char *)a, pb - pa); - vecswap(a, pb - r, r); - r = min(pd - pc, pn - pd - es); - vecswap(pb, pn - r, r); - if ((r = pb - pa) > es) -#ifdef I_AM_QSORT_R - qsort_r(a, r / es, es, thunk, cmp); + d1 = MIN(pa - (char *)a, pb - pa); + vecswap(a, pb - d1, d1); + d1 = MIN(pd - pc, pn - pd - es); + vecswap(pb, pn - d1, d1); + + d1 = pb - pa; + d2 = pd - pc; + if (d1 <= d2) { + /* Recurse on left partition, then iterate on right partition */ + if (d1 > es) { +#ifdef I_AM_QSORT_R + qsort_r(a, d1 / es, es, thunk, cmp); #else - qsort(a, r / es, es, cmp); + qsort(a, d1 / es, es, cmp); #endif - if ((r = pd - pc) > es) { - /* Iterate rather than recurse to save stack space */ - a = pn - r; - n = r / es; - goto loop; + } + if (d2 > es) { + /* Iterate rather than recurse to save stack space */ + /* qsort(pn - d2, d2 / es, es, cmp); */ + a = pn - d2; + n = d2 / es; + goto loop; + } + } else { + /* Recurse on right partition, then iterate on left partition */ + if (d2 > es) { +#ifdef I_AM_QSORT_R + qsort_r(pn - d2, d2 / es, es, thunk, cmp); +#else + qsort(pn - d2, d2 / es, es, cmp); +#endif + } + if (d1 > es) { + /* Iterate rather than recurse to save stack space */ + /* qsort(a, d1 / es, es, cmp); */ + n = d1 / es; + goto loop; + } } } From owner-svn-src-all@freebsd.org Fri May 19 06:43:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7238D74CC7; Fri, 19 May 2017 06:43:24 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C1C2EE95; Fri, 19 May 2017 06:43:24 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (106-68-200-20.dyn.iinet.net.au [106.68.200.20]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v4J6h9FH070441 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 18 May 2017 23:43:13 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk To: Ian Lepore , John Baldwin References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <2229085.lB46rKsq7o@ralph.baldwin.cx> <1494870201.59865.103.camel@freebsd.org> <4703731.Pl02uSWy7k@ralph.baldwin.cx> <1494879113.59865.129.camel@freebsd.org> Cc: Warner Losh , Ngie Cooper , "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Julian Elischer Message-ID: <82ddf34c-9180-f84d-3534-2b4489996aee@freebsd.org> Date: Fri, 19 May 2017 14:43:04 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1494879113.59865.129.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 06:43:25 -0000 On 16/5/17 4:11 am, Ian Lepore wrote: > On Mon, 2017-05-15 at 12:22 -0700, John Baldwin wrote: >> On Monday, May 15, 2017 11:43:21 AM Ian Lepore wrote: >>> On Mon, 2017-05-15 at 10:13 -0700, John Baldwin wrote: >>>> On Saturday, May 13, 2017 10:39:15 AM Warner Losh wrote: >>>>> >>>>>> >>>>>>> >>>>>>> - It's really easy to screw up a mergemaster call if you >>>>>>> edit >>>>>>> the files, and install the stock version which removes the >>>>>>> edits. >>>>>> Also, programmatically removing the entries means you have to >>>>>> bake the metadata into etc/Makefile, which is already >>>>>> complicated >>>>>> enough as-is. >>>>> Why do you care about removing them at all? They are no-ops if >>>>> the >>>>> files don't exist. Why not just always install all these files >>>>> is >>>>> where I'm going with this... >>>> I think this is actually the bigger question. I think it is >>>> perfectly >>>> sensible to support conf.d/* files for ports to use and as a way >>>> to >>>> manage logs for application logs on an appliance, etc. However, >>>> this >>>> shuffling is a bit of a merge nightmare for anyone using >>>> mergemaster >>>> or etcupdate, and the biggest cost is that newsyslog will create >>>> a >>>> one-line file in /var/log for entries with 'C'. >>>> >>> That's only a good argument for keeping the lines in the monolithic >>> file if those lines will be ignored when a file in the .conf.d >>> directory provides conflicting config. Otherwise my embedded >>> product >>> that drops different rules for rotating /var/log/messages into >>> .conf.d >>> STILL has to programmatically edit the monolithic file to remove >>> the >>> standard rule(s). >> Now you have to programmatically edit the file in >> conf.d/foo. However, >> by this argument the monolithic conf file shouldn't even exist. The >> current approach is a half-way mix with the worst of both models it >> seems. >> > Programmatically editing a single file containing only config for a > single component typically means just rewriting the entire file with > your new contents. In particular, you don't need to attempt to > preserve other information, the format of which you may not even know, > including free-form comments and who knows what-else. > >> Also, _you_ could just splat an empty /etc/newsyslog.conf file on >> your >> appliance and create a bunch of conf.d/foo files if that is easier >> for >> you to use on an appliance. The files we ship in a release aren't >> really >> tailored for an appliance (I've yet to see an appliance that doesn't >> use >> a FooBSD with local patches). OTOH, the existing setup is probably >> simpler to manage for an out-of-the-box install. >> >> I'm also suprised you don't manage the newsyslog.conf file yourself >> rather than trying to edit and merge in upstream changes? That is, I >> can see a few approaches: >> > You seem to be picturing some sort of etcupdate kind of thing. I'm > more talking about a GUI or other config-management tool within an > embedded product that has to edit or rewrite configuration on the fly > based on user choices. > > Of course, separate files does also simplify the update process, for > the most part. If a new subsystem is added in a new freebsd release, I > have zero work to do to upgrade a system in the field if that new > subsystem just drops a new file into a .conf.d directory. If it has > new entries in a monolithic file, then I do have to do some sort of > merge/edit operation. > >> 1) Keep your real newsyslog.conf / syslogd.conf files in your >> FooBSD's >> VCS and when newsyslog.conf changes upstream you merge that in the >> way you normally merge changes. >> >> 2) Move the "vendor" newsyslog.conf out entirely and install your own >> versions of these files either as a monolithic assembled by config >> management rules or a bunch of conf.d/foo files (here I would >> probably >> opt for separate files). >> >> However, your approach doesn't seem to describe either of these since >> this commit doesn't impact those work flows (if 1), you would have >> already >> made any local changes you need and if anything merging this commit >> gives >> you the kind of merge conflicts people will get on the next >> mergemaster / >> etcupdate for non-appliance boxes, or if 2) you ignore these files) >> > This seems to be an argument for everyone doing for themselves the > operation of splitting the distributed monolithic file into finer > grained files, and re-performing that operation (or at least the > analysis part of it) on every update. We (Panzura) use the directory /etc/newsyslog.conf.d and have a separate panzura.conf in there that we write out in one hit with all our log files in it. we rewrite it all (from our internal metadata) if it needs to change. We also have individual files for optional components that do their own logging, so it is definitely important to us to have the ability to do the small files but I don't really see a need to have a bunch of files for standard log files. I think files should be grouped in "installable unit" atomicity. and at this time the installable unit for the base system is the entire base unit.. Now when 'pkgbase' hist and we install our system from N separate pkg units the argument will be different. It also needs to be decided what happens it multipl modules use a shared file, or a single pkg has different options that require different log files.. > In general a lot of this feels like "I only needed 6 big config files > to control my whole system in 1988, and so I should only need those > same 6 files now." Sure, all us old-timers have the finger memory for > editing rc.conf and syslog.conf and so on, but how often do you crack > open syslog.conf with the plan of editing 12 different lines in it at > once? Because the main objection to .conf.d directories seems to be > that there are more files to edit, and that just doesn't feel like a > big problem in actual daily use. > > -- Ian > > From owner-svn-src-all@freebsd.org Fri May 19 07:28:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 459B7D73AC5; Fri, 19 May 2017 07:28:38 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 149D4FF; Fri, 19 May 2017 07:28:38 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J7Sbd4082904; Fri, 19 May 2017 07:28:37 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J7Sb2Z082903; Fri, 19 May 2017 07:28:37 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201705190728.v4J7Sb2Z082903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 19 May 2017 07:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318518 - stable/11/sys/netinet/libalias X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 07:28:38 -0000 Author: eugen (ports committer) Date: Fri May 19 07:28:36 2017 New Revision: 318518 URL: https://svnweb.freebsd.org/changeset/base/318518 Log: MFC r318150: Fix translation of transit PPtP/GRE connections for ipfw nat/natd "global" case. PR: 218968 Approved by: ae, vsevolod (mentor) Modified: stable/11/sys/netinet/libalias/alias.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/libalias/alias.c ============================================================================== --- stable/11/sys/netinet/libalias/alias.c Fri May 19 06:37:16 2017 (r318517) +++ stable/11/sys/netinet/libalias/alias.c Fri May 19 07:28:36 2017 (r318518) @@ -699,12 +699,14 @@ ProtoAliasOut(struct libalias *la, struc struct alias_link *lnk; LIBALIAS_LOCK_ASSERT(la); - (void)create; /* Return if proxy-only mode is enabled */ if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY) return (PKT_ALIAS_OK); + if (!create) + return (PKT_ALIAS_IGNORED); + lnk = FindProtoOut(la, *ip_src, ip_dst, ip_p); if (lnk != NULL) { struct in_addr alias_address; From owner-svn-src-all@freebsd.org Fri May 19 07:31:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 942E1D73CF9; Fri, 19 May 2017 07:31:49 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65E5168A; Fri, 19 May 2017 07:31:49 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J7Vmhr084491; Fri, 19 May 2017 07:31:48 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J7VmAa084490; Fri, 19 May 2017 07:31:48 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201705190731.v4J7VmAa084490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 19 May 2017 07:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318519 - stable/10/sys/netinet/libalias X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 07:31:49 -0000 Author: eugen (ports committer) Date: Fri May 19 07:31:48 2017 New Revision: 318519 URL: https://svnweb.freebsd.org/changeset/base/318519 Log: MFC r318150: Fix translation of transit PPtP/GRE connections for ipfw nat/natd "global" case. PR: 218968 Approved by: ae, vsevolod (mentor) Modified: stable/10/sys/netinet/libalias/alias.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/libalias/alias.c ============================================================================== --- stable/10/sys/netinet/libalias/alias.c Fri May 19 07:28:36 2017 (r318518) +++ stable/10/sys/netinet/libalias/alias.c Fri May 19 07:31:48 2017 (r318519) @@ -699,12 +699,14 @@ ProtoAliasOut(struct libalias *la, struc struct alias_link *lnk; LIBALIAS_LOCK_ASSERT(la); - (void)create; /* Return if proxy-only mode is enabled */ if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY) return (PKT_ALIAS_OK); + if (!create) + return (PKT_ALIAS_IGNORED); + lnk = FindProtoOut(la, *ip_src, ip_dst, ip_p); if (lnk != NULL) { struct in_addr alias_address; From owner-svn-src-all@freebsd.org Fri May 19 08:11:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6260D74BE2; Fri, 19 May 2017 08:11:16 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77A5A1901; Fri, 19 May 2017 08:11:16 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J8BF7m000558; Fri, 19 May 2017 08:11:15 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J8BFve000557; Fri, 19 May 2017 08:11:15 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705190811.v4J8BFve000557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 19 May 2017 08:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318520 - head/sys/dev/xen/blkfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 08:11:16 -0000 Author: royger Date: Fri May 19 08:11:15 2017 New Revision: 318520 URL: https://svnweb.freebsd.org/changeset/base/318520 Log: xen/blkfront: correctly detach a disk with active users Call disk_gone when the backend switches to the "Closing" state and blkfront still has pending users. This allows the disk to be detached, and will call into xbd_closing by itself when the geom layout cleanup has finished. Reported by: bapt Tested by: manu Reviewed by: bapt Sponsored by: Citrix Systems R&D MFC after: 1 week Differential revision: https://reviews.freebsd.org/D10772 Modified: head/sys/dev/xen/blkfront/blkfront.c Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Fri May 19 07:31:48 2017 (r318519) +++ head/sys/dev/xen/blkfront/blkfront.c Fri May 19 08:11:15 2017 (r318520) @@ -1578,11 +1578,14 @@ xbd_backend_changed(device_t dev, Xenbus break; case XenbusStateClosing: - if (sc->xbd_users > 0) - xenbus_dev_error(dev, -EBUSY, - "Device in use; refusing to close"); - else + if (sc->xbd_users > 0) { + device_printf(dev, "detaching with pending users\n"); + KASSERT(sc->xbd_disk != NULL, + ("NULL disk with pending users\n")); + disk_gone(sc->xbd_disk); + } else { xbd_closing(dev); + } break; } } From owner-svn-src-all@freebsd.org Fri May 19 08:16:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5B81D74CA6; Fri, 19 May 2017 08:16:48 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F6001CDA; Fri, 19 May 2017 08:16:48 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J8GlxD002882; Fri, 19 May 2017 08:16:47 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J8GlaH002881; Fri, 19 May 2017 08:16:47 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201705190816.v4J8GlaH002881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Fri, 19 May 2017 08:16:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318521 - head/sys/dev/etherswitch/e6000sw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 08:16:48 -0000 Author: wma Date: Fri May 19 08:16:47 2017 New Revision: 318521 URL: https://svnweb.freebsd.org/changeset/base/318521 Log: Improve busy-wait loop during switch phy access in e6000sw Hitherto implementation of PHY polling resulted in a risk of an endless loop and very high occupation of the SMI bus. Improve the operation by limiting the polling tries and adding sleepable pause. Submitted by: Marcin Wojtas Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: loos Differential revision: https://reviews.freebsd.org/D10713 Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000sw.c Fri May 19 08:11:15 2017 (r318520) +++ head/sys/dev/etherswitch/e6000sw/e6000sw.c Fri May 19 08:16:47 2017 (r318521) @@ -431,13 +431,21 @@ out_fail: return (err); } -static __inline void +static __inline int e6000sw_poll_done(e6000sw_softc_t *sc) { + int i; + + for (i = 0; i < 16; i++) { + + if (!(e6000sw_readreg(sc, REG_GLOBAL2, PHY_CMD) & + (1 << PHY_CMD_SMI_BUSY))) + return (0); - while (e6000sw_readreg(sc, REG_GLOBAL2, PHY_CMD) & - (1 << PHY_CMD_SMI_BUSY)) - continue; + pause("e6000sw PHY poll", hz/1000); + } + + return (ETIMEDOUT); } /* @@ -449,6 +457,7 @@ e6000sw_readphy(device_t dev, int phy, i { e6000sw_softc_t *sc; uint32_t val; + int err; sc = device_get_softc(dev); val = 0; @@ -460,14 +469,25 @@ e6000sw_readphy(device_t dev, int phy, i E6000SW_LOCK_ASSERT(sc, SA_XLOCKED); - e6000sw_poll_done(sc); + err = e6000sw_poll_done(sc); + if (err != 0) { + device_printf(dev, "Timeout while waiting for switch\n"); + return (err); + } + val |= 1 << PHY_CMD_SMI_BUSY; val |= PHY_CMD_MODE_MDIO << PHY_CMD_MODE; val |= PHY_CMD_OPCODE_READ << PHY_CMD_OPCODE; val |= (reg << PHY_CMD_REG_ADDR) & PHY_CMD_REG_ADDR_MASK; val |= (phy << PHY_CMD_DEV_ADDR) & PHY_CMD_DEV_ADDR_MASK; e6000sw_writereg(sc, REG_GLOBAL2, SMI_PHY_CMD_REG, val); - e6000sw_poll_done(sc); + + err = e6000sw_poll_done(sc); + if (err != 0) { + device_printf(dev, "Timeout while waiting for switch\n"); + return (err); + } + val = e6000sw_readreg(sc, REG_GLOBAL2, SMI_PHY_DATA_REG) & PHY_DATA_MASK; @@ -479,6 +499,7 @@ e6000sw_writephy(device_t dev, int phy, { e6000sw_softc_t *sc; uint32_t val; + int err; sc = device_get_softc(dev); val = 0; @@ -490,7 +511,12 @@ e6000sw_writephy(device_t dev, int phy, E6000SW_LOCK_ASSERT(sc, SA_XLOCKED); - e6000sw_poll_done(sc); + err = e6000sw_poll_done(sc); + if (err != 0) { + device_printf(dev, "Timeout while waiting for switch\n"); + return (err); + } + val |= PHY_CMD_MODE_MDIO << PHY_CMD_MODE; val |= 1 << PHY_CMD_SMI_BUSY; val |= PHY_CMD_OPCODE_WRITE << PHY_CMD_OPCODE; @@ -499,7 +525,12 @@ e6000sw_writephy(device_t dev, int phy, e6000sw_writereg(sc, REG_GLOBAL2, SMI_PHY_DATA_REG, data & PHY_DATA_MASK); e6000sw_writereg(sc, REG_GLOBAL2, SMI_PHY_CMD_REG, val); - e6000sw_poll_done(sc); + + err = e6000sw_poll_done(sc); + if (err != 0) { + device_printf(dev, "Timeout while waiting for switch\n"); + return (err); + } return (0); } From owner-svn-src-all@freebsd.org Fri May 19 08:19:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00BA0D74D59; Fri, 19 May 2017 08:19:41 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B67DB1EEC; Fri, 19 May 2017 08:19:40 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J8JdIw003014; Fri, 19 May 2017 08:19:39 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J8JdkY003010; Fri, 19 May 2017 08:19:39 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201705190819.v4J8JdkY003010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Fri, 19 May 2017 08:19:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318522 - in head/sys: arm/mv dev/cesa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 08:19:41 -0000 Author: wma Date: Fri May 19 08:19:39 2017 New Revision: 318522 URL: https://svnweb.freebsd.org/changeset/base/318522 Log: Enable proper configuration of CESA MBUS windows For all Marvell devices, MBUS windows configuration is done in a common place. Only CESA was an exception, so move its related code from driver to mv_common.c. This way it uses same proper DRAM information, same as all other interfaces instead of parsing DT /memory node directly. Submitted by: Marcin Wojtas Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: loos Differential revision: https://reviews.freebsd.org/D10723 Modified: head/sys/arm/mv/mv_common.c head/sys/arm/mv/mvwin.h head/sys/dev/cesa/cesa.c head/sys/dev/cesa/cesa.h Modified: head/sys/arm/mv/mv_common.c ============================================================================== --- head/sys/arm/mv/mv_common.c Fri May 19 08:16:47 2017 (r318521) +++ head/sys/arm/mv/mv_common.c Fri May 19 08:19:39 2017 (r318522) @@ -76,6 +76,7 @@ MALLOC_DEFINE(M_IDMA, "idma", "idma dma static int win_eth_can_remap(int i); +static int decode_win_cesa_valid(void); static int decode_win_cpu_valid(void); static int decode_win_usb_valid(void); static int decode_win_usb3_valid(void); @@ -91,6 +92,7 @@ static void decode_win_cpu_setup(void); #ifdef SOC_MV_ARMADAXP static int decode_win_sdram_fixup(void); #endif +static void decode_win_cesa_setup(u_long); static void decode_win_usb_setup(u_long); static void decode_win_usb3_setup(u_long); static void decode_win_eth_setup(u_long); @@ -101,6 +103,7 @@ static void decode_win_sdhci_setup(u_lon static void decode_win_idma_setup(u_long); static void decode_win_xor_setup(u_long); +static void decode_win_cesa_dump(u_long); static void decode_win_usb_dump(u_long); static void decode_win_usb3_dump(u_long); static void decode_win_eth_dump(u_long base); @@ -146,6 +149,7 @@ static struct soc_node_spec soc_nodes[] { "mrvl,sata", &decode_win_sata_setup, NULL }, { "mrvl,xor", &decode_win_xor_setup, &decode_win_xor_dump }, { "mrvl,idma", &decode_win_idma_setup, &decode_win_idma_dump }, + { "mrvl,cesa", &decode_win_cesa_setup, &decode_win_cesa_dump }, { "mrvl,pcie", &decode_win_pcie_setup, NULL }, { NULL, NULL, NULL }, }; @@ -574,7 +578,7 @@ soc_decode_win(void) !decode_win_eth_valid() || !decode_win_idma_valid() || !decode_win_pcie_valid() || !decode_win_sata_valid() || !decode_win_xor_valid() || !decode_win_usb3_valid() || - !decode_win_sdhci_valid()) + !decode_win_sdhci_valid() || !decode_win_cesa_valid()) return (EINVAL); decode_win_cpu_setup(); @@ -601,6 +605,11 @@ WIN_REG_IDX_WR(win_cpu, br, MV_WIN_CPU_B WIN_REG_IDX_WR(win_cpu, remap_l, MV_WIN_CPU_REMAP_LO, MV_MBUS_BRIDGE_BASE) WIN_REG_IDX_WR(win_cpu, remap_h, MV_WIN_CPU_REMAP_HI, MV_MBUS_BRIDGE_BASE) +WIN_REG_BASE_IDX_RD(win_cesa, cr, MV_WIN_CESA_CTRL) +WIN_REG_BASE_IDX_RD(win_cesa, br, MV_WIN_CESA_BASE) +WIN_REG_BASE_IDX_WR(win_cesa, cr, MV_WIN_CESA_CTRL) +WIN_REG_BASE_IDX_WR(win_cesa, br, MV_WIN_CESA_BASE) + WIN_REG_BASE_IDX_RD(win_usb, cr, MV_WIN_USB_CTRL) WIN_REG_BASE_IDX_RD(win_usb, br, MV_WIN_USB_BASE) WIN_REG_BASE_IDX_WR(win_usb, cr, MV_WIN_USB_CTRL) @@ -1071,6 +1080,63 @@ ddr_target(int i) } /************************************************************************** + * CESA windows routines + **************************************************************************/ +static int +decode_win_cesa_valid(void) +{ + + return (decode_win_can_cover_ddr(MV_WIN_CESA_MAX)); +} + +static void +decode_win_cesa_dump(u_long base) +{ + int i; + + for (i = 0; i < MV_WIN_CESA_MAX; i++) + printf("CESA window#%d: c 0x%08x, b 0x%08x\n", i, + win_cesa_cr_read(base, i), win_cesa_br_read(base, i)); +} + +/* + * Set CESA decode windows. + */ +static void +decode_win_cesa_setup(u_long base) +{ + uint32_t br, cr; + int i, j; + + for (i = 0; i < MV_WIN_CESA_MAX; i++) { + win_cesa_cr_write(base, i, 0); + win_cesa_br_write(base, i, 0); + } + + /* Only access to active DRAM banks is required */ + for (i = 0; i < MV_WIN_DDR_MAX; i++) { + if (ddr_is_active(i)) { + br = ddr_base(i); + + cr = (((ddr_size(i) - 1) & 0xffff0000) | + (ddr_attr(i) << IO_WIN_ATTR_SHIFT) | + (ddr_target(i) << IO_WIN_TGT_SHIFT) | + IO_WIN_ENA_MASK); + + /* Set the first free CESA window */ + for (j = 0; j < MV_WIN_CESA_MAX; j++) { + if (win_cesa_cr_read(base, j) & 0x1) + continue; + + win_cesa_br_write(base, j, br); + win_cesa_cr_write(base, j, cr); + break; + } + } + } +} + +/************************************************************************** * USB windows routines **************************************************************************/ static int Modified: head/sys/arm/mv/mvwin.h ============================================================================== --- head/sys/arm/mv/mvwin.h Fri May 19 08:16:47 2017 (r318521) +++ head/sys/arm/mv/mvwin.h Fri May 19 08:19:39 2017 (r318522) @@ -216,6 +216,11 @@ #define MV_WIN_CESA_ATTR(eng_sel) 0 #endif +/* CESA TDMA address decoding registers */ +#define MV_WIN_CESA_CTRL(n) (0x8 * (n) + 0xA04) +#define MV_WIN_CESA_BASE(n) (0x8 * (n) + 0xA00) +#define MV_WIN_CESA_MAX 4 + #define MV_WIN_USB_CTRL(n) (0x10 * (n) + 0x320) #define MV_WIN_USB_BASE(n) (0x10 * (n) + 0x324) #define MV_WIN_USB_MAX 4 Modified: head/sys/dev/cesa/cesa.c ============================================================================== --- head/sys/dev/cesa/cesa.c Fri May 19 08:16:47 2017 (r318521) +++ head/sys/dev/cesa/cesa.c Fri May 19 08:19:39 2017 (r318522) @@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$"); #include "cryptodev_if.h" #include -#include #include #include "cesa.h" @@ -80,7 +79,6 @@ static void cesa_intr(void *); static int cesa_newsession(device_t, u_int32_t *, struct cryptoini *); static int cesa_freesession(device_t, u_int64_t); static int cesa_process(device_t, struct cryptop *, int); -static int decode_win_cesa_setup(struct cesa_softc *sc); static struct resource_spec cesa_res_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, @@ -1085,13 +1083,6 @@ cesa_attach(device_t dev) goto err0; } - /* Setup CESA decoding windows */ - error = decode_win_cesa_setup(sc); - if (error) { - device_printf(dev, "could not setup decoding windows\n"); - goto err1; - } - /* Acquire SRAM base address */ error = cesa_setup_sram(sc); if (error) { @@ -1706,50 +1697,3 @@ cesa_process(device_t dev, struct crypto return (0); } - -/* - * Set CESA TDMA decode windows. - */ -static int -decode_win_cesa_setup(struct cesa_softc *sc) -{ - struct mem_region availmem_regions[FDT_MEM_REGIONS]; - int availmem_regions_sz; - uint32_t br, cr, i; - - /* Grab physical memory regions information from DTS */ - if (fdt_get_mem_regions(availmem_regions, &availmem_regions_sz, - NULL) != 0) - return (ENXIO); - - if (availmem_regions_sz > MV_WIN_CESA_MAX) { - device_printf(sc->sc_dev, "Too much memory regions, cannot " - " set CESA windows to cover whole DRAM \n"); - return (ENXIO); - } - - /* Disable and clear all CESA windows */ - for (i = 0; i < MV_WIN_CESA_MAX; i++) { - CESA_TDMA_WRITE(sc, MV_WIN_CESA_BASE(i), 0); - CESA_TDMA_WRITE(sc, MV_WIN_CESA_CTRL(i), 0); - } - - /* Fill CESA TDMA decoding windows with information acquired from DTS */ - for (i = 0; i < availmem_regions_sz; i++) { - br = availmem_regions[i].mr_start; - cr = availmem_regions[i].mr_size; - - /* Don't add entries with size lower than 64KB */ - if (cr & 0xffff0000) { - cr = (((cr - 1) & 0xffff0000) | - (MV_WIN_DDR_ATTR(i) << MV_WIN_CPU_ATTR_SHIFT) | - (MV_WIN_DDR_TARGET << MV_WIN_CPU_TARGET_SHIFT) | - MV_WIN_CPU_ENABLE_BIT); - CESA_TDMA_WRITE(sc, MV_WIN_CESA_BASE(i), br); - CESA_TDMA_WRITE(sc, MV_WIN_CESA_CTRL(i), cr); - } - } - - return (0); -} - Modified: head/sys/dev/cesa/cesa.h ============================================================================== --- head/sys/dev/cesa/cesa.h Fri May 19 08:16:47 2017 (r318521) +++ head/sys/dev/cesa/cesa.h Fri May 19 08:19:39 2017 (r318522) @@ -350,11 +350,6 @@ struct cesa_chain_info { #define CESA_TDMA_EMR_BOTH_HIT CESA_TDMA_ECR_BOTH_HIT #define CESA_TDMA_EMR_DATA_ERROR CESA_TDMA_ECR_DATA_ERROR -/* CESA TDMA address decoding registers */ -#define MV_WIN_CESA_CTRL(n) (0x8 * (n) + 0xA04) -#define MV_WIN_CESA_BASE(n) (0x8 * (n) + 0xA00) -#define MV_WIN_CESA_MAX 4 - /* CESA SA registers definitions */ #define CESA_SA_CMD 0x0E00 #define CESA_SA_CMD_ACTVATE (1 << 0) From owner-svn-src-all@freebsd.org Fri May 19 08:19:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C473D74D85; Fri, 19 May 2017 08:19:52 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57AE01F91; Fri, 19 May 2017 08:19:52 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J8JpRs003067; Fri, 19 May 2017 08:19:51 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J8JplS003066; Fri, 19 May 2017 08:19:51 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705190819.v4J8JplS003066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 19 May 2017 08:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318523 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 08:19:52 -0000 Author: royger Date: Fri May 19 08:19:51 2017 New Revision: 318523 URL: https://svnweb.freebsd.org/changeset/base/318523 Log: xen/netfront: don't drop the ring RX lock with inconsistent ring state Make sure the RX ring lock is only released when the state of the ring is consistent, or else concurrent calls to xn_rxeof might get an inconsistent ring state and thus some packets might be processed twice. Note that this is not very common, and could only happen when an interrupt is delivered while in xn_ifinit. Reported by: cperciva Tested by: cperciva MFC after: 1 week Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Fri May 19 08:19:39 2017 (r318522) +++ head/sys/dev/xen/netfront/netfront.c Fri May 19 08:19:51 2017 (r318523) @@ -1161,17 +1161,18 @@ xn_rxeof(struct netfront_rxq *rxq) struct mbufq mbufq_rxq, mbufq_errq; int err, work_to_do; - do { - XN_RX_LOCK_ASSERT(rxq); - if (!netfront_carrier_ok(np)) - return; - - /* XXX: there should be some sane limit. */ - mbufq_init(&mbufq_errq, INT_MAX); - mbufq_init(&mbufq_rxq, INT_MAX); + XN_RX_LOCK_ASSERT(rxq); + + if (!netfront_carrier_ok(np)) + return; + + /* XXX: there should be some sane limit. */ + mbufq_init(&mbufq_errq, INT_MAX); + mbufq_init(&mbufq_rxq, INT_MAX); - ifp = np->xn_ifp; + ifp = np->xn_ifp; + do { rp = rxq->ring.sring->rsp_prod; rmb(); /* Ensure we see queued responses up to 'rp'. */ @@ -1191,7 +1192,7 @@ xn_rxeof(struct netfront_rxq *rxq) } m->m_pkthdr.rcvif = ifp; - if ( rx->flags & NETRXF_data_validated ) { + if (rx->flags & NETRXF_data_validated) { /* * According to mbuf(9) the correct way to tell * the stack that the checksum of an inbound @@ -1214,50 +1215,45 @@ xn_rxeof(struct netfront_rxq *rxq) } (void )mbufq_enqueue(&mbufq_rxq, m); - rxq->ring.rsp_cons = i; } - mbufq_drain(&mbufq_errq); + rxq->ring.rsp_cons = i; - /* - * Process all the mbufs after the remapping is complete. - * Break the mbuf chain first though. - */ - while ((m = mbufq_dequeue(&mbufq_rxq)) != NULL) { - if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + xn_alloc_rx_buffers(rxq); - /* XXX: Do we really need to drop the rx lock? */ - XN_RX_UNLOCK(rxq); + RING_FINAL_CHECK_FOR_RESPONSES(&rxq->ring, work_to_do); + } while (work_to_do); + + XN_RX_UNLOCK(rxq); + mbufq_drain(&mbufq_errq); + /* + * Process all the mbufs after the remapping is complete. + * Break the mbuf chain first though. + */ + while ((m = mbufq_dequeue(&mbufq_rxq)) != NULL) { + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); #if (defined(INET) || defined(INET6)) - /* Use LRO if possible */ - if ((ifp->if_capenable & IFCAP_LRO) == 0 || - lro->lro_cnt == 0 || tcp_lro_rx(lro, m, 0)) { - /* - * If LRO fails, pass up to the stack - * directly. - */ - (*ifp->if_input)(ifp, m); - } -#else + /* Use LRO if possible */ + if ((ifp->if_capenable & IFCAP_LRO) == 0 || + lro->lro_cnt == 0 || tcp_lro_rx(lro, m, 0)) { + /* + * If LRO fails, pass up to the stack + * directly. + */ (*ifp->if_input)(ifp, m); -#endif - - XN_RX_LOCK(rxq); } - - rxq->ring.rsp_cons = i; +#else + (*ifp->if_input)(ifp, m); +#endif + } #if (defined(INET) || defined(INET6)) - /* - * Flush any outstanding LRO work - */ - tcp_lro_flush_all(lro); + /* + * Flush any outstanding LRO work + */ + tcp_lro_flush_all(lro); #endif - - xn_alloc_rx_buffers(rxq); - - RING_FINAL_CHECK_FOR_RESPONSES(&rxq->ring, work_to_do); - } while (work_to_do); + XN_RX_LOCK(rxq); } static void From owner-svn-src-all@freebsd.org Fri May 19 08:24:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A58EFD74F3A; Fri, 19 May 2017 08:24:24 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77E2777F; Fri, 19 May 2017 08:24:24 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J8ONOx007273; Fri, 19 May 2017 08:24:23 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J8ON6X007271; Fri, 19 May 2017 08:24:23 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201705190824.v4J8ON6X007271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Fri, 19 May 2017 08:24:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318524 - head/sys/dev/etherswitch/e6000sw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 08:24:24 -0000 Author: wma Date: Fri May 19 08:24:23 2017 New Revision: 318524 URL: https://svnweb.freebsd.org/changeset/base/318524 Log: Poll PHY status using internal e6000sw registers e6000sw family automatically reflects PHY status in each port's registers. Therefore it is not necessary to do a full PHY polling squence, which results in much quicker operation and much less significant usage of the SMI bus. Care must be taken that the resulting ifmedia_active is identical to what the PHY will compute, or gratuitous link status changes will occur whenever the PHYs update function is called. This patch implements above improvement. On the occasion set a pointer to the proc structure to be part of software context instead of being a global variable. Submitted by: Marcin Wojtas Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: loos Differential revision: https://reviews.freebsd.org/D10714 Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c head/sys/dev/etherswitch/e6000sw/e6000swreg.h Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000sw.c Fri May 19 08:19:51 2017 (r318523) +++ head/sys/dev/etherswitch/e6000sw/e6000sw.c Fri May 19 08:24:23 2017 (r318524) @@ -89,7 +89,7 @@ typedef struct e6000sw_softc { char *ifname[E6000SW_MAX_PORTS]; device_t miibus[E6000SW_MAX_PORTS]; struct mii_data *mii[E6000SW_MAX_PORTS]; - struct callout tick_callout; + struct proc *kproc; uint32_t cpuports_mask; uint32_t fixed_mask; @@ -149,8 +149,6 @@ static __inline int e6000sw_is_phyport(e static __inline struct mii_data *e6000sw_miiforphy(e6000sw_softc_t *sc, unsigned int phy); -static struct proc *e6000sw_kproc; - static device_method_t e6000sw_methods[] = { /* device interface */ DEVMETHOD(device_identify, e6000sw_identify), @@ -419,8 +417,7 @@ e6000sw_attach(device_t dev) bus_generic_probe(dev); bus_generic_attach(dev); - kproc_create(e6000sw_tick, sc, &e6000sw_kproc, 0, 0, - "e6000sw tick kproc"); + kproc_create(e6000sw_tick, sc, &sc->kproc, 0, 0, "e6000sw tick kproc"); return (0); @@ -1010,23 +1007,65 @@ e6000sw_get_pvid(e6000sw_softc_t *sc, in return (0); } +/* + * Convert port status to ifmedia. + */ +static void +e6000sw_update_ifmedia(uint16_t portstatus, u_int *media_status, u_int *media_active) +{ + *media_active = IFM_ETHER; + *media_status = IFM_AVALID; + + if ((portstatus & PORT_STATUS_LINK_MASK) != 0) + *media_status |= IFM_ACTIVE; + else { + *media_active |= IFM_NONE; + return; + } + + switch (portstatus & PORT_STATUS_SPEED_MASK) { + case PORT_STATUS_SPEED_10: + *media_active |= IFM_10_T; + break; + case PORT_STATUS_SPEED_100: + *media_active |= IFM_100_TX; + break; + case PORT_STATUS_SPEED_1000: + *media_active |= IFM_1000_T; + break; + } + + if ((portstatus & PORT_STATUS_DUPLEX_MASK) == 0) + *media_active |= IFM_FDX; + else + *media_active |= IFM_HDX; +} + static void e6000sw_tick (void *arg) { e6000sw_softc_t *sc; struct mii_softc *miisc; + uint16_t portstatus; int port; sc = arg; E6000SW_LOCK_ASSERT(sc, SA_UNLOCKED); + for (;;) { E6000SW_LOCK(sc); for (port = 0; port < sc->num_ports; port++) { /* Tick only on PHY ports */ if (!e6000sw_is_phyport(sc, port)) continue; - mii_tick(sc->mii[port]); + + portstatus = e6000sw_readreg(sc, REG_PORT(port), PORT_STATUS); + + e6000sw_update_ifmedia(portstatus, + &sc->mii[port]->mii_media_status, + &sc->mii[port]->mii_media_active); + LIST_FOREACH(miisc, &sc->mii[port]->mii_phys, mii_list) { if (IFM_INST(sc->mii[port]->mii_media.ifm_cur->ifm_media) != miisc->mii_inst) Modified: head/sys/dev/etherswitch/e6000sw/e6000swreg.h ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000swreg.h Fri May 19 08:19:51 2017 (r318523) +++ head/sys/dev/etherswitch/e6000sw/e6000swreg.h Fri May 19 08:24:23 2017 (r318524) @@ -55,6 +55,14 @@ struct atu_opt { * Per-Port Switch Registers */ #define PORT_STATUS 0x0 +#define PORT_STATUS_SPEED_MASK 0x300 +#define PORT_STATUS_SPEED_10 0 +#define PORT_STATUS_SPEED_100 1 +#define PORT_STATUS_SPEED_1000 2 +#define PORT_STATUS_DUPLEX_MASK (1 << 10) +#define PORT_STATUS_LINK_MASK (1 << 11) +#define PORT_STATUS_PHY_DETECT_MASK (1 << 12) + #define PSC_CONTROL 0x1 #define SWITCH_ID 0x3 #define PORT_CONTROL 0x4 From owner-svn-src-all@freebsd.org Fri May 19 08:25:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DEFBD74FC1; Fri, 19 May 2017 08:25:41 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 349828F2; Fri, 19 May 2017 08:25:41 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J8Pef2007360; Fri, 19 May 2017 08:25:40 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J8Peic007359; Fri, 19 May 2017 08:25:40 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201705190825.v4J8Peic007359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Fri, 19 May 2017 08:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318525 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 08:25:41 -0000 Author: wma Date: Fri May 19 08:25:40 2017 New Revision: 318525 URL: https://svnweb.freebsd.org/changeset/base/318525 Log: Fix MPIC mask/unmask Before the fix for single interrupt, both percpu and non-percpu routes were enabled/disable at the same time. Submitted by: Marcin Wojtas Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95897D73081; Fri, 19 May 2017 08:26:42 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62A6AA6A; Fri, 19 May 2017 08:26:42 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J8Qfe3007441; Fri, 19 May 2017 08:26:41 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J8QfT9007440; Fri, 19 May 2017 08:26:41 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201705190826.v4J8QfT9007440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Fri, 19 May 2017 08:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318526 - head/sys/arm/mv/armada38x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 08:26:42 -0000 Author: wma Date: Fri May 19 08:26:41 2017 New Revision: 318526 URL: https://svnweb.freebsd.org/changeset/base/318526 Log: Fix boot up on ARMADA38X uniprocessor variant Marvell Armada 380 is a uni-processor variant of the 38x SoC family. A function platform_mp_setmaxid() was setting a hardcoded value, which caused boot fail on A380. Fix this by relying on the CPU count obtained from device tree nodes. Submitted by: Marcin Wojtas Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC18DD737AD; Fri, 19 May 2017 08:38:04 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD8211190; Fri, 19 May 2017 08:38:04 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J8c31b011372; Fri, 19 May 2017 08:38:03 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J8c3Jq011370; Fri, 19 May 2017 08:38:03 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201705190838.v4J8c3Jq011370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Fri, 19 May 2017 08:38:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318527 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 08:38:05 -0000 Author: truckman Date: Fri May 19 08:38:03 2017 New Revision: 318527 URL: https://svnweb.freebsd.org/changeset/base/318527 Log: Fix the queue delay estimation in PIE/FQ-PIE when the timestamp (TS) method is used. When packet timestamp is used, the "current_qdelay" keeps storing the last queue delay value calculated in the dequeue function. Therefore, when a burst of packets arrives followed by a pause, the "current_qdelay" will store a high value caused by the burst and stick to that value during the pause because the queue delay measurement is done inside the dequeue function. This causes the drop probability calculation function to calculate high drop probability value instead of zero and prevents the burst allowance mechanism from working properly. Fix this problem by resetting "current_qdelay" inside the drop probability calculation function when the queue length is zero and TS option is used. Submitted by: Rasool Al-Saadi MFC after: 1 week Modified: head/sys/netpfil/ipfw/dn_aqm_pie.c head/sys/netpfil/ipfw/dn_sched_fq_pie.c Modified: head/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- head/sys/netpfil/ipfw/dn_aqm_pie.c Fri May 19 08:26:41 2017 (r318526) +++ head/sys/netpfil/ipfw/dn_aqm_pie.c Fri May 19 08:38:03 2017 (r318527) @@ -211,11 +211,16 @@ calculate_drop_prob(void *x) pprms = pst->parms; prob = pst->drop_prob; - /* calculate current qdelay */ - if (pprms->flags & PIE_DEPRATEEST_ENABLED) { + /* calculate current qdelay using DRE method. + * If TS is used and no data in the queue, reset current_qdelay + * as it stays at last value during dequeue process. + */ + if (pprms->flags & PIE_DEPRATEEST_ENABLED) pst->current_qdelay = ((uint64_t)pst->pq->ni.len_bytes * pst->avg_dq_time) >> PIE_DQ_THRESHOLD_BITS; - } + else + if (!pst->pq->ni.len_bytes) + pst->current_qdelay = 0; /* calculate drop probability */ p = (int64_t)pprms->alpha * Modified: head/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- head/sys/netpfil/ipfw/dn_sched_fq_pie.c Fri May 19 08:26:41 2017 (r318526) +++ head/sys/netpfil/ipfw/dn_sched_fq_pie.c Fri May 19 08:38:03 2017 (r318527) @@ -383,11 +383,16 @@ fq_calculate_drop_prob(void *x) pprms = pst->parms; prob = pst->drop_prob; - /* calculate current qdelay */ - if (pprms->flags & PIE_DEPRATEEST_ENABLED) { + /* calculate current qdelay using DRE method. + * If TS is used and no data in the queue, reset current_qdelay + * as it stays at last value during dequeue process. + */ + if (pprms->flags & PIE_DEPRATEEST_ENABLED) pst->current_qdelay = ((uint64_t)q->stats.len_bytes * pst->avg_dq_time) >> PIE_DQ_THRESHOLD_BITS; - } + else + if (!q->stats.len_bytes) + pst->current_qdelay = 0; /* calculate drop probability */ p = (int64_t)pprms->alpha * From owner-svn-src-all@freebsd.org Fri May 19 09:04:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33171D74037; Fri, 19 May 2017 09:04:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE34E1E2C; Fri, 19 May 2017 09:04:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J94JCt023471; Fri, 19 May 2017 09:04:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J94JZ1023470; Fri, 19 May 2017 09:04:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705190904.v4J94JZ1023470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 19 May 2017 09:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318528 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 09:04:20 -0000 Author: kib Date: Fri May 19 09:04:18 2017 New Revision: 318528 URL: https://svnweb.freebsd.org/changeset/base/318528 Log: MFC r318243: Do not wake up sleeping thread in reschedule_signals() if the signal is blocked. The spurious wakeup might result in spurious EINTR. PR: 219228 Modified: stable/11/sys/kern/kern_sig.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sig.c ============================================================================== --- stable/11/sys/kern/kern_sig.c Fri May 19 08:38:03 2017 (r318527) +++ stable/11/sys/kern/kern_sig.c Fri May 19 09:04:18 2017 (r318528) @@ -2664,7 +2664,9 @@ reschedule_signals(struct proc *p, sigse signotify(td); if (!(flags & SIGPROCMASK_PS_LOCKED)) mtx_lock(&ps->ps_mtx); - if (p->p_flag & P_TRACED || SIGISMEMBER(ps->ps_sigcatch, sig)) + if (p->p_flag & P_TRACED || + (SIGISMEMBER(ps->ps_sigcatch, sig) && + !SIGISMEMBER(td->td_sigmask, sig))) tdsigwakeup(td, sig, SIG_CATCH, (SIGISMEMBER(ps->ps_sigintr, sig) ? EINTR : ERESTART)); From owner-svn-src-all@freebsd.org Fri May 19 10:16:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0038FD71184; Fri, 19 May 2017 10:16:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5D0A2FE; Fri, 19 May 2017 10:16:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JAGpnP052122; Fri, 19 May 2017 10:16:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JAGpEX052121; Fri, 19 May 2017 10:16:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705191016.v4JAGpEX052121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 19 May 2017 10:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318529 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 10:16:53 -0000 Author: kib Date: Fri May 19 10:16:51 2017 New Revision: 318529 URL: https://svnweb.freebsd.org/changeset/base/318529 Log: MFC r318243: Do not wake up sleeping thread in reschedule_signals() if the signal is blocked. The spurious wakeup might result in spurious EINTR. PR: 219228 Modified: stable/10/sys/kern/kern_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Fri May 19 09:04:18 2017 (r318528) +++ stable/10/sys/kern/kern_sig.c Fri May 19 10:16:51 2017 (r318529) @@ -2637,7 +2637,9 @@ reschedule_signals(struct proc *p, sigse signotify(td); if (!(flags & SIGPROCMASK_PS_LOCKED)) mtx_lock(&ps->ps_mtx); - if (p->p_flag & P_TRACED || SIGISMEMBER(ps->ps_sigcatch, sig)) + if (p->p_flag & P_TRACED || + (SIGISMEMBER(ps->ps_sigcatch, sig) && + !SIGISMEMBER(td->td_sigmask, sig))) tdsigwakeup(td, sig, SIG_CATCH, (SIGISMEMBER(ps->ps_sigintr, sig) ? EINTR : ERESTART)); From owner-svn-src-all@freebsd.org Fri May 19 11:45:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82356D74C67; Fri, 19 May 2017 11:45:15 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 527F914AB; Fri, 19 May 2017 11:45:15 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JBjESG088695; Fri, 19 May 2017 11:45:14 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JBjEWh088694; Fri, 19 May 2017 11:45:14 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705191145.v4JBjEWh088694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 19 May 2017 11:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318530 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 11:45:15 -0000 Author: mmel Date: Fri May 19 11:45:14 2017 New Revision: 318530 URL: https://svnweb.freebsd.org/changeset/base/318530 Log: Increase maximum text segment size. LLVM binaries are huge... MFC after: 3 days Modified: head/sys/arm/include/vmparam.h Modified: head/sys/arm/include/vmparam.h ============================================================================== --- head/sys/arm/include/vmparam.h Fri May 19 10:16:51 2017 (r318529) +++ head/sys/arm/include/vmparam.h Fri May 19 11:45:14 2017 (r318530) @@ -42,7 +42,7 @@ * Virtual memory related constants, all in bytes */ #ifndef MAXTSIZ -#define MAXTSIZ (64UL*1024*1024) /* max text size */ +#define MAXTSIZ (256UL*1024*1024) /* max text size */ #endif #ifndef DFLDSIZ #define DFLDSIZ (128UL*1024*1024) /* initial data size limit */ From owner-svn-src-all@freebsd.org Fri May 19 12:22:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65AF3D7227F; Fri, 19 May 2017 12:22:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 238A71C01; Fri, 19 May 2017 12:22:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCMnNX004848; Fri, 19 May 2017 12:22:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCMni4004846; Fri, 19 May 2017 12:22:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191222.v4JCMni4004846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318531 - head/sys/dev/mlx4/mlx4_core X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:22:50 -0000 Author: hselasky Date: Fri May 19 12:22:48 2017 New Revision: 318531 URL: https://svnweb.freebsd.org/changeset/base/318531 Log: mlx4: Use the CQ quota for SRIOV when creating completion EQs When creating EQs to handle CQ completion events for the PF or for VFs, we create enough EQE entries to handle completions for the max number of CQs that can use that EQ. When SRIOV is activated, the max number of CQs a VF (or the PF) can obtain is its CQ quota (determined by the Hypervisor resource tracker). Therefore, when creating an EQ, the number of EQE entries that the VF should request for that EQ is the CQ quota value (and not the total number of CQs available in the firmware). Under SRIOV, the PF, also must use its CQ quota, because the resource tracker also controls how many CQs the PF can obtain. Using the firmware total CQs instead of the CQ quota when creating EQs resulted wasting MTT entries, due to allocating more EQEs than were needed. MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_core/mlx4_eq.c head/sys/dev/mlx4/mlx4_core/mlx4_main.c Modified: head/sys/dev/mlx4/mlx4_core/mlx4_eq.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_eq.c Fri May 19 11:45:14 2017 (r318530) +++ head/sys/dev/mlx4/mlx4_core/mlx4_eq.c Fri May 19 12:22:48 2017 (r318531) @@ -1169,8 +1169,7 @@ int mlx4_init_eq_table(struct mlx4_dev * } for (i = 0; i < dev->caps.num_comp_vectors; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); @@ -1190,8 +1189,7 @@ int mlx4_init_eq_table(struct mlx4_dev * for (i = dev->caps.num_comp_vectors + 1; i < dev->caps.num_comp_vectors + dev->caps.comp_pool + 1; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); Modified: head/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_main.c Fri May 19 11:45:14 2017 (r318530) +++ head/sys/dev/mlx4/mlx4_core/mlx4_main.c Fri May 19 12:22:48 2017 (r318531) @@ -3446,6 +3446,8 @@ slave_start: goto err_free_eq; } + mlx4_init_quotas(dev); + err = mlx4_setup_hca(dev); if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) && !mlx4_is_mfunc(dev)) { @@ -3459,7 +3461,6 @@ slave_start: if (err) goto err_steer; - mlx4_init_quotas(dev); mlx4_init_hca_info(dev); for (port = 1; port <= dev->caps.num_ports; port++) { From owner-svn-src-all@freebsd.org Fri May 19 12:35:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29373D726A6; Fri, 19 May 2017 12:35:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE9FC38D; Fri, 19 May 2017 12:35:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCZN9s009370; Fri, 19 May 2017 12:35:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCZNxP009364; Fri, 19 May 2017 12:35:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191235.v4JCZNxP009364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318532 - in stable/11/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:35:25 -0000 Author: hselasky Date: Fri May 19 12:35:23 2017 New Revision: 318532 URL: https://svnweb.freebsd.org/changeset/base/318532 Log: MFC r313556: Change mlx4 QP allocation scheme. When using Blue-Flame, BF, the QPN overrides the VLAN, CV, and SV fields in the WQE. Thus, BF may only be used for QPNs with bits 6,7 unset. The current ethernet driver code reserves a TX QP range with 256b alignment. This is wrong because if there are more than 64 TX QPs in use, QPNs >= base + 65 will have bits 6/7 set. This problem is not specific for the Ethernet driver, any entity that tries to reserve more than 64 BF-enabled QPs should fail. Also, using ranges is not necessary here and is wasteful. The new mechanism introduced here will support reservation for "Eth QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs (when hypervisors support WC in VMs). The flow we use is: 1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation, and request "BF enabled QPs" if BF is supported for the function 2. In the ALLOC_RES FW command, change param1 to: a. param1[23:0] - number of QPs b. param1[31-24] - flags controlling QPs reservation Bit 31 refers to Eth blueflame supported QPs. Those QPs must have bits 6 and 7 unset in order to be used in Ethernet. Bits 24-30 of the flags are currently reserved. When a function tries to allocate a QP, it states the required attributes for this QP. Those attributes are considered "best-effort". If an attribute, such as Ethernet BF enabled QP, is a must-have attribute, the function has to check that attribute is supported before trying to do the allocation. In a lower layer of the code, mlx4_qp_reserve_range masks out the bits which are unsupported. If SRIOV is used, the PF validates those attributes and masks out unsupported attributes as well. In order to notify VFs which attributes are supported, the VF uses QUERY_FUNC_CAP command. This command's mailbox is filled by the PF, which notifies which QP allocation attributes it supports. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8868 Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/fw.c stable/11/sys/ofed/drivers/net/mlx4/fw.h stable/11/sys/ofed/drivers/net/mlx4/main.c stable/11/sys/ofed/drivers/net/mlx4/qp.c stable/11/sys/ofed/drivers/net/mlx4/resource_tracker.c stable/11/sys/ofed/include/linux/mlx4/device.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:22:48 2017 (r318531) +++ stable/11/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:35:23 2017 (r318532) @@ -210,10 +210,15 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_MTT_QUOTA_OFFSET 0x64 #define QUERY_FUNC_CAP_MCG_QUOTA_OFFSET 0x68 +#define QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET 0x6c + #define QUERY_FUNC_CAP_FMR_FLAG 0x80 #define QUERY_FUNC_CAP_FLAG_RDMA 0x40 #define QUERY_FUNC_CAP_FLAG_ETH 0x80 #define QUERY_FUNC_CAP_FLAG_QUOTAS 0x10 +#define QUERY_FUNC_CAP_FLAG_VALID_MAILBOX 0x04 + +#define QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG (1UL << 31) /* when opcode modifier = 1 */ #define QUERY_FUNC_CAP_PHYS_PORT_OFFSET 0x3 @@ -266,7 +271,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m } else if (vhcr->op_modifier == 0) { /* enable rdma and ethernet interfaces, and new quota locations */ field = (QUERY_FUNC_CAP_FLAG_ETH | QUERY_FUNC_CAP_FLAG_RDMA | - QUERY_FUNC_CAP_FLAG_QUOTAS); + QUERY_FUNC_CAP_FLAG_QUOTAS | QUERY_FUNC_CAP_FLAG_VALID_MAILBOX); MLX4_PUT(outbox->buf, field, QUERY_FUNC_CAP_FLAGS_OFFSET); field = dev->caps.num_ports; @@ -313,6 +318,8 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET); MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET_DEP); + size = QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); } else err = -EINVAL; @@ -402,6 +409,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev MLX4_GET(size, outbox, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); func_cap->reserved_eq = size & 0xFFFFFF; + func_cap->extra_flags = 0; + + /* Mailbox data from 0x6c and onward should only be treated if + * QUERY_FUNC_CAP_FLAG_VALID_MAILBOX is set in func_cap->flags + */ + if (func_cap->flags & QUERY_FUNC_CAP_FLAG_VALID_MAILBOX) { + MLX4_GET(size, outbox, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); + if (size & QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG) + func_cap->extra_flags |= MLX4_QUERY_FUNC_FLAGS_BF_RES_QP; + } + goto out; } Modified: stable/11/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:22:48 2017 (r318531) +++ stable/11/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:35:23 2017 (r318532) @@ -144,6 +144,7 @@ struct mlx4_func_cap { u8 physical_port; u8 port_flags; u8 def_counter_index; + u8 extra_flags; }; struct mlx4_adapter { Modified: stable/11/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:22:48 2017 (r318531) +++ stable/11/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:35:23 2017 (r318532) @@ -823,6 +823,11 @@ static int mlx4_dev_cap(struct mlx4_dev if (!mlx4_is_slave(dev)) { for (i = 0; i < dev->caps.num_ports; ++i) dev->caps.def_counter_index[i] = i << 1; + + dev->caps.alloc_res_qp_mask = + (dev->caps.bf_reg_size ? MLX4_RESERVE_ETH_BF_QP : 0); + } else { + dev->caps.alloc_res_qp_mask = 0; } return 0; @@ -1088,6 +1093,10 @@ static int mlx4_slave_cap(struct mlx4_de slave_adjust_steering_mode(dev, &dev_cap, &hca_param); + if (func_cap.extra_flags & MLX4_QUERY_FUNC_FLAGS_BF_RES_QP && + dev->caps.bf_reg_size) + dev->caps.alloc_res_qp_mask |= MLX4_RESERVE_ETH_BF_QP; + return 0; err_mem: Modified: stable/11/sys/ofed/drivers/net/mlx4/qp.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/qp.c Fri May 19 12:22:48 2017 (r318531) +++ stable/11/sys/ofed/drivers/net/mlx4/qp.c Fri May 19 12:35:23 2017 (r318532) @@ -242,6 +242,9 @@ int mlx4_qp_reserve_range(struct mlx4_de u64 out_param; int err; + /* Turn off all unsupported QP allocation flags */ + flags &= dev->caps.alloc_res_qp_mask; + if (mlx4_is_mfunc(dev)) { set_param_l(&in_param, (((u32) flags) << 24) | (u32) cnt); set_param_h(&in_param, align); Modified: stable/11/sys/ofed/drivers/net/mlx4/resource_tracker.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/resource_tracker.c Fri May 19 12:22:48 2017 (r318531) +++ stable/11/sys/ofed/drivers/net/mlx4/resource_tracker.c Fri May 19 12:35:23 2017 (r318532) @@ -1544,7 +1544,10 @@ static int qp_alloc_res(struct mlx4_dev switch (op) { case RES_OP_RESERVE: count = get_param_l(&in_param) & 0xffffff; - flags = get_param_l(&in_param) >> 24; + /* Turn off all unsupported QP allocation flags that the + * slave tries to set. + */ + flags = (get_param_l(&in_param) >> 24) & dev->caps.alloc_res_qp_mask; align = get_param_h(&in_param); err = mlx4_grant_resource(dev, slave, RES_QP, count, 0); if (err) Modified: stable/11/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/11/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:22:48 2017 (r318531) +++ stable/11/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:35:23 2017 (r318532) @@ -218,6 +218,23 @@ enum { }; enum { + MLX4_QUERY_FUNC_FLAGS_BF_RES_QP = 1LL << 0 +}; + +/* bit enums for an 8-bit flags field indicating special use + * QPs which require special handling in qp_reserve_range. + * Currently, this only includes QPs used by the ETH interface, + * where we expect to use blueflame. These QPs must not have + * bits 6 and 7 set in their qp number. + * + * This enum may use only bits 0..7. + */ +enum { + MLX4_RESERVE_ETH_BF_QP = 1 << 7, +}; + + +enum { MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 }; @@ -531,6 +548,7 @@ struct mlx4_caps { u32 max_basic_counters; u32 max_extended_counters; u8 def_counter_index[MLX4_MAX_PORTS + 1]; + u8 alloc_res_qp_mask; }; struct mlx4_buf_list { From owner-svn-src-all@freebsd.org Fri May 19 12:39:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFA69D727CC; Fri, 19 May 2017 12:39:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91C3D7A3; Fri, 19 May 2017 12:39:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCdaYD009559; Fri, 19 May 2017 12:39:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCdaNq009552; Fri, 19 May 2017 12:39:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191239.v4JCdaNq009552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:39:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318533 - in stable/10/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:39:37 -0000 Author: hselasky Date: Fri May 19 12:39:35 2017 New Revision: 318533 URL: https://svnweb.freebsd.org/changeset/base/318533 Log: MFC r313556: Change mlx4 QP allocation scheme. When using Blue-Flame, BF, the QPN overrides the VLAN, CV, and SV fields in the WQE. Thus, BF may only be used for QPNs with bits 6,7 unset. The current ethernet driver code reserves a TX QP range with 256b alignment. This is wrong because if there are more than 64 TX QPs in use, QPNs >= base + 65 will have bits 6/7 set. This problem is not specific for the Ethernet driver, any entity that tries to reserve more than 64 BF-enabled QPs should fail. Also, using ranges is not necessary here and is wasteful. The new mechanism introduced here will support reservation for "Eth QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs (when hypervisors support WC in VMs). The flow we use is: 1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation, and request "BF enabled QPs" if BF is supported for the function 2. In the ALLOC_RES FW command, change param1 to: a. param1[23:0] - number of QPs b. param1[31-24] - flags controlling QPs reservation Bit 31 refers to Eth blueflame supported QPs. Those QPs must have bits 6 and 7 unset in order to be used in Ethernet. Bits 24-30 of the flags are currently reserved. When a function tries to allocate a QP, it states the required attributes for this QP. Those attributes are considered "best-effort". If an attribute, such as Ethernet BF enabled QP, is a must-have attribute, the function has to check that attribute is supported before trying to do the allocation. In a lower layer of the code, mlx4_qp_reserve_range masks out the bits which are unsupported. If SRIOV is used, the PF validates those attributes and masks out unsupported attributes as well. In order to notify VFs which attributes are supported, the VF uses QUERY_FUNC_CAP command. This command's mailbox is filled by the PF, which notifies which QP allocation attributes it supports. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8868 Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.c stable/10/sys/ofed/drivers/net/mlx4/fw.h stable/10/sys/ofed/drivers/net/mlx4/main.c stable/10/sys/ofed/drivers/net/mlx4/qp.c stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c stable/10/sys/ofed/include/linux/mlx4/device.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:35:23 2017 (r318532) +++ stable/10/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:39:35 2017 (r318533) @@ -208,10 +208,15 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_MTT_QUOTA_OFFSET 0x64 #define QUERY_FUNC_CAP_MCG_QUOTA_OFFSET 0x68 +#define QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET 0x6c + #define QUERY_FUNC_CAP_FMR_FLAG 0x80 #define QUERY_FUNC_CAP_FLAG_RDMA 0x40 #define QUERY_FUNC_CAP_FLAG_ETH 0x80 #define QUERY_FUNC_CAP_FLAG_QUOTAS 0x10 +#define QUERY_FUNC_CAP_FLAG_VALID_MAILBOX 0x04 + +#define QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG (1UL << 31) /* when opcode modifier = 1 */ #define QUERY_FUNC_CAP_PHYS_PORT_OFFSET 0x3 @@ -264,7 +269,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m } else if (vhcr->op_modifier == 0) { /* enable rdma and ethernet interfaces, and new quota locations */ field = (QUERY_FUNC_CAP_FLAG_ETH | QUERY_FUNC_CAP_FLAG_RDMA | - QUERY_FUNC_CAP_FLAG_QUOTAS); + QUERY_FUNC_CAP_FLAG_QUOTAS | QUERY_FUNC_CAP_FLAG_VALID_MAILBOX); MLX4_PUT(outbox->buf, field, QUERY_FUNC_CAP_FLAGS_OFFSET); field = dev->caps.num_ports; @@ -311,6 +316,8 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET); MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET_DEP); + size = QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); } else err = -EINVAL; @@ -400,6 +407,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev MLX4_GET(size, outbox, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); func_cap->reserved_eq = size & 0xFFFFFF; + func_cap->extra_flags = 0; + + /* Mailbox data from 0x6c and onward should only be treated if + * QUERY_FUNC_CAP_FLAG_VALID_MAILBOX is set in func_cap->flags + */ + if (func_cap->flags & QUERY_FUNC_CAP_FLAG_VALID_MAILBOX) { + MLX4_GET(size, outbox, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); + if (size & QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG) + func_cap->extra_flags |= MLX4_QUERY_FUNC_FLAGS_BF_RES_QP; + } + goto out; } Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:35:23 2017 (r318532) +++ stable/10/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:39:35 2017 (r318533) @@ -144,6 +144,7 @@ struct mlx4_func_cap { u8 physical_port; u8 port_flags; u8 def_counter_index; + u8 extra_flags; }; struct mlx4_adapter { Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:35:23 2017 (r318532) +++ stable/10/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:39:35 2017 (r318533) @@ -825,6 +825,11 @@ static int mlx4_dev_cap(struct mlx4_dev if (!mlx4_is_slave(dev)) { for (i = 0; i < dev->caps.num_ports; ++i) dev->caps.def_counter_index[i] = i << 1; + + dev->caps.alloc_res_qp_mask = + (dev->caps.bf_reg_size ? MLX4_RESERVE_ETH_BF_QP : 0); + } else { + dev->caps.alloc_res_qp_mask = 0; } return 0; @@ -1090,6 +1095,10 @@ static int mlx4_slave_cap(struct mlx4_de slave_adjust_steering_mode(dev, &dev_cap, &hca_param); + if (func_cap.extra_flags & MLX4_QUERY_FUNC_FLAGS_BF_RES_QP && + dev->caps.bf_reg_size) + dev->caps.alloc_res_qp_mask |= MLX4_RESERVE_ETH_BF_QP; + return 0; err_mem: Modified: stable/10/sys/ofed/drivers/net/mlx4/qp.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/qp.c Fri May 19 12:35:23 2017 (r318532) +++ stable/10/sys/ofed/drivers/net/mlx4/qp.c Fri May 19 12:39:35 2017 (r318533) @@ -242,6 +242,9 @@ int mlx4_qp_reserve_range(struct mlx4_de u64 out_param; int err; + /* Turn off all unsupported QP allocation flags */ + flags &= dev->caps.alloc_res_qp_mask; + if (mlx4_is_mfunc(dev)) { set_param_l(&in_param, (((u32) flags) << 24) | (u32) cnt); set_param_h(&in_param, align); Modified: stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c Fri May 19 12:35:23 2017 (r318532) +++ stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c Fri May 19 12:39:35 2017 (r318533) @@ -1544,7 +1544,10 @@ static int qp_alloc_res(struct mlx4_dev switch (op) { case RES_OP_RESERVE: count = get_param_l(&in_param) & 0xffffff; - flags = get_param_l(&in_param) >> 24; + /* Turn off all unsupported QP allocation flags that the + * slave tries to set. + */ + flags = (get_param_l(&in_param) >> 24) & dev->caps.alloc_res_qp_mask; align = get_param_h(&in_param); err = mlx4_grant_resource(dev, slave, RES_QP, count, 0); if (err) Modified: stable/10/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/10/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:35:23 2017 (r318532) +++ stable/10/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:39:35 2017 (r318533) @@ -218,6 +218,23 @@ enum { }; enum { + MLX4_QUERY_FUNC_FLAGS_BF_RES_QP = 1LL << 0 +}; + +/* bit enums for an 8-bit flags field indicating special use + * QPs which require special handling in qp_reserve_range. + * Currently, this only includes QPs used by the ETH interface, + * where we expect to use blueflame. These QPs must not have + * bits 6 and 7 set in their qp number. + * + * This enum may use only bits 0..7. + */ +enum { + MLX4_RESERVE_ETH_BF_QP = 1 << 7, +}; + + +enum { MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 }; @@ -531,6 +548,7 @@ struct mlx4_caps { u32 max_basic_counters; u32 max_extended_counters; u8 def_counter_index[MLX4_MAX_PORTS + 1]; + u8 alloc_res_qp_mask; }; struct mlx4_buf_list { From owner-svn-src-all@freebsd.org Fri May 19 12:42:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3708D729C7; Fri, 19 May 2017 12:42:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B40CEB85; Fri, 19 May 2017 12:42:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCgYqL013230; Fri, 19 May 2017 12:42:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCgYWH013224; Fri, 19 May 2017 12:42:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191242.v4JCgYWH013224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r318534 - in stable/9/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:42:36 -0000 Author: hselasky Date: Fri May 19 12:42:33 2017 New Revision: 318534 URL: https://svnweb.freebsd.org/changeset/base/318534 Log: MFC r313556: Change mlx4 QP allocation scheme. When using Blue-Flame, BF, the QPN overrides the VLAN, CV, and SV fields in the WQE. Thus, BF may only be used for QPNs with bits 6,7 unset. The current ethernet driver code reserves a TX QP range with 256b alignment. This is wrong because if there are more than 64 TX QPs in use, QPNs >= base + 65 will have bits 6/7 set. This problem is not specific for the Ethernet driver, any entity that tries to reserve more than 64 BF-enabled QPs should fail. Also, using ranges is not necessary here and is wasteful. The new mechanism introduced here will support reservation for "Eth QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs (when hypervisors support WC in VMs). The flow we use is: 1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation, and request "BF enabled QPs" if BF is supported for the function 2. In the ALLOC_RES FW command, change param1 to: a. param1[23:0] - number of QPs b. param1[31-24] - flags controlling QPs reservation Bit 31 refers to Eth blueflame supported QPs. Those QPs must have bits 6 and 7 unset in order to be used in Ethernet. Bits 24-30 of the flags are currently reserved. When a function tries to allocate a QP, it states the required attributes for this QP. Those attributes are considered "best-effort". If an attribute, such as Ethernet BF enabled QP, is a must-have attribute, the function has to check that attribute is supported before trying to do the allocation. In a lower layer of the code, mlx4_qp_reserve_range masks out the bits which are unsupported. If SRIOV is used, the PF validates those attributes and masks out unsupported attributes as well. In order to notify VFs which attributes are supported, the VF uses QUERY_FUNC_CAP command. This command's mailbox is filled by the PF, which notifies which QP allocation attributes it supports. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8868 Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/fw.c stable/9/sys/ofed/drivers/net/mlx4/fw.h stable/9/sys/ofed/drivers/net/mlx4/main.c stable/9/sys/ofed/drivers/net/mlx4/qp.c stable/9/sys/ofed/drivers/net/mlx4/resource_tracker.c stable/9/sys/ofed/include/linux/mlx4/device.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:39:35 2017 (r318533) +++ stable/9/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:42:33 2017 (r318534) @@ -208,10 +208,15 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_MTT_QUOTA_OFFSET 0x64 #define QUERY_FUNC_CAP_MCG_QUOTA_OFFSET 0x68 +#define QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET 0x6c + #define QUERY_FUNC_CAP_FMR_FLAG 0x80 #define QUERY_FUNC_CAP_FLAG_RDMA 0x40 #define QUERY_FUNC_CAP_FLAG_ETH 0x80 #define QUERY_FUNC_CAP_FLAG_QUOTAS 0x10 +#define QUERY_FUNC_CAP_FLAG_VALID_MAILBOX 0x04 + +#define QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG (1UL << 31) /* when opcode modifier = 1 */ #define QUERY_FUNC_CAP_PHYS_PORT_OFFSET 0x3 @@ -264,7 +269,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m } else if (vhcr->op_modifier == 0) { /* enable rdma and ethernet interfaces, and new quota locations */ field = (QUERY_FUNC_CAP_FLAG_ETH | QUERY_FUNC_CAP_FLAG_RDMA | - QUERY_FUNC_CAP_FLAG_QUOTAS); + QUERY_FUNC_CAP_FLAG_QUOTAS | QUERY_FUNC_CAP_FLAG_VALID_MAILBOX); MLX4_PUT(outbox->buf, field, QUERY_FUNC_CAP_FLAGS_OFFSET); field = dev->caps.num_ports; @@ -311,6 +316,8 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET); MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET_DEP); + size = QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); } else err = -EINVAL; @@ -400,6 +407,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev MLX4_GET(size, outbox, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); func_cap->reserved_eq = size & 0xFFFFFF; + func_cap->extra_flags = 0; + + /* Mailbox data from 0x6c and onward should only be treated if + * QUERY_FUNC_CAP_FLAG_VALID_MAILBOX is set in func_cap->flags + */ + if (func_cap->flags & QUERY_FUNC_CAP_FLAG_VALID_MAILBOX) { + MLX4_GET(size, outbox, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); + if (size & QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG) + func_cap->extra_flags |= MLX4_QUERY_FUNC_FLAGS_BF_RES_QP; + } + goto out; } Modified: stable/9/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:39:35 2017 (r318533) +++ stable/9/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:42:33 2017 (r318534) @@ -144,6 +144,7 @@ struct mlx4_func_cap { u8 physical_port; u8 port_flags; u8 def_counter_index; + u8 extra_flags; }; struct mlx4_adapter { Modified: stable/9/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:39:35 2017 (r318533) +++ stable/9/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:42:33 2017 (r318534) @@ -825,6 +825,11 @@ static int mlx4_dev_cap(struct mlx4_dev if (!mlx4_is_slave(dev)) { for (i = 0; i < dev->caps.num_ports; ++i) dev->caps.def_counter_index[i] = i << 1; + + dev->caps.alloc_res_qp_mask = + (dev->caps.bf_reg_size ? MLX4_RESERVE_ETH_BF_QP : 0); + } else { + dev->caps.alloc_res_qp_mask = 0; } return 0; @@ -1090,6 +1095,10 @@ static int mlx4_slave_cap(struct mlx4_de slave_adjust_steering_mode(dev, &dev_cap, &hca_param); + if (func_cap.extra_flags & MLX4_QUERY_FUNC_FLAGS_BF_RES_QP && + dev->caps.bf_reg_size) + dev->caps.alloc_res_qp_mask |= MLX4_RESERVE_ETH_BF_QP; + return 0; err_mem: Modified: stable/9/sys/ofed/drivers/net/mlx4/qp.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/qp.c Fri May 19 12:39:35 2017 (r318533) +++ stable/9/sys/ofed/drivers/net/mlx4/qp.c Fri May 19 12:42:33 2017 (r318534) @@ -242,6 +242,9 @@ int mlx4_qp_reserve_range(struct mlx4_de u64 out_param; int err; + /* Turn off all unsupported QP allocation flags */ + flags &= dev->caps.alloc_res_qp_mask; + if (mlx4_is_mfunc(dev)) { set_param_l(&in_param, (((u32) flags) << 24) | (u32) cnt); set_param_h(&in_param, align); Modified: stable/9/sys/ofed/drivers/net/mlx4/resource_tracker.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/resource_tracker.c Fri May 19 12:39:35 2017 (r318533) +++ stable/9/sys/ofed/drivers/net/mlx4/resource_tracker.c Fri May 19 12:42:33 2017 (r318534) @@ -1544,7 +1544,10 @@ static int qp_alloc_res(struct mlx4_dev switch (op) { case RES_OP_RESERVE: count = get_param_l(&in_param) & 0xffffff; - flags = get_param_l(&in_param) >> 24; + /* Turn off all unsupported QP allocation flags that the + * slave tries to set. + */ + flags = (get_param_l(&in_param) >> 24) & dev->caps.alloc_res_qp_mask; align = get_param_h(&in_param); err = mlx4_grant_resource(dev, slave, RES_QP, count, 0); if (err) Modified: stable/9/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/9/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:39:35 2017 (r318533) +++ stable/9/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:42:33 2017 (r318534) @@ -218,6 +218,23 @@ enum { }; enum { + MLX4_QUERY_FUNC_FLAGS_BF_RES_QP = 1LL << 0 +}; + +/* bit enums for an 8-bit flags field indicating special use + * QPs which require special handling in qp_reserve_range. + * Currently, this only includes QPs used by the ETH interface, + * where we expect to use blueflame. These QPs must not have + * bits 6 and 7 set in their qp number. + * + * This enum may use only bits 0..7. + */ +enum { + MLX4_RESERVE_ETH_BF_QP = 1 << 7, +}; + + +enum { MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 }; @@ -531,6 +548,7 @@ struct mlx4_caps { u32 max_basic_counters; u32 max_extended_counters; u8 def_counter_index[MLX4_MAX_PORTS + 1]; + u8 alloc_res_qp_mask; }; struct mlx4_buf_list { From owner-svn-src-all@freebsd.org Fri May 19 12:51:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15421D72C0F; Fri, 19 May 2017 12:51:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFA84F1B; Fri, 19 May 2017 12:51:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCpDUq015719; Fri, 19 May 2017 12:51:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCpDSF015622; Fri, 19 May 2017 12:51:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191251.v4JCpDSF015622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318535 - in stable/11/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:51:15 -0000 Author: hselasky Date: Fri May 19 12:51:13 2017 New Revision: 318535 URL: https://svnweb.freebsd.org/changeset/base/318535 Log: MFC r313555: Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs. Previously, the mlx4 driver queried the firmware in order to get the number of supported EQs. Under SRIOV, since this was done before the driver notified the firmware how many VFs it actually needs, the firmware had to take into account a worst case scenario and always allocated four EQs per VF, where one was used for events while the others were used for completions. Now, when the firmware supports the asymmetric allocation scheme, denoted by exposing num_sys_eqs > 0 (--> MLX4_DEV_CAP_FLAG2_SYS_EQS), we use the QUERY_FUNC command to query the firmware before enabling SRIOV. Thus we can get more EQs and MSI-X vectors per function. Moreover, when running in the new firmware/driver mode, the limitation that the number of EQs should be a power of two is lifted. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8867 Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/eq.c stable/11/sys/ofed/drivers/net/mlx4/fw.c stable/11/sys/ofed/drivers/net/mlx4/fw.h stable/11/sys/ofed/drivers/net/mlx4/main.c stable/11/sys/ofed/drivers/net/mlx4/profile.c stable/11/sys/ofed/include/linux/mlx4/device.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/eq.c Fri May 19 12:42:33 2017 (r318534) +++ stable/11/sys/ofed/drivers/net/mlx4/eq.c Fri May 19 12:51:13 2017 (r318535) @@ -1136,8 +1136,12 @@ int mlx4_init_eq_table(struct mlx4_dev * goto err_out_free; } - err = mlx4_bitmap_init(&priv->eq_table.bitmap, dev->caps.num_eqs, - dev->caps.num_eqs - 1, dev->caps.reserved_eqs, 0); + err = mlx4_bitmap_init(&priv->eq_table.bitmap, + roundup_pow_of_two(dev->caps.num_eqs), + dev->caps.num_eqs - 1, + dev->caps.reserved_eqs, + roundup_pow_of_two(dev->caps.num_eqs) - + dev->caps.num_eqs); if (err) goto err_out_free; Modified: stable/11/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:42:33 2017 (r318534) +++ stable/11/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:51:13 2017 (r318535) @@ -179,6 +179,60 @@ int mlx4_MOD_STAT_CFG(struct mlx4_dev *d return err; } +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave) +{ + struct mlx4_cmd_mailbox *mailbox; + u32 *outbox; + u8 in_modifier; + u8 field; + u16 field16; + int err; + +#define QUERY_FUNC_BUS_OFFSET 0x00 +#define QUERY_FUNC_DEVICE_OFFSET 0x01 +#define QUERY_FUNC_FUNCTION_OFFSET 0x01 +#define QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET 0x03 +#define QUERY_FUNC_RSVD_EQS_OFFSET 0x04 +#define QUERY_FUNC_MAX_EQ_OFFSET 0x06 +#define QUERY_FUNC_RSVD_UARS_OFFSET 0x0b + + mailbox = mlx4_alloc_cmd_mailbox(dev); + if (IS_ERR(mailbox)) + return PTR_ERR(mailbox); + outbox = mailbox->buf; + + in_modifier = slave; + + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, 0, + MLX4_CMD_QUERY_FUNC, + MLX4_CMD_TIME_CLASS_A, + MLX4_CMD_NATIVE); + if (err) + goto out; + + MLX4_GET(field, outbox, QUERY_FUNC_BUS_OFFSET); + func->bus = field & 0xf; + MLX4_GET(field, outbox, QUERY_FUNC_DEVICE_OFFSET); + func->device = field & 0xf1; + MLX4_GET(field, outbox, QUERY_FUNC_FUNCTION_OFFSET); + func->function = field & 0x7; + MLX4_GET(field, outbox, QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET); + func->physical_function = field & 0xf; + MLX4_GET(field16, outbox, QUERY_FUNC_RSVD_EQS_OFFSET); + func->rsvd_eqs = field16 & 0xffff; + MLX4_GET(field16, outbox, QUERY_FUNC_MAX_EQ_OFFSET); + func->max_eq = field16 & 0xffff; + MLX4_GET(field, outbox, QUERY_FUNC_RSVD_UARS_OFFSET); + func->rsvd_uars = field & 0x0f; + + mlx4_dbg(dev, "Bus: %d, Device: %d, Function: %d, Physical function: %d, Max EQs: %d, Reserved EQs: %d, Reserved UARs: %d\n", + func->bus, func->device, func->function, func->physical_function, + func->max_eq, func->rsvd_eqs, func->rsvd_uars); +out: + mlx4_free_cmd_mailbox(dev, mailbox); + return err; +} + int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, @@ -189,6 +243,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m u8 field, port; u32 size; int err = 0; + struct mlx4_func func; #define QUERY_FUNC_CAP_FLAGS_OFFSET 0x0 #define QUERY_FUNC_CAP_NUM_PORTS_OFFSET 0x1 @@ -236,6 +291,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_PROPS_DEF_COUNTER 0x20 #define QUERY_FUNC_CAP_RDMA_PROPS_FORCE_PHY_WQE_GID 0x80 +#define QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS (1 << 31) if (vhcr->op_modifier == 1) { port = vhcr->in_modifier; /* phys-port = logical-port */ @@ -298,11 +354,24 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m size = dev->caps.num_cqs; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_CQ_QUOTA_OFFSET_DEP); - size = dev->caps.num_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); - - size = dev->caps.reserved_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) || + mlx4_QUERY_FUNC(dev, &func, slave)) { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + dev->caps.num_eqs : + rounddown_pow_of_two(dev->caps.num_eqs); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = dev->caps.reserved_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } else { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + func.max_eq : + rounddown_pow_of_two(func.max_eq); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = func.rsvd_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } size = priv->mfunc.master.res_tracker.res_alloc[RES_MPT].quota[slave]; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MPT_QUOTA_OFFSET); @@ -334,14 +403,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev u8 field, op_modifier; u32 size; int err = 0, quotas = 0; + u32 in_modifier; op_modifier = !!gen_or_port; /* 0 = general, 1 = logical port */ + in_modifier = op_modifier ? gen_or_port : + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS; mailbox = mlx4_alloc_cmd_mailbox(dev); if (IS_ERR(mailbox)) return PTR_ERR(mailbox); - err = mlx4_cmd_box(dev, 0, mailbox->dma, gen_or_port, op_modifier, + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, op_modifier, MLX4_CMD_QUERY_FUNC_CAP, MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED); if (err) @@ -522,6 +594,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * #define QUERY_DEV_CAP_MAX_MRW_SZ_OFFSET 0x21 #define QUERY_DEV_CAP_RSVD_MRW_OFFSET 0x22 #define QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET 0x23 +#define QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET 0x26 #define QUERY_DEV_CAP_MAX_AV_OFFSET 0x27 #define QUERY_DEV_CAP_MAX_REQ_QP_OFFSET 0x29 #define QUERY_DEV_CAP_MAX_RES_QP_OFFSET 0x2b @@ -619,6 +692,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->reserved_mrws = 1 << (field & 0xf); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET); dev_cap->max_mtt_seg = 1 << (field & 0x3f); + MLX4_GET(size, outbox, QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET); + dev_cap->num_sys_eqs = size & 0xfff; MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_REQ_QP_OFFSET); dev_cap->max_requester_per_qp = 1 << (field & 0x3f); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_RES_QP_OFFSET); @@ -845,8 +920,11 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * * we can't use any EQs whose doorbell falls on that page, * even if the EQ itself isn't reserved. */ - dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, - dev_cap->reserved_eqs); + if (dev_cap->num_sys_eqs == 0) + dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, + dev_cap->reserved_eqs); + else + dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_SYS_EQS; mlx4_dbg(dev, "Max ICM size %lld MB\n", (unsigned long long) dev_cap->max_icm_sz >> 20); @@ -856,8 +934,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->max_srqs, dev_cap->reserved_srqs, dev_cap->srq_entry_sz); mlx4_dbg(dev, "Max CQs: %d, reserved CQs: %d, entry size: %d\n", dev_cap->max_cqs, dev_cap->reserved_cqs, dev_cap->cqc_entry_sz); - mlx4_dbg(dev, "Max EQs: %d, reserved EQs: %d, entry size: %d\n", - dev_cap->max_eqs, dev_cap->reserved_eqs, dev_cap->eqc_entry_sz); + mlx4_dbg(dev, "Num sys EQs: %d, max EQs: %d, reserved EQs: %d, entry size: %d\n", + dev_cap->num_sys_eqs, dev_cap->max_eqs, dev_cap->reserved_eqs, + dev_cap->eqc_entry_sz); mlx4_dbg(dev, "reserved MPTs: %d, reserved MTTs: %d\n", dev_cap->reserved_mrws, dev_cap->reserved_mtts); mlx4_dbg(dev, "Max PDs: %d, reserved PDs: %d, reserved UARs: %d\n", @@ -1359,6 +1438,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, #define INIT_HCA_AUXC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x50) #define INIT_HCA_EQC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x60) #define INIT_HCA_LOG_EQ_OFFSET (INIT_HCA_QPC_OFFSET + 0x67) +#define INIT_HCA_NUM_SYS_EQS_OFFSET (INIT_HCA_QPC_OFFSET + 0x6a) #define INIT_HCA_RDMARC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x70) #define INIT_HCA_LOG_RD_OFFSET (INIT_HCA_QPC_OFFSET + 0x77) #define INIT_HCA_MCAST_OFFSET 0x0c0 @@ -1467,6 +1547,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, MLX4_PUT(inbox, param->auxc_base, INIT_HCA_AUXC_BASE_OFFSET); MLX4_PUT(inbox, param->eqc_base, INIT_HCA_EQC_BASE_OFFSET); MLX4_PUT(inbox, param->log_num_eqs, INIT_HCA_LOG_EQ_OFFSET); + MLX4_PUT(inbox, param->num_sys_eqs, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_PUT(inbox, param->rdmarc_base, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_PUT(inbox, param->log_rd_per_qp, INIT_HCA_LOG_RD_OFFSET); @@ -1573,6 +1654,7 @@ int mlx4_QUERY_HCA(struct mlx4_dev *dev, MLX4_GET(param->auxc_base, outbox, INIT_HCA_AUXC_BASE_OFFSET); MLX4_GET(param->eqc_base, outbox, INIT_HCA_EQC_BASE_OFFSET); MLX4_GET(param->log_num_eqs, outbox, INIT_HCA_LOG_EQ_OFFSET); + MLX4_GET(param->num_sys_eqs, outbox, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_GET(param->rdmarc_base, outbox, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_GET(param->log_rd_per_qp, outbox, INIT_HCA_LOG_RD_OFFSET); Modified: stable/11/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:42:33 2017 (r318534) +++ stable/11/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:51:13 2017 (r318535) @@ -56,6 +56,7 @@ struct mlx4_dev_cap { int max_mpts; int reserved_eqs; int max_eqs; + int num_sys_eqs; int reserved_mtts; int max_mrw_sz; int reserved_mrws; @@ -147,6 +148,16 @@ struct mlx4_func_cap { u8 extra_flags; }; +struct mlx4_func { + int bus; + int device; + int function; + int physical_function; + int rsvd_eqs; + int max_eq; + int rsvd_uars; +}; + struct mlx4_adapter { u16 vsd_vendor_id; char board_id[MLX4_BOARD_ID_LEN]; @@ -174,6 +185,7 @@ struct mlx4_init_hca_param { u8 log_num_srqs; u8 log_num_cqs; u8 log_num_eqs; + u16 num_sys_eqs; u8 log_rd_per_qp; u8 log_mc_table_sz; u8 log_mpt_sz; @@ -226,6 +238,7 @@ int mlx4_map_cmd(struct mlx4_dev *dev, u int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages); int mlx4_NOP(struct mlx4_dev *dev); int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg); +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave); void mlx4_opreq_action(struct work_struct *work); #endif /* MLX4_FW_H */ Modified: stable/11/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:42:33 2017 (r318534) +++ stable/11/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:51:13 2017 (r318535) @@ -590,6 +590,29 @@ static void mlx4_set_port_mask(struct ml dev->caps.port_mask[i] = dev->caps.port_type[i]; } +enum { + MLX4_QUERY_FUNC_NUM_SYS_EQS = 1 << 0, +}; + +static int mlx4_query_func(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) +{ + int err = 0; + struct mlx4_func func; + + if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_QUERY_FUNC(dev, &func, 0); + if (err) { + mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting.\n"); + return err; + } + dev_cap->max_eqs = func.max_eq; + dev_cap->reserved_eqs = func.rsvd_eqs; + dev_cap->reserved_uars = func.rsvd_uars; + err |= MLX4_QUERY_FUNC_NUM_SYS_EQS; + } + return err; +} + static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) { int err; @@ -623,7 +646,10 @@ static int mlx4_dev_cap(struct mlx4_dev } dev->caps.num_ports = dev_cap->num_ports; - dev->phys_caps.num_phys_eqs = MLX4_MAX_EQ_NUM; + dev->caps.num_sys_eqs = dev_cap->num_sys_eqs; + dev->phys_caps.num_phys_eqs = dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS ? + dev->caps.num_sys_eqs : + MLX4_MAX_EQ_NUM; for (i = 1; i <= dev->caps.num_ports; ++i) { dev->caps.vl_cap[i] = dev_cap->max_vl[i]; dev->caps.ib_mtu_cap[i] = dev_cap->ib_mtu[i]; @@ -1474,8 +1500,7 @@ static int mlx4_init_cmpt_table(struct m if (err) goto err_srq; - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.cmpt_table, cmpt_base + ((u64) (MLX4_CMPT_TYPE_EQ * @@ -1537,8 +1562,7 @@ static int mlx4_init_icm(struct mlx4_dev } - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.table, init_hca->eqc_base, dev_cap->eqc_entry_sz, num_eqs, num_eqs, 0, 0); @@ -2074,6 +2098,18 @@ static int mlx4_init_hca(struct mlx4_dev goto err_free_icm; } + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_query_func(dev, dev_cap); + if (err < 0) { + mlx4_err(dev, "QUERY_FUNC command failed, aborting.\n"); + goto err_stop_fw; + } else if (err & MLX4_QUERY_FUNC_NUM_SYS_EQS) { + dev->caps.num_eqs = dev_cap->max_eqs; + dev->caps.reserved_eqs = dev_cap->reserved_eqs; + dev->caps.reserved_uars = dev_cap->reserved_uars; + } + } + /* * Read HCA frequency by QUERY_HCA command */ @@ -2914,13 +2950,12 @@ static void mlx4_enable_msi_x(struct mlx { struct mlx4_priv *priv = mlx4_priv(dev); struct msix_entry *entries; - int nreq = min_t(int, dev->caps.num_ports * - min_t(int, num_possible_cpus() + 1, MAX_MSIX_P_PORT) - + MSIX_LEGACY_SZ, MAX_MSIX); int err; int i; if (msi_x) { + int nreq = dev->caps.num_ports * num_online_cpus() + MSIX_LEGACY_SZ; + nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, nreq); Modified: stable/11/sys/ofed/drivers/net/mlx4/profile.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/profile.c Fri May 19 12:42:33 2017 (r318534) +++ stable/11/sys/ofed/drivers/net/mlx4/profile.c Fri May 19 12:51:13 2017 (r318535) @@ -199,10 +199,17 @@ u64 mlx4_make_profile(struct mlx4_dev *d init_hca->log_num_cqs = profile[i].log_num; break; case MLX4_RES_EQ: - dev->caps.num_eqs = roundup_pow_of_two(min_t(unsigned, dev_cap->max_eqs, - MAX_MSIX)); - init_hca->eqc_base = profile[i].start; - init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + init_hca->log_num_eqs = 0x1f; + init_hca->eqc_base = profile[i].start; + init_hca->num_sys_eqs = dev_cap->num_sys_eqs; + } else { + dev->caps.num_eqs = roundup_pow_of_two( + min_t(unsigned, + dev_cap->max_eqs, MAX_MSIX)); + init_hca->eqc_base = profile[i].start; + init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + } break; case MLX4_RES_DMPT: dev->caps.num_mpts = profile[i].num; Modified: stable/11/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/11/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:42:33 2017 (r318534) +++ stable/11/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:51:13 2017 (r318535) @@ -199,6 +199,7 @@ enum { MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, + MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 26, }; /* bit enums for an 8-bit flags field indicating special use @@ -490,6 +491,7 @@ struct mlx4_caps { int num_cqs; int max_cqes; int reserved_cqs; + int num_sys_eqs; int num_eqs; int reserved_eqs; int num_comp_vectors; From owner-svn-src-all@freebsd.org Fri May 19 12:53:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 399AED72CF5; Fri, 19 May 2017 12:53:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A6641195; Fri, 19 May 2017 12:53:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCrpSS017361; Fri, 19 May 2017 12:53:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCrooQ017354; Fri, 19 May 2017 12:53:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191253.v4JCrooQ017354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318536 - in stable/10/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:53:52 -0000 Author: hselasky Date: Fri May 19 12:53:50 2017 New Revision: 318536 URL: https://svnweb.freebsd.org/changeset/base/318536 Log: MFC r313555: Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs. Previously, the mlx4 driver queried the firmware in order to get the number of supported EQs. Under SRIOV, since this was done before the driver notified the firmware how many VFs it actually needs, the firmware had to take into account a worst case scenario and always allocated four EQs per VF, where one was used for events while the others were used for completions. Now, when the firmware supports the asymmetric allocation scheme, denoted by exposing num_sys_eqs > 0 (--> MLX4_DEV_CAP_FLAG2_SYS_EQS), we use the QUERY_FUNC command to query the firmware before enabling SRIOV. Thus we can get more EQs and MSI-X vectors per function. Moreover, when running in the new firmware/driver mode, the limitation that the number of EQs should be a power of two is lifted. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8867 Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c stable/10/sys/ofed/drivers/net/mlx4/fw.c stable/10/sys/ofed/drivers/net/mlx4/fw.h stable/10/sys/ofed/drivers/net/mlx4/main.c stable/10/sys/ofed/drivers/net/mlx4/profile.c stable/10/sys/ofed/include/linux/mlx4/device.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/eq.c Fri May 19 12:51:13 2017 (r318535) +++ stable/10/sys/ofed/drivers/net/mlx4/eq.c Fri May 19 12:53:50 2017 (r318536) @@ -1136,8 +1136,12 @@ int mlx4_init_eq_table(struct mlx4_dev * goto err_out_free; } - err = mlx4_bitmap_init(&priv->eq_table.bitmap, dev->caps.num_eqs, - dev->caps.num_eqs - 1, dev->caps.reserved_eqs, 0); + err = mlx4_bitmap_init(&priv->eq_table.bitmap, + roundup_pow_of_two(dev->caps.num_eqs), + dev->caps.num_eqs - 1, + dev->caps.reserved_eqs, + roundup_pow_of_two(dev->caps.num_eqs) - + dev->caps.num_eqs); if (err) goto err_out_free; Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:51:13 2017 (r318535) +++ stable/10/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:53:50 2017 (r318536) @@ -177,6 +177,60 @@ int mlx4_MOD_STAT_CFG(struct mlx4_dev *d return err; } +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave) +{ + struct mlx4_cmd_mailbox *mailbox; + u32 *outbox; + u8 in_modifier; + u8 field; + u16 field16; + int err; + +#define QUERY_FUNC_BUS_OFFSET 0x00 +#define QUERY_FUNC_DEVICE_OFFSET 0x01 +#define QUERY_FUNC_FUNCTION_OFFSET 0x01 +#define QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET 0x03 +#define QUERY_FUNC_RSVD_EQS_OFFSET 0x04 +#define QUERY_FUNC_MAX_EQ_OFFSET 0x06 +#define QUERY_FUNC_RSVD_UARS_OFFSET 0x0b + + mailbox = mlx4_alloc_cmd_mailbox(dev); + if (IS_ERR(mailbox)) + return PTR_ERR(mailbox); + outbox = mailbox->buf; + + in_modifier = slave; + + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, 0, + MLX4_CMD_QUERY_FUNC, + MLX4_CMD_TIME_CLASS_A, + MLX4_CMD_NATIVE); + if (err) + goto out; + + MLX4_GET(field, outbox, QUERY_FUNC_BUS_OFFSET); + func->bus = field & 0xf; + MLX4_GET(field, outbox, QUERY_FUNC_DEVICE_OFFSET); + func->device = field & 0xf1; + MLX4_GET(field, outbox, QUERY_FUNC_FUNCTION_OFFSET); + func->function = field & 0x7; + MLX4_GET(field, outbox, QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET); + func->physical_function = field & 0xf; + MLX4_GET(field16, outbox, QUERY_FUNC_RSVD_EQS_OFFSET); + func->rsvd_eqs = field16 & 0xffff; + MLX4_GET(field16, outbox, QUERY_FUNC_MAX_EQ_OFFSET); + func->max_eq = field16 & 0xffff; + MLX4_GET(field, outbox, QUERY_FUNC_RSVD_UARS_OFFSET); + func->rsvd_uars = field & 0x0f; + + mlx4_dbg(dev, "Bus: %d, Device: %d, Function: %d, Physical function: %d, Max EQs: %d, Reserved EQs: %d, Reserved UARs: %d\n", + func->bus, func->device, func->function, func->physical_function, + func->max_eq, func->rsvd_eqs, func->rsvd_uars); +out: + mlx4_free_cmd_mailbox(dev, mailbox); + return err; +} + int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, @@ -187,6 +241,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m u8 field, port; u32 size; int err = 0; + struct mlx4_func func; #define QUERY_FUNC_CAP_FLAGS_OFFSET 0x0 #define QUERY_FUNC_CAP_NUM_PORTS_OFFSET 0x1 @@ -234,6 +289,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_PROPS_DEF_COUNTER 0x20 #define QUERY_FUNC_CAP_RDMA_PROPS_FORCE_PHY_WQE_GID 0x80 +#define QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS (1 << 31) if (vhcr->op_modifier == 1) { port = vhcr->in_modifier; /* phys-port = logical-port */ @@ -296,11 +352,24 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m size = dev->caps.num_cqs; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_CQ_QUOTA_OFFSET_DEP); - size = dev->caps.num_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); - - size = dev->caps.reserved_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) || + mlx4_QUERY_FUNC(dev, &func, slave)) { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + dev->caps.num_eqs : + rounddown_pow_of_two(dev->caps.num_eqs); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = dev->caps.reserved_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } else { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + func.max_eq : + rounddown_pow_of_two(func.max_eq); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = func.rsvd_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } size = priv->mfunc.master.res_tracker.res_alloc[RES_MPT].quota[slave]; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MPT_QUOTA_OFFSET); @@ -332,14 +401,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev u8 field, op_modifier; u32 size; int err = 0, quotas = 0; + u32 in_modifier; op_modifier = !!gen_or_port; /* 0 = general, 1 = logical port */ + in_modifier = op_modifier ? gen_or_port : + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS; mailbox = mlx4_alloc_cmd_mailbox(dev); if (IS_ERR(mailbox)) return PTR_ERR(mailbox); - err = mlx4_cmd_box(dev, 0, mailbox->dma, gen_or_port, op_modifier, + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, op_modifier, MLX4_CMD_QUERY_FUNC_CAP, MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED); if (err) @@ -520,6 +592,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * #define QUERY_DEV_CAP_MAX_MRW_SZ_OFFSET 0x21 #define QUERY_DEV_CAP_RSVD_MRW_OFFSET 0x22 #define QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET 0x23 +#define QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET 0x26 #define QUERY_DEV_CAP_MAX_AV_OFFSET 0x27 #define QUERY_DEV_CAP_MAX_REQ_QP_OFFSET 0x29 #define QUERY_DEV_CAP_MAX_RES_QP_OFFSET 0x2b @@ -617,6 +690,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->reserved_mrws = 1 << (field & 0xf); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET); dev_cap->max_mtt_seg = 1 << (field & 0x3f); + MLX4_GET(size, outbox, QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET); + dev_cap->num_sys_eqs = size & 0xfff; MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_REQ_QP_OFFSET); dev_cap->max_requester_per_qp = 1 << (field & 0x3f); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_RES_QP_OFFSET); @@ -843,8 +918,11 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * * we can't use any EQs whose doorbell falls on that page, * even if the EQ itself isn't reserved. */ - dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, - dev_cap->reserved_eqs); + if (dev_cap->num_sys_eqs == 0) + dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, + dev_cap->reserved_eqs); + else + dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_SYS_EQS; mlx4_dbg(dev, "Max ICM size %lld MB\n", (unsigned long long) dev_cap->max_icm_sz >> 20); @@ -854,8 +932,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->max_srqs, dev_cap->reserved_srqs, dev_cap->srq_entry_sz); mlx4_dbg(dev, "Max CQs: %d, reserved CQs: %d, entry size: %d\n", dev_cap->max_cqs, dev_cap->reserved_cqs, dev_cap->cqc_entry_sz); - mlx4_dbg(dev, "Max EQs: %d, reserved EQs: %d, entry size: %d\n", - dev_cap->max_eqs, dev_cap->reserved_eqs, dev_cap->eqc_entry_sz); + mlx4_dbg(dev, "Num sys EQs: %d, max EQs: %d, reserved EQs: %d, entry size: %d\n", + dev_cap->num_sys_eqs, dev_cap->max_eqs, dev_cap->reserved_eqs, + dev_cap->eqc_entry_sz); mlx4_dbg(dev, "reserved MPTs: %d, reserved MTTs: %d\n", dev_cap->reserved_mrws, dev_cap->reserved_mtts); mlx4_dbg(dev, "Max PDs: %d, reserved PDs: %d, reserved UARs: %d\n", @@ -1357,6 +1436,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, #define INIT_HCA_AUXC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x50) #define INIT_HCA_EQC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x60) #define INIT_HCA_LOG_EQ_OFFSET (INIT_HCA_QPC_OFFSET + 0x67) +#define INIT_HCA_NUM_SYS_EQS_OFFSET (INIT_HCA_QPC_OFFSET + 0x6a) #define INIT_HCA_RDMARC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x70) #define INIT_HCA_LOG_RD_OFFSET (INIT_HCA_QPC_OFFSET + 0x77) #define INIT_HCA_MCAST_OFFSET 0x0c0 @@ -1465,6 +1545,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, MLX4_PUT(inbox, param->auxc_base, INIT_HCA_AUXC_BASE_OFFSET); MLX4_PUT(inbox, param->eqc_base, INIT_HCA_EQC_BASE_OFFSET); MLX4_PUT(inbox, param->log_num_eqs, INIT_HCA_LOG_EQ_OFFSET); + MLX4_PUT(inbox, param->num_sys_eqs, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_PUT(inbox, param->rdmarc_base, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_PUT(inbox, param->log_rd_per_qp, INIT_HCA_LOG_RD_OFFSET); @@ -1571,6 +1652,7 @@ int mlx4_QUERY_HCA(struct mlx4_dev *dev, MLX4_GET(param->auxc_base, outbox, INIT_HCA_AUXC_BASE_OFFSET); MLX4_GET(param->eqc_base, outbox, INIT_HCA_EQC_BASE_OFFSET); MLX4_GET(param->log_num_eqs, outbox, INIT_HCA_LOG_EQ_OFFSET); + MLX4_GET(param->num_sys_eqs, outbox, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_GET(param->rdmarc_base, outbox, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_GET(param->log_rd_per_qp, outbox, INIT_HCA_LOG_RD_OFFSET); Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:51:13 2017 (r318535) +++ stable/10/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:53:50 2017 (r318536) @@ -56,6 +56,7 @@ struct mlx4_dev_cap { int max_mpts; int reserved_eqs; int max_eqs; + int num_sys_eqs; int reserved_mtts; int max_mrw_sz; int reserved_mrws; @@ -147,6 +148,16 @@ struct mlx4_func_cap { u8 extra_flags; }; +struct mlx4_func { + int bus; + int device; + int function; + int physical_function; + int rsvd_eqs; + int max_eq; + int rsvd_uars; +}; + struct mlx4_adapter { u16 vsd_vendor_id; char board_id[MLX4_BOARD_ID_LEN]; @@ -174,6 +185,7 @@ struct mlx4_init_hca_param { u8 log_num_srqs; u8 log_num_cqs; u8 log_num_eqs; + u16 num_sys_eqs; u8 log_rd_per_qp; u8 log_mc_table_sz; u8 log_mpt_sz; @@ -226,6 +238,7 @@ int mlx4_map_cmd(struct mlx4_dev *dev, u int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages); int mlx4_NOP(struct mlx4_dev *dev); int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg); +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave); void mlx4_opreq_action(struct work_struct *work); #endif /* MLX4_FW_H */ Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:51:13 2017 (r318535) +++ stable/10/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:53:50 2017 (r318536) @@ -592,6 +592,29 @@ static void mlx4_set_port_mask(struct ml dev->caps.port_mask[i] = dev->caps.port_type[i]; } +enum { + MLX4_QUERY_FUNC_NUM_SYS_EQS = 1 << 0, +}; + +static int mlx4_query_func(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) +{ + int err = 0; + struct mlx4_func func; + + if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_QUERY_FUNC(dev, &func, 0); + if (err) { + mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting.\n"); + return err; + } + dev_cap->max_eqs = func.max_eq; + dev_cap->reserved_eqs = func.rsvd_eqs; + dev_cap->reserved_uars = func.rsvd_uars; + err |= MLX4_QUERY_FUNC_NUM_SYS_EQS; + } + return err; +} + static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) { int err; @@ -625,7 +648,10 @@ static int mlx4_dev_cap(struct mlx4_dev } dev->caps.num_ports = dev_cap->num_ports; - dev->phys_caps.num_phys_eqs = MLX4_MAX_EQ_NUM; + dev->caps.num_sys_eqs = dev_cap->num_sys_eqs; + dev->phys_caps.num_phys_eqs = dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS ? + dev->caps.num_sys_eqs : + MLX4_MAX_EQ_NUM; for (i = 1; i <= dev->caps.num_ports; ++i) { dev->caps.vl_cap[i] = dev_cap->max_vl[i]; dev->caps.ib_mtu_cap[i] = dev_cap->ib_mtu[i]; @@ -1476,8 +1502,7 @@ static int mlx4_init_cmpt_table(struct m if (err) goto err_srq; - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.cmpt_table, cmpt_base + ((u64) (MLX4_CMPT_TYPE_EQ * @@ -1539,8 +1564,7 @@ static int mlx4_init_icm(struct mlx4_dev } - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.table, init_hca->eqc_base, dev_cap->eqc_entry_sz, num_eqs, num_eqs, 0, 0); @@ -2076,6 +2100,18 @@ static int mlx4_init_hca(struct mlx4_dev goto err_free_icm; } + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_query_func(dev, dev_cap); + if (err < 0) { + mlx4_err(dev, "QUERY_FUNC command failed, aborting.\n"); + goto err_stop_fw; + } else if (err & MLX4_QUERY_FUNC_NUM_SYS_EQS) { + dev->caps.num_eqs = dev_cap->max_eqs; + dev->caps.reserved_eqs = dev_cap->reserved_eqs; + dev->caps.reserved_uars = dev_cap->reserved_uars; + } + } + /* * Read HCA frequency by QUERY_HCA command */ @@ -2916,13 +2952,12 @@ static void mlx4_enable_msi_x(struct mlx { struct mlx4_priv *priv = mlx4_priv(dev); struct msix_entry *entries; - int nreq = min_t(int, dev->caps.num_ports * - min_t(int, num_possible_cpus() + 1, MAX_MSIX_P_PORT) - + MSIX_LEGACY_SZ, MAX_MSIX); int err; int i; if (msi_x) { + int nreq = dev->caps.num_ports * num_online_cpus() + MSIX_LEGACY_SZ; + nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, nreq); Modified: stable/10/sys/ofed/drivers/net/mlx4/profile.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/profile.c Fri May 19 12:51:13 2017 (r318535) +++ stable/10/sys/ofed/drivers/net/mlx4/profile.c Fri May 19 12:53:50 2017 (r318536) @@ -199,10 +199,17 @@ u64 mlx4_make_profile(struct mlx4_dev *d init_hca->log_num_cqs = profile[i].log_num; break; case MLX4_RES_EQ: - dev->caps.num_eqs = roundup_pow_of_two(min_t(unsigned, dev_cap->max_eqs, - MAX_MSIX)); - init_hca->eqc_base = profile[i].start; - init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + init_hca->log_num_eqs = 0x1f; + init_hca->eqc_base = profile[i].start; + init_hca->num_sys_eqs = dev_cap->num_sys_eqs; + } else { + dev->caps.num_eqs = roundup_pow_of_two( + min_t(unsigned, + dev_cap->max_eqs, MAX_MSIX)); + init_hca->eqc_base = profile[i].start; + init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + } break; case MLX4_RES_DMPT: dev->caps.num_mpts = profile[i].num; Modified: stable/10/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/10/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:51:13 2017 (r318535) +++ stable/10/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:53:50 2017 (r318536) @@ -199,6 +199,7 @@ enum { MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, + MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 26, }; /* bit enums for an 8-bit flags field indicating special use @@ -490,6 +491,7 @@ struct mlx4_caps { int num_cqs; int max_cqes; int reserved_cqs; + int num_sys_eqs; int num_eqs; int reserved_eqs; int num_comp_vectors; From owner-svn-src-all@freebsd.org Fri May 19 12:56:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74F4BD72D99; Fri, 19 May 2017 12:56:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45CBC134E; Fri, 19 May 2017 12:56:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCuJLx017548; Fri, 19 May 2017 12:56:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCuIjt017542; Fri, 19 May 2017 12:56:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191256.v4JCuIjt017542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r318537 - in stable/9/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:56:20 -0000 Author: hselasky Date: Fri May 19 12:56:18 2017 New Revision: 318537 URL: https://svnweb.freebsd.org/changeset/base/318537 Log: MFC r313555: Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs. Previously, the mlx4 driver queried the firmware in order to get the number of supported EQs. Under SRIOV, since this was done before the driver notified the firmware how many VFs it actually needs, the firmware had to take into account a worst case scenario and always allocated four EQs per VF, where one was used for events while the others were used for completions. Now, when the firmware supports the asymmetric allocation scheme, denoted by exposing num_sys_eqs > 0 (--> MLX4_DEV_CAP_FLAG2_SYS_EQS), we use the QUERY_FUNC command to query the firmware before enabling SRIOV. Thus we can get more EQs and MSI-X vectors per function. Moreover, when running in the new firmware/driver mode, the limitation that the number of EQs should be a power of two is lifted. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8867 Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/eq.c stable/9/sys/ofed/drivers/net/mlx4/fw.c stable/9/sys/ofed/drivers/net/mlx4/fw.h stable/9/sys/ofed/drivers/net/mlx4/main.c stable/9/sys/ofed/drivers/net/mlx4/profile.c stable/9/sys/ofed/include/linux/mlx4/device.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/eq.c Fri May 19 12:53:50 2017 (r318536) +++ stable/9/sys/ofed/drivers/net/mlx4/eq.c Fri May 19 12:56:18 2017 (r318537) @@ -1136,8 +1136,12 @@ int mlx4_init_eq_table(struct mlx4_dev * goto err_out_free; } - err = mlx4_bitmap_init(&priv->eq_table.bitmap, dev->caps.num_eqs, - dev->caps.num_eqs - 1, dev->caps.reserved_eqs, 0); + err = mlx4_bitmap_init(&priv->eq_table.bitmap, + roundup_pow_of_two(dev->caps.num_eqs), + dev->caps.num_eqs - 1, + dev->caps.reserved_eqs, + roundup_pow_of_two(dev->caps.num_eqs) - + dev->caps.num_eqs); if (err) goto err_out_free; Modified: stable/9/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:53:50 2017 (r318536) +++ stable/9/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:56:18 2017 (r318537) @@ -177,6 +177,60 @@ int mlx4_MOD_STAT_CFG(struct mlx4_dev *d return err; } +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave) +{ + struct mlx4_cmd_mailbox *mailbox; + u32 *outbox; + u8 in_modifier; + u8 field; + u16 field16; + int err; + +#define QUERY_FUNC_BUS_OFFSET 0x00 +#define QUERY_FUNC_DEVICE_OFFSET 0x01 +#define QUERY_FUNC_FUNCTION_OFFSET 0x01 +#define QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET 0x03 +#define QUERY_FUNC_RSVD_EQS_OFFSET 0x04 +#define QUERY_FUNC_MAX_EQ_OFFSET 0x06 +#define QUERY_FUNC_RSVD_UARS_OFFSET 0x0b + + mailbox = mlx4_alloc_cmd_mailbox(dev); + if (IS_ERR(mailbox)) + return PTR_ERR(mailbox); + outbox = mailbox->buf; + + in_modifier = slave; + + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, 0, + MLX4_CMD_QUERY_FUNC, + MLX4_CMD_TIME_CLASS_A, + MLX4_CMD_NATIVE); + if (err) + goto out; + + MLX4_GET(field, outbox, QUERY_FUNC_BUS_OFFSET); + func->bus = field & 0xf; + MLX4_GET(field, outbox, QUERY_FUNC_DEVICE_OFFSET); + func->device = field & 0xf1; + MLX4_GET(field, outbox, QUERY_FUNC_FUNCTION_OFFSET); + func->function = field & 0x7; + MLX4_GET(field, outbox, QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET); + func->physical_function = field & 0xf; + MLX4_GET(field16, outbox, QUERY_FUNC_RSVD_EQS_OFFSET); + func->rsvd_eqs = field16 & 0xffff; + MLX4_GET(field16, outbox, QUERY_FUNC_MAX_EQ_OFFSET); + func->max_eq = field16 & 0xffff; + MLX4_GET(field, outbox, QUERY_FUNC_RSVD_UARS_OFFSET); + func->rsvd_uars = field & 0x0f; + + mlx4_dbg(dev, "Bus: %d, Device: %d, Function: %d, Physical function: %d, Max EQs: %d, Reserved EQs: %d, Reserved UARs: %d\n", + func->bus, func->device, func->function, func->physical_function, + func->max_eq, func->rsvd_eqs, func->rsvd_uars); +out: + mlx4_free_cmd_mailbox(dev, mailbox); + return err; +} + int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, @@ -187,6 +241,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m u8 field, port; u32 size; int err = 0; + struct mlx4_func func; #define QUERY_FUNC_CAP_FLAGS_OFFSET 0x0 #define QUERY_FUNC_CAP_NUM_PORTS_OFFSET 0x1 @@ -234,6 +289,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_PROPS_DEF_COUNTER 0x20 #define QUERY_FUNC_CAP_RDMA_PROPS_FORCE_PHY_WQE_GID 0x80 +#define QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS (1 << 31) if (vhcr->op_modifier == 1) { port = vhcr->in_modifier; /* phys-port = logical-port */ @@ -296,11 +352,24 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m size = dev->caps.num_cqs; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_CQ_QUOTA_OFFSET_DEP); - size = dev->caps.num_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); - - size = dev->caps.reserved_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) || + mlx4_QUERY_FUNC(dev, &func, slave)) { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + dev->caps.num_eqs : + rounddown_pow_of_two(dev->caps.num_eqs); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = dev->caps.reserved_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } else { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + func.max_eq : + rounddown_pow_of_two(func.max_eq); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = func.rsvd_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } size = priv->mfunc.master.res_tracker.res_alloc[RES_MPT].quota[slave]; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MPT_QUOTA_OFFSET); @@ -332,14 +401,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev u8 field, op_modifier; u32 size; int err = 0, quotas = 0; + u32 in_modifier; op_modifier = !!gen_or_port; /* 0 = general, 1 = logical port */ + in_modifier = op_modifier ? gen_or_port : + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS; mailbox = mlx4_alloc_cmd_mailbox(dev); if (IS_ERR(mailbox)) return PTR_ERR(mailbox); - err = mlx4_cmd_box(dev, 0, mailbox->dma, gen_or_port, op_modifier, + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, op_modifier, MLX4_CMD_QUERY_FUNC_CAP, MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED); if (err) @@ -520,6 +592,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * #define QUERY_DEV_CAP_MAX_MRW_SZ_OFFSET 0x21 #define QUERY_DEV_CAP_RSVD_MRW_OFFSET 0x22 #define QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET 0x23 +#define QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET 0x26 #define QUERY_DEV_CAP_MAX_AV_OFFSET 0x27 #define QUERY_DEV_CAP_MAX_REQ_QP_OFFSET 0x29 #define QUERY_DEV_CAP_MAX_RES_QP_OFFSET 0x2b @@ -617,6 +690,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->reserved_mrws = 1 << (field & 0xf); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET); dev_cap->max_mtt_seg = 1 << (field & 0x3f); + MLX4_GET(size, outbox, QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET); + dev_cap->num_sys_eqs = size & 0xfff; MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_REQ_QP_OFFSET); dev_cap->max_requester_per_qp = 1 << (field & 0x3f); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_RES_QP_OFFSET); @@ -843,8 +918,11 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * * we can't use any EQs whose doorbell falls on that page, * even if the EQ itself isn't reserved. */ - dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, - dev_cap->reserved_eqs); + if (dev_cap->num_sys_eqs == 0) + dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, + dev_cap->reserved_eqs); + else + dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_SYS_EQS; mlx4_dbg(dev, "Max ICM size %lld MB\n", (unsigned long long) dev_cap->max_icm_sz >> 20); @@ -854,8 +932,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->max_srqs, dev_cap->reserved_srqs, dev_cap->srq_entry_sz); mlx4_dbg(dev, "Max CQs: %d, reserved CQs: %d, entry size: %d\n", dev_cap->max_cqs, dev_cap->reserved_cqs, dev_cap->cqc_entry_sz); - mlx4_dbg(dev, "Max EQs: %d, reserved EQs: %d, entry size: %d\n", - dev_cap->max_eqs, dev_cap->reserved_eqs, dev_cap->eqc_entry_sz); + mlx4_dbg(dev, "Num sys EQs: %d, max EQs: %d, reserved EQs: %d, entry size: %d\n", + dev_cap->num_sys_eqs, dev_cap->max_eqs, dev_cap->reserved_eqs, + dev_cap->eqc_entry_sz); mlx4_dbg(dev, "reserved MPTs: %d, reserved MTTs: %d\n", dev_cap->reserved_mrws, dev_cap->reserved_mtts); mlx4_dbg(dev, "Max PDs: %d, reserved PDs: %d, reserved UARs: %d\n", @@ -1357,6 +1436,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, #define INIT_HCA_AUXC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x50) #define INIT_HCA_EQC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x60) #define INIT_HCA_LOG_EQ_OFFSET (INIT_HCA_QPC_OFFSET + 0x67) +#define INIT_HCA_NUM_SYS_EQS_OFFSET (INIT_HCA_QPC_OFFSET + 0x6a) #define INIT_HCA_RDMARC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x70) #define INIT_HCA_LOG_RD_OFFSET (INIT_HCA_QPC_OFFSET + 0x77) #define INIT_HCA_MCAST_OFFSET 0x0c0 @@ -1465,6 +1545,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, MLX4_PUT(inbox, param->auxc_base, INIT_HCA_AUXC_BASE_OFFSET); MLX4_PUT(inbox, param->eqc_base, INIT_HCA_EQC_BASE_OFFSET); MLX4_PUT(inbox, param->log_num_eqs, INIT_HCA_LOG_EQ_OFFSET); + MLX4_PUT(inbox, param->num_sys_eqs, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_PUT(inbox, param->rdmarc_base, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_PUT(inbox, param->log_rd_per_qp, INIT_HCA_LOG_RD_OFFSET); @@ -1571,6 +1652,7 @@ int mlx4_QUERY_HCA(struct mlx4_dev *dev, MLX4_GET(param->auxc_base, outbox, INIT_HCA_AUXC_BASE_OFFSET); MLX4_GET(param->eqc_base, outbox, INIT_HCA_EQC_BASE_OFFSET); MLX4_GET(param->log_num_eqs, outbox, INIT_HCA_LOG_EQ_OFFSET); + MLX4_GET(param->num_sys_eqs, outbox, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_GET(param->rdmarc_base, outbox, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_GET(param->log_rd_per_qp, outbox, INIT_HCA_LOG_RD_OFFSET); Modified: stable/9/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:53:50 2017 (r318536) +++ stable/9/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:56:18 2017 (r318537) @@ -56,6 +56,7 @@ struct mlx4_dev_cap { int max_mpts; int reserved_eqs; int max_eqs; + int num_sys_eqs; int reserved_mtts; int max_mrw_sz; int reserved_mrws; @@ -147,6 +148,16 @@ struct mlx4_func_cap { u8 extra_flags; }; +struct mlx4_func { + int bus; + int device; + int function; + int physical_function; + int rsvd_eqs; + int max_eq; + int rsvd_uars; +}; + struct mlx4_adapter { u16 vsd_vendor_id; char board_id[MLX4_BOARD_ID_LEN]; @@ -174,6 +185,7 @@ struct mlx4_init_hca_param { u8 log_num_srqs; u8 log_num_cqs; u8 log_num_eqs; + u16 num_sys_eqs; u8 log_rd_per_qp; u8 log_mc_table_sz; u8 log_mpt_sz; @@ -226,6 +238,7 @@ int mlx4_map_cmd(struct mlx4_dev *dev, u int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages); int mlx4_NOP(struct mlx4_dev *dev); int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg); +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave); void mlx4_opreq_action(struct work_struct *work); #endif /* MLX4_FW_H */ Modified: stable/9/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:53:50 2017 (r318536) +++ stable/9/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:56:18 2017 (r318537) @@ -592,6 +592,29 @@ static void mlx4_set_port_mask(struct ml dev->caps.port_mask[i] = dev->caps.port_type[i]; } +enum { + MLX4_QUERY_FUNC_NUM_SYS_EQS = 1 << 0, +}; + +static int mlx4_query_func(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) +{ + int err = 0; + struct mlx4_func func; + + if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_QUERY_FUNC(dev, &func, 0); + if (err) { + mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting.\n"); + return err; + } + dev_cap->max_eqs = func.max_eq; + dev_cap->reserved_eqs = func.rsvd_eqs; + dev_cap->reserved_uars = func.rsvd_uars; + err |= MLX4_QUERY_FUNC_NUM_SYS_EQS; + } + return err; +} + static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) { int err; @@ -625,7 +648,10 @@ static int mlx4_dev_cap(struct mlx4_dev } dev->caps.num_ports = dev_cap->num_ports; - dev->phys_caps.num_phys_eqs = MLX4_MAX_EQ_NUM; + dev->caps.num_sys_eqs = dev_cap->num_sys_eqs; + dev->phys_caps.num_phys_eqs = dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS ? + dev->caps.num_sys_eqs : + MLX4_MAX_EQ_NUM; for (i = 1; i <= dev->caps.num_ports; ++i) { dev->caps.vl_cap[i] = dev_cap->max_vl[i]; dev->caps.ib_mtu_cap[i] = dev_cap->ib_mtu[i]; @@ -1476,8 +1502,7 @@ static int mlx4_init_cmpt_table(struct m if (err) goto err_srq; - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.cmpt_table, cmpt_base + ((u64) (MLX4_CMPT_TYPE_EQ * @@ -1539,8 +1564,7 @@ static int mlx4_init_icm(struct mlx4_dev } - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.table, init_hca->eqc_base, dev_cap->eqc_entry_sz, num_eqs, num_eqs, 0, 0); @@ -2076,6 +2100,18 @@ static int mlx4_init_hca(struct mlx4_dev goto err_free_icm; } + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_query_func(dev, dev_cap); + if (err < 0) { + mlx4_err(dev, "QUERY_FUNC command failed, aborting.\n"); + goto err_stop_fw; + } else if (err & MLX4_QUERY_FUNC_NUM_SYS_EQS) { + dev->caps.num_eqs = dev_cap->max_eqs; + dev->caps.reserved_eqs = dev_cap->reserved_eqs; + dev->caps.reserved_uars = dev_cap->reserved_uars; + } + } + /* * Read HCA frequency by QUERY_HCA command */ @@ -2916,13 +2952,12 @@ static void mlx4_enable_msi_x(struct mlx { struct mlx4_priv *priv = mlx4_priv(dev); struct msix_entry *entries; - int nreq = min_t(int, dev->caps.num_ports * - min_t(int, num_possible_cpus() + 1, MAX_MSIX_P_PORT) - + MSIX_LEGACY_SZ, MAX_MSIX); int err; int i; if (msi_x) { + int nreq = dev->caps.num_ports * num_online_cpus() + MSIX_LEGACY_SZ; + nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, nreq); Modified: stable/9/sys/ofed/drivers/net/mlx4/profile.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/profile.c Fri May 19 12:53:50 2017 (r318536) +++ stable/9/sys/ofed/drivers/net/mlx4/profile.c Fri May 19 12:56:18 2017 (r318537) @@ -199,10 +199,17 @@ u64 mlx4_make_profile(struct mlx4_dev *d init_hca->log_num_cqs = profile[i].log_num; break; case MLX4_RES_EQ: - dev->caps.num_eqs = roundup_pow_of_two(min_t(unsigned, dev_cap->max_eqs, - MAX_MSIX)); - init_hca->eqc_base = profile[i].start; - init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + init_hca->log_num_eqs = 0x1f; + init_hca->eqc_base = profile[i].start; + init_hca->num_sys_eqs = dev_cap->num_sys_eqs; + } else { + dev->caps.num_eqs = roundup_pow_of_two( + min_t(unsigned, + dev_cap->max_eqs, MAX_MSIX)); + init_hca->eqc_base = profile[i].start; + init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + } break; case MLX4_RES_DMPT: dev->caps.num_mpts = profile[i].num; Modified: stable/9/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/9/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:53:50 2017 (r318536) +++ stable/9/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:56:18 2017 (r318537) @@ -199,6 +199,7 @@ enum { MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, + MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 26, }; /* bit enums for an 8-bit flags field indicating special use @@ -490,6 +491,7 @@ struct mlx4_caps { int num_cqs; int max_cqes; int reserved_cqs; + int num_sys_eqs; int num_eqs; int reserved_eqs; int num_comp_vectors; From owner-svn-src-all@freebsd.org Fri May 19 13:02:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63511D730EE; Fri, 19 May 2017 13:02:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E9BB18F4; Fri, 19 May 2017 13:02:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JD2KNX021732; Fri, 19 May 2017 13:02:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JD2KsZ021730; Fri, 19 May 2017 13:02:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191302.v4JD2KsZ021730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 13:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318538 - stable/11/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 13:02:21 -0000 Author: hselasky Date: Fri May 19 13:02:19 2017 New Revision: 318538 URL: https://svnweb.freebsd.org/changeset/base/318538 Log: MFC r317505: Don't free uninitialized sysctl contexts in the mlx4en driver. This can cause NULL pointer panics during failed device attach. Differential Revision: https://reviews.freebsd.org/D8876 Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c stable/11/sys/ofed/drivers/net/mlx4/mlx4_en.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Fri May 19 12:56:18 2017 (r318537) +++ stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Fri May 19 13:02:19 2017 (r318538) @@ -1639,7 +1639,7 @@ void mlx4_en_free_resources(struct mlx4_ mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); } - if (priv->sysctl) + if (priv->stat_sysctl != NULL) sysctl_ctx_free(&priv->stat_ctx); } @@ -1754,7 +1754,7 @@ void mlx4_en_destroy_netdev(struct net_d mlx4_en_free_resources(priv); /* freeing the sysctl conf cannot be called from within mlx4_en_free_resources */ - if (priv->sysctl) + if (priv->conf_sysctl != NULL) sysctl_ctx_free(&priv->conf_ctx); kfree(priv->tx_ring); @@ -2573,9 +2573,9 @@ static void mlx4_en_sysctl_conf(struct m pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev); sysctl_ctx_init(ctx); - priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), + priv->conf_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, dev->if_xname, CTLFLAG_RD, 0, "mlx4 10gig ethernet"); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "conf", CTLFLAG_RD, NULL, "Configuration"); node_list = SYSCTL_CHILDREN(node); @@ -2638,7 +2638,6 @@ static void mlx4_en_sysctl_conf(struct m static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv) { struct sysctl_ctx_list *ctx; - struct sysctl_oid *node; struct sysctl_oid_list *node_list; struct sysctl_oid *ring_node; struct sysctl_oid_list *ring_list; @@ -2649,9 +2648,9 @@ static void mlx4_en_sysctl_stat(struct m ctx = &priv->stat_ctx; sysctl_ctx_init(ctx); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + priv->stat_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "stat", CTLFLAG_RD, NULL, "Statistics"); - node_list = SYSCTL_CHILDREN(node); + node_list = SYSCTL_CHILDREN(priv->stat_sysctl); #ifdef MLX4_EN_PERF_STAT SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_poll", CTLFLAG_RD, Modified: stable/11/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri May 19 12:56:18 2017 (r318537) +++ stable/11/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri May 19 13:02:19 2017 (r318538) @@ -587,7 +587,8 @@ struct mlx4_en_priv { struct callout watchdog_timer; struct ifmedia media; volatile int blocked; - struct sysctl_oid *sysctl; + struct sysctl_oid *conf_sysctl; + struct sysctl_oid *stat_sysctl; struct sysctl_ctx_list conf_ctx; struct sysctl_ctx_list stat_ctx; #define MLX4_EN_MAC_HASH_IDX 5 From owner-svn-src-all@freebsd.org Fri May 19 13:04:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81188D73188; Fri, 19 May 2017 13:04:07 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DEF11A90; Fri, 19 May 2017 13:04:07 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JD462K021860; Fri, 19 May 2017 13:04:06 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JD45Sn021851; Fri, 19 May 2017 13:04:05 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705191304.v4JD45Sn021851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 19 May 2017 13:04:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318539 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 13:04:07 -0000 Author: vangyzen Date: Fri May 19 13:04:05 2017 New Revision: 318539 URL: https://svnweb.freebsd.org/changeset/base/318539 Log: libthr: fix warnings at WARNS=6 Fix warnings about the following when WARNS=6 (which I will commit soon): - casting away const - no previous 'extern' declaration for non-static variable - others as explained by #pragmas and comments - unused parameters The last is the only functional change. Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10808 Modified: head/lib/libthr/thread/thr_attr.c head/lib/libthr/thread/thr_exit.c head/lib/libthr/thread/thr_sig.c head/lib/libthr/thread/thr_spec.c head/lib/libthr/thread/thr_stack.c head/lib/libthr/thread/thr_symbols.c head/lib/libthr/thread/thr_umtx.c head/lib/libthr/thread/thr_umtx.h Modified: head/lib/libthr/thread/thr_attr.c ============================================================================== --- head/lib/libthr/thread/thr_attr.c Fri May 19 13:02:19 2017 (r318538) +++ head/lib/libthr/thread/thr_attr.c Fri May 19 13:04:05 2017 (r318539) @@ -607,7 +607,7 @@ _pthread_attr_setaffinity_np(pthread_att /* Kernel checks invalid bits, we check it here too. */ size_t i; for (i = kern_size; i < cpusetsize; ++i) { - if (((char *)cpusetp)[i]) + if (((const char *)cpusetp)[i]) return (EINVAL); } } Modified: head/lib/libthr/thread/thr_exit.c ============================================================================== --- head/lib/libthr/thread/thr_exit.c Fri May 19 13:02:19 2017 (r318538) +++ head/lib/libthr/thread/thr_exit.c Fri May 19 13:04:05 2017 (r318539) @@ -119,7 +119,8 @@ _Unwind_GetCFA(struct _Unwind_Context *c #endif /* PIC */ static void -thread_unwind_cleanup(_Unwind_Reason_Code code, struct _Unwind_Exception *e) +thread_unwind_cleanup(_Unwind_Reason_Code code __unused, + struct _Unwind_Exception *e __unused) { /* * Specification said that _Unwind_Resume should not be used here, @@ -130,10 +131,10 @@ thread_unwind_cleanup(_Unwind_Reason_Cod } static _Unwind_Reason_Code -thread_unwind_stop(int version, _Unwind_Action actions, - int64_t exc_class, - struct _Unwind_Exception *exc_obj, - struct _Unwind_Context *context, void *stop_parameter) +thread_unwind_stop(int version __unused, _Unwind_Action actions, + int64_t exc_class __unused, + struct _Unwind_Exception *exc_obj __unused, + struct _Unwind_Context *context, void *stop_parameter __unused) { struct pthread *curthread = _get_curthread(); struct pthread_cleanup *cur; Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Fri May 19 13:02:19 2017 (r318538) +++ head/lib/libthr/thread/thr_sig.c Fri May 19 13:04:05 2017 (r318539) @@ -441,7 +441,7 @@ _thr_signal_init(int dlopened) } void -_thr_sigact_unload(struct dl_phdr_info *phdr_info) +_thr_sigact_unload(struct dl_phdr_info *phdr_info __unused) { #if 0 struct pthread *curthread = _get_curthread(); Modified: head/lib/libthr/thread/thr_spec.c ============================================================================== --- head/lib/libthr/thread/thr_spec.c Fri May 19 13:02:19 2017 (r318538) +++ head/lib/libthr/thread/thr_spec.c Fri May 19 13:04:05 2017 (r318539) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include "thr_private.h" -struct pthread_key _thread_keytable[PTHREAD_KEYS_MAX]; +static struct pthread_key _thread_keytable[PTHREAD_KEYS_MAX]; __weak_reference(_pthread_key_create, pthread_key_create); __weak_reference(_pthread_key_delete, pthread_key_delete); Modified: head/lib/libthr/thread/thr_stack.c ============================================================================== --- head/lib/libthr/thread/thr_stack.c Fri May 19 13:02:19 2017 (r318538) +++ head/lib/libthr/thread/thr_stack.c Fri May 19 13:04:05 2017 (r318539) @@ -290,6 +290,19 @@ _thr_stack_alloc(struct pthread_attr *at return (-1); } +/* + * Disable this warning from clang: + * + * cast from 'char *' to + * 'struct stack *' increases required alignment from 1 to 8 + * [-Werror,-Wcast-align] + * spare_stack = (struct stack *) + */ +#ifdef __clang__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-align" +#endif + /* This function must be called with _thread_list_lock held. */ void _thr_stack_free(struct pthread_attr *attr) @@ -316,3 +329,7 @@ _thr_stack_free(struct pthread_attr *att attr->stackaddr_attr = NULL; } } + +#ifdef __clang__ +#pragma GCC diagnostic pop +#endif Modified: head/lib/libthr/thread/thr_symbols.c ============================================================================== --- head/lib/libthr/thread/thr_symbols.c Fri May 19 13:02:19 2017 (r318538) +++ head/lib/libthr/thread/thr_symbols.c Fri May 19 13:04:05 2017 (r318539) @@ -37,6 +37,10 @@ __FBSDID("$FreeBSD$"); #include "thr_private.h" +#ifdef __clang__ +#pragma GCC diagnostic ignored "-Wmissing-variable-declarations" +#endif + /* A collection of symbols needed by debugger */ /* int _libthr_debug */ Modified: head/lib/libthr/thread/thr_umtx.c ============================================================================== --- head/lib/libthr/thread/thr_umtx.c Fri May 19 13:02:19 2017 (r318538) +++ head/lib/libthr/thread/thr_umtx.c Fri May 19 13:04:05 2017 (r318539) @@ -168,7 +168,7 @@ __thr_umutex_timedlock(struct umutex *mt } int -__thr_umutex_unlock(struct umutex *mtx, uint32_t id) +__thr_umutex_unlock(struct umutex *mtx) { return (_umtx_op_err(mtx, UMTX_OP_MUTEX_UNLOCK, 0, 0, 0)); Modified: head/lib/libthr/thread/thr_umtx.h ============================================================================== --- head/lib/libthr/thread/thr_umtx.h Fri May 19 13:02:19 2017 (r318538) +++ head/lib/libthr/thread/thr_umtx.h Fri May 19 13:04:05 2017 (r318539) @@ -44,7 +44,7 @@ int __thr_umutex_lock(struct umutex *mtx int __thr_umutex_lock_spin(struct umutex *mtx, uint32_t id) __hidden; int __thr_umutex_timedlock(struct umutex *mtx, uint32_t id, const struct timespec *timeout) __hidden; -int __thr_umutex_unlock(struct umutex *mtx, uint32_t id) __hidden; +int __thr_umutex_unlock(struct umutex *mtx) __hidden; int __thr_umutex_trylock(struct umutex *mtx) __hidden; int __thr_umutex_set_ceiling(struct umutex *mtx, uint32_t ceiling, uint32_t *oldceiling) __hidden; @@ -155,7 +155,7 @@ _thr_umutex_unlock2(struct umutex *mtx, if (atomic_cmpset_rel_32(&mtx->m_owner, id, noncst ? UMUTEX_RB_NOTRECOV : UMUTEX_UNOWNED)) return (0); - return (__thr_umutex_unlock(mtx, id)); + return (__thr_umutex_unlock(mtx)); } do { From owner-svn-src-all@freebsd.org Fri May 19 13:04:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39283D7319E; Fri, 19 May 2017 13:04:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 166701A95; Fri, 19 May 2017 13:04:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JD4AGO021907; Fri, 19 May 2017 13:04:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JD4AAr021905; Fri, 19 May 2017 13:04:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191304.v4JD4AAr021905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 13:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318540 - stable/10/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 13:04:11 -0000 Author: hselasky Date: Fri May 19 13:04:09 2017 New Revision: 318540 URL: https://svnweb.freebsd.org/changeset/base/318540 Log: MFC r317505: Don't free uninitialized sysctl contexts in the mlx4en driver. This can cause NULL pointer panics during failed device attach. Differential Revision: https://reviews.freebsd.org/D8876 Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Fri May 19 13:04:05 2017 (r318539) +++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Fri May 19 13:04:09 2017 (r318540) @@ -1640,7 +1640,7 @@ void mlx4_en_free_resources(struct mlx4_ mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); } - if (priv->sysctl) + if (priv->stat_sysctl != NULL) sysctl_ctx_free(&priv->stat_ctx); } @@ -1755,7 +1755,7 @@ void mlx4_en_destroy_netdev(struct net_d mlx4_en_free_resources(priv); /* freeing the sysctl conf cannot be called from within mlx4_en_free_resources */ - if (priv->sysctl) + if (priv->conf_sysctl != NULL) sysctl_ctx_free(&priv->conf_ctx); kfree(priv->tx_ring); @@ -2572,9 +2572,9 @@ static void mlx4_en_sysctl_conf(struct m pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev); sysctl_ctx_init(ctx); - priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), + priv->conf_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, dev->if_xname, CTLFLAG_RD, 0, "mlx4 10gig ethernet"); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "conf", CTLFLAG_RD, NULL, "Configuration"); node_list = SYSCTL_CHILDREN(node); @@ -2637,7 +2637,6 @@ static void mlx4_en_sysctl_conf(struct m static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv) { struct sysctl_ctx_list *ctx; - struct sysctl_oid *node; struct sysctl_oid_list *node_list; struct sysctl_oid *ring_node; struct sysctl_oid_list *ring_list; @@ -2648,9 +2647,9 @@ static void mlx4_en_sysctl_stat(struct m ctx = &priv->stat_ctx; sysctl_ctx_init(ctx); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + priv->stat_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "stat", CTLFLAG_RD, NULL, "Statistics"); - node_list = SYSCTL_CHILDREN(node); + node_list = SYSCTL_CHILDREN(priv->stat_sysctl); #ifdef MLX4_EN_PERF_STAT SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_poll", CTLFLAG_RD, Modified: stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri May 19 13:04:05 2017 (r318539) +++ stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri May 19 13:04:09 2017 (r318540) @@ -586,7 +586,8 @@ struct mlx4_en_priv { struct callout watchdog_timer; struct ifmedia media; volatile int blocked; - struct sysctl_oid *sysctl; + struct sysctl_oid *conf_sysctl; + struct sysctl_oid *stat_sysctl; struct sysctl_ctx_list conf_ctx; struct sysctl_ctx_list stat_ctx; #define MLX4_EN_MAC_HASH_IDX 5 From owner-svn-src-all@freebsd.org Fri May 19 13:05:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93232D7326E; Fri, 19 May 2017 13:05:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E8011D4F; Fri, 19 May 2017 13:05:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JD5ehc022023; Fri, 19 May 2017 13:05:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JD5eCX022021; Fri, 19 May 2017 13:05:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191305.v4JD5eCX022021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 13:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r318541 - stable/9/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 13:05:41 -0000 Author: hselasky Date: Fri May 19 13:05:40 2017 New Revision: 318541 URL: https://svnweb.freebsd.org/changeset/base/318541 Log: MFC r317505: Don't free uninitialized sysctl contexts in the mlx4en driver. This can cause NULL pointer panics during failed device attach. Differential Revision: https://reviews.freebsd.org/D8876 Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Fri May 19 13:04:09 2017 (r318540) +++ stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Fri May 19 13:05:40 2017 (r318541) @@ -1640,7 +1640,7 @@ void mlx4_en_free_resources(struct mlx4_ mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); } - if (priv->sysctl) + if (priv->stat_sysctl != NULL) sysctl_ctx_free(&priv->stat_ctx); } @@ -1755,7 +1755,7 @@ void mlx4_en_destroy_netdev(struct net_d mlx4_en_free_resources(priv); /* freeing the sysctl conf cannot be called from within mlx4_en_free_resources */ - if (priv->sysctl) + if (priv->conf_sysctl != NULL) sysctl_ctx_free(&priv->conf_ctx); kfree(priv->tx_ring); @@ -2573,9 +2573,9 @@ static void mlx4_en_sysctl_conf(struct m pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev); sysctl_ctx_init(ctx); - priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), + priv->conf_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, dev->if_xname, CTLFLAG_RD, 0, "mlx4 10gig ethernet"); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "conf", CTLFLAG_RD, NULL, "Configuration"); node_list = SYSCTL_CHILDREN(node); @@ -2638,7 +2638,6 @@ static void mlx4_en_sysctl_conf(struct m static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv) { struct sysctl_ctx_list *ctx; - struct sysctl_oid *node; struct sysctl_oid_list *node_list; struct sysctl_oid *ring_node; struct sysctl_oid_list *ring_list; @@ -2649,9 +2648,9 @@ static void mlx4_en_sysctl_stat(struct m ctx = &priv->stat_ctx; sysctl_ctx_init(ctx); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + priv->stat_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "stat", CTLFLAG_RD, NULL, "Statistics"); - node_list = SYSCTL_CHILDREN(node); + node_list = SYSCTL_CHILDREN(priv->stat_sysctl); #ifdef MLX4_EN_PERF_STAT SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_poll", CTLFLAG_RD, Modified: stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri May 19 13:04:09 2017 (r318540) +++ stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri May 19 13:05:40 2017 (r318541) @@ -586,7 +586,8 @@ struct mlx4_en_priv { struct callout watchdog_timer; struct ifmedia media; volatile int blocked; - struct sysctl_oid *sysctl; + struct sysctl_oid *conf_sysctl; + struct sysctl_oid *stat_sysctl; struct sysctl_ctx_list conf_ctx; struct sysctl_ctx_list stat_ctx; #define MLX4_EN_MAC_HASH_IDX 5 From owner-svn-src-all@freebsd.org Fri May 19 15:57:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDEDFD74F7C; Fri, 19 May 2017 15:57:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CDC91E8; Fri, 19 May 2017 15:57:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JFv5dN093669; Fri, 19 May 2017 15:57:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JFv5Tg093668; Fri, 19 May 2017 15:57:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705191557.v4JFv5Tg093668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 15:57:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318542 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 15:57:06 -0000 Author: gjb Date: Fri May 19 15:57:05 2017 New Revision: 318542 URL: https://svnweb.freebsd.org/changeset/base/318542 Log: Correct a typo. Submitted by: vangyzen Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 13:05:40 2017 (r318541) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 15:57:05 2017 (r318542) @@ -633,7 +633,7 @@ sponsor="&dellemc;">The network stack has been modified to fix incorrect or invalid IP addresses if multiple threads emit a UDP - log_in_vein message concurrently. + log_in_vain message concurrently. The TCP stack has From owner-svn-src-all@freebsd.org Fri May 19 16:15:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC20BD73700; Fri, 19 May 2017 16:15:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A44AFAD; Fri, 19 May 2017 16:15:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JGF05Z001828; Fri, 19 May 2017 16:15:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JGF0Jc001827; Fri, 19 May 2017 16:15:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705191615.v4JGF0Jc001827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 16:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318543 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 16:15:01 -0000 Author: gjb Date: Fri May 19 16:15:00 2017 New Revision: 318543 URL: https://svnweb.freebsd.org/changeset/base/318543 Log: Document r317373, periodic(8) sleep consolidation. Submitted by: asomers Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 15:57:05 2017 (r318542) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 16:15:00 2017 (r318543) @@ -333,6 +333,13 @@ <filename class="directory">/etc/periodic</filename> Scripts + The default &man.periodic.conf.5; has + been updated to include the + anticongestion_sleeptime option, + consolidating random sleeps in &man.periodic.8; scripts and + replacing the daily_ntpd_avoid_congestion + option. The default value is 3600 seconds. + The 410.status-mfi &man.periodic.8; script has been added to monitor the status of &man.mfi.4; volumes. From owner-svn-src-all@freebsd.org Fri May 19 16:22:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE20AD73DBC; Fri, 19 May 2017 16:22:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DABB1ABA; Fri, 19 May 2017 16:22:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JGMQUd005670; Fri, 19 May 2017 16:22:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JGMQ2k005669; Fri, 19 May 2017 16:22:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705191622.v4JGMQ2k005669@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 16:22:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318544 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 16:22:27 -0000 Author: gjb Date: Fri May 19 16:22:26 2017 New Revision: 318544 URL: https://svnweb.freebsd.org/changeset/base/318544 Log: Remove an HREF from a section title. Suggested by: asomers Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 16:15:00 2017 (r318543) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 16:22:26 2017 (r318544) @@ -594,7 +594,7 @@ - &man.geom.4; + <literal>geom(4)</literal>   From owner-svn-src-all@freebsd.org Fri May 19 16:28:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97C96D73ECC; Fri, 19 May 2017 16:28:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5825E1CB7; Fri, 19 May 2017 16:28:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id E07DF10A7B9; Fri, 19 May 2017 12:28:32 -0400 (EDT) From: John Baldwin To: Baptiste Daroussin Cc: rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318441 - in head/etc: . cron.d Date: Fri, 19 May 2017 09:17:23 -0700 Message-ID: <9570430.uB7Ojud3DG@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170518212429.rugl6vnv5d2b2hpb@ivaldir.net> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <2201156.H7EQSgYph9@ralph.baldwin.cx> <20170518212429.rugl6vnv5d2b2hpb@ivaldir.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 19 May 2017 12:28:33 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 16:28:34 -0000 On Thursday, May 18, 2017 11:24:29 PM Baptiste Daroussin wrote: > On Thu, May 18, 2017 at 09:48:25AM -0700, John Baldwin wrote: > > On Thursday, May 18, 2017 03:09:32 PM Baptiste Daroussin wrote: > > > On Thu, May 18, 2017 at 02:56:31AM -0700, Rodney W. Grimes wrote: > > > > > Author: ngie > > > > > Date: Thu May 18 06:25:39 2017 > > > > > New Revision: 318441 > > > > > URL: https://svnweb.freebsd.org/changeset/base/318441 > > > > > > > > > > Log: > > > > > Handle the cron.d entry for MK_AT in cron conditionally > > > > > > > > > > Install /etc/cron.d/at if MK_AT != no, always using it, which tries > > > > > to run a non-existent program via cron(8) every 5 minutes with the > > > > > default /etc/crontab, prior to this commit. > > > > > > > > > > SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at > > > > > because atrun(8) executes programs, which may rely on environment > > > > > currently set via /etc/crontab. > > > > > > > > > > Noted by: bdrewery (in an internal review) > > > > > MFC after: 2 months > > > > > Relnotes: yes (may need to add environmental modifications to > > > > > /etc/cron.d/at) > > > > > Sponsored by: Dell EMC Isilon > > > > > > > > > > Added: > > > > > head/etc/cron.d/ > > > > > head/etc/cron.d/Makefile (contents, props changed) > > > > > head/etc/cron.d/at (contents, props changed) > > > > > Modified: > > > > > head/etc/Makefile > > > > > head/etc/crontab > > > > > > > > > > Modified: head/etc/Makefile > > > > > ============================================================================== > > > > > --- head/etc/Makefile Thu May 18 06:15:42 2017 (r318440) > > > > > +++ head/etc/Makefile Thu May 18 06:25:39 2017 (r318441) > > > > > @@ -8,6 +8,7 @@ FILESGROUPS= FILES > > > > > # No need as it is empty and just causes rebuilds since this file does so much. > > > > > UPDATE_DEPENDFILE= no > > > > > SUBDIR= \ > > > > > + cron.d \ > > > > > newsyslog.conf.d \ > > > > > syslog.d > > > > > > > > The thread on the newsyslog clearly shows that this is a contriversial change. > > > > > > > > I strongly object to further splitting of /etc/FOO into /etc/foo.d/FOO files > > > > to suite Dell/EMC/Isilon's needs. It is in conflict with the needs and > > > > desires of others. > > > > > > Has multiple people has stated, on the newsyslog thread. this is not a > > > DELL/EMC/Isilon need, this is also a requirement for plenty of use cases > > > 1. Consistency > > > as a project we do support building WITHOUT_FOO there is no reason to install > > > syslog, cron configuration for FOO if the system was built without foo > > > > Though it doesn't _hurt_, and breaking POLA has to be worth it, not just > > because it looks nice. > > > > > 2. Packaging base > > > if one does not install at there is no need for the at crontab to be installed > > > (same reason as 1.) > > > > This is a viable reason except that it isn't fully baked yet. > > > > > 3. Large deployment of freebsd farms > > > Being able to administrate thousands of FreeBSD machines, one often ends up > > > using tools like puppet, chef, ansible, cfengine. When programmatically > > > handling configuration management it is way easier and safer to simple > > > add/removes files in a directory rather than mangling^Winplace editing files. > > > > There's nothing preventing you now from deploying split files and an empty > > global configuration file since the daemons support foo.d. You don't require > > that to change in upstream since you should be using some sort of VCS to > > manage your configuration as it is. > > > > > 4. Ports/packages > > > On can provide easily sample configuration for cron, syslog (not only) and the > > > admin can decide to use it or not easily (ususally this is done by making > > > symlinks from the said file which would live in share/* into the .d directory. > > > > > > This is not a new trend in FreeBSD: newsyslog, rc.conf, libmap and more. > > > > The support for broken out files has long been there, but the base system has > > not used them previously for default config shipped during a release. That > > is in fact a new trend. > > > > However, the current approach seems to be the absolute worst way to do this. > > If someone wants to use the existing base system image and modify it with > > config management, they now have to use a mix of styles (for some services > > edit a global config file for certain settings, but use a dedicated file for > > other settings for the same service, or for the same settings but a different > > service). It's also the worst case for humans trying to work with our system > > as the division between which services are broken out vs global is > > inconsistent and arbitrary. > > > > Once you split up the files you make a merge conflict for anyone trying to do > > an upgrade. If we do this piecemail then we create N merge conflicts for users > > to deal with as opposed to if you split it up all at once. > > > > Also, there wasn't a clear consensus (a mail to arch@ with "hey, we should > > switch to splitting up config files for reasons A and B and let's do this for > > 12.0 but not merge to stable so there is a clear flag day / sign post for users > > to manage upgrades". Instead there have been a couple of commits and any > > not-in-100%-agreement opinions are ignored. > > > That's true, another thing is the way it is done, there is no simple way to > disable the at cron from an admin point of view rather than rm /etc/cron.d/at > for an end user which an upgrade will bring back. I think an upgrade won't bring the file back necessarily (etcupdate warns you that a removed file changed, but it doesn't bring it back, I think a similar strategy might be sensible for pkg as well). To be clear, my main thoughts are that if we are going to start using conf.d for the base system: 1) We should be intentional about deciding to use that approach in general (so discuss it first, though perhaps we've had enough discussion in the current threads). 2) When converting a utility from a global foo.conf to a conf.d style, I think we should convert it all at once, not piecemeal so that there's just one painful update for users to work through instead of N updates to the same file. 3) This is probably a sufficiently large POLA violation to not MFC, but be part of a new X.0. -- John Baldwin From owner-svn-src-all@freebsd.org Fri May 19 16:33:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3D11D74265; Fri, 19 May 2017 16:33:56 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AF4B13E5; Fri, 19 May 2017 16:33:56 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 9EA8E11B8; Fri, 19 May 2017 16:33:55 +0000 (UTC) Date: Fri, 19 May 2017 18:33:55 +0200 From: Baptiste Daroussin To: John Baldwin Cc: rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318441 - in head/etc: . cron.d Message-ID: <20170519163355.rs5w3hr6dltdx7kv@ivaldir.net> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <2201156.H7EQSgYph9@ralph.baldwin.cx> <20170518212429.rugl6vnv5d2b2hpb@ivaldir.net> <9570430.uB7Ojud3DG@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fpgvlokedjylwomp" Content-Disposition: inline In-Reply-To: <9570430.uB7Ojud3DG@ralph.baldwin.cx> User-Agent: NeoMutt/20170428 (1.8.2) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 16:33:56 -0000 --fpgvlokedjylwomp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 19, 2017 at 09:17:23AM -0700, John Baldwin wrote: > On Thursday, May 18, 2017 11:24:29 PM Baptiste Daroussin wrote: > > On Thu, May 18, 2017 at 09:48:25AM -0700, John Baldwin wrote: > > > On Thursday, May 18, 2017 03:09:32 PM Baptiste Daroussin wrote: > > > > On Thu, May 18, 2017 at 02:56:31AM -0700, Rodney W. Grimes wrote: > > > > > > Author: ngie > > > > > > Date: Thu May 18 06:25:39 2017 > > > > > > New Revision: 318441 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/318441 > > > > > >=20 > > > > > > Log: > > > > > > Handle the cron.d entry for MK_AT in cron conditionally > > > > > > =20 > > > > > > Install /etc/cron.d/at if MK_AT !=3D no, always using it, whi= ch tries > > > > > > to run a non-existent program via cron(8) every 5 minutes wit= h the > > > > > > default /etc/crontab, prior to this commit. > > > > > > =20 > > > > > > SHELL and PATH are duplicated between /etc/crontab and /etc/c= ron.d/at > > > > > > because atrun(8) executes programs, which may rely on environ= ment > > > > > > currently set via /etc/crontab. > > > > > > =20 > > > > > > Noted by: bdrewery (in an internal review) > > > > > > MFC after: 2 months > > > > > > Relnotes: yes (may need to add environmental modifications to > > > > > > /etc/cron.d/at) > > > > > > Sponsored by: Dell EMC Isilon > > > > > >=20 > > > > > > Added: > > > > > > head/etc/cron.d/ > > > > > > head/etc/cron.d/Makefile (contents, props changed) > > > > > > head/etc/cron.d/at (contents, props changed) > > > > > > Modified: > > > > > > head/etc/Makefile > > > > > > head/etc/crontab > > > > > >=20 > > > > > > Modified: head/etc/Makefile > > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > > > > > > --- head/etc/Makefile Thu May 18 06:15:42 2017 (r318440) > > > > > > +++ head/etc/Makefile Thu May 18 06:25:39 2017 (r318441) > > > > > > @@ -8,6 +8,7 @@ FILESGROUPS=3D FILES > > > > > > # No need as it is empty and just causes rebuilds since this f= ile does so much. > > > > > > UPDATE_DEPENDFILE=3D no > > > > > > SUBDIR=3D \ > > > > > > + cron.d \ > > > > > > newsyslog.conf.d \ > > > > > > syslog.d > > > > >=20 > > > > > The thread on the newsyslog clearly shows that this is a contrive= rsial change. > > > > >=20 > > > > > I strongly object to further splitting of /etc/FOO into /etc/foo.= d/FOO files > > > > > to suite Dell/EMC/Isilon's needs. It is in conflict with the nee= ds and > > > > > desires of others. > > > >=20 > > > > Has multiple people has stated, on the newsyslog thread. this is no= t a > > > > DELL/EMC/Isilon need, this is also a requirement for plenty of use = cases > > > > 1. Consistency > > > > as a project we do support building WITHOUT_FOO there is no reaso= n to install > > > > syslog, cron configuration for FOO if the system was built withou= t foo > > >=20 > > > Though it doesn't _hurt_, and breaking POLA has to be worth it, not j= ust > > > because it looks nice. > > >=20 > > > > 2. Packaging base > > > > if one does not install at there is no need for the at crontab to= be installed > > > > (same reason as 1.) > > >=20 > > > This is a viable reason except that it isn't fully baked yet. > > >=20 > > > > 3. Large deployment of freebsd farms > > > > Being able to administrate thousands of FreeBSD machines, one oft= en ends up > > > > using tools like puppet, chef, ansible, cfengine. When programmat= ically > > > > handling configuration management it is way easier and safer to s= imple > > > > add/removes files in a directory rather than mangling^Winplace ed= iting files. > > >=20 > > > There's nothing preventing you now from deploying split files and an = empty > > > global configuration file since the daemons support foo.d. You don't= require > > > that to change in upstream since you should be using some sort of VCS= to > > > manage your configuration as it is. > > >=20 > > > > 4. Ports/packages > > > > On can provide easily sample configuration for cron, syslog (not = only) and the > > > > admin can decide to use it or not easily (ususally this is done b= y making > > > > symlinks from the said file which would live in share/* into the = =2Ed directory. > > > >=20 > > > > This is not a new trend in FreeBSD: newsyslog, rc.conf, libmap and = more. > > >=20 > > > The support for broken out files has long been there, but the base sy= stem has > > > not used them previously for default config shipped during a release.= That > > > is in fact a new trend. > > >=20 > > > However, the current approach seems to be the absolute worst way to d= o this. > > > If someone wants to use the existing base system image and modify it = with > > > config management, they now have to use a mix of styles (for some ser= vices > > > edit a global config file for certain settings, but use a dedicated f= ile for > > > other settings for the same service, or for the same settings but a d= ifferent > > > service). It's also the worst case for humans trying to work with ou= r system > > > as the division between which services are broken out vs global is > > > inconsistent and arbitrary. > > >=20 > > > Once you split up the files you make a merge conflict for anyone tryi= ng to do > > > an upgrade. If we do this piecemail then we create N merge conflicts= for users > > > to deal with as opposed to if you split it up all at once. > > >=20 > > > Also, there wasn't a clear consensus (a mail to arch@ with "hey, we s= hould > > > switch to splitting up config files for reasons A and B and let's do = this for > > > 12.0 but not merge to stable so there is a clear flag day / sign post= for users > > > to manage upgrades". Instead there have been a couple of commits and= any > > > not-in-100%-agreement opinions are ignored. > > >=20 > > That's true, another thing is the way it is done, there is no simple wa= y to > > disable the at cron from an admin point of view rather than rm /etc/cr= on.d/at > > for an end user which an upgrade will bring back. >=20 > I think an upgrade won't bring the file back necessarily (etcupdate warns= you > that a removed file changed, but it doesn't bring it back, I think a simi= lar > strategy might be sensible for pkg as well). I need to check, I do not remember what I did here and I will certainly add= a regression test for that to ensure this behaviour is always working as expe= cted. >=20 > To be clear, my main thoughts are that if we are going to start using con= f.d > for the base system: >=20 > 1) We should be intentional about deciding to use that approach in general > (so discuss it first, though perhaps we've had enough discussion in the > current threads). >=20 > 2) When converting a utility from a global foo.conf to a conf.d style, I > think we should convert it all at once, not piecemeal so that there's = just > one painful update for users to work through instead of N updates to t= he > same file. >=20 > 3) This is probably a sufficiently large POLA violation to not MFC, but be > part of a new X.0. I agree with the 3 points above. Bapt --fpgvlokedjylwomp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlkfHnAACgkQY4mL3PG3 PlqWoQ//UGIf5rjCu3zCc7QBhD93NVqeMc5M3c1o8GiqmPbpUaj4wHYCpaMnbcZ/ ljH2SPR5h+JAaNEvgNsn0qHokSEfxM3k4l/Y/BQ7ofgqn4+rVmhei4XGhu3sIqmC OiJXB1UBJPCSheLFcAd14lhfKgBJgC2+1/JV2iWWR5fepd7aTBBsSh/hIrMafmhc iO8Iu9/3ZVGdrm7qeuqjWmD5yYtoZaQ24SJLi1pI2nt/QS5HIvqZ4xrTAXcpCIyG h5u4TF64iH+IRYfqIkY9F6ziZk4kqbMsz+dihBJNw4kFvW0QploWoqpJK+1J7tJA vvWjmVKa9zQcpbgY47ADxzqGQH/TYb0uGqqhfBqDK/pNUXOZIIbX0AjVgORzq4Tw hZ9kcno1ufBIefYY1si+iN4fangRUVdx0zFAJGL+EJLO/SlkrKXtbgVeiT+qHS8v JmlwQLMysccsfw4T2whnxMtFV52YsbOM/N17aIqL3aDyQw9HiQv4luMAykJDBb27 1aeu3FckRrHS6Gc1Eb74P7hkcWvElwcGdWPUpqm2SWH7OEyYIgpET0tuus9NAMoA IVV/WfPMv48EUltP9prYdYUDQaERpbU4SZiIwacuuAh6Z8Qu1U/iK/5DnsC8RUPb jPRGcaQ6bcU4Z50K+ghtrpzKOGeu7DZXPk+XJVDR/+HnAXIoX40= =MMKP -----END PGP SIGNATURE----- --fpgvlokedjylwomp-- From owner-svn-src-all@freebsd.org Fri May 19 17:04:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3505FD74D55; Fri, 19 May 2017 17:04:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE0C775E; Fri, 19 May 2017 17:04:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JH41I2022292; Fri, 19 May 2017 17:04:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JH41Zh022291; Fri, 19 May 2017 17:04:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705191704.v4JH41Zh022291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 19 May 2017 17:04:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318545 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 17:04:03 -0000 Author: ngie Date: Fri May 19 17:04:01 2017 New Revision: 318545 URL: https://svnweb.freebsd.org/changeset/base/318545 Log: Install {cron.d,newsyslog.conf.d,syslog.d} via `make distribution`, not `make install` I incorrectly started this pattern in r277541 with the opensm newsyslog.conf.d file, and continued using it in r318441 and r318443. This will fix the files being handled improperly via installworld, preventing tools like etcupdate, mergemaster, etc from functioning properly when comparing the installed contents on a system vs the contents in a source tree when doing merges. PR: 219404 Submitted by: Dan McGregor MFC after: 2 weeks MFC with: r277541, r318441, r318443 Sponsored by: Dell EMC Isilon Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Fri May 19 16:22:26 2017 (r318544) +++ head/etc/Makefile Fri May 19 17:04:01 2017 (r318545) @@ -7,10 +7,6 @@ FILESGROUPS= FILES # No need as it is empty and just causes rebuilds since this file does so much. UPDATE_DEPENDFILE= no -SUBDIR= \ - cron.d \ - newsyslog.conf.d \ - syslog.d .if ${MK_SENDMAIL} != "no" SUBDIR+=sendmail @@ -254,9 +250,11 @@ distribution: .if ${MK_CASPER} != "no" ${_+_}cd ${.CURDIR}/casper; ${MAKE} install .endif + ${_+_}cd ${.CURDIR}/cron.d; ${MAKE} install ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install + ${_+_}cd ${.CURDIR}/newsyslog.conf.d; ${MAKE} install .if ${MK_NTP} != "no" ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install .endif @@ -266,6 +264,7 @@ distribution: .endif ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap + ${_+_}cd ${.CURDIR}/syslog.d; ${MAKE} install ${_+_}cd ${SRCTOP}/usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ From owner-svn-src-all@freebsd.org Fri May 19 17:14:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81D86D73236; Fri, 19 May 2017 17:14:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EF86FE5; Fri, 19 May 2017 17:14:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JHETUY026882; Fri, 19 May 2017 17:14:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JHEToi026880; Fri, 19 May 2017 17:14:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705191714.v4JHEToi026880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 19 May 2017 17:14:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318546 - in head: contrib/netbsd-tests/fs/tmpfs tests/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 17:14:30 -0000 Author: ngie Date: Fri May 19 17:14:29 2017 New Revision: 318546 URL: https://svnweb.freebsd.org/changeset/base/318546 Log: sys/fs/tmpfs/vnd_test: make md(4) allocation dynamic The previous logic was flawed in the sense that it assumed that /dev/md3 was always available. This was a caveat I noted in r306038, that I hadn't gotten around to solving before now. Cache the device for the mountpoint after executing mdmfs, then use the cached value in basic_cleanup(..) when unmounting/disconnecting the md(4) device. Apply sed expressions to use reuse logic in the NetBSD code that could also be applied to FreeBSD, just with different tools. Differential Revision: D10766 MFC after: 1 week Reviewed by: bdrewery Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh head/tests/sys/fs/tmpfs/Makefile Modified: head/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh ============================================================================== --- head/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Fri May 19 17:04:01 2017 (r318545) +++ head/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Fri May 19 17:14:29 2017 (r318546) @@ -28,6 +28,10 @@ # Verifies that vnd works with files stored in tmpfs. # +# Begin FreeBSD +MD_DEVICE_FILE=md.device +# End FreeBSD + atf_test_case basic cleanup basic_head() { atf_set "descr" "Verifies that vnd works with files stored in tmpfs" @@ -41,7 +45,10 @@ basic_body() { # Begin FreeBSD if true; then atf_check -s eq:0 -o empty -e empty mkdir mnt - atf_check -s eq:0 -o empty -e empty mdmfs -F disk.img md3 mnt + atf_check -s eq:0 -o empty -e empty mdmfs -F disk.img md mnt + md_dev=$(df mnt | awk 'NR != 1 { print $1 }' | xargs basename) + atf_check test -c /dev/$md_dev # Sanity check + echo -n $md_dev > $TMPDIR/$MD_DEVICE_FILE else # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig /dev/vnd3 disk.img @@ -67,31 +74,23 @@ basic_body() { done atf_check -s eq:0 -o empty -e empty umount mnt - # Begin FreeBSD - if true; then - atf_check -s eq:0 -o empty -e empty mdconfig -d -u 3 - else - # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig -u /dev/vnd3 - # Begin FreeBSD - fi - # End FreeBSD test_unmount touch done } basic_cleanup() { + # Begin FreeBSD + if md_dev=$(cat $TMPDIR/$MD_DEVICE_FILE); then + echo "Will try disconnecting $md_dev" + else + echo "$MD_DEVICE_FILE doesn't exist in $TMPDIR; returning early" + return 0 + fi + # End FreeBSD if [ ! -f done ]; then umount mnt 2>/dev/null 1>&2 - # Begin FreeBSD - if true; then - [ ! -c /dev/md3 ] || mdconfig -d -u 3 - else - # End FreeBSD vndconfig -u /dev/vnd3 2>/dev/null 1>&2 - # Begin FreeBSD - fi - # End FreeBSD fi } Modified: head/tests/sys/fs/tmpfs/Makefile ============================================================================== --- head/tests/sys/fs/tmpfs/Makefile Fri May 19 17:04:01 2017 (r318545) +++ head/tests/sys/fs/tmpfs/Makefile Fri May 19 17:14:29 2017 (r318546) @@ -54,6 +54,9 @@ ATF_TESTS_SH_SED_mount_test= \ ATF_TESTS_SH_SED_readdir_test= -e 's,mknod fifo p,mkfifo fifo,g' ATF_TESTS_SH_SED_sizes_test= -e 's,-o -s,-o size=,g' ATF_TESTS_SH_SED_statvfs_test= -e 's,-o -s,-o size=,g' +ATF_TESTS_SH_SED_vnd_test= \ + -e 's,vndconfig -u /dev/vnd3,mdconfig -d -u $$md_dev,g' \ + -e 's,/dev/vnd3,/dev/$$md_dev,g' ATF_TESTS_SH_SED_vnode_leak_test= -e 's,-o -s,-o size=,g' .include From owner-svn-src-all@freebsd.org Fri May 19 17:43:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D97DD7410B; Fri, 19 May 2017 17:43:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4B649CB; Fri, 19 May 2017 17:43:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id C888F10A87D; Fri, 19 May 2017 13:43:42 -0400 (EDT) From: John Baldwin To: Baptiste Daroussin , svn-src-head@freebsd.org Cc: svn-src-all@freebsd.org, src-committers@freebsd.org Subject: pkgbase and conf files (was Re: svn commit: r318441 - in head/etc: . cron.d) Date: Fri, 19 May 2017 10:43:30 -0700 Message-ID: <3548472.irpQCNYL7x@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170519163355.rs5w3hr6dltdx7kv@ivaldir.net> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <9570430.uB7Ojud3DG@ralph.baldwin.cx> <20170519163355.rs5w3hr6dltdx7kv@ivaldir.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 19 May 2017 13:43:42 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 17:43:51 -0000 On Friday, May 19, 2017 06:33:55 PM Baptiste Daroussin wrote: > On Fri, May 19, 2017 at 09:17:23AM -0700, John Baldwin wrote: > > On Thursday, May 18, 2017 11:24:29 PM Baptiste Daroussin wrote: > > I think an upgrade won't bring the file back necessarily (etcupdate warns you > > that a removed file changed, but it doesn't bring it back, I think a similar > > strategy might be sensible for pkg as well). > > I need to check, I do not remember what I did here and I will certainly add a > regression test for that to ensure this behaviour is always working as expected. One nice "feature" to have in pkg for pkgbase would be a way to ask pkg to restore a stock configuration file (perhaps with an option to restore it to an alternate directory or filename?) This would imply that packages would need to keep the "pristine" conf files around somewhere. This would also let you do 'pkg confdiff' or the like (as a replacement for 'etcupdate diff') -- John Baldwin From owner-svn-src-all@freebsd.org Fri May 19 18:07:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9256DD74ACD; Fri, 19 May 2017 18:07:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6151D17A8; Fri, 19 May 2017 18:07:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JI7Se3047347; Fri, 19 May 2017 18:07:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JI7SLB047346; Fri, 19 May 2017 18:07:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705191807.v4JI7SLB047346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 18:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318547 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 18:07:29 -0000 Author: gjb Date: Fri May 19 18:07:28 2017 New Revision: 318547 URL: https://svnweb.freebsd.org/changeset/base/318547 Log: Fix a few grammar and ambiguity nits. Submitted by: adamw Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 17:14:29 2017 (r318546) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 18:07:28 2017 (r318547) @@ -205,7 +205,7 @@ NAT-T configuration. The -g and -t flags have been added, which list only global and virtual policies, - respectively when used with the -D and + respectively, when used with the -D and -P flags. The &man.daemon.8; utility has been updated to allow redirecting &man.stdout.4; and &man.stderr.4; - output to &man.syslog.3; and to a file. + output to &man.syslog.3; or to a file. @@ -307,8 +307,8 @@ sponsor="&ff;">&man.blacklistd.8; support for OpenSSH has been refined to adjust notification points to catch all authentication failures - rather than authentication failures caused by invalid - login usernames. + rather than only those caused by invalid login + usernames. From owner-svn-src-all@freebsd.org Fri May 19 18:13:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45C60D74D49; Fri, 19 May 2017 18:13:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C5231CBE; Fri, 19 May 2017 18:13:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JIDgMc051241; Fri, 19 May 2017 18:13:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JIDfs9051232; Fri, 19 May 2017 18:13:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705191813.v4JIDfs9051232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 19 May 2017 18:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318548 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 18:13:43 -0000 Author: emaste Date: Fri May 19 18:13:41 2017 New Revision: 318548 URL: https://svnweb.freebsd.org/changeset/base/318548 Log: msdosfs: use C99 types General cleanup, for diff reduction with NetBSD and future use by FAT support in makefs. Submitted by: Siva Mahadevan Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10821 Modified: head/sys/fs/msdosfs/bootsect.h head/sys/fs/msdosfs/bpb.h head/sys/fs/msdosfs/denode.h head/sys/fs/msdosfs/direntry.h head/sys/fs/msdosfs/msdosfs_conv.c head/sys/fs/msdosfs/msdosfs_fat.c head/sys/fs/msdosfs/msdosfs_lookup.c head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/fs/msdosfs/msdosfsmount.h Modified: head/sys/fs/msdosfs/bootsect.h ============================================================================== --- head/sys/fs/msdosfs/bootsect.h Fri May 19 18:07:28 2017 (r318547) +++ head/sys/fs/msdosfs/bootsect.h Fri May 19 18:13:41 2017 (r318548) @@ -25,13 +25,13 @@ * first sector of a partitioned hard disk. */ struct bootsector33 { - u_int8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */ + uint8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */ int8_t bsOemName[8]; /* OEM name and version */ int8_t bsBPB[19]; /* BIOS parameter block */ int8_t bsDriveNumber; /* drive number (0x80) */ int8_t bsBootCode[479]; /* pad so struct is 512b */ - u_int8_t bsBootSectSig0; - u_int8_t bsBootSectSig1; + uint8_t bsBootSectSig0; + uint8_t bsBootSectSig1; #define BOOTSIG0 0x55 #define BOOTSIG1 0xaa }; @@ -47,25 +47,25 @@ struct extboot { }; struct bootsector50 { - u_int8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */ + uint8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */ int8_t bsOemName[8]; /* OEM name and version */ int8_t bsBPB[25]; /* BIOS parameter block */ int8_t bsExt[26]; /* Bootsector Extension */ int8_t bsBootCode[448]; /* pad so structure is 512b */ - u_int8_t bsBootSectSig0; - u_int8_t bsBootSectSig1; + uint8_t bsBootSectSig0; + uint8_t bsBootSectSig1; #define BOOTSIG0 0x55 #define BOOTSIG1 0xaa }; struct bootsector710 { - u_int8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */ + uint8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */ int8_t bsOEMName[8]; /* OEM name and version */ int8_t bsBPB[53]; /* BIOS parameter block */ int8_t bsExt[26]; /* Bootsector Extension */ int8_t bsBootCode[420]; /* pad so structure is 512b */ - u_int8_t bsBootSectSig0; - u_int8_t bsBootSectSig1; + uint8_t bsBootSectSig0; + uint8_t bsBootSectSig1; #define BOOTSIG0 0x55 #define BOOTSIG1 0xaa }; Modified: head/sys/fs/msdosfs/bpb.h ============================================================================== --- head/sys/fs/msdosfs/bpb.h Fri May 19 18:07:28 2017 (r318547) +++ head/sys/fs/msdosfs/bpb.h Fri May 19 18:13:41 2017 (r318548) @@ -24,17 +24,17 @@ * BIOS Parameter Block (BPB) for DOS 3.3 */ struct bpb33 { - u_int16_t bpbBytesPerSec; /* bytes per sector */ - u_int8_t bpbSecPerClust; /* sectors per cluster */ - u_int16_t bpbResSectors; /* number of reserved sectors */ - u_int8_t bpbFATs; /* number of FATs */ - u_int16_t bpbRootDirEnts; /* number of root directory entries */ - u_int16_t bpbSectors; /* total number of sectors */ - u_int8_t bpbMedia; /* media descriptor */ - u_int16_t bpbFATsecs; /* number of sectors per FAT */ - u_int16_t bpbSecPerTrack; /* sectors per track */ - u_int16_t bpbHeads; /* number of heads */ - u_int16_t bpbHiddenSecs; /* number of hidden sectors */ + uint16_t bpbBytesPerSec; /* bytes per sector */ + uint8_t bpbSecPerClust; /* sectors per cluster */ + uint16_t bpbResSectors; /* number of reserved sectors */ + uint8_t bpbFATs; /* number of FATs */ + uint16_t bpbRootDirEnts; /* number of root directory entries */ + uint16_t bpbSectors; /* total number of sectors */ + uint8_t bpbMedia; /* media descriptor */ + uint16_t bpbFATsecs; /* number of sectors per FAT */ + uint16_t bpbSecPerTrack; /* sectors per track */ + uint16_t bpbHeads; /* number of heads */ + uint16_t bpbHiddenSecs; /* number of hidden sectors */ }; /* @@ -42,46 +42,46 @@ struct bpb33 { * and bpbHugeSectors is not in the 3.3 bpb. */ struct bpb50 { - u_int16_t bpbBytesPerSec; /* bytes per sector */ - u_int8_t bpbSecPerClust; /* sectors per cluster */ - u_int16_t bpbResSectors; /* number of reserved sectors */ - u_int8_t bpbFATs; /* number of FATs */ - u_int16_t bpbRootDirEnts; /* number of root directory entries */ - u_int16_t bpbSectors; /* total number of sectors */ - u_int8_t bpbMedia; /* media descriptor */ - u_int16_t bpbFATsecs; /* number of sectors per FAT */ - u_int16_t bpbSecPerTrack; /* sectors per track */ - u_int16_t bpbHeads; /* number of heads */ - u_int32_t bpbHiddenSecs; /* # of hidden sectors */ - u_int32_t bpbHugeSectors; /* # of sectors if bpbSectors == 0 */ + uint16_t bpbBytesPerSec; /* bytes per sector */ + uint8_t bpbSecPerClust; /* sectors per cluster */ + uint16_t bpbResSectors; /* number of reserved sectors */ + uint8_t bpbFATs; /* number of FATs */ + uint16_t bpbRootDirEnts; /* number of root directory entries */ + uint16_t bpbSectors; /* total number of sectors */ + uint8_t bpbMedia; /* media descriptor */ + uint16_t bpbFATsecs; /* number of sectors per FAT */ + uint16_t bpbSecPerTrack; /* sectors per track */ + uint16_t bpbHeads; /* number of heads */ + uint32_t bpbHiddenSecs; /* # of hidden sectors */ + uint32_t bpbHugeSectors; /* # of sectors if bpbSectors == 0 */ }; /* * BPB for DOS 7.10 (FAT32). This one has a few extensions to bpb50. */ struct bpb710 { - u_int16_t bpbBytesPerSec; /* bytes per sector */ - u_int8_t bpbSecPerClust; /* sectors per cluster */ - u_int16_t bpbResSectors; /* number of reserved sectors */ - u_int8_t bpbFATs; /* number of FATs */ - u_int16_t bpbRootDirEnts; /* number of root directory entries */ - u_int16_t bpbSectors; /* total number of sectors */ - u_int8_t bpbMedia; /* media descriptor */ - u_int16_t bpbFATsecs; /* number of sectors per FAT */ - u_int16_t bpbSecPerTrack; /* sectors per track */ - u_int16_t bpbHeads; /* number of heads */ - u_int32_t bpbHiddenSecs; /* # of hidden sectors */ - u_int32_t bpbHugeSectors; /* # of sectors if bpbSectors == 0 */ - u_int32_t bpbBigFATsecs; /* like bpbFATsecs for FAT32 */ - u_int16_t bpbExtFlags; /* extended flags: */ + uint16_t bpbBytesPerSec; /* bytes per sector */ + uint8_t bpbSecPerClust; /* sectors per cluster */ + uint16_t bpbResSectors; /* number of reserved sectors */ + uint8_t bpbFATs; /* number of FATs */ + uint16_t bpbRootDirEnts; /* number of root directory entries */ + uint16_t bpbSectors; /* total number of sectors */ + uint8_t bpbMedia; /* media descriptor */ + uint16_t bpbFATsecs; /* number of sectors per FAT */ + uint16_t bpbSecPerTrack; /* sectors per track */ + uint16_t bpbHeads; /* number of heads */ + uint32_t bpbHiddenSecs; /* # of hidden sectors */ + uint32_t bpbHugeSectors; /* # of sectors if bpbSectors == 0 */ + uint32_t bpbBigFATsecs; /* like bpbFATsecs for FAT32 */ + uint16_t bpbExtFlags; /* extended flags: */ #define FATNUM 0xf /* mask for numbering active FAT */ #define FATMIRROR 0x80 /* FAT is mirrored (like it always was) */ - u_int16_t bpbFSVers; /* filesystem version */ + uint16_t bpbFSVers; /* filesystem version */ #define FSVERS 0 /* currently only 0 is understood */ - u_int32_t bpbRootClust; /* start cluster for root directory */ - u_int16_t bpbFSInfo; /* filesystem info structure sector */ - u_int16_t bpbBackup; /* backup boot sector */ - u_int8_t bpbReserved[12]; /* reserved for future expansion */ + uint32_t bpbRootClust; /* start cluster for root directory */ + uint16_t bpbFSInfo; /* filesystem info structure sector */ + uint16_t bpbBackup; /* backup boot sector */ + uint8_t bpbReserved[12]; /* reserved for future expansion */ }; /* @@ -138,37 +138,37 @@ struct byte_bpb50 { * BPB for DOS 7.10 (FAT32). This one has a few extensions to bpb50. */ struct byte_bpb710 { - u_int8_t bpbBytesPerSec[2]; /* bytes per sector */ - u_int8_t bpbSecPerClust; /* sectors per cluster */ - u_int8_t bpbResSectors[2]; /* number of reserved sectors */ - u_int8_t bpbFATs; /* number of FATs */ - u_int8_t bpbRootDirEnts[2]; /* number of root directory entries */ - u_int8_t bpbSectors[2]; /* total number of sectors */ - u_int8_t bpbMedia; /* media descriptor */ - u_int8_t bpbFATsecs[2]; /* number of sectors per FAT */ - u_int8_t bpbSecPerTrack[2]; /* sectors per track */ - u_int8_t bpbHeads[2]; /* number of heads */ - u_int8_t bpbHiddenSecs[4]; /* # of hidden sectors */ - u_int8_t bpbHugeSectors[4]; /* # of sectors if bpbSectors == 0 */ - u_int8_t bpbBigFATsecs[4]; /* like bpbFATsecs for FAT32 */ - u_int8_t bpbExtFlags[2]; /* extended flags: */ - u_int8_t bpbFSVers[2]; /* filesystem version */ - u_int8_t bpbRootClust[4]; /* start cluster for root directory */ - u_int8_t bpbFSInfo[2]; /* filesystem info structure sector */ - u_int8_t bpbBackup[2]; /* backup boot sector */ - u_int8_t bpbReserved[12]; /* reserved for future expansion */ + uint8_t bpbBytesPerSec[2]; /* bytes per sector */ + uint8_t bpbSecPerClust; /* sectors per cluster */ + uint8_t bpbResSectors[2]; /* number of reserved sectors */ + uint8_t bpbFATs; /* number of FATs */ + uint8_t bpbRootDirEnts[2]; /* number of root directory entries */ + uint8_t bpbSectors[2]; /* total number of sectors */ + uint8_t bpbMedia; /* media descriptor */ + uint8_t bpbFATsecs[2]; /* number of sectors per FAT */ + uint8_t bpbSecPerTrack[2]; /* sectors per track */ + uint8_t bpbHeads[2]; /* number of heads */ + uint8_t bpbHiddenSecs[4]; /* # of hidden sectors */ + uint8_t bpbHugeSectors[4]; /* # of sectors if bpbSectors == 0 */ + uint8_t bpbBigFATsecs[4]; /* like bpbFATsecs for FAT32 */ + uint8_t bpbExtFlags[2]; /* extended flags: */ + uint8_t bpbFSVers[2]; /* filesystem version */ + uint8_t bpbRootClust[4]; /* start cluster for root directory */ + uint8_t bpbFSInfo[2]; /* filesystem info structure sector */ + uint8_t bpbBackup[2]; /* backup boot sector */ + uint8_t bpbReserved[12]; /* reserved for future expansion */ }; /* * FAT32 FSInfo block. */ struct fsinfo { - u_int8_t fsisig1[4]; - u_int8_t fsifill1[480]; - u_int8_t fsisig2[4]; - u_int8_t fsinfree[4]; - u_int8_t fsinxtfree[4]; - u_int8_t fsifill2[12]; - u_int8_t fsisig3[4]; + uint8_t fsisig1[4]; + uint8_t fsifill1[480]; + uint8_t fsisig2[4]; + uint8_t fsinfree[4]; + uint8_t fsinxtfree[4]; + uint8_t fsifill2[12]; + uint8_t fsisig3[4]; }; #endif /* !_FS_MSDOSFS_BPB_H_ */ Modified: head/sys/fs/msdosfs/denode.h ============================================================================== --- head/sys/fs/msdosfs/denode.h Fri May 19 18:07:28 2017 (r318547) +++ head/sys/fs/msdosfs/denode.h Fri May 19 18:13:41 2017 (r318548) @@ -158,7 +158,7 @@ struct denode { u_long de_FileSize; /* size of file in bytes */ struct fatcache de_fc[FC_SIZE]; /* fat cache */ u_quad_t de_modrev; /* Revision level for lease. */ - u_int64_t de_inode; /* Inode number (really byte offset of direntry) */ + uint64_t de_inode; /* Inode number (really byte offset of direntry) */ }; /* @@ -224,7 +224,7 @@ struct denode { break; \ } \ if ((dep)->de_flag & DE_ACCESS) { \ - u_int16_t adate; \ + uint16_t adate; \ \ timespec2fattime((acc), 0, &adate, NULL, NULL); \ if (adate != (dep)->de_ADate) { \ @@ -247,10 +247,10 @@ struct defid { u_short defid_len; /* length of structure */ u_short defid_pad; /* force long alignment */ - u_int32_t defid_dirclust; /* cluster this dir entry came from */ - u_int32_t defid_dirofs; /* offset of entry within the cluster */ + uint32_t defid_dirclust; /* cluster this dir entry came from */ + uint32_t defid_dirofs; /* offset of entry within the cluster */ #if 0 - u_int32_t defid_gen; /* generation number */ + uint32_t defid_gen; /* generation number */ #endif }; Modified: head/sys/fs/msdosfs/direntry.h ============================================================================== --- head/sys/fs/msdosfs/direntry.h Fri May 19 18:07:28 2017 (r318547) +++ head/sys/fs/msdosfs/direntry.h Fri May 19 18:13:41 2017 (r318548) @@ -54,11 +54,11 @@ * Structure of a dos directory entry. */ struct direntry { - u_int8_t deName[11]; /* filename, blank filled */ + uint8_t deName[11]; /* filename, blank filled */ #define SLOT_EMPTY 0x00 /* slot has never been used */ #define SLOT_E5 0x05 /* the real value is 0xe5 */ #define SLOT_DELETED 0xe5 /* file in this slot deleted */ - u_int8_t deAttributes; /* file attributes */ + uint8_t deAttributes; /* file attributes */ #define ATTR_NORMAL 0x00 /* normal file */ #define ATTR_READONLY 0x01 /* file is readonly */ #define ATTR_HIDDEN 0x02 /* file is hidden */ @@ -66,35 +66,35 @@ struct direntry { #define ATTR_VOLUME 0x08 /* entry is a volume label */ #define ATTR_DIRECTORY 0x10 /* entry is a directory name */ #define ATTR_ARCHIVE 0x20 /* file is new or modified */ - u_int8_t deLowerCase; /* NT VFAT lower case flags */ + uint8_t deLowerCase; /* NT VFAT lower case flags */ #define LCASE_BASE 0x08 /* filename base in lower case */ #define LCASE_EXT 0x10 /* filename extension in lower case */ - u_int8_t deCHundredth; /* hundredth of seconds in CTime */ - u_int8_t deCTime[2]; /* create time */ - u_int8_t deCDate[2]; /* create date */ - u_int8_t deADate[2]; /* access date */ - u_int8_t deHighClust[2]; /* high bytes of cluster number */ - u_int8_t deMTime[2]; /* last update time */ - u_int8_t deMDate[2]; /* last update date */ - u_int8_t deStartCluster[2]; /* starting cluster of file */ - u_int8_t deFileSize[4]; /* size of file in bytes */ + uint8_t deCHundredth; /* hundredth of seconds in CTime */ + uint8_t deCTime[2]; /* create time */ + uint8_t deCDate[2]; /* create date */ + uint8_t deADate[2]; /* access date */ + uint8_t deHighClust[2]; /* high bytes of cluster number */ + uint8_t deMTime[2]; /* last update time */ + uint8_t deMDate[2]; /* last update date */ + uint8_t deStartCluster[2]; /* starting cluster of file */ + uint8_t deFileSize[4]; /* size of file in bytes */ }; /* * Structure of a Win95 long name directory entry */ struct winentry { - u_int8_t weCnt; + uint8_t weCnt; #define WIN_LAST 0x40 #define WIN_CNT 0x3f - u_int8_t wePart1[10]; - u_int8_t weAttributes; + uint8_t wePart1[10]; + uint8_t weAttributes; #define ATTR_WIN95 0x0f - u_int8_t weReserved1; - u_int8_t weChksum; - u_int8_t wePart2[12]; - u_int16_t weReserved2; - u_int8_t wePart3[4]; + uint8_t weReserved1; + uint8_t weChksum; + uint8_t wePart2[12]; + uint16_t weReserved2; + uint8_t wePart3[4]; }; #define WIN_CHARS 13 /* Number of chars per winentry */ @@ -156,7 +156,7 @@ int winChkName(struct mbnambuf *nbp, con int chksum, struct msdosfsmount *pmp); int win2unixfn(struct mbnambuf *nbp, struct winentry *wep, int chksum, struct msdosfsmount *pmp); -u_int8_t winChksum(u_int8_t *name); +uint8_t winChksum(uint8_t *name); int winSlotCnt(const u_char *un, size_t unlen, struct msdosfsmount *pmp); size_t winLenFixup(const u_char *un, size_t unlen); #endif /* _KERNEL */ Modified: head/sys/fs/msdosfs/msdosfs_conv.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_conv.c Fri May 19 18:07:28 2017 (r318547) +++ head/sys/fs/msdosfs/msdosfs_conv.c Fri May 19 18:13:41 2017 (r318548) @@ -62,9 +62,9 @@ extern struct iconv_functions *msdosfs_i static int mbsadjpos(const char **, size_t, size_t, int, int, void *handle); static u_char * dos2unixchr(u_char *, const u_char **, size_t *, int, struct msdosfsmount *); -static u_int16_t unix2doschr(const u_char **, size_t *, struct msdosfsmount *); -static u_char * win2unixchr(u_char *, u_int16_t, struct msdosfsmount *); -static u_int16_t unix2winchr(const u_char **, size_t *, int, struct msdosfsmount *); +static uint16_t unix2doschr(const u_char **, size_t *, struct msdosfsmount *); +static u_char * win2unixchr(u_char *, uint16_t, struct msdosfsmount *); +static uint16_t unix2winchr(const u_char **, size_t *, int, struct msdosfsmount *); /* * 0 - character disallowed in long file name. @@ -303,7 +303,7 @@ unix2dosfn(const u_char *un, u_char dn[1 int conv = 1; const u_char *cp, *dp, *dp1; u_char gentext[6], *wcp; - u_int16_t c; + uint16_t c; /* * Fill the dos filename string with blanks. These are DOS's pad @@ -518,9 +518,9 @@ int unix2winfn(const u_char *un, size_t unlen, struct winentry *wep, int cnt, int chksum, struct msdosfsmount *pmp) { - u_int8_t *wcp; + uint8_t *wcp; int i, end; - u_int16_t code; + uint16_t code; /* * Drop trailing blanks and dots @@ -536,7 +536,7 @@ unix2winfn(const u_char *un, size_t unle /* * Initialize winentry to some useful default */ - for (wcp = (u_int8_t *)wep, i = sizeof(*wep); --i >= 0; *wcp++ = 0xff); + for (wcp = (uint8_t *)wep, i = sizeof(*wep); --i >= 0; *wcp++ = 0xff); wep->weCnt = cnt; wep->weAttributes = ATTR_WIN95; wep->weReserved1 = 0; @@ -583,7 +583,7 @@ winChkName(struct mbnambuf *nbp, const u struct msdosfsmount *pmp) { size_t len; - u_int16_t c1, c2; + uint16_t c1, c2; u_char *np; struct dirent dirbuf; @@ -630,9 +630,9 @@ win2unixfn(struct mbnambuf *nbp, struct struct msdosfsmount *pmp) { u_char *c, tmpbuf[5]; - u_int8_t *cp; - u_int8_t *np, name[WIN_CHARS * 3 + 1]; - u_int16_t code; + uint8_t *cp; + uint8_t *np, name[WIN_CHARS * 3 + 1]; + uint16_t code; int i; if ((wep->weCnt&WIN_CNT) > howmany(WIN_MAXLEN, WIN_CHARS) @@ -722,11 +722,11 @@ win2unixfn(struct mbnambuf *nbp, struct /* * Compute the unrolled checksum of a DOS filename for Win95 LFN use. */ -u_int8_t -winChksum(u_int8_t *name) +uint8_t +winChksum(uint8_t *name) { int i; - u_int8_t s; + uint8_t s; for (s = 0, i = 11; --i >= 0; s += *name++) s = (s << 7)|(s >> 1); @@ -838,12 +838,12 @@ dos2unixchr(u_char *outbuf, const u_char /* * Convert Local char to DOS char */ -static u_int16_t +static uint16_t unix2doschr(const u_char **instr, size_t *ilen, struct msdosfsmount *pmp) { u_char c; char *up, *outp, unicode[3], outbuf[3]; - u_int16_t wc; + uint16_t wc; size_t len, ucslen, unixlen, olen; if (pmp->pm_flags & MSDOSFSMNT_KICONV && msdosfs_iconv) { @@ -909,14 +909,14 @@ unix2doschr(const u_char **instr, size_t c = *(*instr)++; c = l2u[c]; c = unix2dos[c]; - return ((u_int16_t)c); + return ((uint16_t)c); } /* * Convert Windows char to Local char */ static u_char * -win2unixchr(u_char *outbuf, u_int16_t wc, struct msdosfsmount *pmp) +win2unixchr(u_char *outbuf, uint16_t wc, struct msdosfsmount *pmp) { u_char *inp, *outp, inbuf[3]; size_t ilen, olen, len; @@ -951,11 +951,11 @@ win2unixchr(u_char *outbuf, u_int16_t wc /* * Convert Local char to Windows char */ -static u_int16_t +static uint16_t unix2winchr(const u_char **instr, size_t *ilen, int lower, struct msdosfsmount *pmp) { u_char *outp, outbuf[3]; - u_int16_t wc; + uint16_t wc; size_t olen; if (*ilen == 0) Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Fri May 19 18:07:28 2017 (r318547) +++ head/sys/fs/msdosfs/msdosfs_fat.c Fri May 19 18:13:41 2017 (r318548) @@ -338,9 +338,9 @@ updatefats(struct msdosfsmount *pmp, str bcopy(bp->b_data, bpn->b_data, bp->b_bcount); /* Force the clean bit on in the other copies. */ if (cleanfat == 16) - ((u_int8_t *)bpn->b_data)[3] |= 0x80; + ((uint8_t *)bpn->b_data)[3] |= 0x80; else if (cleanfat == 32) - ((u_int8_t *)bpn->b_data)[7] |= 0x08; + ((uint8_t *)bpn->b_data)[7] |= 0x08; if (pmp->pm_mountp->mnt_flag & MNT_SYNCHRONOUS) bwrite(bpn); else Modified: head/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_lookup.c Fri May 19 18:07:28 2017 (r318547) +++ head/sys/fs/msdosfs/msdosfs_lookup.c Fri May 19 18:13:41 2017 (r318548) @@ -62,7 +62,7 @@ #include static int msdosfs_lookup_(struct vnode *vdp, struct vnode **vpp, - struct componentname *cnp, u_int64_t *inum); + struct componentname *cnp, uint64_t *inum); int msdosfs_lookup(struct vop_cachedlookup_args *ap) @@ -110,7 +110,7 @@ msdosfs_deget_dotdot(struct mount *mp, v */ static int msdosfs_lookup_(struct vnode *vdp, struct vnode **vpp, - struct componentname *cnp, u_int64_t *dd_inum) + struct componentname *cnp, uint64_t *dd_inum) { struct mbnambuf nb; daddr_t bn; @@ -135,7 +135,7 @@ msdosfs_lookup_(struct vnode *vdp, struc int flags = cnp->cn_flags; int nameiop = cnp->cn_nameiop; int unlen; - u_int64_t inode1; + uint64_t inode1; int wincnt = 1; int chksum = -1, chksum_ok; @@ -656,7 +656,7 @@ createde(struct denode *dep, struct deno * Now write the Win95 long name */ if (ddep->de_fndcnt > 0) { - u_int8_t chksum = winChksum(ndep->deName); + uint8_t chksum = winChksum(ndep->deName); const u_char *un = (const u_char *)cnp->cn_nameptr; int unlen = cnp->cn_namelen; int cnt = 1; Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Fri May 19 18:07:28 2017 (r318547) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Fri May 19 18:13:41 2017 (r318548) @@ -398,7 +398,7 @@ mountmsdosfs(struct vnode *devvp, struct struct byte_bpb33 *b33; struct byte_bpb50 *b50; struct byte_bpb710 *b710; - u_int8_t SecPerClust; + uint8_t SecPerClust; u_long clusters; int ronly, error; struct g_consumer *cp; Modified: head/sys/fs/msdosfs/msdosfsmount.h ============================================================================== --- head/sys/fs/msdosfs/msdosfsmount.h Fri May 19 18:07:28 2017 (r318547) +++ head/sys/fs/msdosfs/msdosfsmount.h Fri May 19 18:13:41 2017 (r318548) @@ -96,7 +96,7 @@ struct msdosfsmount { u_long pm_fatblocksize; /* size of fat blocks in bytes */ u_long pm_fatblocksec; /* size of fat blocks in sectors */ u_long pm_fatsize; /* size of fat in bytes */ - u_int32_t pm_fatmask; /* mask to use for fat numbers */ + uint32_t pm_fatmask; /* mask to use for fat numbers */ u_long pm_fsinfo; /* fsinfo block number */ u_long pm_nxtfree; /* next place to search for a free cluster */ u_int pm_fatmult; /* these 2 values are used in fat */ @@ -108,7 +108,7 @@ struct msdosfsmount { void *pm_w2u; /* Unicode->Local iconv handle */ void *pm_u2d; /* Unicode->DOS iconv handle */ void *pm_d2u; /* DOS->Local iconv handle */ - u_int32_t pm_nfileno; /* next 32-bit fileno */ + uint32_t pm_nfileno; /* next 32-bit fileno */ RB_HEAD(msdosfs_filenotree, msdosfs_fileno) pm_filenos; /* 64<->32-bit fileno mapping */ struct lock pm_fatlock; /* lockmgr protecting allocations and rb tree */ @@ -240,7 +240,7 @@ struct msdosfs_args { mode_t mask; /* file mask to be applied for msdosfs perms */ int flags; /* see below */ int unused1; /* unused, was version number */ - u_int16_t unused2[128]; /* no longer used, was Local->Unicode table */ + uint16_t unused2[128]; /* no longer used, was Local->Unicode table */ char *cs_win; /* Windows(Unicode) Charset */ char *cs_dos; /* DOS Charset */ char *cs_local; /* Local Charset */ From owner-svn-src-all@freebsd.org Fri May 19 18:23:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D79ACD74044; Fri, 19 May 2017 18:23:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8F85238; Fri, 19 May 2017 18:23:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JINiNC055327; Fri, 19 May 2017 18:23:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JINiAr055326; Fri, 19 May 2017 18:23:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705191823.v4JINiAr055326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 18:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318549 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 18:23:45 -0000 Author: gjb Date: Fri May 19 18:23:44 2017 New Revision: 318549 URL: https://svnweb.freebsd.org/changeset/base/318549 Log: Use literal tags around 'keep state'/'keep frags' to avoid (mis)placing a comma. In collaboration with: adamw Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 18:13:41 2017 (r318548) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 18:23:44 2017 (r318549) @@ -385,9 +385,9 @@ &man.close.2; calls. The &man.ipf.4; packet filter has been - updated to prevent "keep state" from incorrectly - implying "keep frags", matching the behavior - documented in &man.ipf.5;. + updated to prevent keep state from + incorrectly implying keep frags, matching + the behavior documented in &man.ipf.5;. From owner-svn-src-all@freebsd.org Fri May 19 20:02:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 545B6D74E17; Fri, 19 May 2017 20:02:34 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21259ECE; Fri, 19 May 2017 20:02:34 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JK2Xoo099044; Fri, 19 May 2017 20:02:33 GMT (envelope-from maxim@FreeBSD.org) Received: (from maxim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JK2XBn099043; Fri, 19 May 2017 20:02:33 GMT (envelope-from maxim@FreeBSD.org) Message-Id: <201705192002.v4JK2XBn099043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: maxim set sender to maxim@FreeBSD.org using -f From: Maxim Konovalov Date: Fri, 19 May 2017 20:02:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318550 - head/usr.sbin/devctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:02:34 -0000 Author: maxim Date: Fri May 19 20:02:32 2017 New Revision: 318550 URL: https://svnweb.freebsd.org/changeset/base/318550 Log: o Missed flag restored. PR: 219395 Submitted by: Tiwei Bie Modified: head/usr.sbin/devctl/devctl.8 Modified: head/usr.sbin/devctl/devctl.8 ============================================================================== --- head/usr.sbin/devctl/devctl.8 Fri May 19 18:23:44 2017 (r318549) +++ head/usr.sbin/devctl/devctl.8 Fri May 19 20:02:32 2017 (r318550) @@ -156,7 +156,7 @@ the device will not be changed. Rescan a bus device checking for devices that have been added or removed. .It Xo Cm delete -.Op Fl +.Op Fl f .Ar device .Xc Delete the device from the device tree. From owner-svn-src-all@freebsd.org Fri May 19 20:11:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39279D74FF1; Fri, 19 May 2017 20:11:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5F5A1298; Fri, 19 May 2017 20:11:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKBUYv000948; Fri, 19 May 2017 20:11:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKBUSA000947; Fri, 19 May 2017 20:11:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192011.v4JKBUSA000947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318551 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:11:32 -0000 Author: gjb Date: Fri May 19 20:11:30 2017 New Revision: 318551 URL: https://svnweb.freebsd.org/changeset/base/318551 Log: Further clarify zfsbootcfg(8). Move kvm_close(3) entry to 'Runtime Libraries and API'. Move cloudabi(4) to the 'Kernel Modules' section. Submitted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:02:32 2017 (r318550) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:30 2017 (r318551) @@ -197,8 +197,8 @@ default. The &man.zfsbootcfg.8; utility has been - added, providing one-time &man.nextboot.8; options for - &man.zfsboot.8;. + added, providing one-time &man.boot.config.5;-style options + for &man.zfsboot.8;. The &man.setkey.8; utility has been modified to show the runtime @@ -348,6 +348,10 @@ Runtime Libraries and API + The &man.kvm.close.3; function has been + updated to return the accumulated error from previous + &man.close.2; calls. + The clock_nanosleep() system call has been added. The @@ -380,10 +384,6 @@ Kernel Bug Fixes - The &man.kvm.close.3; function has been - updated to return the accumulated error from previous - &man.close.2; calls. - The &man.ipf.4; packet filter has been updated to prevent keep state from incorrectly implying keep frags, matching @@ -407,6 +407,11 @@ Kernel Modules + &man.cloudabi.4; has been updated to + allow running 32-bit binaries within 64-bit userland + environments when the kernel configuration file has the + COMPAT_CLOUDABI32 option present. + The ipsec and tcpmd5 kernel modules have been added. @@ -542,12 +547,6 @@ Hardware Support - The &man.cloudabi.4; driver has been - updated to allow running 32-bit binaries within 64-bit - userland environments when the kernel configuration file has - the COMPAT_CLOUDABI32 option - present. - The &man.atkbdc.4; driver has been updated to provide support for Elantech® trackpads. To enable hardware support, add From owner-svn-src-all@freebsd.org Fri May 19 20:11:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7466D74FFD; Fri, 19 May 2017 20:11:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3E1012A3; Fri, 19 May 2017 20:11:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKBWo6001039; Fri, 19 May 2017 20:11:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKBWOB001038; Fri, 19 May 2017 20:11:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192011.v4JKBWOB001038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:11:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318553 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:11:34 -0000 Author: gjb Date: Fri May 19 20:11:32 2017 New Revision: 318553 URL: https://svnweb.freebsd.org/changeset/base/318553 Log: Document r312394, /dev/kmem no longer supports access via mmap(). Document r306533, devctl(8) now supports a "clear driver" command. Submitted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:31 2017 (r318552) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:32 2017 (r318553) @@ -488,6 +488,17 @@ The &man.bytgpio.4; driver has been added, providing support for Intel® Bay Trail™ SoC GPIO controllers. + + /dev/kmem no longer + supports access via mmap(). Consumers + wishing to use /dev/kmem must use + read() and + write(). + + &man.devctl.8; now supports a "clear + driver" command as a complement to "set + driver". From owner-svn-src-all@freebsd.org Fri May 19 20:11:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFB32D74FF7; Fri, 19 May 2017 20:11:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C14A1129C; Fri, 19 May 2017 20:11:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKBVgn000996; Fri, 19 May 2017 20:11:31 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKBV3g000995; Fri, 19 May 2017 20:11:31 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192011.v4JKBV3g000995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318552 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:11:33 -0000 Author: gjb Date: Fri May 19 20:11:31 2017 New Revision: 318552 URL: https://svnweb.freebsd.org/changeset/base/318552 Log: Document r309258, max_align_t' is now defined for C11 compliance. Submitted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:30 2017 (r318551) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:31 2017 (r318552) @@ -362,6 +362,9 @@ ABI Compatibility + The type max_align_t + is now defined for C11 compliance. + The sem_clockwait_np() library function has From owner-svn-src-all@freebsd.org Fri May 19 20:11:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BB1ED74040; Fri, 19 May 2017 20:11:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AD2E12B7; Fri, 19 May 2017 20:11:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKBY5R001127; Fri, 19 May 2017 20:11:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKBYCU001126; Fri, 19 May 2017 20:11:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192011.v4JKBYCU001126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318555 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:11:35 -0000 Author: gjb Date: Fri May 19 20:11:34 2017 New Revision: 318555 URL: https://svnweb.freebsd.org/changeset/base/318555 Log: Document r306520, PCI pass through with bhyve resets functions via FLR. Document r306471, PCI pass through with bhyve supports more dynamic configurations. Submitted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:33 2017 (r318554) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:34 2017 (r318555) @@ -602,7 +602,16 @@ Virtualization Support -   + PCI passthrough with + &man.bhyve.4; supports more dynamic configurations permitting + devices to be marked for passthrough or host use at + runtime. + + PCI passthrough with + &man.bhyve.4; resets functions via FLR when + a virtual machine is started and stopped. From owner-svn-src-all@freebsd.org Fri May 19 20:11:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AD38D7405A; Fri, 19 May 2017 20:11:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 291A012C5; Fri, 19 May 2017 20:11:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKBZJp001171; Fri, 19 May 2017 20:11:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKBZpZ001170; Fri, 19 May 2017 20:11:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192011.v4JKBZpZ001170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318556 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:11:36 -0000 Author: gjb Date: Fri May 19 20:11:35 2017 New Revision: 318556 URL: https://svnweb.freebsd.org/changeset/base/318556 Log: Add a 'Userland Debugging' section. Document r306786, core dumps now include the process ID (PID) and command line arguments. Document r304499, ptrace(2) now supports events for vfork(2). Submitted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:34 2017 (r318555) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:35 2017 (r318556) @@ -375,6 +375,18 @@ nullability attribute has been added to the C library headers. + + + Userland Debugging + + &man.ptrace.2; now supports events for + &man.vfork.2;, permitting reliable debugging across + &man.vfork.2; invocations. + + Process core dumps now include the + process ID (PID and command line + arguments. + From owner-svn-src-all@freebsd.org Fri May 19 20:11:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0893D74039; Fri, 19 May 2017 20:11:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D70712A6; Fri, 19 May 2017 20:11:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKBXDI001084; Fri, 19 May 2017 20:11:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKBXhm001083; Fri, 19 May 2017 20:11:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192011.v4JKBXhm001083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:11:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318554 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:11:35 -0000 Author: gjb Date: Fri May 19 20:11:33 2017 New Revision: 318554 URL: https://svnweb.freebsd.org/changeset/base/318554 Log: Document r306660, Virtual Function devices on T4 and T5 adapters. Document r306661, TCP Offload Engine on Chelsio T4+ adapters. Document r306664, cxgbev(4) addition. Document r309560, several cxgbe(4) and cxgbev(4) updates. Submitted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:32 2017 (r318553) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:33 2017 (r318554) @@ -510,11 +510,42 @@ Network Drivers + The &man.cxgbe.4; has been updated to + provide support for Virtual Function devices + (VFs) on Chelsio T4 and T5 adapters. + + TCP connections using the TCP Offload + Engine (TOE) on Chelsio T4+ adapters can + now perform zero-copy sends via + aio_write(). + + The &man.cxgbev.4; has been added, + providing support for Virtual Function devices + (VFs) on Chelsio T4 and T5 adapters. + The &man.bnxt.4; driver has been added, providing support for Broadcom® NetXtreme-C™ and NetXtreme-E™ devices. + The &man.cxgbe.4; driver now supports + devices using T6-based adapters which support 10, 25, 40, and + 100 Gbps. + + The &man.cxgbe.4; has been updated to + provide support for Virtual Function devices + (VFs) on Chelsio T6 adapters. + + The &man.cxgbev.4; has been updated to + provide support for Virtual Function devices + (VFs) on Chelsio T6 adapters. + The &man.miibus.4; driver has been updated to support Microchip/Micrel KSZ9031 Gigabit ethernet From owner-svn-src-all@freebsd.org Fri May 19 20:16:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B790D744FA; Fri, 19 May 2017 20:16:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6F081D60; Fri, 19 May 2017 20:16:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKGE17003780; Fri, 19 May 2017 20:16:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKGEjc003779; Fri, 19 May 2017 20:16:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192016.v4JKGEjc003779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318557 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:16:16 -0000 Author: gjb Date: Fri May 19 20:16:14 2017 New Revision: 318557 URL: https://svnweb.freebsd.org/changeset/base/318557 Log: Document r305476, OpenSSH blacklistd(8) support. Wording fixes. Expand what GARP means. Submitted by: lidl Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:35 2017 (r318556) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:16:14 2017 (r318557) @@ -159,8 +159,8 @@ Userland Configuration Changes - The &man.inetd.8; utility can now be - built without libwrap support when + The &man.inetd.8; utility is now built + without libwrap support when WITHOUT_TCP_WRAPPERS is set in &man.src.conf.5;. @@ -179,6 +179,10 @@ Userland Application Changes + Support for &man.blacklistd.8; has been added + to OpenSSH. + The &man.cron.8; utility has been updated to add support for including files within Support for GARP - retransmit has been added. A new &man.sysctl.8;, + (gratuitous ARP) retransmit has been added. + A new &man.sysctl.8;, net.link.ether.inet.garp_rexmit_count, has been added, which sets the maximum number of retransmissions when set to a non-zero value. From owner-svn-src-all@freebsd.org Fri May 19 20:20:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C3C3D7481D; Fri, 19 May 2017 20:20:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B415CB; Fri, 19 May 2017 20:20:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKKHL1003986; Fri, 19 May 2017 20:20:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKKHW2003985; Fri, 19 May 2017 20:20:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192020.v4JKKHW2003985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318558 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:20:18 -0000 Author: gjb Date: Fri May 19 20:20:17 2017 New Revision: 318558 URL: https://svnweb.freebsd.org/changeset/base/318558 Log: Add a missing ')'. Spotted by: vangyzen Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:16:14 2017 (r318557) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:20:17 2017 (r318558) @@ -388,7 +388,7 @@ &man.vfork.2; invocations. Process core dumps now include the - process ID (PID and command line + process ID (PID) and command line arguments. From owner-svn-src-all@freebsd.org Fri May 19 20:22:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43D64D74A93; Fri, 19 May 2017 20:22:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDB957D7; Fri, 19 May 2017 20:22:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKMiRZ007818; Fri, 19 May 2017 20:22:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKMieQ007817; Fri, 19 May 2017 20:22:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192022.v4JKMieQ007817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318559 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:22:46 -0000 Author: gjb Date: Fri May 19 20:22:44 2017 New Revision: 318559 URL: https://svnweb.freebsd.org/changeset/base/318559 Log: Add missing 'driver' after manual page references where missing. Spotted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:20:17 2017 (r318558) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:22:44 2017 (r318559) @@ -527,8 +527,8 @@ Network Drivers The &man.cxgbe.4; has been updated to - provide support for Virtual Function devices + sponsor="&chelsio;">The &man.cxgbe.4; driver has been updated + to provide support for Virtual Function devices (VFs) on Chelsio T4 and T5 adapters. aio_write(). The &man.cxgbev.4; has been added, + sponsor="&chelsio;">The &man.cxgbev.4; driver has been added, providing support for Virtual Function devices (VFs) on Chelsio T4 and T5 adapters. @@ -553,13 +553,13 @@ 100 Gbps. The &man.cxgbe.4; has been updated to - provide support for Virtual Function devices + sponsor="&chelsio;">The &man.cxgbe.4; driver has been updated + to provide support for Virtual Function devices (VFs) on Chelsio T6 adapters. The &man.cxgbev.4; has been updated to - provide support for Virtual Function devices + sponsor="&chelsio;">The &man.cxgbev.4; driver has been updated + to provide support for Virtual Function devices (VFs) on Chelsio T6 adapters. Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 951D9D748ED; Fri, 19 May 2017 21:18:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 618AA7F; Fri, 19 May 2017 21:18:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JLIgQM029178; Fri, 19 May 2017 21:18:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JLIggH029177; Fri, 19 May 2017 21:18:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705192118.v4JLIggH029177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 19 May 2017 21:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318560 - stable/11/sys/libkern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 21:18:43 -0000 Author: markj Date: Fri May 19 21:18:42 2017 New Revision: 318560 URL: https://svnweb.freebsd.org/changeset/base/318560 Log: Direct commit to fix the PC98 build. Modified: stable/11/sys/libkern/crc32.c Modified: stable/11/sys/libkern/crc32.c ============================================================================== --- stable/11/sys/libkern/crc32.c Fri May 19 20:22:44 2017 (r318559) +++ stable/11/sys/libkern/crc32.c Fri May 19 21:18:42 2017 (r318560) @@ -755,7 +755,7 @@ calculate_crc32c(uint32_t crc32c, const unsigned char *buffer, unsigned int length) { -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) if ((cpu_feature2 & CPUID2_SSE42) != 0) { return (sse42_crc32c(crc32c, buffer, length)); } else From owner-svn-src-all@freebsd.org Fri May 19 22:54:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B91D7D74824; Fri, 19 May 2017 22:54:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 863A2EF1; Fri, 19 May 2017 22:54:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JMsjcH070375; Fri, 19 May 2017 22:54:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JMsj0V070374; Fri, 19 May 2017 22:54:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705192254.v4JMsj0V070374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 19 May 2017 22:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318562 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 22:54:46 -0000 Author: jhb Date: Fri May 19 22:54:45 2017 New Revision: 318562 URL: https://svnweb.freebsd.org/changeset/base/318562 Log: Exclude ccr(4) from arm LINT since it excludes cxgbe(4). Modified: head/sys/arm/conf/NOTES Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Fri May 19 21:20:01 2017 (r318561) +++ head/sys/arm/conf/NOTES Fri May 19 22:54:45 2017 (r318562) @@ -79,6 +79,7 @@ nodevice snake_saver nodevice star_saver nodevice warp_saver +nodevice ccr nodevice cxgbe nodevice cxgbev nodevice snd_cmi From owner-svn-src-all@freebsd.org Fri May 19 23:01:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4842FD7493A; Fri, 19 May 2017 23:01:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1823A13F0; Fri, 19 May 2017 23:01:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JN1uxI073668; Fri, 19 May 2017 23:01:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JN1udK073667; Fri, 19 May 2017 23:01:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705192301.v4JN1udK073667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 19 May 2017 23:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318563 - stable/11/sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 23:01:57 -0000 Author: jhb Date: Fri May 19 23:01:55 2017 New Revision: 318563 URL: https://svnweb.freebsd.org/changeset/base/318563 Log: MFC 318360: Fix p_endcopy. For p_endcopy to work correctly, it must be the name of the next element in struct proc after the end of the copy region, not the name of the last element in the copy region. Currently, the last element (p_elf_flags) is not being copied. In addition, the p_xexit and p_xsig fields should not be copied on fork, so move them out of the copy region. Note that for stable/11 the fix is a bit simpler than in HEAD as it merely consists of formally moving p_xexit and p_xsig out of the copy region by shrinking the end of the copy region. Modified: stable/11/sys/sys/proc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Fri May 19 22:54:45 2017 (r318562) +++ stable/11/sys/sys/proc.h Fri May 19 23:01:55 2017 (r318563) @@ -624,12 +624,11 @@ struct proc { pid_t p_reapsubtree; /* (e) Pid of the direct child of the reaper which spawned our subtree. */ - u_int p_xexit; /* (c) Exit code. */ - u_int p_xsig; /* (c) Stop/kill sig. */ - /* End area that is copied on creation. */ -#define p_endcopy p_pgrp +#define p_endcopy p_xexit + u_int p_xexit; /* (c) Exit code. */ + u_int p_xsig; /* (c) Stop/kill sig. */ struct pgrp *p_pgrp; /* (c + e) Pointer to process group. */ struct knlist *p_klist; /* (c) Knotes attached to this proc. */ int p_numthreads; /* (c) Number of threads. */ From owner-svn-src-all@freebsd.org Sat May 20 00:41:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ECC9D7324B; Sat, 20 May 2017 00:41:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 165081E4C; Sat, 20 May 2017 00:41:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K0fD7Y011401; Sat, 20 May 2017 00:41:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K0fDEd011400; Sat, 20 May 2017 00:41:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705200041.v4K0fDEd011400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 20 May 2017 00:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318564 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 00:41:14 -0000 Author: kib Date: Sat May 20 00:41:12 2017 New Revision: 318564 URL: https://svnweb.freebsd.org/changeset/base/318564 Log: MFC r318256: Style. Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Fri May 19 23:01:55 2017 (r318563) +++ stable/11/libexec/rtld-elf/rtld.c Sat May 20 00:41:12 2017 (r318564) @@ -339,22 +339,16 @@ _LD(const char *var) func_ptr_type _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) { - Elf_Auxinfo *aux_info[AT_COUNT]; - int i; - int argc; - char **argv; - char **env; - Elf_Auxinfo *aux; - Elf_Auxinfo *auxp; - const char *argv0; + Elf_Auxinfo *aux, *auxp, *aux_info[AT_COUNT]; Objlist_Entry *entry; - Obj_Entry *obj; - Obj_Entry *preload_tail; - Obj_Entry *last_interposer; + Obj_Entry *last_interposer, *obj, *preload_tail; + const Elf_Phdr *phdr; Objlist initlist; RtldLockState lockstate; - char *library_path_rpath; - int mib[2]; + char **argv, *argv0, **env, *kexecpath, *library_path_rpath; + caddr_t imgentry; + char buf[MAXPATHLEN]; + int argc, fd, i, mib[2], phnum; size_t len; /* @@ -477,7 +471,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ * already loaded. */ if (aux_info[AT_EXECFD] != NULL) { /* Load the main program. */ - int fd = aux_info[AT_EXECFD]->a_un.a_val; + fd = aux_info[AT_EXECFD]->a_un.a_val; dbg("loading main program"); obj_main = map_object(fd, argv0, NULL); close(fd); @@ -485,10 +479,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ rtld_die(); max_stack_flags = obj->stack_flags; } else { /* Main program already loaded. */ - const Elf_Phdr *phdr; - int phnum; - caddr_t entry; - dbg("processing main program's program header"); assert(aux_info[AT_PHDR] != NULL); phdr = (const Elf_Phdr *) aux_info[AT_PHDR]->a_un.a_ptr; @@ -497,15 +487,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ assert(aux_info[AT_PHENT] != NULL); assert(aux_info[AT_PHENT]->a_un.a_val == sizeof(Elf_Phdr)); assert(aux_info[AT_ENTRY] != NULL); - entry = (caddr_t) aux_info[AT_ENTRY]->a_un.a_ptr; - if ((obj_main = digest_phdr(phdr, phnum, entry, argv0)) == NULL) + imgentry = (caddr_t) aux_info[AT_ENTRY]->a_un.a_ptr; + if ((obj_main = digest_phdr(phdr, phnum, imgentry, argv0)) == NULL) rtld_die(); } if (aux_info[AT_EXECPATH] != NULL) { - char *kexecpath; - char buf[MAXPATHLEN]; - kexecpath = aux_info[AT_EXECPATH]->a_un.a_ptr; dbg("AT_EXECPATH %p %s", kexecpath, kexecpath); if (kexecpath[0] == '/') From owner-svn-src-all@freebsd.org Sat May 20 00:42:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE632D7336E; Sat, 20 May 2017 00:42:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0621108E; Sat, 20 May 2017 00:42:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K0gltp014983; Sat, 20 May 2017 00:42:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K0glEV014982; Sat, 20 May 2017 00:42:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705200042.v4K0glEV014982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 20 May 2017 00:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318565 - head/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 00:42:48 -0000 Author: emaste Date: Sat May 20 00:42:47 2017 New Revision: 318565 URL: https://svnweb.freebsd.org/changeset/base/318565 Log: bsdgrep: fix segfault with --mmap r313948 partially fixed --mmap behavior but was incomplete. This commit generally reverts it and does it the more correct way- by just consuming the rest of the buffer and moving on. PR: 219402 Submitted by: Kyle Evans Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D10820 Modified: head/usr.bin/grep/file.c Modified: head/usr.bin/grep/file.c ============================================================================== --- head/usr.bin/grep/file.c Sat May 20 00:41:12 2017 (r318564) +++ head/usr.bin/grep/file.c Sat May 20 00:42:47 2017 (r318565) @@ -213,24 +213,24 @@ grep_fgetln(struct file *f, size_t *lenp if (grep_lnbufgrow(len + LNBUFBUMP)) goto error; memcpy(lnbuf + off, bufpos, len - off); + /* With FILE_MMAP, this is EOF; there's no more to refill */ + if (filebehave == FILE_MMAP) { + bufrem -= len; + break; + } off = len; + /* Fetch more to try and find EOL/EOF */ if (grep_refill(f) != 0) goto error; if (bufrem == 0) /* EOF: return partial line */ break; - if ((p = memchr(bufpos, fileeol, bufrem)) == NULL && - filebehave != FILE_MMAP) + if ((p = memchr(bufpos, fileeol, bufrem)) == NULL) continue; - if (p == NULL) { - /* mmap EOF: return partial line, consume buffer */ - diff = len; - } else { - /* got it: finish up the line (like code above) */ - ++p; - diff = p - bufpos; - len += diff; - } + /* got it: finish up the line (like code above) */ + ++p; + diff = p - bufpos; + len += diff; if (grep_lnbufgrow(len)) goto error; memcpy(lnbuf + off, bufpos, diff); From owner-svn-src-all@freebsd.org Sat May 20 00:43:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B3B4D73414; Sat, 20 May 2017 00:43:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E5801232; Sat, 20 May 2017 00:43:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K0hr29015100; Sat, 20 May 2017 00:43:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K0hqjB015092; Sat, 20 May 2017 00:43:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705200043.v4K0hqjB015092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 20 May 2017 00:43:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318566 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 00:43:54 -0000 Author: adrian Date: Sat May 20 00:43:52 2017 New Revision: 318566 URL: https://svnweb.freebsd.org/changeset/base/318566 Log: [net80211] prepare for A-MSDU/A-MPDU offload crypto / sequence number checking. When doing AMSDU offload, the driver (for now!) presents 802.11 frames with the same sequence number and crypto sequence number / IV values up to the stack. But, this will trip afoul over the sequence number detection. So drivers now have a way to signify that a frame is part of an offloaded AMSDU group, so we can just ensure that we pass those frames up to the stack. The logic will be a bit messy - the TL;DR will be that if it's part of the previously seen sequence number then it belongs in the same burst. But if we get a repeat of the same sequence number (eg we sent an ACK but the receiver didn't hear it) then we shouldn't be passing those frames up. So, we can't just say "all subframes go up", we need to track whether we've seen the end of a burst of frames for the given sequence number or not, so we know whether to actually pass them up or not. The first part of doing all of this is to ensure the ieee80211_rx_stats struct is available in the RX sequence number check path and the RX ampdu reorder path. So, start by passing the pointer into these functions to avoid doing another lookup. The actual support will come in a subsequent commit once I know the functionality actually works! Modified: head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_ht.h head/sys/net80211/ieee80211_input.h head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_wds.c Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Sat May 20 00:42:47 2017 (r318565) +++ head/sys/net80211/ieee80211_adhoc.c Sat May 20 00:43:52 2017 (r318566) @@ -448,7 +448,7 @@ adhoc_input(struct ieee80211_node *ni, s if (IEEE80211_QOS_HAS_SEQ(wh) && TID_TO_WME_AC(tid) >= WME_AC_VI) ic->ic_wme.wme_hipri_traffic++; - if (! ieee80211_check_rxseq(ni, wh, bssid)) + if (! ieee80211_check_rxseq(ni, wh, bssid, rxs)) goto out; } } @@ -479,7 +479,7 @@ adhoc_input(struct ieee80211_node *ni, s * and we should do nothing more with it. */ if ((m->m_flags & M_AMPDU) && - ieee80211_ampdu_reorder(ni, m) != 0) { + ieee80211_ampdu_reorder(ni, m, rxs) != 0) { m = NULL; goto out; } Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Sat May 20 00:42:47 2017 (r318565) +++ head/sys/net80211/ieee80211_hostap.c Sat May 20 00:43:52 2017 (r318566) @@ -577,7 +577,7 @@ hostap_input(struct ieee80211_node *ni, if (IEEE80211_QOS_HAS_SEQ(wh) && TID_TO_WME_AC(tid) >= WME_AC_VI) ic->ic_wme.wme_hipri_traffic++; - if (! ieee80211_check_rxseq(ni, wh, bssid)) + if (! ieee80211_check_rxseq(ni, wh, bssid, rxs)) goto out; } } @@ -665,7 +665,7 @@ hostap_input(struct ieee80211_node *ni, * and we should do nothing more with it. */ if ((m->m_flags & M_AMPDU) && - ieee80211_ampdu_reorder(ni, m) != 0) { + ieee80211_ampdu_reorder(ni, m, rxs) != 0) { m = NULL; goto out; } Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Sat May 20 00:42:47 2017 (r318565) +++ head/sys/net80211/ieee80211_ht.c Sat May 20 00:43:52 2017 (r318566) @@ -849,7 +849,8 @@ ampdu_rx_flush_upto(struct ieee80211_nod * the frame should be processed normally by the caller. */ int -ieee80211_ampdu_reorder(struct ieee80211_node *ni, struct mbuf *m) +ieee80211_ampdu_reorder(struct ieee80211_node *ni, struct mbuf *m, + const struct ieee80211_rx_stats *rxs) { #define PROCESS 0 /* caller should process frame */ #define CONSUMED 1 /* frame consumed, caller does nothing */ Modified: head/sys/net80211/ieee80211_ht.h ============================================================================== --- head/sys/net80211/ieee80211_ht.h Sat May 20 00:42:47 2017 (r318565) +++ head/sys/net80211/ieee80211_ht.h Sat May 20 00:43:52 2017 (r318566) @@ -185,7 +185,8 @@ int ieee80211_setup_htrates(struct ieee8 void ieee80211_setup_basic_htrates(struct ieee80211_node *, const uint8_t *htinfo); struct mbuf *ieee80211_decap_amsdu(struct ieee80211_node *, struct mbuf *); -int ieee80211_ampdu_reorder(struct ieee80211_node *, struct mbuf *); +int ieee80211_ampdu_reorder(struct ieee80211_node *, struct mbuf *, + const struct ieee80211_rx_stats *); void ieee80211_recv_bar(struct ieee80211_node *, struct mbuf *); void ieee80211_ht_node_init(struct ieee80211_node *); void ieee80211_ht_node_cleanup(struct ieee80211_node *); Modified: head/sys/net80211/ieee80211_input.h ============================================================================== --- head/sys/net80211/ieee80211_input.h Sat May 20 00:42:47 2017 (r318565) +++ head/sys/net80211/ieee80211_input.h Sat May 20 00:43:52 2017 (r318566) @@ -158,7 +158,7 @@ ishtinfooui(const uint8_t *frm) */ static __inline int ieee80211_check_rxseq(struct ieee80211_node *ni, struct ieee80211_frame *wh, - uint8_t *bssid) + uint8_t *bssid, const struct ieee80211_rx_stats *rxs) { #define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) #define SEQ_EQ(a,b) ((int)((a)-(b)) == 0) Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Sat May 20 00:42:47 2017 (r318565) +++ head/sys/net80211/ieee80211_mesh.c Sat May 20 00:43:52 2017 (r318566) @@ -1580,7 +1580,7 @@ mesh_input(struct ieee80211_node *ni, st if (IEEE80211_QOS_HAS_SEQ(wh) && TID_TO_WME_AC(tid) >= WME_AC_VI) ic->ic_wme.wme_hipri_traffic++; - if (! ieee80211_check_rxseq(ni, wh, wh->i_addr1)) + if (! ieee80211_check_rxseq(ni, wh, wh->i_addr1, rxs)) goto out; } } Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Sat May 20 00:42:47 2017 (r318565) +++ head/sys/net80211/ieee80211_sta.c Sat May 20 00:43:52 2017 (r318566) @@ -648,7 +648,7 @@ sta_input(struct ieee80211_node *ni, str if (IEEE80211_QOS_HAS_SEQ(wh) && TID_TO_WME_AC(tid) >= WME_AC_VI) ic->ic_wme.wme_hipri_traffic++; - if (! ieee80211_check_rxseq(ni, wh, bssid)) + if (! ieee80211_check_rxseq(ni, wh, bssid, rxs)) goto out; } } @@ -673,7 +673,7 @@ sta_input(struct ieee80211_node *ni, str if ((m->m_flags & M_AMPDU) && (dir == IEEE80211_FC1_DIR_FROMDS || dir == IEEE80211_FC1_DIR_DSTODS) && - ieee80211_ampdu_reorder(ni, m) != 0) { + ieee80211_ampdu_reorder(ni, m, rxs) != 0) { m = NULL; goto out; } Modified: head/sys/net80211/ieee80211_wds.c ============================================================================== --- head/sys/net80211/ieee80211_wds.c Sat May 20 00:42:47 2017 (r318565) +++ head/sys/net80211/ieee80211_wds.c Sat May 20 00:43:52 2017 (r318566) @@ -504,7 +504,7 @@ wds_input(struct ieee80211_node *ni, str if (IEEE80211_QOS_HAS_SEQ(wh) && TID_TO_WME_AC(tid) >= WME_AC_VI) ic->ic_wme.wme_hipri_traffic++; - if (! ieee80211_check_rxseq(ni, wh, wh->i_addr1)) + if (! ieee80211_check_rxseq(ni, wh, wh->i_addr1, rxs)) goto out; } switch (type) { @@ -540,7 +540,7 @@ wds_input(struct ieee80211_node *ni, str * and we should do nothing more with it. */ if ((m->m_flags & M_AMPDU) && - ieee80211_ampdu_reorder(ni, m) != 0) { + ieee80211_ampdu_reorder(ni, m, rxs) != 0) { m = NULL; goto out; } From owner-svn-src-all@freebsd.org Sat May 20 01:04:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 697C1D73AFD; Sat, 20 May 2017 01:04:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 394E11C4F; Sat, 20 May 2017 01:04:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K14Iht022954; Sat, 20 May 2017 01:04:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K14IoS022953; Sat, 20 May 2017 01:04:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705200104.v4K14IoS022953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 20 May 2017 01:04:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318567 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 01:04:19 -0000 Author: gjb Date: Sat May 20 01:04:18 2017 New Revision: 318567 URL: https://svnweb.freebsd.org/changeset/base/318567 Log: s/nullability attribute/nullability qualifier/ Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 20 00:43:52 2017 (r318566) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 20 01:04:18 2017 (r318567) @@ -376,7 +376,7 @@ clock and choose between absolute and relative mode. The clang - nullability attribute has been added to the + nullability qualifier has been added to the C library headers. From owner-svn-src-all@freebsd.org Sat May 20 01:04:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1266AD73B0D; Sat, 20 May 2017 01:04:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D80911C51; Sat, 20 May 2017 01:04:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K14J2p023042; Sat, 20 May 2017 01:04:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K14JVO023041; Sat, 20 May 2017 01:04:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705200104.v4K14JVO023041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 20 May 2017 01:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318569 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 01:04:21 -0000 Author: gjb Date: Sat May 20 01:04:19 2017 New Revision: 318569 URL: https://svnweb.freebsd.org/changeset/base/318569 Log: Document r316613, C standard library has been updated to make use of reallocarray(3). Document r318121, system libraries have been updated to make use of reallocarray(3). Document r315282, GNU __nonnull__ attribute have been replaced with the more benign Clang nullability attributes. Submitted by: pfg Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 20 01:04:18 2017 (r318568) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 20 01:04:19 2017 (r318569) @@ -386,6 +386,11 @@ The clang nullability qualifier has been added to the C library headers. + + Uses of the GNU + __nonnull__ attribute have been replaced + with the more benign Clang + nullability attributes. From owner-svn-src-all@freebsd.org Sat May 20 01:04:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44751D73B06; Sat, 20 May 2017 01:04:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1437D1C50; Sat, 20 May 2017 01:04:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K14Jcs022999; Sat, 20 May 2017 01:04:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K14J1G022998; Sat, 20 May 2017 01:04:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705200104.v4K14J1G022998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 20 May 2017 01:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318568 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 01:04:20 -0000 Author: gjb Date: Sat May 20 01:04:18 2017 New Revision: 318568 URL: https://svnweb.freebsd.org/changeset/base/318568 Log: Document r316613, C standard library has been updated to make use of reallocarray(3). Document r318121, system libraries have been updated to make use of reallocarray(3). Submitted by: pfg Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 20 01:04:18 2017 (r318567) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 20 01:04:18 2017 (r318568) @@ -356,11 +356,19 @@ updated to return the accumulated error from previous &man.close.2; calls. + The C standard library has been updated + to make use of &man.reallocarray.3; for bounds + checking. + The clock_nanosleep() system call has been added. The nanosleep() system call is now a wrapper around clock_nanosleep(). + + The system libraries have been updated + to make use of &man.reallocarray.3; for bounds + checking. From owner-svn-src-all@freebsd.org Sat May 20 03:51:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41C42D7326F; Sat, 20 May 2017 03:51:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF3311A8D; Sat, 20 May 2017 03:51:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K3pVwa090645; Sat, 20 May 2017 03:51:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K3pV3g090643; Sat, 20 May 2017 03:51:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705200351.v4K3pV3g090643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 20 May 2017 03:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318571 - in head: contrib/netbsd-tests/usr.bin/grep usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 03:51:33 -0000 Author: emaste Date: Sat May 20 03:51:31 2017 New Revision: 318571 URL: https://svnweb.freebsd.org/changeset/base/318571 Log: bsdgrep: emit more than MAX_LINE_MATCHES per line We should not set an arbitrary cap on the number of matches on a line, and in any case MAX_LINE_MATCHES of 32 is much too low. Instead, if we match more than MAX_LINE_MATCHES, keep processing and matching from the last match until all are found. For the regression test, we produce 4096 matches (larger than we expect we'll ever set MAX_LINE_MATCHES) and make sure we actually get 4096 lines of output with the -o flag. We'll also make sure that every distinct line is getting its own line number to detect line metadata not being printed as appropriate along the way. PR: 218811 Submitted by: Kyle Evans Reported by: jbeich Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D10577 Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh head/usr.bin/grep/util.c Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh ============================================================================== --- head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Sat May 20 01:04:47 2017 (r318570) +++ head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Sat May 20 03:51:31 2017 (r318571) @@ -413,6 +413,26 @@ wflag_emptypat_body() atf_check -o file:test4 grep -w -e "" test4 } +atf_test_case excessive_matches +excessive_matches_head() +{ + atf_set "descr" "Check for proper handling of lines with excessive matches (PR 218811)" +} +excessive_matches_body() +{ + grep_type + if [ $? -eq $GREP_TYPE_GNU_FREEBSD ]; then + atf_expect_fail "this test does not pass with GNU grep in base" + fi + + for i in $(jot 4096); do + printf "x" >> test.in + done + + atf_check -s exit:0 -x '[ $(grep -o x test.in | wc -l) -eq 4096 ]' + #atf_check -s exit:1 -x 'grep -on x test.in | grep -v "1:x"' +} + atf_test_case fgrep_sanity fgrep_sanity_head() { @@ -603,6 +623,7 @@ atf_init_test_cases() atf_add_test_case egrep_empty_invalid atf_add_test_case zerolen atf_add_test_case wflag_emptypat + atf_add_test_case excessive_matches atf_add_test_case wv_combo_break atf_add_test_case fgrep_sanity atf_add_test_case egrep_sanity Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Sat May 20 01:04:47 2017 (r318570) +++ head/usr.bin/grep/util.c Sat May 20 03:51:31 2017 (r318571) @@ -63,6 +63,7 @@ static bool first_match = true; struct parsec { regmatch_t matches[MAX_LINE_MATCHES]; /* Matches made */ struct str ln; /* Current line */ + size_t lnstart; /* Start of line processing */ size_t matchidx; /* Latest used match index */ bool binary; /* Binary file? */ }; @@ -247,8 +248,9 @@ procfile(const char *fn) mcount = mlimit; for (c = 0; c == 0 || !(lflag || qflag); ) { - /* Reset match count for every line processed */ + /* Reset match count and line start for every line processed */ pc.matchidx = 0; + pc.lnstart = 0; pc.ln.off += pc.ln.len + 1; if ((pc.ln.dat = grep_fgetln(f, &pc.ln.len)) == NULL || pc.ln.len == 0) { @@ -288,6 +290,14 @@ procfile(const char *fn) /* Print the matching line, but only if not quiet/binary */ if (t == 0 && printmatch) { printline(&pc, ':'); + while (pc.matchidx >= MAX_LINE_MATCHES) { + /* Reset matchidx and try again */ + pc.matchidx = 0; + if (procline(&pc) == 0) + printline(&pc, ':'); + else + break; + } first_match = false; same_file = true; last_outed = 0; @@ -356,11 +366,11 @@ procline(struct parsec *pc) { regmatch_t pmatch, lastmatch, chkmatch; wchar_t wbegin, wend; - size_t st = 0, nst = 0; + size_t st, nst; unsigned int i; int c = 0, r = 0, lastmatches = 0, leflags = eflags; size_t startm = 0, matchidx; - int retry; + unsigned int retry; matchidx = pc->matchidx; @@ -376,6 +386,8 @@ procline(struct parsec *pc) } else if (matchall) return (0); + st = pc->lnstart; + nst = 0; /* Initialize to avoid a false positive warning from GCC. */ lastmatch.rm_so = lastmatch.rm_eo = 0; @@ -432,12 +444,12 @@ procline(struct parsec *pc) * still match a whole word. */ if (r == REG_NOMATCH && - (retry == 0 || pmatch.rm_so + 1 < retry)) + (retry == pc->lnstart || + pmatch.rm_so + 1 < retry)) retry = pmatch.rm_so + 1; if (r == REG_NOMATCH) continue; } - lastmatches++; lastmatch = pmatch; @@ -466,8 +478,11 @@ procline(struct parsec *pc) } /* avoid excessive matching - skip further patterns */ if ((color == NULL && !oflag) || qflag || lflag || - matchidx >= MAX_LINE_MATCHES) + matchidx >= MAX_LINE_MATCHES) { + pc->lnstart = nst; + lastmatches = 0; break; + } } /* @@ -475,7 +490,7 @@ procline(struct parsec *pc) * again just in case we still have a chance to match later in * the string. */ - if (lastmatches == 0 && retry > 0) { + if (lastmatches == 0 && retry > pc->lnstart) { st = retry; continue; } @@ -497,6 +512,7 @@ procline(struct parsec *pc) /* Advance st based on previous matches */ st = nst; + pc->lnstart = st; } /* Reflect the new matchidx in the context */ From owner-svn-src-all@freebsd.org Sat May 20 05:12:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01A61D75954; Sat, 20 May 2017 05:12:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D10B51961; Sat, 20 May 2017 05:12:33 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K5CW17026104; Sat, 20 May 2017 05:12:32 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K5CWxf026100; Sat, 20 May 2017 05:12:32 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705200512.v4K5CWxf026100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 20 May 2017 05:12:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318572 - in stable/11/sys: cddl/dev/dtrace/powerpc cddl/dev/fbt/powerpc powerpc/booke powerpc/include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 05:12:34 -0000 Author: jhibbits Date: Sat May 20 05:12:32 2017 New Revision: 318572 URL: https://svnweb.freebsd.org/changeset/base/318572 Log: MFC r314370,r318130,r318167: DTrace related fixes for PowerPC. r314370: Unbreak kernel breakpoints, broken for ~4 years now r318130: Fix the encoded instruction for FBT traps on powerpc r318167: Fix stack tracing in dtrace for powerpc Modified: stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c stable/11/sys/cddl/dev/fbt/powerpc/fbt_isa.c stable/11/sys/powerpc/booke/trap_subr.S stable/11/sys/powerpc/include/trap.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c ============================================================================== --- stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Sat May 20 03:51:31 2017 (r318571) +++ stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Sat May 20 05:12:32 2017 (r318572) @@ -38,6 +38,7 @@ #include #include +#include #include #include @@ -54,16 +55,19 @@ #ifdef __powerpc64__ #define OFFSET 4 /* Account for the TOC reload slot */ +#define FRAME_OFFSET 48 #else #define OFFSET 0 +#define FRAME_OFFSET 8 #endif #define INKERNEL(x) ((x) <= VM_MAX_KERNEL_ADDRESS && \ (x) >= VM_MIN_KERNEL_ADDRESS) static __inline int -dtrace_sp_inkernel(uintptr_t sp, int aframes) +dtrace_sp_inkernel(uintptr_t sp) { + struct trapframe *frame; vm_offset_t callpc; #ifdef __powerpc64__ @@ -77,14 +81,15 @@ dtrace_sp_inkernel(uintptr_t sp, int afr /* * trapexit() and asttrapexit() are sentinels * for kernel stack tracing. - * - * Special-case this for 'aframes == 0', because fbt sets aframes to the - * trap callchain depth, so we want to break out of it. */ - if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit) && - aframes != 0) - return (0); + if (callpc + OFFSET == (vm_offset_t) &trapexit || + callpc + OFFSET == (vm_offset_t) &asttrapexit) { + if (sp == 0) + return (0); + frame = (struct trapframe *)(sp + FRAME_OFFSET); + + return ((frame->srr1 & PSL_PR) == 0); + } return (1); } @@ -93,6 +98,7 @@ static __inline uintptr_t dtrace_next_sp(uintptr_t sp) { vm_offset_t callpc; + struct trapframe *frame; #ifdef __powerpc64__ callpc = *(vm_offset_t *)(sp + RETURN_OFFSET64); @@ -103,18 +109,13 @@ dtrace_next_sp(uintptr_t sp) /* * trapexit() and asttrapexit() are sentinels * for kernel stack tracing. - * - * Special-case this for 'aframes == 0', because fbt sets aframes to the - * trap callchain depth, so we want to break out of it. */ if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit)) - /* Access the trap frame */ -#ifdef __powerpc64__ - return (*(uintptr_t *)sp + 48 + sizeof(register_t)); -#else - return (*(uintptr_t *)sp + 8 + sizeof(register_t)); -#endif + callpc + OFFSET == (vm_offset_t) &asttrapexit)) { + /* Access the trap frame */ + frame = (struct trapframe *)(sp + FRAME_OFFSET); + return (*(uintptr_t *)(frame->fixreg[1])); + } return (*(uintptr_t*)sp); } @@ -122,6 +123,7 @@ dtrace_next_sp(uintptr_t sp) static __inline uintptr_t dtrace_get_pc(uintptr_t sp) { + struct trapframe *frame; vm_offset_t callpc; #ifdef __powerpc64__ @@ -133,18 +135,13 @@ dtrace_get_pc(uintptr_t sp) /* * trapexit() and asttrapexit() are sentinels * for kernel stack tracing. - * - * Special-case this for 'aframes == 0', because fbt sets aframes to the - * trap callchain depth, so we want to break out of it. */ if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit)) - /* Access the trap frame */ -#ifdef __powerpc64__ - return (*(uintptr_t *)sp + 48 + offsetof(struct trapframe, lr)); -#else - return (*(uintptr_t *)sp + 8 + offsetof(struct trapframe, lr)); -#endif + callpc + OFFSET == (vm_offset_t) &asttrapexit)) { + /* Access the trap frame */ + frame = (struct trapframe *)(sp + FRAME_OFFSET); + return (frame->srr0); + } return (callpc); } @@ -176,7 +173,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcs if (sp <= osp) break; - if (!dtrace_sp_inkernel(sp, aframes)) + if (!dtrace_sp_inkernel(sp)) break; callpc = dtrace_get_pc(sp); @@ -537,7 +534,7 @@ dtrace_getstackdepth(int aframes) if (sp <= osp) break; - if (!dtrace_sp_inkernel(sp, aframes)) + if (!dtrace_sp_inkernel(sp)) break; if (aframes == 0) Modified: stable/11/sys/cddl/dev/fbt/powerpc/fbt_isa.c ============================================================================== --- stable/11/sys/cddl/dev/fbt/powerpc/fbt_isa.c Sat May 20 03:51:31 2017 (r318571) +++ stable/11/sys/cddl/dev/fbt/powerpc/fbt_isa.c Sat May 20 05:12:32 2017 (r318572) @@ -37,7 +37,7 @@ #include "fbt.h" -#define FBT_PATCHVAL 0x7c810808 +#define FBT_PATCHVAL 0x7ffff808 #define FBT_MFLR_R0 0x7c0802a6 #define FBT_MTLR_R0 0x7c0803a6 #define FBT_BLR 0x4e800020 Modified: stable/11/sys/powerpc/booke/trap_subr.S ============================================================================== --- stable/11/sys/powerpc/booke/trap_subr.S Sat May 20 03:51:31 2017 (r318571) +++ stable/11/sys/powerpc/booke/trap_subr.S Sat May 20 05:12:32 2017 (r318572) @@ -803,12 +803,12 @@ INTERRUPT(int_debug) lwz %r4,0(%r5) /* interrupt_vector_base in r4 */ add %r4,%r4,%r5 cmplw cr0, %r3, %r4 - blt 1f + blt trap_common lwz %r4,4(%r5) /* interrupt_vector_top in r4 */ add %r4,%r4,%r5 addi %r4,%r4,4 cmplw cr0, %r3, %r4 - bge 1f + bge trap_common /* Disable single-stepping for the interrupt handlers. */ lwz %r3, FRAME_SRR1+8(%r1); rlwinm %r3, %r3, 0, 23, 21 @@ -820,14 +820,6 @@ INTERRUPT(int_debug) lwz %r4, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR1+8)(%r4); mtspr SPR_SRR1, %r4 b 9f -1: - addi %r3, %r1, 8 - bl CNAME(trap) - /* - * Handle ASTs, needed for proper support of single-stepping. - * We actually need to return to the process with an rfi. - */ - b trapexit 9: FRAME_LEAVE(SPR_CSRR0, SPR_CSRR1) rfci Modified: stable/11/sys/powerpc/include/trap.h ============================================================================== --- stable/11/sys/powerpc/include/trap.h Sat May 20 03:51:31 2017 (r318571) +++ stable/11/sys/powerpc/include/trap.h Sat May 20 05:12:32 2017 (r318572) @@ -125,7 +125,7 @@ #define EXC_PGM_TRAP (1UL << 17) /* DTrace trap opcode. */ -#define EXC_DTRACE 0x7c810808 +#define EXC_DTRACE 0x7ffff808 /* Magic pointer to store TOC base and other info for trap handlers on ppc64 */ #define TRAP_GENTRAP 0x1f0 From owner-svn-src-all@freebsd.org Sat May 20 06:01:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88006D75A05; Sat, 20 May 2017 06:01:10 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54C741DE5; Sat, 20 May 2017 06:01:10 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K619hI044126; Sat, 20 May 2017 06:01:09 GMT (envelope-from matthew@FreeBSD.org) Received: (from matthew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K619x9044125; Sat, 20 May 2017 06:01:09 GMT (envelope-from matthew@FreeBSD.org) Message-Id: <201705200601.v4K619x9044125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: matthew set sender to matthew@FreeBSD.org using -f From: Matthew Seaman Date: Sat, 20 May 2017 06:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r318573 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 06:01:10 -0000 Author: matthew (ports committer) Date: Sat May 20 06:01:09 2017 New Revision: 318573 URL: https://svnweb.freebsd.org/changeset/base/318573 Log: Take in jkh's commit bit, at his own request Approved by: core (implicit) Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sat May 20 05:12:32 2017 (r318572) +++ svnadmin/conf/access Sat May 20 06:01:09 2017 (r318573) @@ -105,7 +105,6 @@ jhb jhibbits jilles jimharris -jkh jkim jlh jmallett From owner-svn-src-all@freebsd.org Sat May 20 09:47:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BA69D7417E; Sat, 20 May 2017 09:47:34 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E77B1758; Sat, 20 May 2017 09:47:34 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 50ED95208; Sat, 20 May 2017 09:47:33 +0000 (UTC) Date: Sat, 20 May 2017 11:47:33 +0200 From: Baptiste Daroussin To: John Baldwin Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: pkgbase and conf files (was Re: svn commit: r318441 - in head/etc: . cron.d) Message-ID: <20170520094732.4qzvcbp2nt5cz7yb@ivaldir.net> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <9570430.uB7Ojud3DG@ralph.baldwin.cx> <20170519163355.rs5w3hr6dltdx7kv@ivaldir.net> <3548472.irpQCNYL7x@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uzzwgxho2hksozcd" Content-Disposition: inline In-Reply-To: <3548472.irpQCNYL7x@ralph.baldwin.cx> User-Agent: NeoMutt/20170428 (1.8.2) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 09:47:34 -0000 --uzzwgxho2hksozcd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 19, 2017 at 10:43:30AM -0700, John Baldwin wrote: > On Friday, May 19, 2017 06:33:55 PM Baptiste Daroussin wrote: > > On Fri, May 19, 2017 at 09:17:23AM -0700, John Baldwin wrote: > > > On Thursday, May 18, 2017 11:24:29 PM Baptiste Daroussin wrote: > > > I think an upgrade won't bring the file back necessarily (etcupdate w= arns you > > > that a removed file changed, but it doesn't bring it back, I think a = similar > > > strategy might be sensible for pkg as well). > >=20 > > I need to check, I do not remember what I did here and I will certainly= add a > > regression test for that to ensure this behaviour is always working as = expected. >=20 > One nice "feature" to have in pkg for pkgbase would be a way to ask pkg t= o restore > a stock configuration file (perhaps with an option to restore it to an al= ternate > directory or filename?) This would imply that packages would need to kee= p the > "pristine" conf files around somewhere. This would also let you do 'pkg = confdiff' > or the like (as a replacement for 'etcupdate diff') Yes this is in my TODO list Bapt --uzzwgxho2hksozcd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlkgELQACgkQY4mL3PG3 PlrWVg//UD9qBFMOpPSdPda44oy9M/3nDHlU5Xh/4ificVpNz1g7qqIjNm2Fk7us 6QMLLBk+STba8yz0S25ISfGbLwObhvbh0cJOXsldOhw9jq1Ku+6K/trAwkiDebV1 /7XAdl3Xb9rPTua3XItYG2InfITKVKWY3l/p5hfMFagn8IfVItFtB9cHCXNUxt0T 4PebY5RPWiAQRBju6piPP86iiGaR9GtNBGgTPZR9eAdV5f0d6y/U8cZ4iX3pg9R6 NDHzqoHpGiR/zWqVrVqH/hdVbJ5txSfhwEYrCnnjCqKaN+akryLPVWS/Xj9Q9I5d zcmUwc+8y6KAp8o1PKujhmrsyjGfPSJg5jvAPXFs7FrUfcBjUmInTh5JqxPq+lK1 NI2B84CwjerntR6ckLZH63XE9bHxW1HP6ZlHfyxvyP66DW/tg1L2E4VRUJo7m32H 9e8UuKv3c1oh8camDC65/U7uFOgxLG+T0zP/hT63Nz4+ZlL4XBXz397GdIblmXjp Zv96BcSY3rBApToeQXmDUr0HbqImHV4TOAo7Jv2XRzXS1RIJ40iIyFJ4tnGR7Hrr D4cmuvIu6KC84niJxLWucn7KqFT4J20PdZQpfw7WR9ACKh5T7OOMGEuJ1kFZT1Oj GFl0TVm8n75me0Eqtyo1MRlV0w93GnFxn9H9J4ZPABNgf5pS0t0= =nkTU -----END PGP SIGNATURE----- --uzzwgxho2hksozcd-- From owner-svn-src-all@freebsd.org Sat May 20 11:20:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDD54D76CCC; Sat, 20 May 2017 11:20:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 984271048; Sat, 20 May 2017 11:20:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KBK3mV075727; Sat, 20 May 2017 11:20:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KBK3s8075723; Sat, 20 May 2017 11:20:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705201120.v4KBK3s8075723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 20 May 2017 11:20:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318574 - in head: contrib/netbsd-tests/usr.bin/grep usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 11:20:04 -0000 Author: emaste Date: Sat May 20 11:20:03 2017 New Revision: 318574 URL: https://svnweb.freebsd.org/changeset/base/318574 Log: bsdgrep: Correct per-line line metadata printing Metadata printing with -b, -H, or -n flags suffered from a few flaws: 1) -b/offset printing was broken when used in conjunction with -o 2) With -o, bsdgrep did not print metadata for every match/line, just the first match of a line 3) There were no tests for this Address these issues by outputting this data per-match if the -o flag is specified, and prior to outputting any matches if -o but not --color, since --color alone will not generate a new line of output for every iteration over the matches. To correct -b output, fudge the line offset as we're printing matches. While here, make sure we're using grep_printline in -A context. Context printing should *never* look at the parsing context, just the line. The tests included do not pass with gnugrep in base due to it exhibiting similar quirky behavior that bsdgrep previously exhibited. Submitted by: Kyle Evans Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D10580 Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh head/usr.bin/grep/grep.h head/usr.bin/grep/queue.c head/usr.bin/grep/util.c Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh ============================================================================== --- head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Sat May 20 06:01:09 2017 (r318573) +++ head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Sat May 20 11:20:03 2017 (r318574) @@ -430,7 +430,7 @@ excessive_matches_body() done atf_check -s exit:0 -x '[ $(grep -o x test.in | wc -l) -eq 4096 ]' - #atf_check -s exit:1 -x 'grep -on x test.in | grep -v "1:x"' + atf_check -s exit:1 -x 'grep -on x test.in | grep -v "1:x"' } atf_test_case fgrep_sanity @@ -510,6 +510,39 @@ wv_combo_break_body() atf_check -s exit:1 grep -v -w "x" test2 } +atf_test_case ocolor_metadata +ocolor_metadata_head() +{ + atf_set "descr" "Check for -n/-b producing per-line metadata output" +} +ocolor_metadata_body() +{ + grep_type + if [ $? -eq $GREP_TYPE_GNU_FREEBSD ]; then + atf_expect_fail "this test does not pass with GNU grep in base" + fi + + printf "xxx\nyyyy\nzzz\nfoobarbaz\n" > test1 + check_expr="^[^:]*[0-9][^:]*:[^:]+$" + + atf_check -o inline:"1:1:xx\n" grep -bon "xx$" test1 + + atf_check -o inline:"2:4:yyyy\n" grep -bn "yy" test1 + + atf_check -o inline:"2:6:yy\n" grep -bon "yy$" test1 + + # These checks ensure that grep isn't producing bogus line numbering + # in the middle of a line. + atf_check -s exit:1 -x \ + "grep -Eon 'x|y|z|f' test1 | grep -Ev '${check_expr}'" + + atf_check -s exit:1 -x \ + "grep -En 'x|y|z|f' --color=always test1 | grep -Ev '${check_expr}'" + + atf_check -s exit:1 -x \ + "grep -Eon 'x|y|z|f' --color=always test1 | grep -Ev '${check_expr}'" +} + atf_test_case grep_nomatch_flags grep_nomatch_flags_head() { @@ -628,6 +661,7 @@ atf_init_test_cases() atf_add_test_case fgrep_sanity atf_add_test_case egrep_sanity atf_add_test_case grep_sanity + atf_add_test_case ocolor_metadata atf_add_test_case grep_nomatch_flags atf_add_test_case binary_flags atf_add_test_case badcontext Modified: head/usr.bin/grep/grep.h ============================================================================== --- head/usr.bin/grep/grep.h Sat May 20 06:01:09 2017 (r318573) +++ head/usr.bin/grep/grep.h Sat May 20 11:20:03 2017 (r318574) @@ -90,6 +90,7 @@ struct file { }; struct str { + off_t boff; off_t off; size_t len; char *dat; Modified: head/usr.bin/grep/queue.c ============================================================================== --- head/usr.bin/grep/queue.c Sat May 20 06:01:09 2017 (r318573) +++ head/usr.bin/grep/queue.c Sat May 20 11:20:03 2017 (r318574) @@ -65,6 +65,7 @@ enqueue(struct str *x) item->data.dat = grep_malloc(sizeof(char) * x->len); item->data.len = x->len; item->data.line_no = x->line_no; + item->data.boff = x->boff; item->data.off = x->off; memcpy(item->data.dat, x->dat, x->len); item->data.file = x->file; Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Sat May 20 06:01:09 2017 (r318573) +++ head/usr.bin/grep/util.c Sat May 20 11:20:03 2017 (r318574) @@ -61,11 +61,12 @@ static bool first_match = true; * other useful bits */ struct parsec { - regmatch_t matches[MAX_LINE_MATCHES]; /* Matches made */ - struct str ln; /* Current line */ - size_t lnstart; /* Start of line processing */ - size_t matchidx; /* Latest used match index */ - bool binary; /* Binary file? */ + regmatch_t matches[MAX_LINE_MATCHES]; /* Matches made */ + struct str ln; /* Current line */ + size_t lnstart; /* Position in line */ + size_t matchidx; /* Latest match index */ + int printed; /* Metadata printed? */ + bool binary; /* Binary file? */ }; @@ -233,8 +234,10 @@ procfile(const char *fn) strcpy(pc.ln.file, fn); pc.ln.line_no = 0; pc.ln.len = 0; + pc.ln.boff = 0; pc.ln.off = -1; pc.binary = f->binary; + pc.printed = 0; tail = 0; last_outed = 0; same_file = false; @@ -248,9 +251,11 @@ procfile(const char *fn) mcount = mlimit; for (c = 0; c == 0 || !(lflag || qflag); ) { - /* Reset match count and line start for every line processed */ + /* Reset per-line statistics */ + pc.printed = 0; pc.matchidx = 0; pc.lnstart = 0; + pc.ln.boff = 0; pc.ln.off += pc.ln.len + 1; if ((pc.ln.dat = grep_fgetln(f, &pc.ln.len)) == NULL || pc.ln.len == 0) { @@ -305,7 +310,7 @@ procfile(const char *fn) if (t != 0 && doctx) { /* Deal with any -A context */ if (tail > 0) { - printline(&pc, '-'); + grep_printline(&pc.ln, '-'); tail--; if (Bflag > 0) clearqueue(); @@ -607,7 +612,7 @@ printline_metadata(struct str *line, int if (bflag) { if (printsep) putchar(sep); - printf("%lld", (long long)line->off); + printf("%lld", (long long)(line->off + line->boff)); printsep = true; } if (printsep) @@ -632,13 +637,22 @@ printline(struct parsec *pc, int sep) /* --color and -o */ if ((oflag || color) && matchidx > 0) { - printline_metadata(&pc->ln, sep); + /* Only print metadata once per line if --color */ + if (!oflag && pc->printed == 0) + printline_metadata(&pc->ln, sep); for (i = 0; i < matchidx; i++) { match = pc->matches[i]; /* Don't output zero length matches */ if (match.rm_so == match.rm_eo) continue; - if (!oflag) + /* + * Metadata is printed on a per-line basis, so every + * match gets file metadata with the -o flag. + */ + if (oflag) { + pc->ln.boff = match.rm_so; + printline_metadata(&pc->ln, sep); + } else fwrite(pc->ln.dat + a, match.rm_so - a, 1, stdout); if (color) @@ -659,4 +673,5 @@ printline(struct parsec *pc, int sep) } } else grep_printline(&pc->ln, sep); + pc->printed++; } From owner-svn-src-all@freebsd.org Sat May 20 11:40:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23215D761F5; Sat, 20 May 2017 11:40:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E98CD1B00; Sat, 20 May 2017 11:40:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KBecla083890; Sat, 20 May 2017 11:40:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KBec1w083889; Sat, 20 May 2017 11:40:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705201140.v4KBec1w083889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 20 May 2017 11:40:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318575 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 11:40:39 -0000 Author: dim Date: Sat May 20 11:40:37 2017 New Revision: 318575 URL: https://svnweb.freebsd.org/changeset/base/318575 Log: After r317383 (removal of NATM), also remove usr/include/dev/utopia from BSD.include.dist. Modified: head/etc/mtree/BSD.include.dist Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Sat May 20 11:20:03 2017 (r318574) +++ head/etc/mtree/BSD.include.dist Sat May 20 11:40:37 2017 (r318575) @@ -156,8 +156,6 @@ .. usb .. - utopia - .. vkbd .. wi From owner-svn-src-all@freebsd.org Sat May 20 16:12:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D71BFD75DF2; Sat, 20 May 2017 16:12:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 747F015E7; Sat, 20 May 2017 16:12:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KGCjPA097782; Sat, 20 May 2017 16:12:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KGCjlQ097775; Sat, 20 May 2017 16:12:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705201612.v4KGCjlQ097775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 20 May 2017 16:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318576 - in stable/11: lib lib/libefi lib/libefivar share/mk sys/amd64/amd64 sys/arm/include sys/arm64/include sys/boot/efi/include sys/boot/efi/libefi sys/conf sys/contrib/edk2 sys/de... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 16:12:46 -0000 Author: kib Date: Sat May 20 16:12:44 2017 New Revision: 318576 URL: https://svnweb.freebsd.org/changeset/base/318576 Log: MFC efivar(8) (by imp): List of revisions merged: r307070 r307071 r307072 r307074 r307189 r307224 r307339 r307390 r307391 r309776 r314231 r314232 r314615 r314616 r314617 r314618 r314619 r314620 r314621 r314623 r314890 r314925 r314926 r314927 r314928 r315770 r315771 Discussed with: gjb (re), imp Sponsored by: The FreeBSD Foundation Added: stable/11/lib/libefivar/ - copied from r307071, head/lib/libefivar/ stable/11/lib/libefivar/FreeBSD-update - copied unchanged from r314926, head/lib/libefivar/FreeBSD-update stable/11/lib/libefivar/ProcessorBind.h - copied unchanged from r314926, head/lib/libefivar/ProcessorBind.h stable/11/lib/libefivar/efi-osdep.h - copied unchanged from r314926, head/lib/libefivar/efi-osdep.h stable/11/lib/libefivar/efivar-dp-format.c - copied unchanged from r314926, head/lib/libefivar/efivar-dp-format.c stable/11/lib/libefivar/efivar-dp-parse.c - copied, changed from r314926, head/lib/libefivar/efivar-dp-parse.c stable/11/lib/libefivar/efivar-dp.h - copied unchanged from r314926, head/lib/libefivar/efivar-dp.h stable/11/lib/libefivar/uefi-dplib.h - copied, changed from r314926, head/lib/libefivar/uefi-dplib.h stable/11/lib/libefivar/uefi-dputil.c - copied unchanged from r314926, head/lib/libefivar/uefi-dputil.c stable/11/lib/libefivar/uefi-guid.c - copied unchanged from r314926, head/lib/libefivar/uefi-guid.c stable/11/lib/libefivar/uefi-guid.dat - copied unchanged from r314926, head/lib/libefivar/uefi-guid.dat stable/11/sys/boot/efi/include/efichar.h - copied unchanged from r314925, head/sys/boot/efi/include/efichar.h stable/11/sys/boot/efi/libefi/efichar.c - copied unchanged from r314925, head/sys/boot/efi/libefi/efichar.c stable/11/sys/contrib/edk2/ - copied from r314890, head/sys/contrib/edk2/ stable/11/sys/dev/efidev/ - copied from r307070, head/sys/dev/efidev/ stable/11/sys/i386/include/efi.h - copied, changed from r307070, head/sys/i386/include/efi.h stable/11/sys/mips/include/efi.h - copied, changed from r307074, head/sys/mips/include/efi.h stable/11/sys/pc98/include/efi.h - copied, changed from r307074, head/sys/pc98/include/efi.h stable/11/sys/powerpc/include/efi.h - copied, changed from r307074, head/sys/powerpc/include/efi.h stable/11/sys/riscv/include/efi.h - copied, changed from r307074, head/sys/riscv/include/efi.h stable/11/sys/sparc64/include/efi.h - copied, changed from r307074, head/sys/sparc64/include/efi.h stable/11/sys/sys/efiio.h - copied unchanged from r307070, head/sys/sys/efiio.h stable/11/usr.sbin/efidp/ - copied from r314928, head/usr.sbin/efidp/ stable/11/usr.sbin/efivar/ - copied from r307072, head/usr.sbin/efivar/ Deleted: stable/11/lib/libefi/ stable/11/lib/libefivar/libefivar.c stable/11/lib/libefivar/libefivar_int.h Modified: stable/11/lib/Makefile stable/11/lib/libefivar/Makefile stable/11/lib/libefivar/efivar.c stable/11/lib/libefivar/efivar.h stable/11/share/mk/bsd.libnames.mk stable/11/share/mk/src.libnames.mk stable/11/share/mk/src.opts.mk stable/11/sys/amd64/amd64/efirt.c stable/11/sys/arm/include/efi.h stable/11/sys/arm64/include/efi.h stable/11/sys/conf/files stable/11/sys/dev/efidev/efidev.c stable/11/sys/modules/efirt/Makefile stable/11/usr.sbin/Makefile stable/11/usr.sbin/efivar/efivar.8 stable/11/usr.sbin/efivar/efivar.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/Makefile ============================================================================== --- stable/11/lib/Makefile Sat May 20 11:40:37 2017 (r318575) +++ stable/11/lib/Makefile Sat May 20 16:12:44 2017 (r318576) @@ -49,6 +49,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libdpv \ libdwarf \ libedit \ + ${_libefivar} \ ${_libelftc} \ libevent \ libexecinfo \ @@ -232,6 +233,10 @@ _libcxxrt= libcxxrt _libcplusplus= libc++ .endif +.if ${MK_EFI} != "no" +_libefivar= libefivar +.endif + .if ${MK_LIBTHR} != "no" _libthr= libthr .endif Copied: stable/11/lib/libefivar/FreeBSD-update (from r314926, head/lib/libefivar/FreeBSD-update) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libefivar/FreeBSD-update Sat May 20 16:12:44 2017 (r318576, copy of r314926, head/lib/libefivar/FreeBSD-update) @@ -0,0 +1,39 @@ +$FreeBSD$ + +For the printing and parsing functionalit, we use the Tianocore routines directly. + +efivar-dp-format.c is a copy of MdePkg/Library/UefiDevicePathLib/DevicePathToText.c +efivar-dp-parse.c is a copy of MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c + +These files are first mechnaically processed with + +sed -e "s/L'/'/;"'s/L"/"/g;s/%g/%36s/g;s/%a/%s/g;s/^VOID/static VOID/g;s/ *$//g' + +for several reasons. We're moving from wide rotuines to narrow +routines. The UTC-2 this code is written for is a bad match for +wchar_t which is an int. It's a much better match for plain narrow +characters on FreeBSD. So we pretend that CHAR16 for these files is +really char * (ASCII). + +Next, we have have to convert the Unicode printf that this code +expects to FreeBSD's printf. %g means "Print the GUID" and %a means +"print the ASCII string." so we mechanically convert them. Once we've +done that we can compare efivar-dp-*.c to its source to see what's +changed. Because we go through this indirection, I've done that +outside of svn. To upgrade you have to do these files by hand. You +have to go through and make routines static. + +uefi-*.[ch] are internal routines to support this. They've been copied +from EDK2 as well, but in a more hap-hazard manner. This was a trade +off between ease of implementation / upgrade vs pulling in too much +since less than half of any file was needed. + +efi-osdep.h shims the EDK2 types to FreeBSD's types. It's included by +ProcessorBind.h which EDK2 uses to define the CPU. We keep it separate +from uefi-dplib.h to allow better sharing. + +uefi-dplib.h shims the EDK2 routines that are needed to FreeBSD's +routines. This is relatively easy since we map all the UCS-2 routines +to simple char * routines. + +RESIST THE URGE TO CLEAN UP THESE FILES. Modified: stable/11/lib/libefivar/Makefile ============================================================================== --- head/lib/libefivar/Makefile Tue Oct 11 22:30:41 2016 (r307071) +++ stable/11/lib/libefivar/Makefile Sat May 20 16:12:44 2017 (r318576) @@ -26,13 +26,25 @@ .include +EFIBOOT=${SRCTOP}/sys/boot/efi +EDK2INC=${SRCTOP}/sys/contrib/edk2/Include + +.PATH: ${EFIBOOT}/libefi + PACKAGE=lib${LIB} LIB= efivar -SRCS= efivar.c libefivar.c -INCS= efivar.h +SRCS= efivar.c efichar.c efivar-dp-format.c \ + efivar-dp-parse.c \ + uefi-guid.c uefi-dputil.c +INCS= efivar.h efivar-dp.h SHLIB_MAJOR= 1 MAN= efivar.3 +CFLAGS+= -I${EFIBOOT}/include +CFLAGS+= -I${.CURDIR} -I${EDK2INC} + +CFLAGS.efivar-dp-format.c=-Wno-unused-parameter + MLINKS+=efivar.3 efi_set_variables_supported.3 \ efivar.3 efi_del_variable.3 \ efivar.3 efi_get_variable.3 \ @@ -51,3 +63,5 @@ MLINKS+=efivar.3 efi_set_variables_suppo WARNS?= 9 .include + +CFLAGS+= -Wno-cast-align -Wno-unused-parameter Copied: stable/11/lib/libefivar/ProcessorBind.h (from r314926, head/lib/libefivar/ProcessorBind.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libefivar/ProcessorBind.h Sat May 20 16:12:44 2017 (r318576, copy of r314926, head/lib/libefivar/ProcessorBind.h) @@ -0,0 +1,4 @@ +/* File in public domain */ +/* Brings in the glue for UEFI/EDK2 Tianocore code to run on this OS */ +/* $FreeBSD$ */ +#include "efi-osdep.h" Copied: stable/11/lib/libefivar/efi-osdep.h (from r314926, head/lib/libefivar/efi-osdep.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libefivar/efi-osdep.h Sat May 20 16:12:44 2017 (r318576, copy of r314926, head/lib/libefivar/efi-osdep.h) @@ -0,0 +1,111 @@ +/*- + * Copyright (c) 2017 Netflix, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 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 ``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 BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _EFI_OSDEP_H_ +#define _EFI_OSDEP_H_ + +/* + * Defines to adjust the types that EDK2 uses for FreeBSD so we can + * use the code and headers mostly unchanged. The headers are imported + * all into one directory to avoid case issues with filenames and + * included. The actual code is heavily modified since it has too many + * annoying dependencies that are difficult to satisfy. + */ + +#include +#include +#include +#include + +typedef int8_t INT8; +typedef int16_t INT16; +typedef int32_t INT32; +typedef int64_t INT64; +typedef intptr_t INTN; +typedef uint8_t UINT8; +typedef uint16_t UINT16; +typedef uint32_t UINT32; +typedef uint64_t UINT64; +typedef uintptr_t UINTN; +//typedef uintptr_t EFI_PHYSICAL_ADDRESS; +//typedef uint32_t EFI_IPv4_ADDRESS; +//typedef uint8_t EFI_MAC_ADDRESS[6]; +//typedef uint8_t EFI_IPv6_ADDRESS[16]; +typedef uint8_t CHAR8; +typedef uint16_t CHAR16; +typedef UINT8 BOOLEAN; +typedef void VOID; +//typedef uuid_t GUID; +//typedef uuid_t EFI_GUID; + +/* We can't actually call this stuff, so snip out API syntactic sugar */ +#define INTERFACE_DECL(x) +#define EFIAPI +#define IN +#define OUT +#define CONST const +#define OPTIONAL +//#define TRUE 1 +//#define FALSE 0 + +/* + * EDK2 has fine definitions for these, so let it define them. + */ +#undef NULL +#undef EFI_PAGE_SIZE +#undef EFI_PAGE_MASK + +/* + * Note: the EDK2 code assumed #pragma packed works and PACKED is a + * workaround for some old toolchain issues for EDK2 that aren't + * relevent to FreeBSD. + */ +#define PACKED + +/* + * Since we're not compiling for the UEFI boot time (which use ms abi + * conventions), tell EDK2 to define VA_START correctly. For the boot + * loader, this likely needs to be different. + */ +#define NO_MSABI_VA_FUNCS 1 + +/* + * Finally, we need to define the processor we are in EDK2 terms. + */ +#if defined(__i386__) +#define MDE_CPU_IA32 +#elif defined(__amd64__) +#define MDE_CPU_X64 +#elif defined(__arm__) +#define MDE_CPU_ARM +#elif defined(__aarch64__) +#define MDE_CPU_AARCH64 +#endif +/* FreeBSD doesn't have/use MDE_CPU_EBC or MDE_CPU_IPF (ia64) */ + +#endif /* _EFI_OSDEP_H_ */ Copied: stable/11/lib/libefivar/efivar-dp-format.c (from r314926, head/lib/libefivar/efivar-dp-format.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libefivar/efivar-dp-format.c Sat May 20 16:12:44 2017 (r318576, copy of r314926, head/lib/libefivar/efivar-dp-format.c) @@ -0,0 +1,2427 @@ +/*- + * Copyright (c) 2017 Netflix, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 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 ``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 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. + */ + +/* + * Routines to format EFI_DEVICE_PATHs from the UEFI standard. Much of + * this file is taken from EDK2 and rototilled. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include "efi-osdep.h" +#include "efivar-dp.h" + +#include "uefi-dplib.h" + +/* + * This is a lie, but since we have converted everything + * from wide to narrow, it's the right lie now. + */ +#define UnicodeSPrint snprintf + +/* + * Taken from MdePkg/Library/UefiDevicePathLib/DevicePathToText.c + * hash a11928f3310518ab1c6fd34e8d0fdbb72de9602c 2017-Mar-01 + * heavily modified: + * wide strings converted to narrow + * Low level printing code redone for narrow strings + * Routines made static + * %s -> %S in spots (where it is still UCS-2) + * %a (ascii) -> %s + * %g -> %36s hack to print guid (see above for caveat) + * some tidying up of const and deconsting. It's evil, but const + * poisoning the whole file was too much. + */ + +/** @file + DevicePathToText protocol as defined in the UEFI 2.0 specification. + + (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
    +Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
    +This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +// #include "UefiDevicePathLib.h" + +/** + Concatenates a formatted unicode string to allocated pool. The caller must + free the resulting buffer. + + @param Str Tracks the allocated pool, size in use, and + amount of pool allocated. + @param Fmt The format string + @param ... Variable arguments based on the format string. + + @return Allocated buffer with the formatted string printed in it. + The caller must free the allocated buffer. The buffer + allocation is not packed. + +**/ +static char * +EFIAPI +UefiDevicePathLibCatPrint ( + IN OUT POOL_PRINT *Str, + IN const char *Fmt, + ... + ) +{ + UINTN Count; + VA_LIST Args; + + VA_START (Args, Fmt); + Count = vsnprintf(NULL, 0, Fmt, Args); + VA_END(Args); + + if ((Str->Count + (Count + 1)) > Str->Capacity) { + Str->Capacity = (Str->Count + (Count + 1) * 2); + Str->Str = reallocf(Str->Str, Str->Capacity); + ASSERT (Str->Str != NULL); + } + VA_START (Args, Fmt); + vsnprintf(Str->Str + Str->Count, Str->Capacity - Str->Count, Fmt, Args); + Str->Count += Count; + + VA_END (Args); + return Str->Str; +} + +/** + Converts a PCI device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextPci ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + PCI_DEVICE_PATH *Pci; + + Pci = DevPath; + UefiDevicePathLibCatPrint (Str, "Pci(0x%x,0x%x)", Pci->Device, Pci->Function); +} + +/** + Converts a PC Card device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextPccard ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + PCCARD_DEVICE_PATH *Pccard; + + Pccard = DevPath; + UefiDevicePathLibCatPrint (Str, "PcCard(0x%x)", Pccard->FunctionNumber); +} + +/** + Converts a Memory Map device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextMemMap ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + MEMMAP_DEVICE_PATH *MemMap; + + MemMap = DevPath; + UefiDevicePathLibCatPrint ( + Str, + "MemoryMapped(0x%x,0x%lx,0x%lx)", + MemMap->MemoryType, + MemMap->StartingAddress, + MemMap->EndingAddress + ); +} + +/** + Converts a Vendor device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextVendor ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + VENDOR_DEVICE_PATH *Vendor; + const char *Type; + UINTN Index; + UINTN DataLength; + UINT32 FlowControlMap; + UINT16 Info; + + Vendor = (VENDOR_DEVICE_PATH *) DevPath; + switch (DevicePathType (&Vendor->Header)) { + case HARDWARE_DEVICE_PATH: + Type = "Hw"; + break; + + case MESSAGING_DEVICE_PATH: + Type = "Msg"; + if (AllowShortcuts) { + if (CompareGuid (&Vendor->Guid, &gEfiPcAnsiGuid)) { + UefiDevicePathLibCatPrint (Str, "VenPcAnsi()"); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiVT100Guid)) { + UefiDevicePathLibCatPrint (Str, "VenVt100()"); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid)) { + UefiDevicePathLibCatPrint (Str, "VenVt100Plus()"); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) { + UefiDevicePathLibCatPrint (Str, "VenUft8()"); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid)) { + FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap); + switch (FlowControlMap & 0x00000003) { + case 0: + UefiDevicePathLibCatPrint (Str, "UartFlowCtrl(%s)", "None"); + break; + + case 1: + UefiDevicePathLibCatPrint (Str, "UartFlowCtrl(%s)", "Hardware"); + break; + + case 2: + UefiDevicePathLibCatPrint (Str, "UartFlowCtrl(%s)", "XonXoff"); + break; + + default: + break; + } + + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiSasDevicePathGuid)) { + UefiDevicePathLibCatPrint ( + Str, + "SAS(0x%lx,0x%lx,0x%x,", + ((SAS_DEVICE_PATH *) Vendor)->SasAddress, + ((SAS_DEVICE_PATH *) Vendor)->Lun, + ((SAS_DEVICE_PATH *) Vendor)->RelativeTargetPort + ); + Info = (((SAS_DEVICE_PATH *) Vendor)->DeviceTopology); + if (((Info & 0x0f) == 0) && ((Info & BIT7) == 0)) { + UefiDevicePathLibCatPrint (Str, "NoTopology,0,0,0,"); + } else if (((Info & 0x0f) <= 2) && ((Info & BIT7) == 0)) { + UefiDevicePathLibCatPrint ( + Str, + "%s,%s,%s,", + ((Info & BIT4) != 0) ? "SATA" : "SAS", + ((Info & BIT5) != 0) ? "External" : "Internal", + ((Info & BIT6) != 0) ? "Expanded" : "Direct" + ); + if ((Info & 0x0f) == 1) { + UefiDevicePathLibCatPrint (Str, "0,"); + } else { + // + // Value 0x0 thru 0xFF -> Drive 1 thru Drive 256 + // + UefiDevicePathLibCatPrint (Str, "0x%x,", ((Info >> 8) & 0xff) + 1); + } + } else { + UefiDevicePathLibCatPrint (Str, "0x%x,0,0,0,", Info); + } + + UefiDevicePathLibCatPrint (Str, "0x%x)", ((SAS_DEVICE_PATH *) Vendor)->Reserved); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiDebugPortProtocolGuid)) { + UefiDevicePathLibCatPrint (Str, "DebugPort()"); + return ; + } + } + break; + + case MEDIA_DEVICE_PATH: + Type = "Media"; + break; + + default: + Type = "?"; + break; + } + + DataLength = DevicePathNodeLength (&Vendor->Header) - sizeof (VENDOR_DEVICE_PATH); + UefiDevicePathLibCatPrint (Str, "Ven%s(%36s", Type, G(&Vendor->Guid)); + if (DataLength != 0) { + UefiDevicePathLibCatPrint (Str, ","); + for (Index = 0; Index < DataLength; Index++) { + UefiDevicePathLibCatPrint (Str, "%02x", ((VENDOR_DEVICE_PATH_WITH_DATA *) Vendor)->VendorDefinedData[Index]); + } + } + + UefiDevicePathLibCatPrint (Str, ")"); +} + +/** + Converts a Controller device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextController ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + CONTROLLER_DEVICE_PATH *Controller; + + Controller = DevPath; + UefiDevicePathLibCatPrint ( + Str, + "Ctrl(0x%x)", + Controller->ControllerNumber + ); +} + +/** + Converts a BMC device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextBmc ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + BMC_DEVICE_PATH *Bmc; + + Bmc = DevPath; + UefiDevicePathLibCatPrint ( + Str, + "BMC(0x%x,0x%lx)", + Bmc->InterfaceType, + ReadUnaligned64 ((&Bmc->BaseAddress)) + ); +} + +/** + Converts a ACPI device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextAcpi ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + ACPI_HID_DEVICE_PATH *Acpi; + + Acpi = DevPath; + if ((Acpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { + switch (EISA_ID_TO_NUM (Acpi->HID)) { + case 0x0a03: + UefiDevicePathLibCatPrint (Str, "PciRoot(0x%x)", Acpi->UID); + break; + + case 0x0a08: + UefiDevicePathLibCatPrint (Str, "PcieRoot(0x%x)", Acpi->UID); + break; + + case 0x0604: + UefiDevicePathLibCatPrint (Str, "Floppy(0x%x)", Acpi->UID); + break; + + case 0x0301: + UefiDevicePathLibCatPrint (Str, "Keyboard(0x%x)", Acpi->UID); + break; + + case 0x0501: + UefiDevicePathLibCatPrint (Str, "Serial(0x%x)", Acpi->UID); + break; + + case 0x0401: + UefiDevicePathLibCatPrint (Str, "ParallelPort(0x%x)", Acpi->UID); + break; + + default: + UefiDevicePathLibCatPrint (Str, "Acpi(PNP%04x,0x%x)", EISA_ID_TO_NUM (Acpi->HID), Acpi->UID); + break; + } + } else { + UefiDevicePathLibCatPrint (Str, "Acpi(0x%08x,0x%x)", Acpi->HID, Acpi->UID); + } +} + +/** + Converts a ACPI extended HID device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextAcpiEx ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + ACPI_EXTENDED_HID_DEVICE_PATH *AcpiEx; + CHAR8 *HIDStr; + CHAR8 *UIDStr; + CHAR8 *CIDStr; + char HIDText[11]; + char CIDText[11]; + + AcpiEx = DevPath; + HIDStr = (CHAR8 *) (((UINT8 *) AcpiEx) + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH)); + UIDStr = HIDStr + AsciiStrLen (HIDStr) + 1; + CIDStr = UIDStr + AsciiStrLen (UIDStr) + 1; + + // + // Converts EISA identification to string. + // + UnicodeSPrint ( + HIDText, + sizeof (HIDText), + "%c%c%c%04X", + ((AcpiEx->HID >> 10) & 0x1f) + 'A' - 1, + ((AcpiEx->HID >> 5) & 0x1f) + 'A' - 1, + ((AcpiEx->HID >> 0) & 0x1f) + 'A' - 1, + (AcpiEx->HID >> 16) & 0xFFFF + ); + UnicodeSPrint ( + CIDText, + sizeof (CIDText), + "%c%c%c%04X", + ((AcpiEx->CID >> 10) & 0x1f) + 'A' - 1, + ((AcpiEx->CID >> 5) & 0x1f) + 'A' - 1, + ((AcpiEx->CID >> 0) & 0x1f) + 'A' - 1, + (AcpiEx->CID >> 16) & 0xFFFF + ); + + if ((*HIDStr == '\0') && (*CIDStr == '\0') && (AcpiEx->UID == 0)) { + // + // use AcpiExp() + // + UefiDevicePathLibCatPrint ( + Str, + "AcpiExp(%s,%s,%s)", + HIDText, + CIDText, + UIDStr + ); + } else { + if (AllowShortcuts) { + // + // display only + // + if (AcpiEx->HID == 0) { + UefiDevicePathLibCatPrint (Str, "AcpiEx(%s,", HIDStr); + } else { + UefiDevicePathLibCatPrint (Str, "AcpiEx(%s,", HIDText); + } + + if (AcpiEx->UID == 0) { + UefiDevicePathLibCatPrint (Str, "%s,", UIDStr); + } else { + UefiDevicePathLibCatPrint (Str, "0x%x,", AcpiEx->UID); + } + + if (AcpiEx->CID == 0) { + UefiDevicePathLibCatPrint (Str, "%s)", CIDStr); + } else { + UefiDevicePathLibCatPrint (Str, "%s)", CIDText); + } + } else { + UefiDevicePathLibCatPrint ( + Str, + "AcpiEx(%s,%s,0x%x,%s,%s,%s)", + HIDText, + CIDText, + AcpiEx->UID, + HIDStr, + CIDStr, + UIDStr + ); + } + } +} + +/** + Converts a ACPI address device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextAcpiAdr ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + ACPI_ADR_DEVICE_PATH *AcpiAdr; + UINT32 *Addr; + UINT16 Index; + UINT16 Length; + UINT16 AdditionalAdrCount; + + AcpiAdr = DevPath; + Length = (UINT16) DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) AcpiAdr); + AdditionalAdrCount = (UINT16) ((Length - 8) / 4); + + UefiDevicePathLibCatPrint (Str, "AcpiAdr(0x%x", AcpiAdr->ADR); + Addr = &AcpiAdr->ADR + 1; + for (Index = 0; Index < AdditionalAdrCount; Index++) { + UefiDevicePathLibCatPrint (Str, ",0x%x", Addr[Index]); + } + UefiDevicePathLibCatPrint (Str, ")"); +} + +/** + Converts a ATAPI device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextAtapi ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + ATAPI_DEVICE_PATH *Atapi; + + Atapi = DevPath; + + if (DisplayOnly) { + UefiDevicePathLibCatPrint (Str, "Ata(0x%x)", Atapi->Lun); + } else { + UefiDevicePathLibCatPrint ( + Str, + "Ata(%s,%s,0x%x)", + (Atapi->PrimarySecondary == 1) ? "Secondary" : "Primary", + (Atapi->SlaveMaster == 1) ? "Slave" : "Master", + Atapi->Lun + ); + } +} + +/** + Converts a SCSI device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextScsi ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + SCSI_DEVICE_PATH *Scsi; + + Scsi = DevPath; + UefiDevicePathLibCatPrint (Str, "Scsi(0x%x,0x%x)", Scsi->Pun, Scsi->Lun); +} + +/** + Converts a Fibre device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextFibre ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + FIBRECHANNEL_DEVICE_PATH *Fibre; + + Fibre = DevPath; + UefiDevicePathLibCatPrint (Str, "Fibre(0x%lx,0x%lx)", Fibre->WWN, Fibre->Lun); +} + +/** + Converts a FibreEx device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextFibreEx ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + FIBRECHANNELEX_DEVICE_PATH *FibreEx; + UINTN Index; + + FibreEx = DevPath; + UefiDevicePathLibCatPrint (Str, "FibreEx(0x"); + for (Index = 0; Index < sizeof (FibreEx->WWN) / sizeof (FibreEx->WWN[0]); Index++) { + UefiDevicePathLibCatPrint (Str, "%02x", FibreEx->WWN[Index]); + } + UefiDevicePathLibCatPrint (Str, ",0x"); + for (Index = 0; Index < sizeof (FibreEx->Lun) / sizeof (FibreEx->Lun[0]); Index++) { + UefiDevicePathLibCatPrint (Str, "%02x", FibreEx->Lun[Index]); + } + UefiDevicePathLibCatPrint (Str, ")"); +} + +/** + Converts a Sas Ex device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextSasEx ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + SASEX_DEVICE_PATH *SasEx; + UINTN Index; + + SasEx = DevPath; + UefiDevicePathLibCatPrint (Str, "SasEx(0x"); + + for (Index = 0; Index < sizeof (SasEx->SasAddress) / sizeof (SasEx->SasAddress[0]); Index++) { + UefiDevicePathLibCatPrint (Str, "%02x", SasEx->SasAddress[Index]); + } + UefiDevicePathLibCatPrint (Str, ",0x"); + for (Index = 0; Index < sizeof (SasEx->Lun) / sizeof (SasEx->Lun[0]); Index++) { + UefiDevicePathLibCatPrint (Str, "%02x", SasEx->Lun[Index]); + } + UefiDevicePathLibCatPrint (Str, ",0x%x,", SasEx->RelativeTargetPort); + + if (((SasEx->DeviceTopology & 0x0f) == 0) && ((SasEx->DeviceTopology & BIT7) == 0)) { + UefiDevicePathLibCatPrint (Str, "NoTopology,0,0,0"); + } else if (((SasEx->DeviceTopology & 0x0f) <= 2) && ((SasEx->DeviceTopology & BIT7) == 0)) { + UefiDevicePathLibCatPrint ( + Str, + "%s,%s,%s,", + ((SasEx->DeviceTopology & BIT4) != 0) ? "SATA" : "SAS", + ((SasEx->DeviceTopology & BIT5) != 0) ? "External" : "Internal", + ((SasEx->DeviceTopology & BIT6) != 0) ? "Expanded" : "Direct" + ); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat May 20 16:47:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BBB7D76A1A; Sat, 20 May 2017 16:47:01 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 358A513DF; Sat, 20 May 2017 16:47:01 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KGl0nG010050; Sat, 20 May 2017 16:47:00 GMT (envelope-from mr@FreeBSD.org) Received: (from mr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KGl0Lx010049; Sat, 20 May 2017 16:47:00 GMT (envelope-from mr@FreeBSD.org) Message-Id: <201705201647.v4KGl0Lx010049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mr set sender to mr@FreeBSD.org using -f From: Michael Reifenberger Date: Sat, 20 May 2017 16:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318577 - head/etc/periodic/daily X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 16:47:01 -0000 Author: mr Date: Sat May 20 16:47:00 2017 New Revision: 318577 URL: https://svnweb.freebsd.org/changeset/base/318577 Log: Improve time-since-last-scrub calculation. This can be needed to compensate anticongestion delays in 410.pkg-audit or 480.leapfile-ntpd. PR: 217622 Submitted by: wbe@psr.com MFC after: 2 weeks Modified: head/etc/periodic/daily/800.scrub-zfs Modified: head/etc/periodic/daily/800.scrub-zfs ============================================================================== --- head/etc/periodic/daily/800.scrub-zfs Sat May 20 16:12:44 2017 (r318576) +++ head/etc/periodic/daily/800.scrub-zfs Sat May 20 16:47:00 2017 (r318577) @@ -71,7 +71,7 @@ case "$daily_scrub_zfs_enable" in # Now minus last scrub (both in seconds) converted to days. _scrub_diff=$(expr -e \( $(date +%s) - \ - $(date -j -f %F.%T ${_last_scrub} +%s) \) / 60 / 60 / 24) + $(date -j -v -70M -f %F.%T ${_last_scrub} +%s) \) / 60 / 60 / 24) if [ ${_scrub_diff} -lt ${_pool_threshold} ]; then echo " skipping scrubbing of pool '${pool}':" echo " last scrubbing is ${_scrub_diff} days ago, threshold is set to ${_pool_threshold} days" From owner-svn-src-all@freebsd.org Sat May 20 16:58:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E8DCD76F65; Sat, 20 May 2017 16:58:50 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11C021DAE; Sat, 20 May 2017 16:58:49 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KGwnGh014612; Sat, 20 May 2017 16:58:49 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KGwnjk014611; Sat, 20 May 2017 16:58:49 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705201658.v4KGwnjk014611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 20 May 2017 16:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318578 - head/usr.sbin/nscd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 16:58:50 -0000 Author: cy Date: Sat May 20 16:58:48 2017 New Revision: 318578 URL: https://svnweb.freebsd.org/changeset/base/318578 Log: Fix non-recoverable name resolution failures due to negative cache entries never expiring. This patch honours the negative cache timeout. To test/experience the failure do the following: 1. Edit /etc/ncd.conf to adjust the cache timeouts as follows: positive-time-to-live hosts 30 negative-time-to-live hosts 1 2. Ensure that nsswitch.conf hosts line contains something like: hosts: files cache dns Note that cache must be specified before dns. 3. Start nscd. 4. Run the following command: while true; do nc -z -w 3 www.google.com 80; sleep 5; done 5. While running the command, remove or comment out all nameserver statements in /etc/resolv.conf. After a short while you will notice non-recoverable name rsolution failures. 6. Uncomment or replace all nameserver statements back into /etc/resolv.conf. Take note that name resolution never recovers. To recover nscd must be restarted. This patch fixes this. PR: 207804 Submitted by: Jov MFC after: 1 week Modified: head/usr.sbin/nscd/query.c Modified: head/usr.sbin/nscd/query.c ============================================================================== --- head/usr.sbin/nscd/query.c Sat May 20 16:47:00 2017 (r318577) +++ head/usr.sbin/nscd/query.c Sat May 20 16:58:48 2017 (r318578) @@ -743,9 +743,14 @@ on_read_request_process(struct query_sta &read_response->data_size); if (read_response->error_code == -2) { - read_response->error_code = 0; - read_response->data = NULL; - read_response->data_size = 0; + read_response->data = malloc( + read_response->data_size); + assert(read_response != NULL); + read_response->error_code = cache_read(neg_c_entry, + read_request->cache_key, + read_request->cache_key_size, + read_response->data, + &read_response->data_size); } } configuration_unlock_entry(qstate->config_entry, CELT_NEGATIVE); From owner-svn-src-all@freebsd.org Sat May 20 17:09:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39705D756AC; Sat, 20 May 2017 17:09:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AEFC154F; Sat, 20 May 2017 17:09:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KH9Su7018927; Sat, 20 May 2017 17:09:28 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KH9Sud018926; Sat, 20 May 2017 17:09:28 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705201709.v4KH9Sud018926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 20 May 2017 17:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318579 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 17:09:29 -0000 Author: bdrewery Date: Sat May 20 17:09:27 2017 New Revision: 318579 URL: https://svnweb.freebsd.org/changeset/base/318579 Log: MFC r317863: Fix some "don't build" optimizations from r308599 not working due to a typo. Modified: stable/11/share/mk/bsd.init.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.init.mk ============================================================================== --- stable/11/share/mk/bsd.init.mk Sat May 20 16:58:48 2017 (r318578) +++ stable/11/share/mk/bsd.init.mk Sat May 20 17:09:27 2017 (r318579) @@ -29,7 +29,7 @@ ____: .if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL:U1} == 0 && \ ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) _SKIP_BUILD= not building at level 0 -.elseif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \ +.elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ make(clean*) || make(obj) || make(analyze) || make(print-dir) || \ make(destroy*) From owner-svn-src-all@freebsd.org Sat May 20 17:29:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2E5AD75C67; Sat, 20 May 2017 17:29:37 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7286D1E98; Sat, 20 May 2017 17:29:37 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KHTabW027475; Sat, 20 May 2017 17:29:36 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KHTaHh027474; Sat, 20 May 2017 17:29:36 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705201729.v4KHTaHh027474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 20 May 2017 17:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318580 - head/lib/libthr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 17:29:37 -0000 Author: vangyzen Date: Sat May 20 17:29:36 2017 New Revision: 318580 URL: https://svnweb.freebsd.org/changeset/base/318580 Log: libthr: disable thread-safety warnings These warnings don't make sense for code that implements the locking primitives. Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10832 Modified: head/lib/libthr/Makefile Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Sat May 20 17:09:27 2017 (r318579) +++ head/lib/libthr/Makefile Sat May 20 17:29:36 2017 (r318580) @@ -17,6 +17,7 @@ MK_SSP= no LIB=thr SHLIB_MAJOR= 3 WARNS?= 3 +NO_WTHREAD_SAFETY=1 CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}/thread \ -I${SRCTOP}/include From owner-svn-src-all@freebsd.org Sat May 20 17:30:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85288D75D0F; Sat, 20 May 2017 17:30:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62649119A; Sat, 20 May 2017 17:30:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KHUmjj028309; Sat, 20 May 2017 17:30:48 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KHUmt3028308; Sat, 20 May 2017 17:30:48 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705201730.v4KHUmt3028308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 20 May 2017 17:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318581 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 17:30:49 -0000 Author: vangyzen Date: Sat May 20 17:30:48 2017 New Revision: 318581 URL: https://svnweb.freebsd.org/changeset/base/318581 Log: libthr: change CHECK_AND_INIT_RWLOCK to an inline function This was prompted by a compiler warning about 'ret' shadowing a local variable in the callers of the macro. Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10832 Modified: head/lib/libthr/thread/thr_rwlock.c Modified: head/lib/libthr/thread/thr_rwlock.c ============================================================================== --- head/lib/libthr/thread/thr_rwlock.c Sat May 20 17:29:36 2017 (r318580) +++ head/lib/libthr/thread/thr_rwlock.c Sat May 20 17:30:48 2017 (r318581) @@ -49,27 +49,42 @@ __weak_reference(_pthread_rwlock_unlock, __weak_reference(_pthread_rwlock_wrlock, pthread_rwlock_wrlock); __weak_reference(_pthread_rwlock_timedwrlock, pthread_rwlock_timedwrlock); -#define CHECK_AND_INIT_RWLOCK \ - if (*rwlock == THR_PSHARED_PTR) { \ - prwlock = __thr_pshared_offpage(rwlock, 0); \ - if (prwlock == NULL) \ - return (EINVAL); \ - } else if (__predict_false((prwlock = (*rwlock)) <= \ - THR_RWLOCK_DESTROYED)) { \ - if (prwlock == THR_RWLOCK_INITIALIZER) { \ - int ret; \ - ret = init_static(_get_curthread(), rwlock); \ - if (ret) \ - return (ret); \ - } else if (prwlock == THR_RWLOCK_DESTROYED) { \ - return (EINVAL); \ - } \ - prwlock = *rwlock; \ - } - -/* - * Prototypes - */ +static int init_static(struct pthread *thread, pthread_rwlock_t *rwlock); +static int init_rwlock(pthread_rwlock_t *rwlock, pthread_rwlock_t *rwlock_out); + +static int __always_inline +check_and_init_rwlock(pthread_rwlock_t *rwlock, pthread_rwlock_t *rwlock_out) +{ + if (__predict_false(*rwlock == THR_PSHARED_PTR || + *rwlock <= THR_RWLOCK_DESTROYED)) + return (init_rwlock(rwlock, rwlock_out)); + *rwlock_out = *rwlock; + return (0); +} + +static int __noinline +init_rwlock(pthread_rwlock_t *rwlock, pthread_rwlock_t *rwlock_out) +{ + pthread_rwlock_t prwlock; + int ret; + + if (*rwlock == THR_PSHARED_PTR) { + prwlock = __thr_pshared_offpage(rwlock, 0); + if (prwlock == NULL) + return (EINVAL); + } else if ((prwlock = *rwlock) <= THR_RWLOCK_DESTROYED) { + if (prwlock == THR_RWLOCK_INITIALIZER) { + ret = init_static(_get_curthread(), rwlock); + if (ret != 0) + return (ret); + } else if (prwlock == THR_RWLOCK_DESTROYED) { + return (EINVAL); + } + prwlock = *rwlock; + } + *rwlock_out = prwlock; + return (0); +} static int rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr) @@ -148,7 +163,9 @@ rwlock_rdlock_common(pthread_rwlock_t *r int flags; int ret; - CHECK_AND_INIT_RWLOCK + ret = check_and_init_rwlock(rwlock, &prwlock); + if (ret != 0) + return (ret); if (curthread->rdlock_count) { /* @@ -220,7 +237,9 @@ _pthread_rwlock_tryrdlock (pthread_rwloc int flags; int ret; - CHECK_AND_INIT_RWLOCK + ret = check_and_init_rwlock(rwlock, &prwlock); + if (ret != 0) + return (ret); if (curthread->rdlock_count) { /* @@ -253,7 +272,9 @@ _pthread_rwlock_trywrlock (pthread_rwloc pthread_rwlock_t prwlock; int ret; - CHECK_AND_INIT_RWLOCK + ret = check_and_init_rwlock(rwlock, &prwlock); + if (ret != 0) + return (ret); ret = _thr_rwlock_trywrlock(&prwlock->lock); if (ret == 0) @@ -268,7 +289,9 @@ rwlock_wrlock_common (pthread_rwlock_t * pthread_rwlock_t prwlock; int ret; - CHECK_AND_INIT_RWLOCK + ret = check_and_init_rwlock(rwlock, &prwlock); + if (ret != 0) + return (ret); /* * POSIX said the validity of the abstimeout parameter need From owner-svn-src-all@freebsd.org Sat May 20 17:32:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88379D75F37; Sat, 20 May 2017 17:32:03 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D10F1443; Sat, 20 May 2017 17:32:03 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KHW2oB029068; Sat, 20 May 2017 17:32:02 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KHW1Pc029064; Sat, 20 May 2017 17:32:01 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705201732.v4KHW1Pc029064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 20 May 2017 17:32:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318582 - in head/lib: libc/gen libc/include libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 17:32:03 -0000 Author: vangyzen Date: Sat May 20 17:32:01 2017 New Revision: 318582 URL: https://svnweb.freebsd.org/changeset/base/318582 Log: Remove old spinlock_debug code from libc This no longer seems useful. Remove it. This was prompted by a "cast discards volatile qualifier" warning in libthr when WARNS=6. Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10832 Modified: head/lib/libc/gen/Symbol.map head/lib/libc/gen/_spinlock_stub.c head/lib/libc/include/spinlock.h head/lib/libthr/thread/thr_init.c head/lib/libthr/thread/thr_spinlock.c Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Sat May 20 17:30:48 2017 (r318581) +++ head/lib/libc/gen/Symbol.map Sat May 20 17:32:01 2017 (r318582) @@ -485,7 +485,6 @@ FBSDprivate_1.0 { _pthread_sigmask; _pthread_testcancel; _spinlock; - _spinlock_debug; _spinunlock; _rtld_addr_phdr; _rtld_atfork_pre; Modified: head/lib/libc/gen/_spinlock_stub.c ============================================================================== --- head/lib/libc/gen/_spinlock_stub.c Sat May 20 17:30:48 2017 (r318581) +++ head/lib/libc/gen/_spinlock_stub.c Sat May 20 17:32:01 2017 (r318582) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); long _atomic_lock_stub(volatile long *); void _spinlock_stub(spinlock_t *); void _spinunlock_stub(spinlock_t *); -void _spinlock_debug_stub(spinlock_t *, char *, int); __weak_reference(_atomic_lock_stub, _atomic_lock); @@ -48,7 +47,6 @@ _atomic_lock_stub(volatile long *lck __u return (0L); } -__weak_reference(_spinlock, _spinlock_debug); #pragma weak _spinlock void _spinlock(spinlock_t *lck) Modified: head/lib/libc/include/spinlock.h ============================================================================== --- head/lib/libc/include/spinlock.h Sat May 20 17:30:48 2017 (r318581) +++ head/lib/libc/include/spinlock.h Sat May 20 17:32:01 2017 (r318582) @@ -41,21 +41,17 @@ * Lock structure with room for debugging information. */ struct _spinlock { - volatile long access_lock; - volatile long lock_owner; - volatile char *fname; - volatile int lineno; + long spare1; + long spare2; + void *thr_extra; + int spare3; }; typedef struct _spinlock spinlock_t; #define _SPINLOCK_INITIALIZER { 0, 0, 0, 0 } #define _SPINUNLOCK(_lck) _spinunlock(_lck); -#ifdef _LOCK_DEBUG -#define _SPINLOCK(_lck) _spinlock_debug(_lck, __FILE__, __LINE__) -#else #define _SPINLOCK(_lck) _spinlock(_lck) -#endif /* * Thread function prototype definitions: @@ -64,7 +60,6 @@ __BEGIN_DECLS long _atomic_lock(volatile long *); void _spinlock(spinlock_t *); void _spinunlock(spinlock_t *); -void _spinlock_debug(spinlock_t *, char *, int); __END_DECLS #endif /* _SPINLOCK_H_ */ Modified: head/lib/libthr/thread/thr_init.c ============================================================================== --- head/lib/libthr/thread/thr_init.c Sat May 20 17:30:48 2017 (r318581) +++ head/lib/libthr/thread/thr_init.c Sat May 20 17:32:01 2017 (r318582) @@ -173,7 +173,6 @@ STATIC_LIB_REQUIRE(_sigtimedwait); STATIC_LIB_REQUIRE(_sigwait); STATIC_LIB_REQUIRE(_sigwaitinfo); STATIC_LIB_REQUIRE(_spinlock); -STATIC_LIB_REQUIRE(_spinlock_debug); STATIC_LIB_REQUIRE(_spinunlock); STATIC_LIB_REQUIRE(_thread_init_hack); Modified: head/lib/libthr/thread/thr_spinlock.c ============================================================================== --- head/lib/libthr/thread/thr_spinlock.c Sat May 20 17:30:48 2017 (r318581) +++ head/lib/libthr/thread/thr_spinlock.c Sat May 20 17:32:01 2017 (r318582) @@ -65,7 +65,7 @@ __thr_spinunlock(spinlock_t *lck) { struct spinlock_extra *_extra; - _extra = (struct spinlock_extra *)lck->fname; + _extra = lck->thr_extra; THR_UMUTEX_UNLOCK(_get_curthread(), &_extra->lock); } @@ -78,9 +78,9 @@ __thr_spinlock(spinlock_t *lck) PANIC("Spinlock called when not threaded."); if (!initialized) PANIC("Spinlocks not initialized."); - if (lck->fname == NULL) + if (lck->thr_extra == NULL) init_spinlock(lck); - _extra = (struct spinlock_extra *)lck->fname; + _extra = lck->thr_extra; THR_UMUTEX_LOCK(_get_curthread(), &_extra->lock); } @@ -90,14 +90,14 @@ init_spinlock(spinlock_t *lck) struct pthread *curthread = _get_curthread(); THR_UMUTEX_LOCK(curthread, &spinlock_static_lock); - if ((lck->fname == NULL) && (spinlock_count < MAX_SPINLOCKS)) { - lck->fname = (char *)&extra[spinlock_count]; + if ((lck->thr_extra == NULL) && (spinlock_count < MAX_SPINLOCKS)) { + lck->thr_extra = &extra[spinlock_count]; _thr_umutex_init(&extra[spinlock_count].lock); extra[spinlock_count].owner = lck; spinlock_count++; } THR_UMUTEX_UNLOCK(curthread, &spinlock_static_lock); - if (lck->fname == NULL) + if (lck->thr_extra == NULL) PANIC("Warning: exceeded max spinlocks"); } From owner-svn-src-all@freebsd.org Sat May 20 17:32:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48713D75FC0; Sat, 20 May 2017 17:32:32 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A7FA1632; Sat, 20 May 2017 17:32:32 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KHWVFf031225; Sat, 20 May 2017 17:32:31 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KHWVif031224; Sat, 20 May 2017 17:32:31 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705201732.v4KHWVif031224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 20 May 2017 17:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318583 - head/lib/libthr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 17:32:32 -0000 Author: vangyzen Date: Sat May 20 17:32:30 2017 New Revision: 318583 URL: https://svnweb.freebsd.org/changeset/base/318583 Log: libthr: use default WARNS level of 6 Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10832 Modified: head/lib/libthr/Makefile Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Sat May 20 17:32:01 2017 (r318582) +++ head/lib/libthr/Makefile Sat May 20 17:32:30 2017 (r318583) @@ -16,7 +16,6 @@ MK_SSP= no LIB=thr SHLIB_MAJOR= 3 -WARNS?= 3 NO_WTHREAD_SAFETY=1 CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}/thread \ From owner-svn-src-all@freebsd.org Sat May 20 17:33:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C709D7609A; Sat, 20 May 2017 17:33:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3FDC17B2; Sat, 20 May 2017 17:33:48 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KHXlJb031335; Sat, 20 May 2017 17:33:47 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KHXlT6031332; Sat, 20 May 2017 17:33:47 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705201733.v4KHXlT6031332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 20 May 2017 17:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318584 - in head/lib/libthr: . thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 17:33:49 -0000 Author: vangyzen Date: Sat May 20 17:33:47 2017 New Revision: 318584 URL: https://svnweb.freebsd.org/changeset/base/318584 Log: libthr: Use CLI flags instead of pragmas to disable warnings People tweaking the build system or compilers tend to look into the Makefile and not into the source. Having some warning controls in the Makefile and some in the source code is surprising. Pragmas have the advantage that they leave the warnings enabled for more code, but that advantage isn't very relevant in these cases. Requested by: kib Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10832 Modified: head/lib/libthr/Makefile head/lib/libthr/thread/thr_stack.c head/lib/libthr/thread/thr_symbols.c Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Sat May 20 17:32:30 2017 (r318583) +++ head/lib/libthr/Makefile Sat May 20 17:33:47 2017 (r318584) @@ -27,6 +27,12 @@ CFLAGS+=-I${SRCTOP}/libexec/rtld-elf/${M CFLAGS+=-I${SRCTOP}/lib/libthread_db CFLAGS+=-Winline +CFLAGS.thr_stack.c+= -Wno-cast-align +.include +.if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 40300) +CFLAGS.thr_symbols.c+= -Wno-missing-variable-declarations +.endif + .ifndef NO_THREAD_UNWIND_STACK CFLAGS+=-fexceptions CFLAGS+=-D_PTHREAD_FORCED_UNWIND Modified: head/lib/libthr/thread/thr_stack.c ============================================================================== --- head/lib/libthr/thread/thr_stack.c Sat May 20 17:32:30 2017 (r318583) +++ head/lib/libthr/thread/thr_stack.c Sat May 20 17:33:47 2017 (r318584) @@ -290,19 +290,6 @@ _thr_stack_alloc(struct pthread_attr *at return (-1); } -/* - * Disable this warning from clang: - * - * cast from 'char *' to - * 'struct stack *' increases required alignment from 1 to 8 - * [-Werror,-Wcast-align] - * spare_stack = (struct stack *) - */ -#ifdef __clang__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-align" -#endif - /* This function must be called with _thread_list_lock held. */ void _thr_stack_free(struct pthread_attr *attr) @@ -329,7 +316,3 @@ _thr_stack_free(struct pthread_attr *att attr->stackaddr_attr = NULL; } } - -#ifdef __clang__ -#pragma GCC diagnostic pop -#endif Modified: head/lib/libthr/thread/thr_symbols.c ============================================================================== --- head/lib/libthr/thread/thr_symbols.c Sat May 20 17:32:30 2017 (r318583) +++ head/lib/libthr/thread/thr_symbols.c Sat May 20 17:33:47 2017 (r318584) @@ -37,10 +37,6 @@ __FBSDID("$FreeBSD$"); #include "thr_private.h" -#ifdef __clang__ -#pragma GCC diagnostic ignored "-Wmissing-variable-declarations" -#endif - /* A collection of symbols needed by debugger */ /* int _libthr_debug */ From owner-svn-src-all@freebsd.org Sat May 20 17:39:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57E6FD761F0; Sat, 20 May 2017 17:39:24 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29CCD1A51; Sat, 20 May 2017 17:39:24 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KHdN18031580; Sat, 20 May 2017 17:39:23 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KHdNBW031579; Sat, 20 May 2017 17:39:23 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705201739.v4KHdNBW031579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 20 May 2017 17:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318585 - head/contrib/dma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 17:39:24 -0000 Author: vangyzen Date: Sat May 20 17:39:23 2017 New Revision: 318585 URL: https://svnweb.freebsd.org/changeset/base/318585 Log: dma.8: use the correct name for 'SECURETRANSFER' The code uses 'SECURETRANS', but the config file uses 'SECURETRANSFER'. MFC after: 3 days Modified: head/contrib/dma/dma.8 Modified: head/contrib/dma/dma.8 ============================================================================== --- head/contrib/dma/dma.8 Sat May 20 17:33:47 2017 (r318584) +++ head/contrib/dma/dma.8 Sat May 20 17:39:23 2017 (r318585) @@ -30,7 +30,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 13, 2014 +.Dd May 20, 2017 .Dt DMA 8 .Os .Sh NAME @@ -213,7 +213,7 @@ Just stick with the default. Path to the .Sq auth.conf file. -.It Ic SECURETRANS Xo +.It Ic SECURETRANSFER Xo (boolean, default=commented) .Xc Uncomment if you want TLS/SSL secured transfer. @@ -222,7 +222,7 @@ Uncomment if you want TLS/SSL secured tr .Xc Uncomment if you want to use STARTTLS. Only useful together with -.Sq SECURETRANS . +.Sq SECURETRANSFER . .It Ic OPPORTUNISTIC_TLS Xo (boolean, default=commented) .Xc @@ -234,7 +234,7 @@ the outside mail exchangers; in opportun be encrypted if the remote server supports STARTTLS, but an unencrypted delivery will still be made if the negotiation fails. Only useful together with -.Sq SECURETRANS +.Sq SECURETRANSFER and .Sq STARTTLS . .It Ic CERTFILE Xo From owner-svn-src-all@freebsd.org Sat May 20 17:42:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDDCFD76568; Sat, 20 May 2017 17:42:59 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7412F1160; Sat, 20 May 2017 17:42:59 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KHgwVk035395; Sat, 20 May 2017 17:42:58 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KHgwgv035394; Sat, 20 May 2017 17:42:58 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705201742.v4KHgwgv035394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 20 May 2017 17:42:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318586 - head/contrib/dma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 17:42:59 -0000 Author: vangyzen Date: Sat May 20 17:42:58 2017 New Revision: 318586 URL: https://svnweb.freebsd.org/changeset/base/318586 Log: dma.8: fix problems reported by igor and 'mandoc -Tlint' dma.8:77:contraction:Queue the mail, but [don't] attempt to deliver it. dma.8:85:repeated:s [are are] ignored. dma.8:87:contraction:[Don't] run in the background. dma.8:201:contraction:Use the catch-all alias only if you [don't] want any local mail to be mandoc: dma.8:308:5: WARNING: macro neither callable nor escaped: Sm MFC after: 3 days Modified: head/contrib/dma/dma.8 Modified: head/contrib/dma/dma.8 ============================================================================== --- head/contrib/dma/dma.8 Sat May 20 17:39:23 2017 (r318585) +++ head/contrib/dma/dma.8 Sat May 20 17:42:58 2017 (r318586) @@ -74,7 +74,7 @@ acts as a compatibility option for sendm .It Fl bp List all mails currently stored in the mail queue. .It Fl bq -Queue the mail, but don't attempt to deliver it. +Queue the mail, but do not attempt to deliver it. See also the .Sq DEFER config file setting below. @@ -82,9 +82,9 @@ config file setting below. .Pp All other .Ar mode Ns -s are are ignored. +s are ignored. .It Fl D -Don't run in the background. +Do not run in the background. Useful for debugging. .It Fl f Ar sender Set sender address (envelope-from) to @@ -198,7 +198,7 @@ The special name .Ql * can be used to create a catch-all alias, which gets used if no other matching alias is found. -Use the catch-all alias only if you don't want any local mail to be +Use the catch-all alias only if you do not want any local mail to be delivered. .It Ic SPOOLDIR Xo (string, default=/var/spool/dma) @@ -305,7 +305,8 @@ will send all mails as setting it to .Ql percolator will send all mails as -.Ql Sm off Va username @percolator . +.Sm off +.Ql Va username @percolator . .Sm on .It Ic NULLCLIENT Xo .Xc From owner-svn-src-all@freebsd.org Sat May 20 18:02:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2652D76C50; Sat, 20 May 2017 18:02:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82C661C5F; Sat, 20 May 2017 18:02:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KI2Vtf043969; Sat, 20 May 2017 18:02:31 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KI2VcS043968; Sat, 20 May 2017 18:02:31 GMT (envelope-from des@FreeBSD.org) Message-Id: <201705201802.v4KI2VcS043968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sat, 20 May 2017 18:02:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318587 - head/contrib/top X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 18:02:32 -0000 Author: des Date: Sat May 20 18:02:31 2017 New Revision: 318587 URL: https://svnweb.freebsd.org/changeset/base/318587 Log: Add -w to usage string. Reported by: Jamie Landeg-Jones MFC after: 1 week Modified: head/contrib/top/top.c Modified: head/contrib/top/top.c ============================================================================== --- head/contrib/top/top.c Sat May 20 17:42:58 2017 (r318586) +++ head/contrib/top/top.c Sat May 20 18:02:31 2017 (r318587) @@ -433,7 +433,7 @@ char *argv[]; default: fprintf(stderr, "Top version %s\n" -"Usage: %s [-abCHIijnPqStuvz] [-d count] [-m io | cpu] [-o field] [-s time]\n" +"Usage: %s [-abCHIijnPqStuvwz] [-d count] [-m io | cpu] [-o field] [-s time]\n" " [-J jail] [-U username] [number]\n", version_string(), myname); exit(1); From owner-svn-src-all@freebsd.org Sat May 20 18:16:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47A4BD766FF; Sat, 20 May 2017 18:16:28 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1845516EA; Sat, 20 May 2017 18:16:28 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KIGRkM048166; Sat, 20 May 2017 18:16:27 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KIGR8c048165; Sat, 20 May 2017 18:16:27 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705201816.v4KIGR8c048165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 20 May 2017 18:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318588 - head/usr.sbin/nscd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 18:16:28 -0000 Author: cy Date: Sat May 20 18:16:26 2017 New Revision: 318588 URL: https://svnweb.freebsd.org/changeset/base/318588 Log: Fix up two assertions following malloc(). vangyzen@ notified me of the second one. The first one is fixed as well. Reported by: vangyzen@ MFC after: 1 week Modified: head/usr.sbin/nscd/query.c Modified: head/usr.sbin/nscd/query.c ============================================================================== --- head/usr.sbin/nscd/query.c Sat May 20 18:02:31 2017 (r318587) +++ head/usr.sbin/nscd/query.c Sat May 20 18:16:26 2017 (r318588) @@ -725,7 +725,7 @@ on_read_request_process(struct query_sta if (read_response->error_code == -2) { read_response->data = malloc( read_response->data_size); - assert(read_response != NULL); + assert(read_response->data != NULL); read_response->error_code = cache_read(c_entry, read_request->cache_key, read_request->cache_key_size, @@ -745,7 +745,7 @@ on_read_request_process(struct query_sta if (read_response->error_code == -2) { read_response->data = malloc( read_response->data_size); - assert(read_response != NULL); + assert(read_response->data != NULL); read_response->error_code = cache_read(neg_c_entry, read_request->cache_key, read_request->cache_key_size, From owner-svn-src-all@freebsd.org Sat May 20 23:25:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC638D75F17; Sat, 20 May 2017 23:25:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8876916DD; Sat, 20 May 2017 23:25:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KNP7JD076625; Sat, 20 May 2017 23:25:07 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KNP7Vp076624; Sat, 20 May 2017 23:25:07 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705202325.v4KNP7Vp076624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 20 May 2017 23:25:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318589 - head/usr.sbin/mountd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 23:25:08 -0000 Author: rmacklem Date: Sat May 20 23:25:07 2017 New Revision: 318589 URL: https://svnweb.freebsd.org/changeset/base/318589 Log: Update the exports.5 man page to reflect the change in default uid/gid made by r318262. This is a content change. Modified: head/usr.sbin/mountd/exports.5 Modified: head/usr.sbin/mountd/exports.5 ============================================================================== --- head/usr.sbin/mountd/exports.5 Sat May 20 18:16:26 2017 (r318588) +++ head/usr.sbin/mountd/exports.5 Sat May 20 23:25:07 2017 (r318589) @@ -28,7 +28,7 @@ .\" @(#)exports.5 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd August 14, 2014 +.Dd May 20, 2017 .Dt EXPORTS 5 .Os .Sh NAME @@ -164,12 +164,12 @@ In the absence of .Fl maproot and .Fl mapall -options, remote accesses by root will result in using a credential of -2:-2. +options, remote accesses by root will result in using a credential of 65534:65533. All other users will be mapped to their remote credential. If a .Fl maproot option is given, -remote access by root will be mapped to that credential instead of -2:-2. +remote access by root will be mapped to that credential instead of 65534:65533. If a .Fl mapall option is given,