From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 05:45:28 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8BAF670995; Mon, 30 Aug 2021 05:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GyfRr4wTBz3LLK; Mon, 30 Aug 2021 05:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B8C218799; Mon, 30 Aug 2021 05:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17U5jSri071283; Mon, 30 Aug 2021 05:45:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17U5jSxD071282; Mon, 30 Aug 2021 05:45:28 GMT (envelope-from git) Date: Mon, 30 Aug 2021 05:45:28 GMT Message-Id: <202108300545.17U5jSxD071282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 08fe2da3cef2 - stable/13 - nfsstat(1): Fix a typo in an error message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 08fe2da3cef29ac837108be1ed644c52ccc04ed4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 05:45:28 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=08fe2da3cef29ac837108be1ed644c52ccc04ed4 commit 08fe2da3cef29ac837108be1ed644c52ccc04ed4 Author: Gordon Bergling AuthorDate: 2021-08-23 07:21:28 +0000 Commit: Gordon Bergling CommitDate: 2021-08-30 05:44:57 +0000 nfsstat(1): Fix a typo in an error message - s/priviledged/privileged/ (cherry picked from commit 72a92f91f466fdb73071ec28982b9f4d4cf9b672) --- usr.bin/nfsstat/nfsstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index 72a2c08963cf..e2d747634bcc 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -182,7 +182,7 @@ main(int argc, char **argv) mntbuf->f_mntfromname, mntbuf->f_mntonname, buf); else if (errno == EPERM) - errx(1, "Only priviledged users" + errx(1, "Only privileged users" " can use the -m option"); } mntbuf++; From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 05:46:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7149670B95; Mon, 30 Aug 2021 05:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GyfSW5fnMz3LN2; Mon, 30 Aug 2021 05:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A9D3B18B07; Mon, 30 Aug 2021 05:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17U5k33r071470; Mon, 30 Aug 2021 05:46:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17U5k3ld071469; Mon, 30 Aug 2021 05:46:03 GMT (envelope-from git) Date: Mon, 30 Aug 2021 05:46:03 GMT Message-Id: <202108300546.17U5k3ld071469@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 7959cf4d6fc2 - stable/12 - nfsstat(1): Fix a typo in an error message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7959cf4d6fc2fa9bd7bdbd1b6a947d93949c1765 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 05:46:03 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7959cf4d6fc2fa9bd7bdbd1b6a947d93949c1765 commit 7959cf4d6fc2fa9bd7bdbd1b6a947d93949c1765 Author: Gordon Bergling AuthorDate: 2021-08-23 07:21:28 +0000 Commit: Gordon Bergling CommitDate: 2021-08-30 05:45:46 +0000 nfsstat(1): Fix a typo in an error message - s/priviledged/privileged/ (cherry picked from commit 72a92f91f466fdb73071ec28982b9f4d4cf9b672) --- usr.bin/nfsstat/nfsstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index 2f874b5227ca..4f832683a3f1 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -186,7 +186,7 @@ main(int argc, char **argv) mntbuf->f_mntfromname, mntbuf->f_mntonname, buf); else if (errno == EPERM) - errx(1, "Only priviledged users" + errx(1, "Only privileged users" " can use the -m option"); } mntbuf++; From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 09:18:15 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92435673914; Mon, 30 Aug 2021 09:18:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyl9M3Z7Nz3R4f; Mon, 30 Aug 2021 09:18:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E60F1B349; Mon, 30 Aug 2021 09:18:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17U9IFat056222; Mon, 30 Aug 2021 09:18:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17U9IFM7056221; Mon, 30 Aug 2021 09:18:15 GMT (envelope-from git) Date: Mon, 30 Aug 2021 09:18:15 GMT Message-Id: <202108300918.17U9IFM7056221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: bd0ad8209d55 - stable/13 - altq: Fix panics on rmc_restart() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bd0ad8209d55aca19b5f69b2ddc7c956863382b3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 09:18:15 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bd0ad8209d55aca19b5f69b2ddc7c956863382b3 commit bd0ad8209d55aca19b5f69b2ddc7c956863382b3 Author: Kristof Provost AuthorDate: 2021-08-21 11:42:27 +0000 Commit: Kristof Provost CommitDate: 2021-08-30 08:02:14 +0000 altq: Fix panics on rmc_restart() rmc_restart() is called from a timer, but can trigger traffic. This means the curvnet context will not be set. Use the vnet associated with the interface we're currently processing to set it. We also have to enter net_epoch here, for the same reason. Reviewed by: mjg MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31642 (cherry picked from commit 159258afb50ad57f7ed27fe86ded83a7b3a26f90) --- sys/net/altq/altq_rmclass.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/net/altq/altq_rmclass.c b/sys/net/altq/altq_rmclass.c index a6ede6feebe2..a9af314cd48a 100644 --- a/sys/net/altq/altq_rmclass.c +++ b/sys/net/altq/altq_rmclass.c @@ -1554,10 +1554,13 @@ rmc_restart(void *arg) { struct rm_class *cl = arg; struct rm_ifdat *ifd = cl->ifdat_; + struct epoch_tracker et; int s; s = splnet(); + NET_EPOCH_ENTER(et); IFQ_LOCK(ifd->ifq_); + CURVNET_SET(ifd->ifq_->altq_ifp->if_vnet); if (cl->sleeping_) { cl->sleeping_ = 0; cl->undertime_.tv_sec = 0; @@ -1567,7 +1570,9 @@ rmc_restart(void *arg) (ifd->restart)(ifd->ifq_); } } + CURVNET_RESTORE(); IFQ_UNLOCK(ifd->ifq_); + NET_EPOCH_EXIT(et); splx(s); } From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 09:18:17 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BBB066730E3; Mon, 30 Aug 2021 09:18:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyl9P4s4nz3Qtp; Mon, 30 Aug 2021 09:18:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9034F1B4FF; Mon, 30 Aug 2021 09:18:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17U9IHWI056325; Mon, 30 Aug 2021 09:18:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17U9IHk0056324; Mon, 30 Aug 2021 09:18:17 GMT (envelope-from git) Date: Mon, 30 Aug 2021 09:18:17 GMT Message-Id: <202108300918.17U9IHk0056324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: d6163ad0d9ef - stable/12 - altq: Fix panics on rmc_restart() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d6163ad0d9ef7098ba58f77c792166efe32db8cb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 09:18:17 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d6163ad0d9ef7098ba58f77c792166efe32db8cb commit d6163ad0d9ef7098ba58f77c792166efe32db8cb Author: Kristof Provost AuthorDate: 2021-08-21 11:42:27 +0000 Commit: Kristof Provost CommitDate: 2021-08-30 09:15:24 +0000 altq: Fix panics on rmc_restart() rmc_restart() is called from a timer, but can trigger traffic. This means the curvnet context will not be set. Use the vnet associated with the interface we're currently processing to set it. We also have to enter net_epoch here, for the same reason. Reviewed by: mjg MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31642 (cherry picked from commit 159258afb50ad57f7ed27fe86ded83a7b3a26f90) --- sys/net/altq/altq_rmclass.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/net/altq/altq_rmclass.c b/sys/net/altq/altq_rmclass.c index 655b5da724cb..288821867b3a 100644 --- a/sys/net/altq/altq_rmclass.c +++ b/sys/net/altq/altq_rmclass.c @@ -1567,7 +1567,9 @@ rmc_restart(struct rm_class *cl) int s; s = splnet(); + NET_EPOCH_ENTER(); IFQ_LOCK(ifd->ifq_); + CURVNET_SET(ifd->ifq_->altq_ifp->if_vnet); if (cl->sleeping_) { cl->sleeping_ = 0; cl->undertime_.tv_sec = 0; @@ -1577,7 +1579,9 @@ rmc_restart(struct rm_class *cl) (ifd->restart)(ifd->ifq_); } } + CURVNET_RESTORE(); IFQ_UNLOCK(ifd->ifq_); + NET_EPOCH_EXIT(); splx(s); } From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 12:43:09 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA613675C2E; Mon, 30 Aug 2021 12:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyqjn4SkBz3nqq; Mon, 30 Aug 2021 12:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 778AB1E050; Mon, 30 Aug 2021 12:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UCh9f2034846; Mon, 30 Aug 2021 12:43:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UCh9Xk034845; Mon, 30 Aug 2021 12:43:09 GMT (envelope-from git) Date: Mon, 30 Aug 2021 12:43:09 GMT Message-Id: <202108301243.17UCh9Xk034845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 45f92b1e834c - stable/13 - Split out the arm64 ID field comparison function MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 45f92b1e834c11093d8c1fd4fb7654a14e0b2de1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 12:43:09 -0000 The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=45f92b1e834c11093d8c1fd4fb7654a14e0b2de1 commit 45f92b1e834c11093d8c1fd4fb7654a14e0b2de1 Author: Andrew Turner AuthorDate: 2021-07-16 12:46:59 +0000 Commit: Andrew Turner CommitDate: 2021-08-30 11:22:21 +0000 Split out the arm64 ID field comparison function This will be useful in an update for finding which HWCAPS to set. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31200 (cherry picked from commit 04f6015706f73c90ba78699953d0d4d0b0237298) --- sys/arm64/arm64/identcpu.c | 48 ++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 522526b92307..233b036f4499 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1348,22 +1348,26 @@ get_kernel_reg(u_int reg, uint64_t *val) return (false); } -static uint64_t -update_lower_register(uint64_t val, uint64_t new_val, u_int shift, - int width, bool sign) +/* + * Compares two field values that may be signed or unsigned. + * Returns: + * < 0 when a is less than b + * = 0 when a equals b + * > 0 when a is greater than b + */ +static int +mrs_field_cmp(uint64_t a, uint64_t b, u_int shift, int width, bool sign) { uint64_t mask; - uint64_t new_field, old_field; - bool update; KASSERT(width > 0 && width < 64, ("%s: Invalid width %d", __func__, width)); mask = (1ul << width) - 1; - new_field = (new_val >> shift) & mask; - old_field = (val >> shift) & mask; + /* Move the field to the lower bits */ + a = (a >> shift) & mask; + b = (b >> shift) & mask; - update = false; if (sign) { /* * The field is signed. Toggle the upper bit so the comparison @@ -1371,17 +1375,29 @@ update_lower_register(uint64_t val, uint64_t new_val, u_int shift, * i.e. those with a 0 bit, larger than negative numbers, * i.e. those with a 1 bit, in an unsigned comparison. */ - if ((new_field ^ (1ul << (width - 1))) < - (old_field ^ (1ul << (width - 1)))) - update = true; - } else { - if (new_field < old_field) - update = true; + a ^= 1ul << (width - 1); + b ^= 1ul << (width - 1); } - if (update) { + return (a - b); +} + +static uint64_t +update_lower_register(uint64_t val, uint64_t new_val, u_int shift, + int width, bool sign) +{ + uint64_t mask; + + KASSERT(width > 0 && width < 64, ("%s: Invalid width %d", __func__, + width)); + + /* + * If the new value is less than the existing value update it. + */ + if (mrs_field_cmp(new_val, val, shift, width, sign) < 0) { + mask = (1ul << width) - 1; val &= ~(mask << shift); - val |= new_field << shift; + val |= new_val & (mask << shift); } return (val); From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 12:43:11 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 13372676081; Mon, 30 Aug 2021 12:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyqjp5Vvmz3nqs; Mon, 30 Aug 2021 12:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AB691DF2D; Mon, 30 Aug 2021 12:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UChAKr034877; Mon, 30 Aug 2021 12:43:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UChAXd034876; Mon, 30 Aug 2021 12:43:10 GMT (envelope-from git) Date: Mon, 30 Aug 2021 12:43:10 GMT Message-Id: <202108301243.17UChAXd034876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: e20f0db4a94a - stable/13 - Start to clean up arm64 address space selection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e20f0db4a94ab5c29161fda4e6377878f78ab8d7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 12:43:11 -0000 The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e20f0db4a94ab5c29161fda4e6377878f78ab8d7 commit e20f0db4a94ab5c29161fda4e6377878f78ab8d7 Author: Andrew Turner AuthorDate: 2021-07-14 15:19:06 +0000 Commit: Andrew Turner CommitDate: 2021-08-30 11:22:21 +0000 Start to clean up arm64 address space selection On arm64 we should use bit 55 of the address to decide if aan address is a user or kernel address. Add a new macro with this check and a second to ensure the address is in teh canonical form, i.e. the top bits are all zero or all one. This will help with supporting future cpu features, including Top Byte Ignore, Pointer Authentication, and Memory Tagging. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31179 (cherry picked from commit b7a78d573a566c77117af5fe0b259620934a5c7f) --- sys/arm64/arm64/machdep.c | 10 ++++-- sys/arm64/arm64/pmap.c | 75 ++++++++++++++++++++++++++++++++------------- sys/arm64/arm64/trap.c | 9 +++++- sys/arm64/include/vmparam.h | 7 +++++ 4 files changed, 76 insertions(+), 25 deletions(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 6b7e4be7c9d1..a2db5e2b67af 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -377,7 +377,10 @@ set_dbregs(struct thread *td, struct dbreg *regs) addr = regs->db_breakregs[i].dbr_addr; ctrl = regs->db_breakregs[i].dbr_ctrl; - /* Don't let the user set a breakpoint on a kernel address. */ + /* + * Don't let the user set a breakpoint on a kernel or + * non-canonical user address. + */ if (addr >= VM_MAXUSER_ADDRESS) return (EINVAL); @@ -412,7 +415,10 @@ set_dbregs(struct thread *td, struct dbreg *regs) addr = regs->db_watchregs[i].dbw_addr; ctrl = regs->db_watchregs[i].dbw_ctrl; - /* Don't let the user set a watchpoint on a kernel address. */ + /* + * Don't let the user set a watchpoint on a kernel or + * non-canonical user address. + */ if (addr >= VM_MAXUSER_ADDRESS) return (EINVAL); diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index e57a4033c3a3..343a3d69ddee 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -466,11 +466,13 @@ pmap_l1_to_l2(pd_entry_t *l1p, vm_offset_t va) l1 = pmap_load(l1p); + KASSERT(ADDR_IS_CANONICAL(va), + ("%s: Address not in canonical form: %lx", __func__, va)); /* * The valid bit may be clear if pmap_update_entry() is concurrently * modifying the entry, so for KVA only the entry type may be checked. */ - KASSERT(va >= VM_MAX_USER_ADDRESS || (l1 & ATTR_DESCR_VALID) != 0, + KASSERT(ADDR_IS_KERNEL(va) || (l1 & ATTR_DESCR_VALID) != 0, ("%s: L1 entry %#lx for %#lx is invalid", __func__, l1, va)); KASSERT((l1 & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_TABLE, ("%s: L1 entry %#lx for %#lx is a leaf", __func__, l1, va)); @@ -498,11 +500,13 @@ pmap_l2_to_l3(pd_entry_t *l2p, vm_offset_t va) l2 = pmap_load(l2p); + KASSERT(ADDR_IS_CANONICAL(va), + ("%s: Address not in canonical form: %lx", __func__, va)); /* * The valid bit may be clear if pmap_update_entry() is concurrently * modifying the entry, so for KVA only the entry type may be checked. */ - KASSERT(va >= VM_MAX_USER_ADDRESS || (l2 & ATTR_DESCR_VALID) != 0, + KASSERT(ADDR_IS_KERNEL(va) || (l2 & ATTR_DESCR_VALID) != 0, ("%s: L2 entry %#lx for %#lx is invalid", __func__, l2, va)); KASSERT((l2 & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_TABLE, ("%s: L2 entry %#lx for %#lx is a leaf", __func__, l2, va)); @@ -1580,7 +1584,9 @@ pmap_qremove(vm_offset_t sva, int count) vm_offset_t va; int lvl; - KASSERT(sva >= VM_MIN_KERNEL_ADDRESS, ("usermode va %lx", sva)); + KASSERT(ADDR_IS_CANONICAL(sva), + ("%s: Address not in canonical form: %lx", __func__, sva)); + KASSERT(ADDR_IS_KERNEL(sva), ("usermode va %lx", sva)); va = sva; while (count-- > 0) { @@ -1700,7 +1706,9 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t va, pd_entry_t ptepde, { vm_page_t mpte; - if (va >= VM_MAXUSER_ADDRESS) + KASSERT(ADDR_IS_CANONICAL(va), + ("%s: Address not in canonical form: %lx", __func__, va)); + if (ADDR_IS_KERNEL(va)) return (0); KASSERT(ptepde != 0, ("pmap_unuse_pt: ptepde != 0")); mpte = PHYS_TO_VM_PAGE(ptepde & ~ATTR_MASK); @@ -1960,17 +1968,20 @@ pmap_alloc_l2(pmap_t pmap, vm_offset_t va, vm_page_t *l2pgp, vm_page_t l2pg; vm_pindex_t l2pindex; + KASSERT(ADDR_IS_CANONICAL(va), + ("%s: Address not in canonical form: %lx", __func__, va)); + retry: l1 = pmap_l1(pmap, va); if (l1 != NULL && (pmap_load(l1) & ATTR_DESCR_MASK) == L1_TABLE) { l2 = pmap_l1_to_l2(l1, va); - if (va < VM_MAXUSER_ADDRESS) { + if (!ADDR_IS_KERNEL(va)) { /* Add a reference to the L2 page. */ l2pg = PHYS_TO_VM_PAGE(pmap_load(l1) & ~ATTR_MASK); l2pg->ref_count++; } else l2pg = NULL; - } else if (va < VM_MAXUSER_ADDRESS) { + } else if (!ADDR_IS_KERNEL(va)) { /* Allocate a L2 page. */ l2pindex = pmap_l2_pindex(va) >> Ln_ENTRIES_SHIFT; l2pg = _pmap_alloc_l3(pmap, NUL2E + l2pindex, lockp); @@ -2940,11 +2951,15 @@ pmap_remove_l3_range(pmap_t pmap, pd_entry_t l2e, vm_offset_t sva, vm_offset_t va; vm_page_t l3pg, m; + KASSERT(ADDR_IS_CANONICAL(sva), + ("%s: Start address not in canonical form: %lx", __func__, sva)); + KASSERT(ADDR_IS_CANONICAL(eva) || eva == VM_MAX_USER_ADDRESS, + ("%s: End address not in canonical form: %lx", __func__, eva)); + PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT(rounddown2(sva, L2_SIZE) + L2_SIZE == roundup2(eva, L2_SIZE), ("pmap_remove_l3_range: range crosses an L3 page table boundary")); - l3pg = sva < VM_MAXUSER_ADDRESS ? PHYS_TO_VM_PAGE(l2e & ~ATTR_MASK) : - NULL; + l3pg = !ADDR_IS_KERNEL(sva) ? PHYS_TO_VM_PAGE(l2e & ~ATTR_MASK) : NULL; va = eva; for (l3 = pmap_l2_to_l3(&l2e, sva); sva != eva; l3++, sva += L3_SIZE) { if (!pmap_l3_valid(pmap_load(l3))) { @@ -3885,6 +3900,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, boolean_t nosleep; int lvl, rv; + KASSERT(ADDR_IS_CANONICAL(va), + ("%s: Address not in canonical form: %lx", __func__, va)); + va = trunc_page(va); if ((m->oflags & VPO_UNMANAGED) == 0) VM_PAGE_OBJECT_BUSY_ASSERT(m); @@ -3896,7 +3914,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, if ((flags & PMAP_ENTER_WIRED) != 0) new_l3 |= ATTR_SW_WIRED; if (pmap->pm_stage == PM_STAGE1) { - if (va < VM_MAXUSER_ADDRESS) + if (!ADDR_IS_KERNEL(va)) new_l3 |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN; else new_l3 |= ATTR_S1_UXN; @@ -3963,7 +3981,7 @@ retry: pde = pmap_pde(pmap, va, &lvl); if (pde != NULL && lvl == 2) { l3 = pmap_l2_to_l3(pde, va); - if (va < VM_MAXUSER_ADDRESS && mpte == NULL) { + if (!ADDR_IS_KERNEL(va) && mpte == NULL) { mpte = PHYS_TO_VM_PAGE(pmap_load(pde) & ~ATTR_MASK); mpte->ref_count++; } @@ -3973,7 +3991,7 @@ retry: if ((pmap_load(l2) & ATTR_DESCR_MASK) == L2_BLOCK && (l3 = pmap_demote_l2_locked(pmap, l2, va, &lock)) != NULL) { l3 = &l3[pmap_l3_index(va)]; - if (va < VM_MAXUSER_ADDRESS) { + if (!ADDR_IS_KERNEL(va)) { mpte = PHYS_TO_VM_PAGE( pmap_load(l2) & ~ATTR_MASK); mpte->ref_count++; @@ -3982,7 +4000,7 @@ retry: } /* We need to allocate an L3 table. */ } - if (va < VM_MAXUSER_ADDRESS) { + if (!ADDR_IS_KERNEL(va)) { nosleep = (flags & PMAP_ENTER_NOSLEEP) != 0; /* @@ -4207,6 +4225,8 @@ pmap_enter_2mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, PMAP_LOCK_ASSERT(pmap, MA_OWNED); PMAP_ASSERT_STAGE1(pmap); + KASSERT(ADDR_IS_CANONICAL(va), + ("%s: Address not in canonical form: %lx", __func__, va)); new_l2 = (pd_entry_t)(VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | ATTR_S1_IDX(m->md.pv_memattr) | ATTR_S1_AP(ATTR_S1_AP_RO) | @@ -4218,7 +4238,7 @@ pmap_enter_2mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == VM_MEMATTR_DEVICE) new_l2 |= ATTR_S1_XN; - if (va < VM_MAXUSER_ADDRESS) + if (!ADDR_IS_KERNEL(va)) new_l2 |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN; else new_l2 |= ATTR_S1_UXN; @@ -4267,6 +4287,8 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, vm_page_t l2pg, mt; PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT(ADDR_IS_CANONICAL(va), + ("%s: Address not in canonical form: %lx", __func__, va)); if ((l2 = pmap_alloc_l2(pmap, va, &l2pg, (flags & PMAP_ENTER_NOSLEEP) != 0 ? NULL : lockp)) == NULL) { @@ -4281,9 +4303,10 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, if ((old_l2 = pmap_load(l2)) != 0) { KASSERT(l2pg == NULL || l2pg->ref_count > 1, ("pmap_enter_l2: l2pg's ref count is too low")); - if ((flags & PMAP_ENTER_NOREPLACE) != 0 && (va < - VM_MAXUSER_ADDRESS || (old_l2 & ATTR_DESCR_MASK) == - L2_BLOCK || !pmap_every_pte_zero(old_l2 & ~ATTR_MASK))) { + if ((flags & PMAP_ENTER_NOREPLACE) != 0 && + (!ADDR_IS_KERNEL(va) || + (old_l2 & ATTR_DESCR_MASK) == L2_BLOCK || + !pmap_every_pte_zero(old_l2 & ~ATTR_MASK))) { if (l2pg != NULL) l2pg->ref_count--; CTR2(KTR_PMAP, "pmap_enter_l2: failure for va %#lx" @@ -4297,7 +4320,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, else pmap_remove_l3_range(pmap, old_l2, va, va + L2_SIZE, &free, lockp); - if (va < VM_MAXUSER_ADDRESS) { + if (!ADDR_IS_KERNEL(va)) { vm_page_free_pages_toq(&free, true); KASSERT(pmap_load(l2) == 0, ("pmap_enter_l2: non-zero L2 entry %p", l2)); @@ -4436,13 +4459,15 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, ("pmap_enter_quick_locked: managed mapping within the clean submap")); PMAP_LOCK_ASSERT(pmap, MA_OWNED); PMAP_ASSERT_STAGE1(pmap); + KASSERT(ADDR_IS_CANONICAL(va), + ("%s: Address not in canonical form: %lx", __func__, va)); CTR2(KTR_PMAP, "pmap_enter_quick_locked: %p %lx", pmap, va); /* * In the case that a page table page is not * resident, we are creating it here. */ - if (va < VM_MAXUSER_ADDRESS) { + if (!ADDR_IS_KERNEL(va)) { vm_pindex_t l2pindex; /* @@ -4526,7 +4551,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == VM_MEMATTR_DEVICE) l3_val |= ATTR_S1_XN; - if (va < VM_MAXUSER_ADDRESS) + if (!ADDR_IS_KERNEL(va)) l3_val |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN; else l3_val |= ATTR_S1_UXN; @@ -6273,6 +6298,9 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_offset_t va, PMAP_LOCK_ASSERT(pmap, MA_OWNED); PMAP_ASSERT_STAGE1(pmap); + KASSERT(ADDR_IS_CANONICAL(va), + ("%s: Address not in canonical form: %lx", __func__, va)); + l3 = NULL; oldl2 = pmap_load(l2); KASSERT((oldl2 & ATTR_DESCR_MASK) == L2_BLOCK, @@ -6312,7 +6340,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_offset_t va, * so the direct map region is the only part of the * kernel address space that must be handled here. */ - KASSERT(va < VM_MAXUSER_ADDRESS || VIRT_IN_DMAP(va), + KASSERT(!ADDR_IS_KERNEL(va) || VIRT_IN_DMAP(va), ("pmap_demote_l2: No saved mpte for va %#lx", va)); /* @@ -6337,7 +6365,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_offset_t va, goto fail; } - if (va < VM_MAXUSER_ADDRESS) { + if (!ADDR_IS_KERNEL(va)) { ml3->ref_count = NL3PG; pmap_resident_count_inc(pmap, 1); } @@ -6700,7 +6728,10 @@ pmap_sync_icache(pmap_t pmap, vm_offset_t va, vm_size_t sz) { PMAP_ASSERT_STAGE1(pmap); - if (va >= VM_MIN_KERNEL_ADDRESS) { + KASSERT(ADDR_IS_CANONICAL(va), + ("%s: Address not in canonical form: %lx", __func__, va)); + + if (ADDR_IS_KERNEL(va)) { cpu_icache_sync_range(va, sz); } else { u_int len, offset; diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index fa33f713a4fc..2c95239ec1c5 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -261,8 +261,14 @@ data_abort(struct thread *td, struct trapframe *frame, uint64_t esr, else { intr_enable(); + /* We received a TBI/PAC/etc. fault from the kernel */ + if (!ADDR_IS_CANONICAL(far)) { + error = KERN_INVALID_ADDRESS; + goto bad_far; + } + /* The top bit tells us which range to use */ - if (far >= VM_MAXUSER_ADDRESS) { + if (ADDR_IS_KERNEL(far)) { map = kernel_map; } else { map = &p->p_vmspace->vm_map; @@ -306,6 +312,7 @@ data_abort(struct thread *td, struct trapframe *frame, uint64_t esr, /* Fault in the page. */ error = vm_fault_trap(map, far, ftype, VM_FAULT_NORMAL, &sig, &ucode); if (error != KERN_SUCCESS) { +bad_far: if (lower) { call_trapsignal(td, sig, ucode, (void *)far, ESR_ELx_EXCEPTION(esr)); diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index a42c68d52887..170fef61b70d 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -156,6 +156,13 @@ #define VM_MIN_KERNEL_ADDRESS (0xffff000000000000UL) #define VM_MAX_KERNEL_ADDRESS (0xffff008000000000UL) +/* If true addr is in the kernel address space */ +#define ADDR_IS_KERNEL(addr) (((addr) & (1ul << 55)) == (1ul << 55)) +/* If true addr is in its canonical form (i.e. no TBI, PAC, etc.) */ +#define ADDR_IS_CANONICAL(addr) \ + (((addr) & 0xffff000000000000UL) == 0 || \ + ((addr) & 0xffff000000000000UL) == 0xffff000000000000UL) + /* 95 TiB maximum for the direct map region */ #define DMAP_MIN_ADDRESS (0xffffa00000000000UL) #define DMAP_MAX_ADDRESS (0xffffff0000000000UL) From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 12:43:12 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F015D67606C; Mon, 30 Aug 2021 12:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyqjq61fMz3nr2; Mon, 30 Aug 2021 12:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AECCE1DA6A; Mon, 30 Aug 2021 12:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UChBnu034903; Mon, 30 Aug 2021 12:43:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UChB8r034902; Mon, 30 Aug 2021 12:43:11 GMT (envelope-from git) Date: Mon, 30 Aug 2021 12:43:11 GMT Message-Id: <202108301243.17UChB8r034902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 4bc8d0dcdb37 - stable/13 - Switch to an ifunc in the kernel for crc32c MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4bc8d0dcdb3739eaf771727797d70220f4bd2f6e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 12:43:12 -0000 The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4bc8d0dcdb3739eaf771727797d70220f4bd2f6e commit 4bc8d0dcdb3739eaf771727797d70220f4bd2f6e Author: Andrew Turner AuthorDate: 2021-07-22 10:24:33 +0000 Commit: Andrew Turner CommitDate: 2021-08-30 11:22:21 +0000 Switch to an ifunc in the kernel for crc32c There is no need to read the same variable to check if the CPU supports crc32c instructions. Reviewed by: arichardson, kib, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31274 (cherry picked from commit a93941b439fce7047dffad6bc380cc9454b967cd) --- sys/libkern/gsb_crc32.c | 56 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/sys/libkern/gsb_crc32.c b/sys/libkern/gsb_crc32.c index 170ceb3aa710..27b9a926888b 100644 --- a/sys/libkern/gsb_crc32.c +++ b/sys/libkern/gsb_crc32.c @@ -55,11 +55,12 @@ __FBSDID("$FreeBSD$"); #if defined(__amd64__) || defined(__i386__) #include #include +#include #endif #if defined(__aarch64__) -#include -#include +#include +#include #endif #endif /* _KERNEL */ @@ -750,29 +751,48 @@ multitable_crc32c(uint32_t crc32c, return (crc32c_sb8_64_bit(crc32c, buffer, length, to_even_word)); } -uint32_t -calculate_crc32c(uint32_t crc32c, - const unsigned char *buffer, - unsigned int length) +static uint32_t +table_crc32c(uint32_t crc32c, const unsigned char *buffer, unsigned int length) { -#ifdef _KERNEL -#if defined(__amd64__) || defined(__i386__) - if ((cpu_feature2 & CPUID2_SSE42) != 0) { - return (sse42_crc32c(crc32c, buffer, length)); - } else -#endif -#if defined(__aarch64__) - if ((elf_hwcap & HWCAP_CRC32) != 0) { - return (armv8_crc32c(crc32c, buffer, length)); - } else -#endif -#endif /* _KERNEL */ if (length < 4) { return (singletable_crc32c(crc32c, buffer, length)); } else { return (multitable_crc32c(crc32c, buffer, length)); } } + +#if defined(_KERNEL) && defined(__aarch64__) +DEFINE_IFUNC(, uint32_t, calculate_crc32c, + (uint32_t crc32c, const unsigned char *buffer, unsigned int length)) +{ + uint64_t reg; + + if (get_kernel_reg(ID_AA64ISAR0_EL1, ®)) { + if (ID_AA64ISAR0_CRC32_VAL(reg) >= ID_AA64ISAR0_CRC32_BASE) + return (armv8_crc32c); + } + + return (table_crc32c); +} +#elif defined(_KERNEL) && (defined(__amd64__) || defined(__i386__)) +DEFINE_IFUNC(, uint32_t, calculate_crc32c, + (uint32_t crc32c, const unsigned char *buffer, unsigned int length)) +{ + if ((cpu_feature2 & CPUID2_SSE42) != 0) + return (sse42_crc32c); + + return (table_crc32c); +} +#else +uint32_t +calculate_crc32c(uint32_t crc32c, + const unsigned char *buffer, + unsigned int length) +{ + return (table_crc32c(crc32c, buffer, length)); +} +#endif /* _KERNEL && __aarch64__ */ + #else uint32_t calculate_crc32c(uint32_t crc32c, const unsigned char *buffer, unsigned int length) From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 12:43:14 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D77B67606F; Mon, 30 Aug 2021 12:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyqjt1Lkhz3npC; Mon, 30 Aug 2021 12:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BA791E2DB; Mon, 30 Aug 2021 12:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UChDEW034955; Mon, 30 Aug 2021 12:43:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UChDmd034954; Mon, 30 Aug 2021 12:43:13 GMT (envelope-from git) Date: Mon, 30 Aug 2021 12:43:13 GMT Message-Id: <202108301243.17UChDmd034954@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: c7937cf1d347 - stable/13 - Add macros for arm64 special reg op and CR values MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c7937cf1d347a3e963258e74a200949e320aed75 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 12:43:14 -0000 The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c7937cf1d347a3e963258e74a200949e320aed75 commit c7937cf1d347a3e963258e74a200949e320aed75 Author: Andrew Turner AuthorDate: 2021-07-28 13:01:14 +0000 Commit: Andrew Turner CommitDate: 2021-08-30 11:22:21 +0000 Add macros for arm64 special reg op and CR values Use these to simplify the definition of the user_regs array. Reviewed by: imp, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31333 (cherry picked from commit 10f6680faae0177cb5ab18754fb27dbb8a0cf226) --- sys/arm64/arm64/identcpu.c | 82 +++++++++------------------------------------ sys/arm64/include/armreg.h | 83 +++++++++++++++++++++++++++++++++++++++------- 2 files changed, 87 insertions(+), 78 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 794b097195ef..64b3b6a4ef27 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1171,74 +1171,24 @@ struct mrs_user_reg { struct mrs_field *fields; }; +#define USER_REG(name, field_name) \ + { \ + .reg = name, \ + .CRm = name##_CRm, \ + .Op2 = name##_op2, \ + .offset = __offsetof(struct cpu_desc, field_name), \ + .fields = field_name##_fields, \ + } static struct mrs_user_reg user_regs[] = { - { /* id_aa64isar0_el1 */ - .reg = ID_AA64ISAR0_EL1, - .CRm = 6, - .Op2 = 0, - .offset = __offsetof(struct cpu_desc, id_aa64isar0), - .fields = id_aa64isar0_fields, - }, - { /* id_aa64isar1_el1 */ - .reg = ID_AA64ISAR1_EL1, - .CRm = 6, - .Op2 = 1, - .offset = __offsetof(struct cpu_desc, id_aa64isar1), - .fields = id_aa64isar1_fields, - }, - { /* id_aa64pfr0_el1 */ - .reg = ID_AA64PFR0_EL1, - .CRm = 4, - .Op2 = 0, - .offset = __offsetof(struct cpu_desc, id_aa64pfr0), - .fields = id_aa64pfr0_fields, - }, - { /* id_aa64pfr0_el1 */ - .reg = ID_AA64PFR1_EL1, - .CRm = 4, - .Op2 = 1, - .offset = __offsetof(struct cpu_desc, id_aa64pfr1), - .fields = id_aa64pfr1_fields, - }, - { /* id_aa64dfr0_el1 */ - .reg = ID_AA64DFR0_EL1, - .CRm = 5, - .Op2 = 0, - .offset = __offsetof(struct cpu_desc, id_aa64dfr0), - .fields = id_aa64dfr0_fields, - }, - { /* id_aa64mmfr0_el1 */ - .reg = ID_AA64MMFR0_EL1, - .CRm = 7, - .Op2 = 0, - .offset = __offsetof(struct cpu_desc, id_aa64mmfr0), - .fields = id_aa64mmfr0_fields, - }, + USER_REG(ID_AA64ISAR0_EL1, id_aa64isar0), + USER_REG(ID_AA64ISAR1_EL1, id_aa64isar1), + USER_REG(ID_AA64PFR0_EL1, id_aa64pfr0), + USER_REG(ID_AA64DFR0_EL1, id_aa64dfr0), + USER_REG(ID_AA64MMFR0_EL1, id_aa64mmfr0), #ifdef COMPAT_FREEBSD32 - { - /* id_isar5_el1 */ - .reg = ID_ISAR5_EL1, - .CRm = 2, - .Op2 = 5, - .offset = __offsetof(struct cpu_desc, id_isar5), - .fields = id_isar5_fields, - }, - { - /* mvfr0 */ - .reg = MVFR0_EL1, - .CRm = 3, - .Op2 = 0, - .offset = __offsetof(struct cpu_desc, mvfr0), - .fields = mvfr0_fields, - }, - { - /* mvfr1 */ - .reg = MVFR1_EL1, - .CRm = 3, - .Op2 = 1, - .offset = __offsetof(struct cpu_desc, mvfr1), - .fields = mvfr1_fields, - }, + USER_REG(ID_ISAR5_EL1, id_isar5), + USER_REG(MVFR0_EL1, mvfr0), + USER_REG(MVFR1_EL1, mvfr1), #endif /* COMPAT_FREEBSD32 */ }; diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 60389f4171ef..8507e02592b8 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -50,10 +50,14 @@ #define MRS_Op2_MASK 0x000000e0 #define MRS_Rt_SHIFT 0 #define MRS_Rt_MASK 0x0000001f -#define MRS_REG(op0, op1, crn, crm, op2) \ +#define __MRS_REG(op0, op1, crn, crm, op2) \ (((op0) << MRS_Op0_SHIFT) | ((op1) << MRS_Op1_SHIFT) | \ ((crn) << MRS_CRn_SHIFT) | ((crm) << MRS_CRm_SHIFT) | \ ((op2) << MRS_Op2_SHIFT)) +#define MRS_REG(reg) \ + __MRS_REG(reg##_op0, reg##_op1, reg##_CRn, reg##_CRm, reg##_op2) + + #define READ_SPECIALREG(reg) \ ({ uint64_t _val; \ @@ -258,7 +262,12 @@ #define ICC_SRE_EL1_SRE (1U << 0) /* ID_AA64DFR0_EL1 */ -#define ID_AA64DFR0_EL1 MRS_REG(3, 0, 0, 5, 0) +#define ID_AA64DFR0_EL1 MRS_REG(ID_AA64DFR0_EL1) +#define ID_AA64DFR0_EL1_op0 0x3 +#define ID_AA64DFR0_EL1_op1 0x0 +#define ID_AA64DFR0_EL1_CRn 0x0 +#define ID_AA64DFR0_EL1_CRm 0x5 +#define ID_AA64DFR0_EL1_op2 0x0 #define ID_AA64DFR0_DebugVer_SHIFT 0 #define ID_AA64DFR0_DebugVer_MASK (UL(0xf) << ID_AA64DFR0_DebugVer_SHIFT) #define ID_AA64DFR0_DebugVer_VAL(x) ((x) & ID_AA64DFR0_DebugVer_MASK) @@ -310,7 +319,12 @@ #define ID_AA64DFR0_TraceFilt_8_4 (UL(0x1) << ID_AA64DFR0_TraceFilt_SHIFT) /* ID_AA64ISAR0_EL1 */ -#define ID_AA64ISAR0_EL1 MRS_REG(3, 0, 0, 6, 0) +#define ID_AA64ISAR0_EL1 MRS_REG(ID_AA64ISAR0_EL1) +#define ID_AA64ISAR0_EL1_op0 0x3 +#define ID_AA64ISAR0_EL1_op1 0x0 +#define ID_AA64ISAR0_EL1_CRn 0x0 +#define ID_AA64ISAR0_EL1_CRm 0x6 +#define ID_AA64ISAR0_EL1_op2 0x0 #define ID_AA64ISAR0_AES_SHIFT 4 #define ID_AA64ISAR0_AES_MASK (UL(0xf) << ID_AA64ISAR0_AES_SHIFT) #define ID_AA64ISAR0_AES_VAL(x) ((x) & ID_AA64ISAR0_AES_MASK) @@ -387,7 +401,12 @@ #define ID_AA64ISAR0_RNDR_IMPL (UL(0x1) << ID_AA64ISAR0_RNDR_SHIFT) /* ID_AA64ISAR1_EL1 */ -#define ID_AA64ISAR1_EL1 MRS_REG(3, 0, 0, 6, 1) +#define ID_AA64ISAR1_EL1 MRS_REG(ID_AA64ISAR1_EL1) +#define ID_AA64ISAR1_EL1_op0 0x3 +#define ID_AA64ISAR1_EL1_op1 0x0 +#define ID_AA64ISAR1_EL1_CRn 0x0 +#define ID_AA64ISAR1_EL1_CRm 0x6 +#define ID_AA64ISAR1_EL1_op2 0x1 #define ID_AA64ISAR1_DPB_SHIFT 0 #define ID_AA64ISAR1_DPB_MASK (UL(0xf) << ID_AA64ISAR1_DPB_SHIFT) #define ID_AA64ISAR1_DPB_VAL(x) ((x) & ID_AA64ISAR1_DPB_MASK) @@ -464,7 +483,12 @@ #define ID_AA64ISAR1_I8MM_IMPL (UL(0x1) << ID_AA64ISAR1_I8MM_SHIFT) /* ID_AA64MMFR0_EL1 */ -#define ID_AA64MMFR0_EL1 MRS_REG(3, 0, 0, 7, 0) +#define ID_AA64MMFR0_EL1 MRS_REG(ID_AA64MMFR0_EL1) +#define ID_AA64MMFR0_EL1_op0 0x3 +#define ID_AA64MMFR0_EL1_op1 0x0 +#define ID_AA64MMFR0_EL1_CRn 0x0 +#define ID_AA64MMFR0_EL1_CRm 0x7 +#define ID_AA64MMFR0_EL1_op2 0x0 #define ID_AA64MMFR0_PARange_SHIFT 0 #define ID_AA64MMFR0_PARange_MASK (UL(0xf) << ID_AA64MMFR0_PARange_SHIFT) #define ID_AA64MMFR0_PARange_VAL(x) ((x) & ID_AA64MMFR0_PARange_MASK) @@ -535,7 +559,12 @@ #define ID_AA64MMFR0_ExS_IMPL (UL(0x1) << ID_AA64MMFR0_ExS_SHIFT) /* ID_AA64MMFR1_EL1 */ -#define ID_AA64MMFR1_EL1 MRS_REG(3, 0, 0, 7, 1) +#define ID_AA64MMFR1_EL1 MRS_REG(ID_AA64MMFR1_EL1) +#define ID_AA64MMFR1_EL1_op0 0x3 +#define ID_AA64MMFR1_EL1_op1 0x0 +#define ID_AA64MMFR1_EL1_CRn 0x0 +#define ID_AA64MMFR1_EL1_CRm 0x7 +#define ID_AA64MMFR1_EL1_op2 0x1 #define ID_AA64MMFR1_HAFDBS_SHIFT 0 #define ID_AA64MMFR1_HAFDBS_MASK (UL(0xf) << ID_AA64MMFR1_HAFDBS_SHIFT) #define ID_AA64MMFR1_HAFDBS_VAL(x) ((x) & ID_AA64MMFR1_HAFDBS_MASK) @@ -581,7 +610,12 @@ #define ID_AA64MMFR1_XNX_IMPL (UL(0x1) << ID_AA64MMFR1_XNX_SHIFT) /* ID_AA64MMFR2_EL1 */ -#define ID_AA64MMFR2_EL1 MRS_REG(3, 0, 0, 7, 2) +#define ID_AA64MMFR2_EL1 MRS_REG(ID_AA64MMFR2_EL1) +#define ID_AA64MMFR2_EL1_op0 0x3 +#define ID_AA64MMFR2_EL1_op1 0x0 +#define ID_AA64MMFR2_EL1_CRn 0x0 +#define ID_AA64MMFR2_EL1_CRm 0x7 +#define ID_AA64MMFR2_EL1_op2 0x2 #define ID_AA64MMFR2_CnP_SHIFT 0 #define ID_AA64MMFR2_CnP_MASK (UL(0xf) << ID_AA64MMFR2_CnP_SHIFT) #define ID_AA64MMFR2_CnP_VAL(x) ((x) & ID_AA64MMFR2_CnP_MASK) @@ -662,7 +696,12 @@ #define ID_AA64MMFR2_E0PD_IMPL (UL(0x1) << ID_AA64MMFR2_E0PD_SHIFT) /* ID_AA64PFR0_EL1 */ -#define ID_AA64PFR0_EL1 MRS_REG(3, 0, 0, 4, 0) +#define ID_AA64PFR0_EL1 MRS_REG(ID_AA64PFR0_EL1) +#define ID_AA64PFR0_EL1_op0 0x3 +#define ID_AA64PFR0_EL1_op1 0x0 +#define ID_AA64PFR0_EL1_CRn 0x0 +#define ID_AA64PFR0_EL1_CRm 0x4 +#define ID_AA64PFR0_EL1_op2 0x0 #define ID_AA64PFR0_EL0_SHIFT 0 #define ID_AA64PFR0_EL0_MASK (UL(0xf) << ID_AA64PFR0_EL0_SHIFT) #define ID_AA64PFR0_EL0_VAL(x) ((x) & ID_AA64PFR0_EL0_MASK) @@ -747,7 +786,12 @@ #define ID_AA64PFR0_CSV3_ISOLATED (UL(0x1) << ID_AA64PFR0_CSV3_SHIFT) /* ID_AA64PFR1_EL1 */ -#define ID_AA64PFR1_EL1 MRS_REG(3, 0, 0, 4, 1) +#define ID_AA64PFR1_EL1 MRS_REG(ID_AA64PFR1_EL1) +#define ID_AA64PFR1_EL1_op0 0x3 +#define ID_AA64PFR1_EL1_op1 0x0 +#define ID_AA64PFR1_EL1_CRn 0x0 +#define ID_AA64PFR1_EL1_CRm 0x4 +#define ID_AA64PFR1_EL1_op2 0x1 #define ID_AA64PFR1_BT_SHIFT 0 #define ID_AA64PFR1_BT_MASK (UL(0xf) << ID_AA64PFR1_BT_SHIFT) #define ID_AA64PFR1_BT_VAL(x) ((x) & ID_AA64PFR1_BT_MASK) @@ -772,7 +816,12 @@ #define ID_AA64PFR1_RAS_frac_V2 (UL(0x1) << ID_AA64PFR1_RAS_frac_SHIFT) /* ID_ISAR5_EL1 */ -#define ID_ISAR5_EL1 MRS_REG(3, 0, 0, 2, 5) +#define ID_ISAR5_EL1 MRS_REG(ID_ISAR5_EL1) +#define ID_ISAR5_EL1_op0 0x3 +#define ID_ISAR5_EL1_op1 0x0 +#define ID_ISAR5_EL1_CRn 0x0 +#define ID_ISAR5_EL1_CRm 0x2 +#define ID_ISAR5_EL1_op2 0x5 #define ID_ISAR5_SEVL_SHIFT 0 #define ID_ISAR5_SEVL_MASK (UL(0xf) << ID_ISAR5_SEVL_SHIFT) #define ID_ISAR5_SEVL_VAL(x) ((x) & ID_ISAR5_SEVL_MASK) @@ -819,7 +868,12 @@ #define MAIR_NORMAL_WB 0xff /* MVFR0_EL1 */ -#define MVFR0_EL1 MRS_REG(3, 0, 0, 3, 0) +#define MVFR0_EL1 MRS_REG(MVFR0_EL1) +#define MVFR0_EL1_op0 0x3 +#define MVFR0_EL1_op1 0x0 +#define MVFR0_EL1_CRn 0x0 +#define MVFR0_EL1_CRm 0x3 +#define MVFR0_EL1_op2 0x0 #define MVFR0_SIMDReg_SHIFT 0 #define MVFR0_SIMDReg_MASK (UL(0xf) << MVFR0_SIMDReg_SHIFT) #define MVFR0_SIMDReg_VAL(x) ((x) & MVFR0_SIMDReg_MASK) @@ -865,7 +919,12 @@ #define MVFR0_FPRound_IMPL (UL(0x1) << MVFR0_FPRound_SHIFT) /* MVFR1_EL1 */ -#define MVFR1_EL1 MRS_REG(3, 0, 0, 3, 1) +#define MVFR1_EL1 MRS_REG(MVFR1_EL1) +#define MVFR1_EL1_op0 0x3 +#define MVFR1_EL1_op1 0x0 +#define MVFR1_EL1_CRn 0x0 +#define MVFR1_EL1_CRm 0x3 +#define MVFR1_EL1_op2 0x1 #define MVFR1_FPFtZ_SHIFT 0 #define MVFR1_FPFtZ_MASK (UL(0xf) << MVFR1_FPFtZ_SHIFT) #define MVFR1_FPFtZ_VAL(x) ((x) & MVFR1_FPFtZ_MASK) From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 12:43:13 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D9C96675E70; Mon, 30 Aug 2021 12:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyqjs2L8Dz3p32; Mon, 30 Aug 2021 12:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D09011E196; Mon, 30 Aug 2021 12:43:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UChCSZ034929; Mon, 30 Aug 2021 12:43:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UChCeQ034928; Mon, 30 Aug 2021 12:43:12 GMT (envelope-from git) Date: Mon, 30 Aug 2021 12:43:12 GMT Message-Id: <202108301243.17UChCeQ034928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 20aa38363e30 - stable/13 - Teach the arm64 kernel to identify the Arm AEM MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 20aa38363e308063c3db5347f3a1f1b1d8b28ea2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 12:43:14 -0000 The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=20aa38363e308063c3db5347f3a1f1b1d8b28ea2 commit 20aa38363e308063c3db5347f3a1f1b1d8b28ea2 Author: Andrew Turner AuthorDate: 2021-07-27 19:28:33 +0000 Commit: Andrew Turner CommitDate: 2021-08-30 11:22:21 +0000 Teach the arm64 kernel to identify the Arm AEM The Arm Architecture Envelope Model is a simulator that models the architecture rather than any specific implementation. Add its part ID macro and add it to the list of Arm CPUs we can decode. Sponsored by: The FreeBSD Foundation (cherry picked from commit 2531f067ea0e9c77b081445800de8e9584d7d4ab) --- sys/arm64/arm64/identcpu.c | 1 + sys/arm64/include/cpu.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 233b036f4499..794b097195ef 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -190,6 +190,7 @@ struct cpu_implementers { */ /* ARM Ltd. */ static const struct cpu_parts cpu_parts_arm[] = { + { CPU_PART_AEM_V8, "AEMv8" }, { CPU_PART_FOUNDATION, "Foundation-Model" }, { CPU_PART_CORTEX_A35, "Cortex-A35" }, { CPU_PART_CORTEX_A53, "Cortex-A53" }, diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h index 529f156f2e96..d58cf6f113c6 100644 --- a/sys/arm64/include/cpu.h +++ b/sys/arm64/include/cpu.h @@ -93,6 +93,7 @@ #define CPU_PART_NEOVERSE_N1 0xD0C #define CPU_PART_CORTEX_A77 0xD0D #define CPU_PART_CORTEX_A76AE 0xD0E +#define CPU_PART_AEM_V8 0xD0F /* Cavium Part numbers */ #define CPU_PART_THUNDERX 0x0A1 From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 12:43:20 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB002675C5B; Mon, 30 Aug 2021 12:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyqk00YDsz3p9F; Mon, 30 Aug 2021 12:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADDD91E198; Mon, 30 Aug 2021 12:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UChJaF035091; Mon, 30 Aug 2021 12:43:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UChJOC035090; Mon, 30 Aug 2021 12:43:19 GMT (envelope-from git) Date: Mon, 30 Aug 2021 12:43:19 GMT Message-Id: <202108301243.17UChJOC035090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: b3931cb0a807 - stable/13 - Add more arm64 external abort sources MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b3931cb0a8077cc650738404f03e4fa7a1943bd3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 12:43:21 -0000 The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b3931cb0a8077cc650738404f03e4fa7a1943bd3 commit b3931cb0a8077cc650738404f03e4fa7a1943bd3 Author: Andrew Turner AuthorDate: 2021-08-03 13:20:54 +0000 Commit: Andrew Turner CommitDate: 2021-08-30 11:22:22 +0000 Add more arm64 external abort sources These will be used when we support the Arm Reliability, Availability, and Serviceability extension. Sponsored by: The FreeBSD Foundation (cherry picked from commit dcfd60587102b6854cda04a7c59c8de51ecf89b3) --- sys/arm64/arm64/trap.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index 2c95239ec1c5..34e3b08b4e75 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -102,6 +102,15 @@ static abort_handler *abort_handlers[] = { [ISS_DATA_DFSC_PF_L3] = data_abort, [ISS_DATA_DFSC_ALIGN] = align_abort, [ISS_DATA_DFSC_EXT] = external_abort, + [ISS_DATA_DFSC_EXT_L0] = external_abort, + [ISS_DATA_DFSC_EXT_L1] = external_abort, + [ISS_DATA_DFSC_EXT_L2] = external_abort, + [ISS_DATA_DFSC_EXT_L3] = external_abort, + [ISS_DATA_DFSC_ECC] = external_abort, + [ISS_DATA_DFSC_ECC_L0] = external_abort, + [ISS_DATA_DFSC_ECC_L1] = external_abort, + [ISS_DATA_DFSC_ECC_L2] = external_abort, + [ISS_DATA_DFSC_ECC_L3] = external_abort, }; static __inline void From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 12:43:16 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3356D676085; Mon, 30 Aug 2021 12:43:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyqjv2fBgz3p5B; Mon, 30 Aug 2021 12:43:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 260971DD6A; Mon, 30 Aug 2021 12:43:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UChFWW034981; Mon, 30 Aug 2021 12:43:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UChFD8034980; Mon, 30 Aug 2021 12:43:15 GMT (envelope-from git) Date: Mon, 30 Aug 2021 12:43:15 GMT Message-Id: <202108301243.17UChFD8034980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: be8860ea0721 - stable/13 - Sort the arm64 ID_AA64* user registers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: be8860ea07216da207455a1aca916054a4a0448d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 12:43:16 -0000 The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=be8860ea07216da207455a1aca916054a4a0448d commit be8860ea07216da207455a1aca916054a4a0448d Author: Andrew Turner AuthorDate: 2021-07-28 18:30:09 +0000 Commit: Andrew Turner CommitDate: 2021-08-30 11:22:22 +0000 Sort the arm64 ID_AA64* user registers Sponsored by: The FreeBSD Foundation (cherry picked from commit c3f2fcf5b90991c0155ed64bbf3d9468c3033ebc) --- sys/arm64/arm64/identcpu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 64b3b6a4ef27..0220e47e8d7e 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1180,13 +1180,18 @@ struct mrs_user_reg { .fields = field_name##_fields, \ } static struct mrs_user_reg user_regs[] = { + USER_REG(ID_AA64DFR0_EL1, id_aa64dfr0), + USER_REG(ID_AA64ISAR0_EL1, id_aa64isar0), USER_REG(ID_AA64ISAR1_EL1, id_aa64isar1), - USER_REG(ID_AA64PFR0_EL1, id_aa64pfr0), - USER_REG(ID_AA64DFR0_EL1, id_aa64dfr0), + USER_REG(ID_AA64MMFR0_EL1, id_aa64mmfr0), + + USER_REG(ID_AA64PFR0_EL1, id_aa64pfr0), + #ifdef COMPAT_FREEBSD32 USER_REG(ID_ISAR5_EL1, id_isar5), + USER_REG(MVFR0_EL1, mvfr0), USER_REG(MVFR1_EL1, mvfr1), #endif /* COMPAT_FREEBSD32 */ From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 12:43:16 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5807675C53; Mon, 30 Aug 2021 12:43:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyqjw3NJYz3p5G; Mon, 30 Aug 2021 12:43:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E1FF1E051; Mon, 30 Aug 2021 12:43:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UChGb6035013; Mon, 30 Aug 2021 12:43:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UChGMV035012; Mon, 30 Aug 2021 12:43:16 GMT (envelope-from git) Date: Mon, 30 Aug 2021 12:43:16 GMT Message-Id: <202108301243.17UChGMV035012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: b49a75c3932a - stable/13 - Add missing arm64 ID registers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b49a75c3932a8f6d5b77ae8619d4587a82541623 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 12:43:17 -0000 The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b49a75c3932a8f6d5b77ae8619d4587a82541623 commit b49a75c3932a8f6d5b77ae8619d4587a82541623 Author: Andrew Turner AuthorDate: 2021-07-28 19:00:36 +0000 Commit: Andrew Turner CommitDate: 2021-08-30 11:22:22 +0000 Add missing arm64 ID registers These may contain values we export to userpsace. Sponsored by: The FreeBSD Foundation (cherry picked from commit 2d6d5f88d16fc43b6e7ce2b71136ec6b04d10e6e) --- sys/arm64/arm64/identcpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 0220e47e8d7e..40f56017b9fd 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1186,8 +1186,11 @@ static struct mrs_user_reg user_regs[] = { USER_REG(ID_AA64ISAR1_EL1, id_aa64isar1), USER_REG(ID_AA64MMFR0_EL1, id_aa64mmfr0), + USER_REG(ID_AA64MMFR1_EL1, id_aa64mmfr1), + USER_REG(ID_AA64MMFR2_EL1, id_aa64mmfr2), USER_REG(ID_AA64PFR0_EL1, id_aa64pfr0), + USER_REG(ID_AA64PFR1_EL1, id_aa64pfr1), #ifdef COMPAT_FREEBSD32 USER_REG(ID_ISAR5_EL1, id_isar5), From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 12:43:18 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2CEDC675B6C; Mon, 30 Aug 2021 12:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyqjx4lJlz3p98; Mon, 30 Aug 2021 12:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 628701E197; Mon, 30 Aug 2021 12:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UChHHb035039; Mon, 30 Aug 2021 12:43:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UChHnc035038; Mon, 30 Aug 2021 12:43:17 GMT (envelope-from git) Date: Mon, 30 Aug 2021 12:43:17 GMT Message-Id: <202108301243.17UChHnc035038@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: a9f6cb43abc4 - stable/13 - Move setting arm64 HWCAP values to the ID tables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a9f6cb43abc4da25ee154a77fe25838a4841cbc3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 12:43:19 -0000 The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a9f6cb43abc4da25ee154a77fe25838a4841cbc3 commit a9f6cb43abc4da25ee154a77fe25838a4841cbc3 Author: Andrew Turner AuthorDate: 2021-07-16 13:49:33 +0000 Commit: Andrew Turner CommitDate: 2021-08-30 11:22:22 +0000 Move setting arm64 HWCAP values to the ID tables The HWCAPS values are based on the ID registers. Move setting these to the existing ID register parsing code. Previously we would need to handle all possible ID field values where a HWCAP is set, however as most ID fields follow a scheme where when the field increments it will only add new features meaning we only need to check if the field is greater than when the HWCAP feature was added. While here stop setting HWCAP value that need kernel support, but this support is missing. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31201 (cherry picked from commit 1a78f44cd205b6f9ca11ef5cdb6e1f32c0134193) --- sys/arm64/arm64/identcpu.c | 595 +++++++++++++++++++++++++-------------------- 1 file changed, 325 insertions(+), 270 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 40f56017b9fd..193ed6427b1d 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -48,11 +48,8 @@ __FBSDID("$FreeBSD$"); #include static void print_cpu_features(u_int cpu); -static u_long parse_cpu_features_hwcap(void); -static u_long parse_cpu_features_hwcap2(void); #ifdef COMPAT_FREEBSD32 static u_long parse_cpu_features_hwcap32(void); -static u_long parse_cpu_features_hwcap32_2(void); #endif char machine[] = "arm64"; @@ -285,16 +282,32 @@ struct mrs_field_value { #define MRS_FIELD_VALUE_END { .desc = NULL } +struct mrs_field_hwcap { + u_long *hwcap; + uint64_t min; + u_long hwcap_val; +}; + +#define MRS_HWCAP(_hwcap, _val, _min) \ +{ \ + .hwcap = (_hwcap), \ + .hwcap_val = (_val), \ + .min = (_min), \ +} + +#define MRS_HWCAP_END { .hwcap = NULL } + struct mrs_field { const char *name; struct mrs_field_value *values; + struct mrs_field_hwcap *hwcaps; uint64_t mask; bool sign; u_int type; u_int shift; }; -#define MRS_FIELD(_register, _name, _sign, _type, _values) \ +#define MRS_FIELD_HWCAP(_register, _name, _sign, _type, _values, _hwcap) \ { \ .name = #_name, \ .sign = (_sign), \ @@ -302,8 +315,12 @@ struct mrs_field { .shift = _register ## _ ## _name ## _SHIFT, \ .mask = _register ## _ ## _name ## _MASK, \ .values = (_values), \ + .hwcaps = (_hwcap), \ } +#define MRS_FIELD(_register, _name, _sign, _type, _values) \ + MRS_FIELD_HWCAP(_register, _name, _sign, _type, _values, NULL) + #define MRS_FIELD_END { .type = MRS_INVALID, } /* ID_AA64AFR0_EL1 */ @@ -409,6 +426,11 @@ static struct mrs_field_value id_aa64isar0_rndr[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_rndr_caps[] = { + MRS_HWCAP(&elf_hwcap2, HWCAP2_RNG, ID_AA64ISAR0_RNDR_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar0_tlb[] = { MRS_FIELD_VALUE(ID_AA64ISAR0_TLB_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR0_TLB_TLBIOS, "TLBI-OS"), @@ -423,78 +445,154 @@ static struct mrs_field_value id_aa64isar0_ts[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_ts_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_FLAGM, ID_AA64ISAR0_TS_CondM_8_4), + MRS_HWCAP(&elf_hwcap2, HWCAP2_FLAGM2, ID_AA64ISAR0_TS_CondM_8_5), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar0_fhm[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, FHM, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_fhm_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_ASIMDFHM, ID_AA64ISAR0_FHM_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar0_dp[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, DP, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_dp_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_ASIMDDP, ID_AA64ISAR0_DP_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar0_sm4[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SM4, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_sm4_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_SM4, ID_AA64ISAR0_SM4_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar0_sm3[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SM3, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_sm3_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_SM3, ID_AA64ISAR0_SM3_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar0_sha3[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SHA3, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_sha3_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_SHA3, ID_AA64ISAR0_SHA3_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar0_rdm[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, RDM, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_rdm_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_ASIMDRDM, ID_AA64ISAR0_RDM_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar0_atomic[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, Atomic, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_atomic_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_ATOMICS, ID_AA64ISAR0_Atomic_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar0_crc32[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, CRC32, NONE, BASE), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_crc32_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_CRC32, ID_AA64ISAR0_CRC32_BASE), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar0_sha2[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SHA2, NONE, BASE), MRS_FIELD_VALUE(ID_AA64ISAR0_SHA2_512, "SHA2+SHA512"), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_sha2_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_SHA2, ID_AA64ISAR0_SHA2_BASE), + MRS_HWCAP(&elf_hwcap, HWCAP_SHA512, ID_AA64ISAR0_SHA2_512), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar0_sha1[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SHA1, NONE, BASE), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_sha1_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_SHA1, ID_AA64ISAR0_SHA1_BASE), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar0_aes[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, AES, NONE, BASE), MRS_FIELD_VALUE(ID_AA64ISAR0_AES_PMULL, "AES+PMULL"), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar0_aes_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_AES, ID_AA64ISAR0_AES_BASE), + MRS_HWCAP(&elf_hwcap, HWCAP_PMULL, ID_AA64ISAR0_AES_PMULL), + MRS_HWCAP_END +}; + static struct mrs_field id_aa64isar0_fields[] = { - MRS_FIELD(ID_AA64ISAR0, RNDR, false, MRS_LOWER, id_aa64isar0_rndr), + MRS_FIELD_HWCAP(ID_AA64ISAR0, RNDR, false, MRS_LOWER, + id_aa64isar0_rndr, id_aa64isar0_rndr_caps), MRS_FIELD(ID_AA64ISAR0, TLB, false, MRS_EXACT, id_aa64isar0_tlb), - MRS_FIELD(ID_AA64ISAR0, TS, false, MRS_LOWER, id_aa64isar0_ts), - MRS_FIELD(ID_AA64ISAR0, FHM, false, MRS_LOWER, id_aa64isar0_fhm), - MRS_FIELD(ID_AA64ISAR0, DP, false, MRS_LOWER, id_aa64isar0_dp), - MRS_FIELD(ID_AA64ISAR0, SM4, false, MRS_LOWER, id_aa64isar0_sm4), - MRS_FIELD(ID_AA64ISAR0, SM3, false, MRS_LOWER, id_aa64isar0_sm3), - MRS_FIELD(ID_AA64ISAR0, SHA3, false, MRS_LOWER, id_aa64isar0_sha3), - MRS_FIELD(ID_AA64ISAR0, RDM, false, MRS_LOWER, id_aa64isar0_rdm), - MRS_FIELD(ID_AA64ISAR0, Atomic, false, MRS_LOWER, id_aa64isar0_atomic), - MRS_FIELD(ID_AA64ISAR0, CRC32, false, MRS_LOWER, id_aa64isar0_crc32), - MRS_FIELD(ID_AA64ISAR0, SHA2, false, MRS_LOWER, id_aa64isar0_sha2), - MRS_FIELD(ID_AA64ISAR0, SHA1, false, MRS_LOWER, id_aa64isar0_sha1), - MRS_FIELD(ID_AA64ISAR0, AES, false, MRS_LOWER, id_aa64isar0_aes), + MRS_FIELD_HWCAP(ID_AA64ISAR0, TS, false, MRS_LOWER, id_aa64isar0_ts, + id_aa64isar0_ts_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR0, FHM, false, MRS_LOWER, id_aa64isar0_fhm, + id_aa64isar0_fhm_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR0, DP, false, MRS_LOWER, id_aa64isar0_dp, + id_aa64isar0_dp_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR0, SM4, false, MRS_LOWER, id_aa64isar0_sm4, + id_aa64isar0_sm4_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR0, SM3, false, MRS_LOWER, id_aa64isar0_sm3, + id_aa64isar0_sm3_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR0, SHA3, false, MRS_LOWER, id_aa64isar0_sha3, + id_aa64isar0_sha3_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR0, RDM, false, MRS_LOWER, id_aa64isar0_rdm, + id_aa64isar0_rdm_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR0, Atomic, false, MRS_LOWER, + id_aa64isar0_atomic, id_aa64isar0_atomic_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR0, CRC32, false, MRS_LOWER, + id_aa64isar0_crc32, id_aa64isar0_crc32_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR0, SHA2, false, MRS_LOWER, id_aa64isar0_sha2, + id_aa64isar0_sha2_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR0, SHA1, false, MRS_LOWER, + id_aa64isar0_sha1, id_aa64isar0_sha1_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR0, AES, false, MRS_LOWER, id_aa64isar0_aes, + id_aa64isar0_aes_caps), MRS_FIELD_END, }; @@ -505,16 +603,31 @@ static struct mrs_field_value id_aa64isar1_i8mm[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar1_i8mm_caps[] = { + MRS_HWCAP(&elf_hwcap2, HWCAP2_I8MM, ID_AA64ISAR1_I8MM_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar1_dgh[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, DGH, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar1_dgh_caps[] = { + MRS_HWCAP(&elf_hwcap2, HWCAP2_DGH, ID_AA64ISAR1_DGH_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar1_bf16[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, BF16, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar1_bf16_caps[] = { + MRS_HWCAP(&elf_hwcap2, HWCAP2_BF16, ID_AA64ISAR1_BF16_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar1_specres[] = { MRS_FIELD_VALUE(ID_AA64ISAR1_SPECRES_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR1_SPECRES_IMPL, "PredInv"), @@ -526,11 +639,21 @@ static struct mrs_field_value id_aa64isar1_sb[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar1_sb_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_SB, ID_AA64ISAR1_SB_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar1_frintts[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, FRINTTS, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar1_frintts_caps[] = { + MRS_HWCAP(&elf_hwcap2, HWCAP2_FRINT, ID_AA64ISAR1_FRINTTS_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar1_gpi[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, GPI, NONE, IMPL), MRS_FIELD_VALUE_END, @@ -548,16 +671,32 @@ static struct mrs_field_value id_aa64isar1_lrcpc[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar1_lrcpc_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_LRCPC, ID_AA64ISAR1_LRCPC_RCPC_8_3), + MRS_HWCAP(&elf_hwcap, HWCAP_ILRCPC, ID_AA64ISAR1_LRCPC_RCPC_8_4), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar1_fcma[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, FCMA, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar1_fcma_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_FCMA, ID_AA64ISAR1_FCMA_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar1_jscvt[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, JSCVT, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar1_jscvt_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_JSCVT, ID_AA64ISAR1_JSCVT_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64isar1_api[] = { MRS_FIELD_VALUE(ID_AA64ISAR1_API_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR1_API_PAC, "API PAC"), @@ -579,23 +718,37 @@ static struct mrs_field_value id_aa64isar1_dpb[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64isar1_dpb_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_DCPOP, ID_AA64ISAR1_DPB_DCCVAP), + MRS_HWCAP(&elf_hwcap2, HWCAP2_DCPODP, ID_AA64ISAR1_DPB_DCCVADP), + MRS_HWCAP_END +}; + static struct mrs_field id_aa64isar1_fields[] = { - MRS_FIELD(ID_AA64ISAR1, I8MM, false, MRS_LOWER, id_aa64isar1_i8mm), - MRS_FIELD(ID_AA64ISAR1, DGH, false, MRS_LOWER, id_aa64isar1_dgh), - MRS_FIELD(ID_AA64ISAR1, BF16, false, MRS_LOWER, id_aa64isar1_bf16), + MRS_FIELD_HWCAP(ID_AA64ISAR1, I8MM, false, MRS_LOWER, + id_aa64isar1_i8mm, id_aa64isar1_i8mm_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR1, DGH, false, MRS_LOWER, id_aa64isar1_dgh, + id_aa64isar1_dgh_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR1, BF16, false, MRS_LOWER, + id_aa64isar1_bf16, id_aa64isar1_bf16_caps), MRS_FIELD(ID_AA64ISAR1, SPECRES, false, MRS_EXACT, id_aa64isar1_specres), - MRS_FIELD(ID_AA64ISAR1, SB, false, MRS_LOWER, id_aa64isar1_sb), - MRS_FIELD(ID_AA64ISAR1, FRINTTS, false, MRS_LOWER, - id_aa64isar1_frintts), + MRS_FIELD_HWCAP(ID_AA64ISAR1, SB, false, MRS_LOWER, id_aa64isar1_sb, + id_aa64isar1_sb_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR1, FRINTTS, false, MRS_LOWER, + id_aa64isar1_frintts, id_aa64isar1_frintts_caps), MRS_FIELD(ID_AA64ISAR1, GPI, false, MRS_EXACT, id_aa64isar1_gpi), MRS_FIELD(ID_AA64ISAR1, GPA, false, MRS_EXACT, id_aa64isar1_gpa), - MRS_FIELD(ID_AA64ISAR1, LRCPC, false, MRS_LOWER, id_aa64isar1_lrcpc), - MRS_FIELD(ID_AA64ISAR1, FCMA, false, MRS_LOWER, id_aa64isar1_fcma), - MRS_FIELD(ID_AA64ISAR1, JSCVT, false, MRS_LOWER, id_aa64isar1_jscvt), + MRS_FIELD_HWCAP(ID_AA64ISAR1, LRCPC, false, MRS_LOWER, + id_aa64isar1_lrcpc, id_aa64isar1_lrcpc_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR1, FCMA, false, MRS_LOWER, + id_aa64isar1_fcma, id_aa64isar1_fcma_caps), + MRS_FIELD_HWCAP(ID_AA64ISAR1, JSCVT, false, MRS_LOWER, + id_aa64isar1_jscvt, id_aa64isar1_jscvt_caps), MRS_FIELD(ID_AA64ISAR1, API, false, MRS_EXACT, id_aa64isar1_api), MRS_FIELD(ID_AA64ISAR1, APA, false, MRS_EXACT, id_aa64isar1_apa), - MRS_FIELD(ID_AA64ISAR1, DPB, false, MRS_LOWER, id_aa64isar1_dpb), + MRS_FIELD_HWCAP(ID_AA64ISAR1, DPB, false, MRS_LOWER, id_aa64isar1_dpb, + id_aa64isar1_dpb_caps), MRS_FIELD_END, }; @@ -801,6 +954,11 @@ static struct mrs_field_value id_aa64mmfr2_at[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64mmfr2_at_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_USCAT, ID_AA64MMFR2_AT_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64mmfr2_st[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, ST, NONE, IMPL), MRS_FIELD_VALUE_END, @@ -851,7 +1009,8 @@ static struct mrs_field id_aa64mmfr2_fields[] = { MRS_FIELD(ID_AA64MMFR2, TTL, false, MRS_EXACT, id_aa64mmfr2_ttl), MRS_FIELD(ID_AA64MMFR2, FWB, false, MRS_EXACT, id_aa64mmfr2_fwb), MRS_FIELD(ID_AA64MMFR2, IDS, false, MRS_EXACT, id_aa64mmfr2_ids), - MRS_FIELD(ID_AA64MMFR2, AT, false, MRS_LOWER, id_aa64mmfr2_at), + MRS_FIELD_HWCAP(ID_AA64MMFR2, AT, false, MRS_LOWER, id_aa64mmfr2_at, + id_aa64mmfr2_at_caps), MRS_FIELD(ID_AA64MMFR2, ST, false, MRS_EXACT, id_aa64mmfr2_st), MRS_FIELD(ID_AA64MMFR2, NV, false, MRS_EXACT, id_aa64mmfr2_nv), MRS_FIELD(ID_AA64MMFR2, CCIDX, false, MRS_EXACT, id_aa64mmfr2_ccidx), @@ -885,6 +1044,11 @@ static struct mrs_field_value id_aa64pfr0_dit[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64pfr0_dit_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_DIT, ID_AA64PFR0_DIT_PSTATE), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64pfr0_amu[] = { MRS_FIELD_VALUE(ID_AA64PFR0_AMU_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_AMU_V1, "AMUv1"), @@ -906,6 +1070,14 @@ static struct mrs_field_value id_aa64pfr0_sve[] = { MRS_FIELD_VALUE_END, }; +#if 0 +/* Enable when we add SVE support */ +static struct mrs_field_hwcap id_aa64pfr0_sve_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_SVE, ID_AA64PFR0_SVE_IMPL), + MRS_HWCAP_END +}; +#endif + static struct mrs_field_value id_aa64pfr0_ras[] = { MRS_FIELD_VALUE(ID_AA64PFR0_RAS_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_RAS_IMPL, "RAS"), @@ -924,12 +1096,24 @@ static struct mrs_field_value id_aa64pfr0_advsimd[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64pfr0_advsimd_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_ASIMD, ID_AA64PFR0_AdvSIMD_IMPL), + MRS_HWCAP(&elf_hwcap, HWCAP_ASIMDHP, ID_AA64PFR0_AdvSIMD_HP), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64pfr0_fp[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, FP, NONE, IMPL), MRS_FIELD_VALUE(ID_AA64PFR0_FP_HP, "FP+HP"), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64pfr0_fp_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_FP, ID_AA64PFR0_FP_IMPL), + MRS_HWCAP(&elf_hwcap, HWCAP_FPHP, ID_AA64PFR0_FP_HP), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64pfr0_el3[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, EL3, NONE, 64), MRS_FIELD_VALUE(ID_AA64PFR0_EL3_64_32, "EL3 32"), @@ -957,15 +1141,18 @@ static struct mrs_field_value id_aa64pfr0_el0[] = { static struct mrs_field id_aa64pfr0_fields[] = { MRS_FIELD(ID_AA64PFR0, CSV3, false, MRS_EXACT, id_aa64pfr0_csv3), MRS_FIELD(ID_AA64PFR0, CSV2, false, MRS_EXACT, id_aa64pfr0_csv2), - MRS_FIELD(ID_AA64PFR0, DIT, false, MRS_LOWER, id_aa64pfr0_dit), + MRS_FIELD_HWCAP(ID_AA64PFR0, DIT, false, MRS_LOWER, id_aa64pfr0_dit, + id_aa64pfr0_dit_caps), MRS_FIELD(ID_AA64PFR0, AMU, false, MRS_EXACT, id_aa64pfr0_amu), MRS_FIELD(ID_AA64PFR0, MPAM, false, MRS_EXACT, id_aa64pfr0_mpam), MRS_FIELD(ID_AA64PFR0, SEL2, false, MRS_EXACT, id_aa64pfr0_sel2), MRS_FIELD(ID_AA64PFR0, SVE, false, MRS_EXACT, id_aa64pfr0_sve), MRS_FIELD(ID_AA64PFR0, RAS, false, MRS_EXACT, id_aa64pfr0_ras), MRS_FIELD(ID_AA64PFR0, GIC, false, MRS_EXACT, id_aa64pfr0_gic), - MRS_FIELD(ID_AA64PFR0, AdvSIMD, true, MRS_LOWER, id_aa64pfr0_advsimd), - MRS_FIELD(ID_AA64PFR0, FP, true, MRS_LOWER, id_aa64pfr0_fp), + MRS_FIELD_HWCAP(ID_AA64PFR0, AdvSIMD, true, MRS_LOWER, + id_aa64pfr0_advsimd, id_aa64pfr0_advsimd_caps), + MRS_FIELD_HWCAP(ID_AA64PFR0, FP, true, MRS_LOWER, id_aa64pfr0_fp, + id_aa64pfr0_fp_caps), MRS_FIELD(ID_AA64PFR0, EL3, false, MRS_EXACT, id_aa64pfr0_el3), MRS_FIELD(ID_AA64PFR0, EL2, false, MRS_EXACT, id_aa64pfr0_el2), MRS_FIELD(ID_AA64PFR0, EL1, false, MRS_LOWER, id_aa64pfr0_el1), @@ -989,15 +1176,29 @@ static struct mrs_field_value id_aa64pfr1_ssbs[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_aa64pfr1_ssbs_caps[] = { + MRS_HWCAP(&elf_hwcap, HWCAP_SSBS, ID_AA64PFR1_SSBS_PSTATE), + MRS_HWCAP_END +}; + static struct mrs_field_value id_aa64pfr1_bt[] = { MRS_FIELD_VALUE(ID_AA64PFR1_BT_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR1_BT_IMPL, "BTI"), MRS_FIELD_VALUE_END, }; +#if 0 +/* Enable when we add BTI support */ +static struct mrs_field_hwcap id_aa64pfr1_bt_caps[] = { + MRS_HWCAP(&elf_hwcap2, HWCAP2_BTI, ID_AA64PFR1_BT_IMPL), + MRS_HWCAP_END +}; +#endif + static struct mrs_field id_aa64pfr1_fields[] = { MRS_FIELD(ID_AA64PFR1, MTE, false, MRS_EXACT, id_aa64pfr1_mte), - MRS_FIELD(ID_AA64PFR1, SSBS, false, MRS_LOWER, id_aa64pfr1_ssbs), + MRS_FIELD_HWCAP(ID_AA64PFR1, SSBS, false, MRS_LOWER, id_aa64pfr1_ssbs, + id_aa64pfr1_ssbs_caps), MRS_FIELD(ID_AA64PFR1, BT, false, MRS_EXACT, id_aa64pfr1_bt), MRS_FIELD_END, }; @@ -1019,22 +1220,43 @@ static struct mrs_field_value id_isar5_crc32[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_isar5_crc32_caps[] = { + MRS_HWCAP(&elf32_hwcap2, HWCAP32_2_CRC32, ID_ISAR5_CRC32_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_isar5_sha2[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_ISAR5, SHA2, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_isar5_sha2_caps[] = { + MRS_HWCAP(&elf32_hwcap2, HWCAP32_2_SHA2, ID_ISAR5_SHA2_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_isar5_sha1[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_ISAR5, SHA1, NONE, IMPL), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_isar5_sha1_caps[] = { + MRS_HWCAP(&elf32_hwcap2, HWCAP32_2_SHA1, ID_ISAR5_SHA1_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_isar5_aes[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_ISAR5, AES, NONE, BASE), MRS_FIELD_VALUE(ID_ISAR5_AES_VMULL, "AES+VMULL"), MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap id_isar5_aes_caps[] = { + MRS_HWCAP(&elf32_hwcap2, HWCAP32_2_AES, ID_ISAR5_AES_BASE), + MRS_HWCAP(&elf32_hwcap2, HWCAP32_2_PMULL, ID_ISAR5_AES_VMULL), + MRS_HWCAP_END +}; + static struct mrs_field_value id_isar5_sevl[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_ISAR5, SEVL, NOP, IMPL), MRS_FIELD_VALUE_END, @@ -1043,10 +1265,14 @@ static struct mrs_field_value id_isar5_sevl[] = { static struct mrs_field id_isar5_fields[] = { MRS_FIELD(ID_ISAR5, VCMA, false, MRS_LOWER, id_isar5_vcma), MRS_FIELD(ID_ISAR5, RDM, false, MRS_LOWER, id_isar5_rdm), - MRS_FIELD(ID_ISAR5, CRC32, false, MRS_LOWER, id_isar5_crc32), - MRS_FIELD(ID_ISAR5, SHA2, false, MRS_LOWER, id_isar5_sha2), - MRS_FIELD(ID_ISAR5, SHA1, false, MRS_LOWER, id_isar5_sha1), - MRS_FIELD(ID_ISAR5, AES, false, MRS_LOWER, id_isar5_aes), + MRS_FIELD_HWCAP(ID_ISAR5, CRC32, false, MRS_LOWER, id_isar5_crc32, + id_isar5_crc32_caps), + MRS_FIELD_HWCAP(ID_ISAR5, SHA2, false, MRS_LOWER, id_isar5_sha2, + id_isar5_sha2_caps), + MRS_FIELD_HWCAP(ID_ISAR5, SHA1, false, MRS_LOWER, id_isar5_sha1, + id_isar5_sha1_caps), + MRS_FIELD_HWCAP(ID_ISAR5, AES, false, MRS_LOWER, id_isar5_aes, + id_isar5_aes_caps), MRS_FIELD(ID_ISAR5, SEVL, false, MRS_LOWER, id_isar5_sevl), MRS_FIELD_END, }; @@ -1079,6 +1305,11 @@ static struct mrs_field_value mvfr0_fpdp[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap mvfr0_fpdp_caps[] = { + MRS_HWCAP(&elf32_hwcap, HWCAP32_VFP, MVFR0_FPDP_VFP_v2), + MRS_HWCAP(&elf32_hwcap, HWCAP32_VFPv3, MVFR0_FPDP_VFP_v3_v4), +}; + static struct mrs_field_value mvfr0_fpsp[] = { MRS_FIELD_VALUE(MVFR0_FPSP_NONE, ""), MRS_FIELD_VALUE(MVFR0_FPSP_VFP_v2, "SP VFPv2"), @@ -1098,7 +1329,8 @@ static struct mrs_field mvfr0_fields[] = { MRS_FIELD(MVFR0, FPSqrt, false, MRS_LOWER, mvfr0_fpsqrt), MRS_FIELD(MVFR0, FPDivide, false, MRS_LOWER, mvfr0_fpdivide), MRS_FIELD(MVFR0, FPTrap, false, MRS_LOWER, mvfr0_fptrap), - MRS_FIELD(MVFR0, FPDP, false, MRS_LOWER, mvfr0_fpdp), + MRS_FIELD_HWCAP(MVFR0, FPDP, false, MRS_LOWER, mvfr0_fpdp, + mvfr0_fpdp_caps), MRS_FIELD(MVFR0, FPSP, false, MRS_LOWER, mvfr0_fpsp), MRS_FIELD(MVFR0, SIMDReg, false, MRS_LOWER, mvfr0_simdreg), MRS_FIELD_END, @@ -1110,6 +1342,11 @@ static struct mrs_field_value mvfr1_simdfmac[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap mvfr1_simdfmac_caps[] = { + MRS_HWCAP(&elf32_hwcap, HWCAP32_VFPv4, MVFR1_SIMDFMAC_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value mvfr1_fphp[] = { MRS_FIELD_VALUE(MVFR1_FPHP_NONE, ""), MRS_FIELD_VALUE(MVFR1_FPHP_CONV_SP, "FPHP SP Conv"), @@ -1140,6 +1377,11 @@ static struct mrs_field_value mvfr1_simdls[] = { MRS_FIELD_VALUE_END, }; +static struct mrs_field_hwcap mvfr1_simdls_caps[] = { + MRS_HWCAP(&elf32_hwcap, HWCAP32_VFPv4, MVFR1_SIMDFMAC_IMPL), + MRS_HWCAP_END +}; + static struct mrs_field_value mvfr1_fpdnan[] = { MRS_FIELD_VALUE_NONE_IMPL(MVFR1, FPDNaN, NONE, IMPL), MRS_FIELD_VALUE_END, @@ -1151,12 +1393,14 @@ static struct mrs_field_value mvfr1_fpftz[] = { }; static struct mrs_field mvfr1_fields[] = { - MRS_FIELD(MVFR1, SIMDFMAC, false, MRS_LOWER, mvfr1_simdfmac), + MRS_FIELD_HWCAP(MVFR1, SIMDFMAC, false, MRS_LOWER, mvfr1_simdfmac, + mvfr1_simdfmac_caps), MRS_FIELD(MVFR1, FPHP, false, MRS_LOWER, mvfr1_fphp), MRS_FIELD(MVFR1, SIMDHP, false, MRS_LOWER, mvfr1_simdhp), MRS_FIELD(MVFR1, SIMDSP, false, MRS_LOWER, mvfr1_simdsp), MRS_FIELD(MVFR1, SIMDInt, false, MRS_LOWER, mvfr1_simdint), - MRS_FIELD(MVFR1, SIMDLS, false, MRS_LOWER, mvfr1_simdls), + MRS_FIELD_HWCAP(MVFR1, SIMDLS, false, MRS_LOWER, mvfr1_simdls, + mvfr1_simdls_caps), MRS_FIELD(MVFR1, FPDNaN, false, MRS_LOWER, mvfr1_fpdnan), MRS_FIELD(MVFR1, FPFtZ, false, MRS_LOWER, mvfr1_fpftz), MRS_FIELD_END, @@ -1424,6 +1668,41 @@ int64_t dcache_line_size; /* The minimum D cache line size */ int64_t icache_line_size; /* The minimum I cache line size */ int64_t idcache_line_size; /* The minimum cache line size */ +/* + * Find the values to export to userspace as AT_HWCAP and AT_HWCAP2. + */ +static void +parse_cpu_features(void) +{ + struct mrs_field_hwcap *hwcaps; + struct mrs_field *fields; + uint64_t min, reg; + int i, j, k; + + for (i = 0; i < nitems(user_regs); i++) { + reg = CPU_DESC_FIELD(user_cpu_desc, i); + fields = user_regs[i].fields; + for (j = 0; fields[j].type != 0; j++) { + hwcaps = fields[j].hwcaps; + if (hwcaps == NULL) + continue; + + for (k = 0; hwcaps[k].hwcap != NULL; k++) { + min = hwcaps[k].min; + + /* + * If the field is greater than the minimum + * value we can set the hwcap; + */ + if (mrs_field_cmp(reg, min, fields[j].shift, + 4, fields[j].sign) >= 0) { + *hwcaps[k].hwcap |= hwcaps[k].hwcap_val; + } + } + } + } +} + static void identify_cpu_sysinit(void *dummy __unused) { @@ -1444,14 +1723,12 @@ identify_cpu_sysinit(void *dummy __unused) idc = false; } - /* Exposed to userspace as AT_HWCAP and AT_HWCAP2 */ - elf_hwcap = parse_cpu_features_hwcap(); - elf_hwcap2 = parse_cpu_features_hwcap2(); + /* Find the values to export to userspace as AT_HWCAP and AT_HWCAP2 */ + parse_cpu_features(); #ifdef COMPAT_FREEBSD32 - /* 32-bit ARM versions of AT_HWCAP/HWCAP2 */ - elf32_hwcap = parse_cpu_features_hwcap32(); - elf32_hwcap2 = parse_cpu_features_hwcap32_2(); + /* Set the default caps and any that need to check multiple fields */ + elf32_hwcap |= parse_cpu_features_hwcap32(); #endif if (dic && idc) { @@ -1485,244 +1762,22 @@ cpu_features_sysinit(void *dummy __unused) /* Log features before APs are released and start printing to the dmesg. */ SYSINIT(cpu_features, SI_SUB_SMP - 1, SI_ORDER_ANY, cpu_features_sysinit, NULL); -static u_long -parse_cpu_features_hwcap(void) -{ - u_long hwcap = 0; - - switch (ID_AA64ISAR0_TS_VAL(user_cpu_desc.id_aa64isar0)) { - case ID_AA64ISAR0_TS_CondM_8_4: - case ID_AA64ISAR0_TS_CondM_8_5: - hwcap |= HWCAP_FLAGM; - break; - default: - break; - } - - if (ID_AA64ISAR0_FHM_VAL(user_cpu_desc.id_aa64isar0) == - ID_AA64ISAR0_FHM_IMPL) - hwcap |= HWCAP_ASIMDFHM; - - if (ID_AA64ISAR0_DP_VAL(user_cpu_desc.id_aa64isar0) == - ID_AA64ISAR0_DP_IMPL) - hwcap |= HWCAP_ASIMDDP; - - if (ID_AA64ISAR0_SM4_VAL(user_cpu_desc.id_aa64isar0) == - ID_AA64ISAR0_SM4_IMPL) - hwcap |= HWCAP_SM4; - - if (ID_AA64ISAR0_SM3_VAL(user_cpu_desc.id_aa64isar0) == - ID_AA64ISAR0_SM3_IMPL) - hwcap |= HWCAP_SM3; - - if (ID_AA64ISAR0_SHA3_VAL(user_cpu_desc.id_aa64isar0) == - ID_AA64ISAR0_SHA3_IMPL) - hwcap |= HWCAP_SHA3; - - if (ID_AA64ISAR0_RDM_VAL(user_cpu_desc.id_aa64isar0) == - ID_AA64ISAR0_RDM_IMPL) - hwcap |= HWCAP_ASIMDRDM; - - if (ID_AA64ISAR0_Atomic_VAL(user_cpu_desc.id_aa64isar0) == - ID_AA64ISAR0_Atomic_IMPL) - hwcap |= HWCAP_ATOMICS; - - if (ID_AA64ISAR0_CRC32_VAL(user_cpu_desc.id_aa64isar0) == - ID_AA64ISAR0_CRC32_BASE) - hwcap |= HWCAP_CRC32; - - switch (ID_AA64ISAR0_SHA2_VAL(user_cpu_desc.id_aa64isar0)) { - case ID_AA64ISAR0_SHA2_BASE: - hwcap |= HWCAP_SHA2; - break; - case ID_AA64ISAR0_SHA2_512: - hwcap |= HWCAP_SHA2 | HWCAP_SHA512; - break; - default: - break; - } - - if (ID_AA64ISAR0_SHA1_VAL(user_cpu_desc.id_aa64isar0) == - ID_AA64ISAR0_SHA1_BASE) - hwcap |= HWCAP_SHA1; - - switch (ID_AA64ISAR0_AES_VAL(user_cpu_desc.id_aa64isar0)) { - case ID_AA64ISAR0_AES_BASE: - hwcap |= HWCAP_AES; - break; - case ID_AA64ISAR0_AES_PMULL: - hwcap |= HWCAP_PMULL | HWCAP_AES; - break; - default: - break; - } - - if (ID_AA64ISAR1_SB_VAL(user_cpu_desc.id_aa64isar1) == - ID_AA64ISAR1_SB_IMPL) - hwcap |= HWCAP_SB; - - switch (ID_AA64ISAR1_LRCPC_VAL(user_cpu_desc.id_aa64isar1)) { - case ID_AA64ISAR1_LRCPC_RCPC_8_3: - hwcap |= HWCAP_LRCPC; - break; - case ID_AA64ISAR1_LRCPC_RCPC_8_4: - hwcap |= HWCAP_LRCPC | HWCAP_ILRCPC; - break; - default: - break; - } - - if (ID_AA64ISAR1_FCMA_VAL(user_cpu_desc.id_aa64isar1) == - ID_AA64ISAR1_FCMA_IMPL) - hwcap |= HWCAP_FCMA; - - if (ID_AA64ISAR1_JSCVT_VAL(user_cpu_desc.id_aa64isar1) == - ID_AA64ISAR1_JSCVT_IMPL) - hwcap |= HWCAP_JSCVT; - - if (ID_AA64ISAR1_DPB_VAL(user_cpu_desc.id_aa64isar1) == - ID_AA64ISAR1_DPB_DCCVAP) - hwcap |= HWCAP_DCPOP; - - if (ID_AA64MMFR2_AT_VAL(user_cpu_desc.id_aa64mmfr2) == - ID_AA64MMFR2_AT_IMPL) - hwcap |= HWCAP_USCAT; - - if (ID_AA64PFR0_DIT_VAL(user_cpu_desc.id_aa64pfr0) == - ID_AA64PFR0_DIT_PSTATE) - hwcap |= HWCAP_DIT; - - if (ID_AA64PFR0_SVE_VAL(user_cpu_desc.id_aa64pfr0) == - ID_AA64PFR0_SVE_IMPL) - hwcap |= HWCAP_SVE; - - switch (ID_AA64PFR0_AdvSIMD_VAL(user_cpu_desc.id_aa64pfr0)) { - case ID_AA64PFR0_AdvSIMD_IMPL: - hwcap |= HWCAP_ASIMD; - break; - case ID_AA64PFR0_AdvSIMD_HP: - hwcap |= HWCAP_ASIMD | HWCAP_ASIMDHP; - break; - default: - break; - } - - switch (ID_AA64PFR0_FP_VAL(user_cpu_desc.id_aa64pfr0)) { - case ID_AA64PFR0_FP_IMPL: - hwcap |= HWCAP_FP; - break; - case ID_AA64PFR0_FP_HP: - hwcap |= HWCAP_FP | HWCAP_FPHP; - break; - default: - break; - } - - if (ID_AA64PFR1_SSBS_VAL(user_cpu_desc.id_aa64pfr1) == - ID_AA64PFR1_SSBS_PSTATE_MSR) - hwcap |= HWCAP_SSBS; - - return (hwcap); -} - -static u_long -parse_cpu_features_hwcap2(void) -{ - u_long hwcap2 = 0; - - if (ID_AA64ISAR0_RNDR_VAL(user_cpu_desc.id_aa64isar0) == - ID_AA64ISAR0_RNDR_IMPL) - hwcap2 |= HWCAP2_RNG; - - if (ID_AA64ISAR0_TS_VAL(user_cpu_desc.id_aa64isar0) == - ID_AA64ISAR0_TS_CondM_8_5) - hwcap2 |= HWCAP2_FLAGM2; - - if (ID_AA64ISAR1_I8MM_VAL(user_cpu_desc.id_aa64isar1) == - ID_AA64ISAR1_I8MM_IMPL) - hwcap2 |= HWCAP2_I8MM; - - if (ID_AA64ISAR1_DGH_VAL(user_cpu_desc.id_aa64isar1) == - ID_AA64ISAR1_DGH_IMPL) - hwcap2 |= HWCAP2_DGH; - - if (ID_AA64ISAR1_BF16_VAL(user_cpu_desc.id_aa64isar1) == - ID_AA64ISAR1_BF16_IMPL) - hwcap2 |= HWCAP2_BF16; - - if (ID_AA64ISAR1_FRINTTS_VAL(user_cpu_desc.id_aa64isar1) == - ID_AA64ISAR1_FRINTTS_IMPL) - hwcap2 |= HWCAP2_FRINT; - - if (ID_AA64ISAR1_DPB_VAL(user_cpu_desc.id_aa64isar1) == - ID_AA64ISAR1_DPB_DCCVADP) - hwcap2 |= HWCAP2_DCPODP; - - if (ID_AA64PFR1_BT_VAL(user_cpu_desc.id_aa64pfr1) == - ID_AA64PFR1_BT_IMPL) - hwcap2 |= HWCAP2_BTI; - - return (hwcap2); -} - #ifdef COMPAT_FREEBSD32 static u_long parse_cpu_features_hwcap32(void) { u_long hwcap = HWCAP32_DEFAULT; - if (MVFR0_FPDP_VAL(user_cpu_desc.mvfr0) >= - MVFR0_FPDP_VFP_v2) { - hwcap |= HWCAP32_VFP; - - if (MVFR0_FPDP_VAL(user_cpu_desc.mvfr0) == - MVFR0_FPDP_VFP_v3_v4) { - hwcap |= HWCAP32_VFPv3; - - if (MVFR1_SIMDFMAC_VAL(user_cpu_desc.mvfr1) == - MVFR1_SIMDFMAC_IMPL) - hwcap |= HWCAP32_VFPv4; - } - } - - if ((MVFR1_SIMDLS_VAL(user_cpu_desc.mvfr1) == + if ((MVFR1_SIMDLS_VAL(user_cpu_desc.mvfr1) >= MVFR1_SIMDLS_IMPL) && - (MVFR1_SIMDInt_VAL(user_cpu_desc.mvfr1) == + (MVFR1_SIMDInt_VAL(user_cpu_desc.mvfr1) >= MVFR1_SIMDInt_IMPL) && - (MVFR1_SIMDSP_VAL(user_cpu_desc.mvfr1) == + (MVFR1_SIMDSP_VAL(user_cpu_desc.mvfr1) >= MVFR1_SIMDSP_IMPL)) hwcap |= HWCAP32_NEON; return (hwcap); } - -static u_long -parse_cpu_features_hwcap32_2(void) -{ - u_long hwcap2 = 0; - - if (ID_ISAR5_AES_VAL(user_cpu_desc.id_isar5) >= - ID_ISAR5_AES_BASE) - hwcap2 |= HWCAP32_2_AES; - - if (ID_ISAR5_AES_VAL(user_cpu_desc.id_isar5) == - ID_ISAR5_AES_VMULL) - hwcap2 |= HWCAP32_2_PMULL; - - if (ID_ISAR5_SHA1_VAL(user_cpu_desc.id_isar5) == - ID_ISAR5_SHA1_IMPL) - hwcap2 |= HWCAP32_2_SHA1; - - if (ID_ISAR5_SHA2_VAL(user_cpu_desc.id_isar5) == - ID_ISAR5_SHA2_IMPL) - hwcap2 |= HWCAP32_2_SHA2; - - if (ID_ISAR5_CRC32_VAL(user_cpu_desc.id_isar5) == - ID_ISAR5_CRC32_IMPL) - hwcap2 |= HWCAP32_2_CRC32; - - return (hwcap2); -} #endif /* COMPAT_FREEBSD32 */ static void From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 12:43:19 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 894AF67608C; Mon, 30 Aug 2021 12:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyqjy6SCvz3p7d; Mon, 30 Aug 2021 12:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D4DA1E052; Mon, 30 Aug 2021 12:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UChIZh035065; Mon, 30 Aug 2021 12:43:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UChI23035064; Mon, 30 Aug 2021 12:43:18 GMT (envelope-from git) Date: Mon, 30 Aug 2021 12:43:18 GMT Message-Id: <202108301243.17UChI23035064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 94cb1b52c178 - stable/13 - Only store the arm64 ID registers in the cpu_desc MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 94cb1b52c178d0b06d177913ac7d331597b97761 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 12:43:19 -0000 The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=94cb1b52c178d0b06d177913ac7d331597b97761 commit 94cb1b52c178d0b06d177913ac7d331597b97761 Author: Andrew Turner AuthorDate: 2021-07-29 08:55:01 +0000 Commit: Andrew Turner CommitDate: 2021-08-30 11:22:22 +0000 Only store the arm64 ID registers in the cpu_desc There is no need to store a pointer to the CPU implementer and part strings. Switch to load them directly into the sbuf used to print them on boot. While here print the machine ID register when we fail to determine the implementer or part we are booting on. Reviewed by: markj, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31346 (cherry picked from commit 8b3bd5a2b571e2681c96dbe5b4a04529ef0d7f53) --- sys/arm64/arm64/identcpu.c | 112 +++++++++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 50 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 193ed6427b1d..37330a8f0e3f 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +static void print_cpu_midr(struct sbuf *sb, u_int cpu); static void print_cpu_features(u_int cpu); #ifdef COMPAT_FREEBSD32 static u_long parse_cpu_features_hwcap32(void); @@ -116,13 +117,6 @@ uint64_t __cpu_affinity[MAXCPU]; static u_int cpu_aff_levels; struct cpu_desc { - u_int cpu_impl; - u_int cpu_part_num; - u_int cpu_variant; - u_int cpu_revision; - const char *cpu_impl_name; - const char *cpu_part_name; - uint64_t mpidr; uint64_t id_aa64afr0; uint64_t id_aa64afr1; @@ -169,7 +163,7 @@ struct cpu_parts { u_int part_id; const char *part_name; }; -#define CPU_PART_NONE { 0, "Unknown Processor" } +#define CPU_PART_NONE { 0, NULL } struct cpu_implementers { u_int impl_id; @@ -180,7 +174,7 @@ struct cpu_implementers { */ const struct cpu_parts *cpu_parts; }; -#define CPU_IMPLEMENTER_NONE { 0, "Unknown Implementer", cpu_parts_none } +#define CPU_IMPLEMENTER_NONE { 0, NULL, NULL } /* * Per-implementer table of (PartNum, CPU Name) pairs. @@ -1435,7 +1429,6 @@ static struct mrs_user_reg user_regs[] = { USER_REG(ID_AA64PFR0_EL1, id_aa64pfr0), USER_REG(ID_AA64PFR1_EL1, id_aa64pfr1), - #ifdef COMPAT_FREEBSD32 USER_REG(ID_ISAR5_EL1, id_isar5), @@ -1754,10 +1747,17 @@ SYSINIT(identify_cpu, SI_SUB_CPU, SI_ORDER_ANY, identify_cpu_sysinit, NULL); static void cpu_features_sysinit(void *dummy __unused) { + struct sbuf sb; u_int cpu; CPU_FOREACH(cpu) print_cpu_features(cpu); + + /* Fill in cpu_model for the hw.model sysctl */ + sbuf_new(&sb, cpu_model, sizeof(cpu_model), SBUF_FIXEDLEN); + print_cpu_midr(&sb, 0); + sbuf_finish(&sb); + sbuf_delete(&sb); } /* Log features before APs are released and start printing to the dmesg. */ SYSINIT(cpu_features, SI_SUB_SMP - 1, SI_ORDER_ANY, cpu_features_sysinit, NULL); @@ -1879,15 +1879,64 @@ print_id_register(struct sbuf *sb, const char *reg_name, uint64_t reg, print_register(sb, reg_name, reg, print_id_fields, fields); } +static void +print_cpu_midr(struct sbuf *sb, u_int cpu) +{ + const struct cpu_parts *cpu_partsp; + const char *cpu_impl_name; + const char *cpu_part_name; + u_int midr; + u_int impl_id; + u_int part_id; + + midr = pcpu_find(cpu)->pc_midr; + + cpu_impl_name = NULL; + cpu_partsp = NULL; + impl_id = CPU_IMPL(midr); + for (int i = 0; cpu_implementers[i].impl_name != NULL; i++) { + if (impl_id == cpu_implementers[i].impl_id) { + cpu_impl_name = cpu_implementers[i].impl_name; + cpu_partsp = cpu_implementers[i].cpu_parts; + break; + } + } + /* Unknown implementer, so unknown part */ + if (cpu_impl_name == NULL) { + sbuf_printf(sb, "Unknown Implementer (midr: %08x)", midr); + return; + } + + KASSERT(cpu_partsp != NULL, ("%s: No parts table for implementer %s", + __func__, cpu_impl_name)); + + cpu_part_name = NULL; + part_id = CPU_PART(midr); + for (int i = 0; cpu_partsp[i].part_name != NULL; i++) { + if (part_id == cpu_partsp[i].part_id) { + cpu_part_name = cpu_partsp[i].part_name; + break; + } + } + /* Known Implementer, Unknown part */ + if (cpu_part_name == NULL) { + sbuf_printf(sb, "%s Unknown CPU r%dp%d (midr: %08x)", + cpu_impl_name, CPU_VAR(midr), CPU_REV(midr), midr); + return; + } + + sbuf_printf(sb, "%s %s r%dp%d", cpu_impl_name, + cpu_part_name, CPU_VAR(midr), CPU_REV(midr)); +} + static void print_cpu_features(u_int cpu) { struct sbuf *sb; sb = sbuf_new_auto(); - sbuf_printf(sb, "CPU%3d: %s %s r%dp%d", cpu, - cpu_desc[cpu].cpu_impl_name, cpu_desc[cpu].cpu_part_name, - cpu_desc[cpu].cpu_variant, cpu_desc[cpu].cpu_revision); + sbuf_printf(sb, "CPU%3u: ", cpu); + print_cpu_midr(sb, cpu); sbuf_cat(sb, " affinity:"); switch(cpu_aff_levels) { @@ -2058,43 +2107,6 @@ identify_cache(uint64_t ctr) void identify_cpu(u_int cpu) { - u_int midr; - u_int impl_id; - u_int part_id; - size_t i; - const struct cpu_parts *cpu_partsp = NULL; - - midr = get_midr(); - - impl_id = CPU_IMPL(midr); - for (i = 0; i < nitems(cpu_implementers); i++) { - if (impl_id == cpu_implementers[i].impl_id || - cpu_implementers[i].impl_id == 0) { - cpu_desc[cpu].cpu_impl = impl_id; - cpu_desc[cpu].cpu_impl_name = - cpu_implementers[i].impl_name; - cpu_partsp = cpu_implementers[i].cpu_parts; - break; - } - } - - part_id = CPU_PART(midr); - for (i = 0; &cpu_partsp[i] != NULL; i++) { - if (part_id == cpu_partsp[i].part_id || - cpu_partsp[i].part_id == 0) { - cpu_desc[cpu].cpu_part_num = part_id; - cpu_desc[cpu].cpu_part_name = cpu_partsp[i].part_name; - break; - } - } - - cpu_desc[cpu].cpu_revision = CPU_REV(midr); - cpu_desc[cpu].cpu_variant = CPU_VAR(midr); - - snprintf(cpu_model, sizeof(cpu_model), "%s %s r%dp%d", - cpu_desc[cpu].cpu_impl_name, cpu_desc[cpu].cpu_part_name, - cpu_desc[cpu].cpu_variant, cpu_desc[cpu].cpu_revision); - /* Save affinity for current CPU */ cpu_desc[cpu].mpidr = get_mpidr(); CPU_AFFINITY(cpu) = cpu_desc[cpu].mpidr & CPU_AFF_MASK; From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 13:14:35 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FC9A6768E4; Mon, 30 Aug 2021 13:14:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GyrQ26n3nz4QvG; Mon, 30 Aug 2021 13:14:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D14C21E986; Mon, 30 Aug 2021 13:14:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UDEYf8075648; Mon, 30 Aug 2021 13:14:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UDEYv2075647; Mon, 30 Aug 2021 13:14:34 GMT (envelope-from git) Date: Mon, 30 Aug 2021 13:14:34 GMT Message-Id: <202108301314.17UDEYv2075647@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: 7e583075a411 - stable/13 - virtio-modern: fix PCI common read/write functions on big endian targets MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7e583075a411cecbad1ca88b13b82c8a357d5b4e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 13:14:35 -0000 The branch stable/13 has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=7e583075a411cecbad1ca88b13b82c8a357d5b4e commit 7e583075a411cecbad1ca88b13b82c8a357d5b4e Author: Alfredo Dal'Ava Junior AuthorDate: 2021-05-07 05:40:35 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-08-30 16:14:20 +0000 virtio-modern: fix PCI common read/write functions on big endian targets Virtio modern has the common data organized in little endian, but on powerpc64 BE it was reading and writing in the wrong endian. Submitted by: Leonardo Bianconi Reviewed by: bryanv, alfredo Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28947 (cherry picked from commit fb53b42e36a9745d0a33821175a962c7a15eeeaa) --- sys/dev/virtio/pci/virtio_pci_modern.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/dev/virtio/pci/virtio_pci_modern.c b/sys/dev/virtio/pci/virtio_pci_modern.c index 7029d2ff76ce..33fdebf19402 100644 --- a/sys/dev/virtio/pci/virtio_pci_modern.c +++ b/sys/dev/virtio/pci/virtio_pci_modern.c @@ -1315,13 +1315,15 @@ vtpci_modern_read_common_1(struct vtpci_modern_softc *sc, bus_size_t off) static uint16_t vtpci_modern_read_common_2(struct vtpci_modern_softc *sc, bus_size_t off) { - return (bus_read_2(&sc->vtpci_common_res_map.vtrm_map, off)); + return virtio_htog16(true, + bus_read_2(&sc->vtpci_common_res_map.vtrm_map, off)); } static uint32_t vtpci_modern_read_common_4(struct vtpci_modern_softc *sc, bus_size_t off) { - return (bus_read_4(&sc->vtpci_common_res_map.vtrm_map, off)); + return virtio_htog32(true, + bus_read_4(&sc->vtpci_common_res_map.vtrm_map, off)); } static void @@ -1335,14 +1337,16 @@ static void vtpci_modern_write_common_2(struct vtpci_modern_softc *sc, bus_size_t off, uint16_t val) { - bus_write_2(&sc->vtpci_common_res_map.vtrm_map, off, val); + bus_write_2(&sc->vtpci_common_res_map.vtrm_map, + off, virtio_gtoh16(true, val)); } static void vtpci_modern_write_common_4(struct vtpci_modern_softc *sc, bus_size_t off, uint32_t val) { - bus_write_4(&sc->vtpci_common_res_map.vtrm_map, off, val); + bus_write_4(&sc->vtpci_common_res_map.vtrm_map, + off, virtio_gtoh32(true, val)); } static void From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 13:14:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4E569676CA8; Mon, 30 Aug 2021 13:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GyrQ41YCCz4QsK; Mon, 30 Aug 2021 13:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F19281E667; Mon, 30 Aug 2021 13:14:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UDEZBN075672; Mon, 30 Aug 2021 13:14:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UDEZNU075671; Mon, 30 Aug 2021 13:14:35 GMT (envelope-from git) Date: Mon, 30 Aug 2021 13:14:35 GMT Message-Id: <202108301314.17UDEZNU075671@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: e8e5d75e6a96 - stable/13 - llvm/powerpc64*: fix broken binaries generated by clang12 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e8e5d75e6a9676e76c3bfd6d1d52561ffbb40846 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 13:14:36 -0000 The branch stable/13 has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=e8e5d75e6a9676e76c3bfd6d1d52561ffbb40846 commit e8e5d75e6a9676e76c3bfd6d1d52561ffbb40846 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-08-27 14:47:11 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-08-30 16:14:21 +0000 llvm/powerpc64*: fix broken binaries generated by clang12 Amends LLVM commit 2518433f861fcb877d0a7bdd9aec1aec1f77505a that was pointed as the source of regression on LLVM12. This affects powerpc64*, making binaries crash with segmentation fault due to bad code generation around "__stack_chk_guard" Root cause and/or proper fix is under investigation by: https://bugs.llvm.org/show_bug.cgi?id=51590 Reviewed by: dim MFC after: 2 days Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D31698 (cherry picked from commit 9a4d48a645a7a3ebee05fae25afd154a132b638a) --- contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp index 28c8bd0a7ded..74fea674f962 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -1961,7 +1961,8 @@ void TargetLoweringBase::insertSSPDeclarations(Module &M) const { GlobalVariable::ExternalLinkage, nullptr, "__stack_chk_guard"); if (TM.getRelocationModel() == Reloc::Static && - !TM.getTargetTriple().isWindowsGNUEnvironment()) + !TM.getTargetTriple().isWindowsGNUEnvironment() && + !(TM.getTargetTriple().isPPC64() && TM.getTargetTriple().isOSFreeBSD())) GV->setDSOLocal(true); } } From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 16:00:54 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3931C658E8A; Mon, 30 Aug 2021 16:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyw5y1CC5z3CGR; Mon, 30 Aug 2021 16:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11BC22085A; Mon, 30 Aug 2021 16:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UG0r6N000697; Mon, 30 Aug 2021 16:00:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UG0r3O000696; Mon, 30 Aug 2021 16:00:53 GMT (envelope-from git) Date: Mon, 30 Aug 2021 16:00:53 GMT Message-Id: <202108301600.17UG0r3O000696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 706df48aeda9 - stable/13 - arm: enable stack-smashing protection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 706df48aeda9a0fe2cbad3b5488b067fda3d586d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 16:00:54 -0000 The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=706df48aeda9a0fe2cbad3b5488b067fda3d586d commit 706df48aeda9a0fe2cbad3b5488b067fda3d586d Author: Mitchell Horne AuthorDate: 2021-08-04 18:18:18 +0000 Commit: Mitchell Horne CommitDate: 2021-08-30 15:53:59 +0000 arm: enable stack-smashing protection With current generation clang/llvm it can pass all of our tests in libc/ssp. While here, remove the extra MACHINE_CPUARCH check for mips. SSP is included in BROKEN_OPTIONS for this architecture in src.opts.mk, which is enough to ensure normal builds won't set SSP_CFLAGS. Reviewed by: kevans, imp, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D31400 (cherry picked from commit 1b8db4b4e3614ef6334ce776dcdd46fe7f2c5a78) --- share/mk/bsd.sys.mk | 5 ++--- sys/conf/kern.mk | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 6341800d5c70..031d49bbaca2 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -239,12 +239,11 @@ CFLAGS.clang+= -Qunused-arguments # but not yet. CXXFLAGS.clang+= -Wno-c++11-extensions -.if ${MK_SSP} != "no" && \ - ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" +.if ${MK_SSP} != "no" # Don't use -Wstack-protector as it breaks world with -Werror. SSP_CFLAGS?= -fstack-protector-strong CFLAGS+= ${SSP_CFLAGS} -.endif # SSP && !ARM && !MIPS +.endif # SSP # Additional flags passed in CFLAGS and CXXFLAGS when MK_DEBUG_FILES is # enabled. diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index f8ea372b1d93..56bddb35398b 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -213,8 +213,7 @@ CFLAGS+= -fwrapv # # GCC SSP support # -.if ${MK_SSP} != "no" && \ - ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" +.if ${MK_SSP} != "no" CFLAGS+= -fstack-protector .endif From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 16:00:55 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63EA9658E8C; Mon, 30 Aug 2021 16:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyw5z2KFQz3C8S; Mon, 30 Aug 2021 16:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 378DC2085B; Mon, 30 Aug 2021 16:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UG0tqZ000721; Mon, 30 Aug 2021 16:00:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UG0tfN000720; Mon, 30 Aug 2021 16:00:55 GMT (envelope-from git) Date: Mon, 30 Aug 2021 16:00:55 GMT Message-Id: <202108301600.17UG0tfN000720@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 3d51152bfe83 - stable/13 - pmc(3): remove Pentium-related man pages and references MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3d51152bfe831c827d696623466950cd4ce5334b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 16:00:55 -0000 The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3d51152bfe831c827d696623466950cd4ce5334b commit 3d51152bfe831c827d696623466950cd4ce5334b Author: Mitchell Horne AuthorDate: 2021-08-10 20:19:58 +0000 Commit: Mitchell Horne CommitDate: 2021-08-30 15:54:47 +0000 pmc(3): remove Pentium-related man pages and references Support for Pentium events was removed completely in e92a1350b50e. Don't bump .Dd where we are just removing xrefs. Reviewed by: emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31423 (cherry picked from commit d78896e46f1d7744155919476c012400321d0dab) --- ObsoleteFiles.inc | 5 + lib/libpmc/Makefile | 3 - lib/libpmc/pmc.3 | 47 +- lib/libpmc/pmc.atom.3 | 3 - lib/libpmc/pmc.atomsilvermont.3 | 3 - lib/libpmc/pmc.core.3 | 3 - lib/libpmc/pmc.core2.3 | 3 - lib/libpmc/pmc.corei7.3 | 3 - lib/libpmc/pmc.corei7uc.3 | 3 - lib/libpmc/pmc.haswell.3 | 3 - lib/libpmc/pmc.haswelluc.3 | 3 - lib/libpmc/pmc.haswellxeon.3 | 3 - lib/libpmc/pmc.iaf.3 | 3 - lib/libpmc/pmc.ivybridge.3 | 3 - lib/libpmc/pmc.ivybridgexeon.3 | 3 - lib/libpmc/pmc.k7.3 | 3 - lib/libpmc/pmc.k8.3 | 3 - lib/libpmc/pmc.mips24k.3 | 3 - lib/libpmc/pmc.octeon.3 | 3 - lib/libpmc/pmc.p4.3 | 1223 -------------------------------------- lib/libpmc/pmc.p5.3 | 460 -------------- lib/libpmc/pmc.p6.3 | 1026 -------------------------------- lib/libpmc/pmc.sandybridge.3 | 3 - lib/libpmc/pmc.sandybridgeuc.3 | 3 - lib/libpmc/pmc.sandybridgexeon.3 | 3 - lib/libpmc/pmc.soft.3 | 3 - lib/libpmc/pmc.tsc.3 | 3 - lib/libpmc/pmc.ucf.3 | 3 - lib/libpmc/pmc.westmere.3 | 3 - lib/libpmc/pmc.westmereuc.3 | 3 - 30 files changed, 6 insertions(+), 2830 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 2540feae132b..843bc0326a41 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -36,6 +36,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20210810: remove Pentium-related man pages and references +OLD_FILES+=usr/share/man/man3/pmc.p4.3.gz +OLD_FILES+=usr/share/man/man3/pmc.p5.3.gz +OLD_FILES+=usr/share/man/man3/pmc.p6.3.gz + # 20210619: new clang import which bumps version from 12.0.0 to 12.0.1. OLD_FILES+=usr/lib/clang/12.0.0/include/cuda_wrappers/algorithm OLD_FILES+=usr/lib/clang/12.0.0/include/cuda_wrappers/complex diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 285b6c539ece..2ef0d288064c 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -83,9 +83,6 @@ MAN+= pmc.k7.3 MAN+= pmc.k8.3 MAN+= pmc.mips24k.3 MAN+= pmc.octeon.3 -MAN+= pmc.p4.3 -MAN+= pmc.p5.3 -MAN+= pmc.p6.3 MAN+= pmc.sandybridge.3 MAN+= pmc.sandybridgeuc.3 MAN+= pmc.sandybridgexeon.3 diff --git a/lib/libpmc/pmc.3 b/lib/libpmc/pmc.3 index c70862668980..4bf2907db129 100644 --- a/lib/libpmc/pmc.3 +++ b/lib/libpmc/pmc.3 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2020 +.Dd August 10, 2021 .Dt PMC 3 .Os .Sh NAME @@ -161,26 +161,6 @@ and CPUs, and other CPUs conforming to version 2 of the .Tn Intel performance measurement architecture. -.It Li PMC_CPU_INTEL_P5 -.Tn Intel -.Tn "Pentium" -CPUs. -.It Li PMC_CPU_INTEL_P6 -.Tn Intel -.Tn "Pentium Pro" -CPUs. -.It Li PMC_CPU_INTEL_PII -.Tn "Intel Pentium II" -CPUs. -.It Li PMC_CPU_INTEL_PIII -.Tn "Intel Pentium III" -CPUs. -.It Li PMC_CPU_INTEL_PIV -.Tn "Intel Pentium 4" -CPUs. -.It Li PMC_CPU_INTEL_PM -.Tn "Intel Pentium M" -CPUs. .El .Ss Supported PMCs PMC supported by this library are named by the @@ -205,25 +185,6 @@ CPUs. Programmable hardware counters present in .Tn "AMD Athlon64" CPUs. -.It Li PMC_CLASS_P4 -Programmable hardware counters present in -.Tn "Intel Pentium 4" -CPUs. -.It Li PMC_CLASS_P5 -Programmable hardware counters present in -.Tn Intel -.Tn Pentium -CPUs. -.It Li PMC_CLASS_P6 -Programmable hardware counters present in -.Tn Intel -.Tn "Pentium Pro" , -.Tn "Pentium II" , -.Tn "Pentium III" , -.Tn "Celeron" , -and -.Tn "Pentium M" -CPUs. .It Li PMC_CLASS_TSC The timestamp counter on i386 and amd64 architecture CPUs. .It Li PMC_CLASS_SOFT @@ -473,9 +434,6 @@ following manual pages: .It Li PMC_CLASS_IAP Ta Xr pmc.atom 3 , Xr pmc.core 3 , Xr pmc.core2 3 .It Li PMC_CLASS_K7 Ta Xr pmc.k7 3 .It Li PMC_CLASS_K8 Ta Xr pmc.k8 3 -.It Li PMC_CLASS_P4 Ta Xr pmc.p4 3 -.It Li PMC_CLASS_P5 Ta Xr pmc.p5 3 -.It Li PMC_CLASS_P6 Ta Xr pmc.p6 3 .It Li PMC_CLASS_TSC Ta Xr pmc.tsc 3 .El .Ss Event Name Aliases @@ -535,9 +493,6 @@ API is .Xr pmc.k8 3 , .Xr pmc.mips24k 3 , .Xr pmc.octeon 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , .Xr pmc.sandybridgexeon 3 , diff --git a/lib/libpmc/pmc.atom.3 b/lib/libpmc/pmc.atom.3 index edf81ba54a5e..a79d14c9d4c1 100644 --- a/lib/libpmc/pmc.atom.3 +++ b/lib/libpmc/pmc.atom.3 @@ -1174,9 +1174,6 @@ and the underlying hardware events used on these CPUs. .Xr pmc.iaf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmc_cpuinfo 3 , diff --git a/lib/libpmc/pmc.atomsilvermont.3 b/lib/libpmc/pmc.atomsilvermont.3 index 7ed9de461e33..dd1f66a429c7 100644 --- a/lib/libpmc/pmc.atomsilvermont.3 +++ b/lib/libpmc/pmc.atomsilvermont.3 @@ -512,9 +512,6 @@ The number of times the MSROM starts a flow of UOPS. .Xr pmc.iaf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmc_cpuinfo 3 , diff --git a/lib/libpmc/pmc.core.3 b/lib/libpmc/pmc.core.3 index 551e615dc320..8d922cf3c1af 100644 --- a/lib/libpmc/pmc.core.3 +++ b/lib/libpmc/pmc.core.3 @@ -789,9 +789,6 @@ may not count some transitions. .Xr pmc.iaf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmclog 3 , diff --git a/lib/libpmc/pmc.core2.3 b/lib/libpmc/pmc.core2.3 index cd038fb411d9..7c7049136c2b 100644 --- a/lib/libpmc/pmc.core2.3 +++ b/lib/libpmc/pmc.core2.3 @@ -1104,9 +1104,6 @@ and the underlying hardware events used. .Xr pmc.iaf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmc_cpuinfo 3 , diff --git a/lib/libpmc/pmc.corei7.3 b/lib/libpmc/pmc.corei7.3 index e9e2a6e61784..0c405d8e6e7f 100644 --- a/lib/libpmc/pmc.corei7.3 +++ b/lib/libpmc/pmc.corei7.3 @@ -1583,9 +1583,6 @@ Counts number of segment register loads. .Xr pmc.iaf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmc.ucf 3 , diff --git a/lib/libpmc/pmc.corei7uc.3 b/lib/libpmc/pmc.corei7uc.3 index 1f49222ceda6..a102a7b6c1b3 100644 --- a/lib/libpmc/pmc.corei7uc.3 +++ b/lib/libpmc/pmc.corei7uc.3 @@ -886,9 +886,6 @@ into a power down mode. .Xr pmc.iaf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmc.ucf 3 , diff --git a/lib/libpmc/pmc.haswell.3 b/lib/libpmc/pmc.haswell.3 index c69d4b694ca2..c858c702fdf1 100644 --- a/lib/libpmc/pmc.haswell.3 +++ b/lib/libpmc/pmc.haswell.3 @@ -921,9 +921,6 @@ Dirty L2 cache lines evicted by demand. .Xr pmc.ivybridgexeon 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , .Xr pmc.sandybridgexeon 3 , diff --git a/lib/libpmc/pmc.haswelluc.3 b/lib/libpmc/pmc.haswelluc.3 index e7b57c59d0e5..a067a75201ce 100644 --- a/lib/libpmc/pmc.haswelluc.3 +++ b/lib/libpmc/pmc.haswelluc.3 @@ -205,9 +205,6 @@ Number of requests allocated in Coherency Tracker. .Xr pmc.iaf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , .Xr pmc.sandybridgexeon 3 , diff --git a/lib/libpmc/pmc.haswellxeon.3 b/lib/libpmc/pmc.haswellxeon.3 index 5f9a5b20eb5c..7610775adcb3 100644 --- a/lib/libpmc/pmc.haswellxeon.3 +++ b/lib/libpmc/pmc.haswellxeon.3 @@ -935,9 +935,6 @@ Dirty L2 cache lines evicted by demand. .Xr pmc.ivybridgexeon 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , .Xr pmc.sandybridgexeon 3 , diff --git a/lib/libpmc/pmc.iaf.3 b/lib/libpmc/pmc.iaf.3 index f80560999f46..fcfa98042aaf 100644 --- a/lib/libpmc/pmc.iaf.3 +++ b/lib/libpmc/pmc.iaf.3 @@ -128,9 +128,6 @@ CPU, use the event specifier .Xr pmc.core2 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmc_cpuinfo 3 , diff --git a/lib/libpmc/pmc.ivybridge.3 b/lib/libpmc/pmc.ivybridge.3 index d86199b4d407..938d2947a844 100644 --- a/lib/libpmc/pmc.ivybridge.3 +++ b/lib/libpmc/pmc.ivybridge.3 @@ -833,9 +833,6 @@ Dirty L2 cache lines evicted by the MLC prefetcher. .Xr pmc.ivybridgexeon 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , .Xr pmc.sandybridgexeon 3 , diff --git a/lib/libpmc/pmc.ivybridgexeon.3 b/lib/libpmc/pmc.ivybridgexeon.3 index 1bbe16039bd2..9bcf4dbd56da 100644 --- a/lib/libpmc/pmc.ivybridgexeon.3 +++ b/lib/libpmc/pmc.ivybridgexeon.3 @@ -866,9 +866,6 @@ Dirty L2 cache lines filling the L2. .Xr pmc.ivybridge 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , .Xr pmc.sandybridgexeon 3 , diff --git a/lib/libpmc/pmc.k7.3 b/lib/libpmc/pmc.k7.3 index a8be8143f9ea..42933f1958fb 100644 --- a/lib/libpmc/pmc.k7.3 +++ b/lib/libpmc/pmc.k7.3 @@ -246,9 +246,6 @@ and the underlying hardware events used. .Xr pmc.core2 3 , .Xr pmc.iaf 3 , .Xr pmc.k8 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmclog 3 , diff --git a/lib/libpmc/pmc.k8.3 b/lib/libpmc/pmc.k8.3 index 45c70baa438c..cbfe617f31b1 100644 --- a/lib/libpmc/pmc.k8.3 +++ b/lib/libpmc/pmc.k8.3 @@ -779,9 +779,6 @@ and the underlying hardware events used. .Xr pmc.core2 3 , .Xr pmc.iaf 3 , .Xr pmc.k7 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmclog 3 , diff --git a/lib/libpmc/pmc.mips24k.3 b/lib/libpmc/pmc.mips24k.3 index d886d0e8c906..52761d5db751 100644 --- a/lib/libpmc/pmc.mips24k.3 +++ b/lib/libpmc/pmc.mips24k.3 @@ -389,9 +389,6 @@ and the underlying hardware events used. .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.octeon 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmc_cpuinfo 3 , diff --git a/lib/libpmc/pmc.octeon.3 b/lib/libpmc/pmc.octeon.3 index 019b448522e9..43d204f164e6 100644 --- a/lib/libpmc/pmc.octeon.3 +++ b/lib/libpmc/pmc.octeon.3 @@ -229,9 +229,6 @@ and the underlying hardware events used. .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.mips24k 3 , -.Xr pmc.p4 3 , -.Xr pmc.p5 3 , -.Xr pmc.p6 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , .Xr pmc_cpuinfo 3 , diff --git a/lib/libpmc/pmc.p4.3 b/lib/libpmc/pmc.p4.3 deleted file mode 100644 index e113b72001e1..000000000000 --- a/lib/libpmc/pmc.p4.3 +++ /dev/null @@ -1,1223 +0,0 @@ -.\" Copyright (c) 2003-2008 Joseph Koshy. 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 October 4, 2008 -.Dt PMC.P4 3 -.Os -.Sh NAME -.Nm pmc.p4 -.Nd measurement events for -.Tn "Intel Pentium 4" -and other -.Tn Netburst -architecture CPUs -.Sh LIBRARY -.Lb libpmc -.Sh SYNOPSIS -.In pmc.h -.Sh DESCRIPTION -Intel P4 PMCs are present in Intel -.Tn "Pentium 4" -and -.Tn Xeon -processors that use the -.Tn Netburst -CPU architecture. -.Pp -These PMCs are documented in -.Rs -.%B "IA-32 Intel(R) Architecture Software Developer's Manual" -.%T "Volume 3: System Programming Guide" -.%N "Order Number 245472-012" -.%D 2003 -.%Q "Intel Corporation" -.Re -Further information about using these PMCs may be found in -.Rs -.%B "IA-32 Intel(R) Architecture Optimization Guide" -.%D 2003 -.%N "Order Number 248966-009" -.%Q "Intel Corporation" -.Re -Some of these events are affected by processor errata described in -.Rs -.%B "Intel(R) Pentium(R) 4 Processor Specification Update" -.%N "Document Number: 249199-059" -.%D "April 2005" -.%Q "Intel Corporation" -.Re -.Ss PMC Features -Intel Pentium 4 PMCs are 40 bits wide. -Each CPU contains 18 PMCs, divided into 4 groups with 4, 4, 4 and 6 -PMCs respectively. -On processors with hyperthreading support, PMC resources are shared -between logical processors. -These PMCs support the following capabilities: -.Bl -column "PMC_CAP_INTERRUPT" "Support" -.It Em Capability Ta Em Support -.It PMC_CAP_CASCADE Ta Yes -.It PMC_CAP_EDGE Ta Yes -.It PMC_CAP_INTERRUPT Ta Yes -.It PMC_CAP_INVERT Ta Yes -.It PMC_CAP_READ Ta Yes -.It PMC_CAP_PRECISE Ta Unimplemented -.It PMC_CAP_SYSTEM Ta Yes -.It PMC_CAP_TAGGING Ta Yes -.It PMC_CAP_THRESHOLD Ta Yes -.It PMC_CAP_USER Ta Yes -.It PMC_CAP_WRITE Ta Yes -.El -.Ss Event Qualifiers -Event specifiers for Intel P4 PMCs can have the following common -qualifiers: -.Bl -tag -width indent -.It Li active= Ns Ar choice -(On P4 HTT CPUs) Filter event counting based on which logical -processors are active. -The allowed values of -.Ar choice -are: -.Pp -.Bl -tag -width indent -compact -.It Li any -Count when either logical processor is active. -.It Li both -Count when both logical processors are active. -.It Li none -Count only when neither logical processor is active. -.It Li single -Count only when one logical processor is active. -.El -.Pp -The default is -.Dq Li both . -.It Li cascade -Configure the PMC to cascade onto its partner. -See -.Sx "Cascading P4 PMCs" -below for more information. -.It Li edge -Configure the counter to count false to true transitions of the threshold -comparison output. -This qualifier only takes effect if a threshold qualifier has also been -specified. -.It Li complement -Configure the counter to increment only when the event count seen is -less than the threshold qualifier value specified. -.It Li mask= Ns Ar qualifier -Many event specifiers for Intel P4 PMCs need to be additionally -qualified using a mask qualifier. -The allowed syntax for these qualifiers is event specific and is -described along with the events. -.It Li os -Configure the PMC to count when the CPL of the processor is 0. -.It Li precise -Select precise event based sampling. -Precise sampling is supported by the hardware for a limited set of -events. -.It Li tag= Ns Ar value -Configure the PMC to tag the internal uop selected by the other -fields in this event specifier with value -.Ar value . -This feature is used when cascading PMCs. -.It Li threshold= Ns Ar value -Configure the PMC to increment only when the event counts seen are -greater than the specified threshold value -.Ar value . -.It Li usr -Configure the PMC to count when the CPL of the processor is 1, 2 or 3. -.El -.Pp -If neither of the -.Dq Li os -or -.Dq Li usr -qualifiers are specified, the default is to enable both. -.Pp -On Intel Pentium 4 processors with HTT, events are -divided into two classes: -.Pp -.Bl -tag -width indent -compact -.It "TS Events" -are those where hardware can differentiate between events -generated on one logical processor from those generated on the -other. -.It "TI Events" -are those where hardware cannot differentiate between events -generated by multiple logical processors in a package. -.El -.Pp -Only TS events are allowed for use with process-mode PMCs on -Pentium-4/HTT CPUs. -.Pp -The event specifiers supported by Intel P4 PMCs are: -.Bl -tag -width indent -.It Li p4-128bit-mmx-uop Op Li ,mask= Ns Ar flags -.Pq "TI event" -Count integer SIMD SSE2 instructions that operate on 128 bit SIMD -operands. -Qualifier -.Ar flags -can take the following value (which is also the default): -.Pp -.Bl -tag -width indent -compact -.It Li all -Count all uops operating on 128 bit SIMD integer operands in memory or -XMM register. -.El -.Pp -If an instruction contains more than one 128 bit MMX uop, then each -uop will be counted. -.It Li p4-64bit-mmx-uop Op Li ,mask= Ns Ar flags -.Pq "TI event" -Count MMX instructions that operate on 64 bit SIMD operands. -Qualifier -.Ar flags -can take the following value (which is also the default): -.Pp -.Bl -tag -width indent -compact -.It Li all -Count all uops operating on 64 bit SIMD integer operands in memory or -in MMX registers. -.El -.Pp -If an instruction contains more than one 64 bit MMX uop, then each -uop will be counted. -.It Li p4-b2b-cycles -.Pq "TI event" -Count back-to-back bus cycles. -Further documentation for this event is unavailable. -.It Li p4-bnr -.Pq "TI event" -Count bus-not-ready conditions. -Further documentation for this event is unavailable. -.It Li p4-bpu-fetch-request Op Li ,mask= Ns Ar qualifier -.Pq "TS event" -Count instruction fetch requests qualified by additional -flags specified in -.Ar qualifier . -At this point only one flag is supported: -.Pp -.Bl -tag -width indent -compact -.It Li tcmiss -Count trace cache lookup misses. -.El -.Pp -The default qualifier is also -.Dq Li mask=tcmiss . -.It Li p4-branch-retired Op Li ,mask= Ns Ar flags -.Pq "TS event" -Counts retired branches. -Qualifier -.Ar flags -is a list of the following -.Ql + -separated strings: -.Pp -.Bl -tag -width indent -compact -.It Li mmnp -Count branches not-taken and predicted. -.It Li mmnm -Count branches not-taken and mis-predicted. -.It Li mmtp -Count branches taken and predicted. -.It Li mmtm -Count branches taken and mis-predicted. -.El -.Pp -The default qualifier counts all four kinds of branches. -.It Li p4-bsq-active-entries Op Li ,mask= Ns Ar qualifier -.Pq "TS event" -Count the number of entries (clipped at 15) currently active in the -BSQ. -Qualifier -.Ar qualifier -is a -.Ql + -separated set of the following flags: -.Pp -.Bl -tag -width indent -compact -.It Li req-type0 , Li req-type1 -Forms a 2-bit number used to select the request type encoding: -.Pp -.Bl -tag -width indent -compact -.It Li 0 -reads excluding read invalidate -.It Li 1 -read invalidates -.It Li 2 -writes other than writebacks -.It Li 3 -writebacks -.El -.Pp -Bit -.Dq Li req-type1 -is the MSB for this two bit number. -.It Li req-len0 , Li req-len1 -Forms a two-bit number that specifies the request length encoding: -.Pp -.Bl -tag -width indent -compact -.It Li 0 -0 chunks -.It Li 1 -1 chunk -.It Li 3 -8 chunks -.El -.Pp -Bit -.Dq Li req-len1 -is the MSB for this two bit number. -.It Li req-io-type -Count requests that are input or output requests. -.It Li req-lock-type -Count requests that lock the bus. -.It Li req-lock-cache -Count requests that lock the cache. -.It Li req-split-type -Count requests that is a bus 8-byte chunk that is split across an -8-byte boundary. -.It Li req-dem-type -Count requests that are demand (not prefetches) if set. -Count requests that are prefetches if not set. -.It Li req-ord-type -Count requests that are ordered. -.It Li mem-type0 , Li mem-type1 , Li mem-type2 -Forms a 3-bit number that specifies a memory type encoding: -.Pp -.Bl -tag -width indent -compact -.It Li 0 -UC -.It Li 1 -USWC -.It Li 4 -WT -.It Li 5 -WP -.It Li 6 -WB -.El -.Pp -Bit -.Dq Li mem-type2 -is the MSB of this 3-bit number. -.El -.Pp -The default qualifier has all the above bits set. -.Pp -Edge triggering using the -.Dq Li edge -qualifier should not be used with this event when counting cycles. -.It Li p4-bsq-allocation Op Li ,mask= Ns Ar qualifier -.Pq "TS event" -Count allocations in the bus sequence unit according to the flags -specified in -.Ar qualifier , -which is a -.Ql + -separated set of the following flags: -.Pp -.Bl -tag -width indent -compact -.It Li req-type0 , Li req-type1 -Forms a 2-bit number used to select the request type encoding: -.Pp -.Bl -tag -width indent -compact -.It Li 0 -reads excluding read invalidate -.It Li 1 -read invalidates -.It Li 2 -writes other than writebacks -.It Li 3 -writebacks -.El -.Pp -Bit -.Dq Li req-type1 -is the MSB for this two bit number. -.It Li req-len0 , Li req-len1 -Forms a two-bit number that specifies the request length encoding: -.Pp -.Bl -tag -width indent -compact -.It Li 0 -0 chunks -.It Li 1 -1 chunk -.It Li 3 -8 chunks -.El -.Pp -Bit -.Dq Li req-len1 -is the MSB for this two bit number. -.It Li req-io-type -Count requests that are input or output requests. -.It Li req-lock-type -Count requests that lock the bus. -.It Li req-lock-cache -Count requests that lock the cache. -.It Li req-split-type -Count requests that is a bus 8-byte chunk that is split across an -8-byte boundary. -.It Li req-dem-type -Count requests that are demand (not prefetches) if set. -Count requests that are prefetches if not set. -.It Li req-ord-type -Count requests that are ordered. -.It Li mem-type0 , Li mem-type1 , Li mem-type2 -Forms a 3-bit number that specifies a memory type encoding: -.Pp -.Bl -tag -width indent -compact -.It Li 0 -UC -.It Li 1 -USWC -.It Li 4 -WT -.It Li 5 -WP -.It Li 6 -WB -.El -.Pp -Bit -.Dq Li mem-type2 -is the MSB of this 3-bit number. -.El -.Pp -The default qualifier has all the above bits set. -.Pp -This event is usually used along with the -.Dq Li edge -qualifier to avoid multiple counting. -.It Li p4-bsq-cache-reference Op Li ,mask= Ns Ar qualifier -.Pq "TS event" -Count cache references as seen by the bus unit (2nd or 3rd level -cache references). -Qualifier -.Ar qualifier -is a -.Ql + -separated list of the following keywords: -.Pp -.Bl -tag -width indent -compact -.It Li rd-2ndl-hits -Count 2nd level cache hits in the shared state. -.It Li rd-2ndl-hite -Count 2nd level cache hits in the exclusive state. -.It Li rd-2ndl-hitm -Count 2nd level cache hits in the modified state. -.It Li rd-3rdl-hits -Count 3rd level cache hits in the shared state. -.It Li rd-3rdl-hite -Count 3rd level cache hits in the exclusive state. -.It Li rd-3rdl-hitm -Count 3rd level cache hits in the modified state. -.It Li rd-2ndl-miss -Count 2nd level cache misses. -.It Li rd-3rdl-miss -Count 3rd level cache misses. -.It Li wr-2ndl-miss -Count write-back lookups from the data access cache that miss the 2nd -level cache. -.El -.Pp -The default is to count all the above events. -.It Li p4-execution-event Op Li ,mask= Ns Ar flags -.Pq "TS event" -Count the retirement of tagged uops selected through the execution -tagging mechanism. -Qualifier -.Ar flags -can contain the following strings separated by -.Ql + -characters: -.Pp -.Bl -tag -width indent -compact -.It Li nbogus0 , Li nbogus1 , Li nbogus2 , Li nbogus3 -The marked uops are not bogus. -.It Li bogus0 , Li bogus1 , Li bogus2 , Li bogus3 -The marked uops are bogus. -.El -.Pp -This event requires additional (upstream) events to be allocated to -perform the desired uop tagging. -The default is to set all the above flags. -This event can be used for precise event based sampling. -.It Li p4-front-end-event Op Li ,mask= Ns Ar flags -.Pq "TS event" -Count the retirement of tagged uops selected through the front-end -tagging mechanism. -Qualifier -.Ar flags -can contain the following strings separated by -.Ql + -characters: -.Pp -.Bl -tag -width indent -compact -.It Li nbogus -The marked uops are not bogus. -.It Li bogus -The marked uops are bogus. -.El -.Pp -This event requires additional (upstream) events to be allocated to -perform the desired uop tagging. -The default is to select both kinds of events. -This event can be used for precise event based sampling. -.It Li p4-fsb-data-activity Op Li ,mask= Ns Ar flags -.Pq "TI event" -Count each DBSY or DRDY event selected by qualifier -.Ar flags . -Qualifier -.Ar flags -is a -.Ql + -separated set of the following flags: -.Pp -.Bl -tag -width indent -compact -.It Li drdy-drv -Count when this processor is driving data onto the bus. -.It Li drdy-own -Count when this processor is reading data from the bus. -.It Li drdy-other -Count when data is on the bus but not being sampled by this processor. -.It Li dbsy-drv -Count when this processor reserves the bus for use in the next cycle -in order to drive data. -.It Li dbsy-own -Count when some agent reserves the bus for use in the next bus cycle -to drive data that this processor will sample. -.It Li dbsy-other -Count when some agent reserves the bus for use in the next bus cycle -to drive data that this processor will not sample. -.El -.Pp -Flags -.Dq Li drdy-own -and -.Dq Li drdy-other -are mutually exclusive. -Flags -.Dq Li dbsy-own -and -.Dq Li dbsy-other -are mutually exclusive. -The default value for -.Ar qualifier -is -.Dq Li drdy-drv+drdy-own+dbsy-drv+dbsy-own . -.It Li p4-global-power-events Op Li ,mask= Ns Ar flags -.Pq "TS event" -Count cycles during which the processor is not stopped. -Qualifier -.Ar flags -can take the following value (which is also the default): -.Pp -.Bl -tag -width indent -compact -.It Li running -Count cycles when the processor is active. -.El -.It Li p4-instr-retired Op Li ,mask= Ns Ar flags -.Pq "TS event" -Count instructions retired during a clock cycle. -Qualifier -.Ar flags -comprises of the following strings separated by -.Ql + -characters: -.Pp -.Bl -tag -width indent -compact -.It Li nbogusntag -Count non-bogus instructions that are not tagged. -.It Li nbogustag -Count non-bogus instructions that are tagged. -.It Li bogusntag -Count bogus instructions that are not tagged. -.It Li bogustag -Count bogus instructions that are tagged. -.El -.Pp -The default qualifier counts all the above kinds of instructions. -.It Li p4-ioq-active-entries Xo -.Op Li ,mask= Ns Ar qualifier -.Op Li ,busreqtype= Ns Ar req-type -.Xc -.Pq "TS event" -Count the number of entries (clipped at 15) in the IOQ that are -active. -The event masks are specified by qualifier -.Ar qualifier -and -.Ar req-type . -.Pp -Qualifier -.Ar qualifier -is a -.Ql + -separated set of the following flags: -.Pp -.Bl -tag -width indent -compact -.It Li all-read -Count read entries. -.It Li all-write *** 2247 LINES SKIPPED *** From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 16:00:56 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5299658BDE; Mon, 30 Aug 2021 16:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gyw603ySTz3C8Y; Mon, 30 Aug 2021 16:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58C332085D; Mon, 30 Aug 2021 16:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UG0uMj000747; Mon, 30 Aug 2021 16:00:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UG0uRg000746; Mon, 30 Aug 2021 16:00:56 GMT (envelope-from git) Date: Mon, 30 Aug 2021 16:00:56 GMT Message-Id: <202108301600.17UG0uRg000746@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: fb886a18a0eb - stable/13 - kdb: Handle process enumeration before procinit() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fb886a18a0ebfc12d1efa7ba3f89c14d3bdf21ae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 16:00:56 -0000 The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=fb886a18a0ebfc12d1efa7ba3f89c14d3bdf21ae commit fb886a18a0ebfc12d1efa7ba3f89c14d3bdf21ae Author: Mitchell Horne AuthorDate: 2021-08-11 17:40:01 +0000 Commit: Mitchell Horne CommitDate: 2021-08-30 15:55:40 +0000 kdb: Handle process enumeration before procinit() Make kdb_thr_first() and kdb_thr_next() return sane values if the allproc list and pidhashtbl haven't been initialized yet. This can happen if the debugger is entered very early on, for example with the '-d' boot flag. This allows remote gdb to attach at such a time, and fixes some ddb commands like 'show threads'. Be explicit about the static initialization of these variables. This part has no functional change. Reviewed by: markj, imp (previous version) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D31495 (cherry picked from commit 4ccaa87f695c8b9eb31f2ba9ce4913a045755fe0) --- sys/kern/kern_proc.c | 5 ++--- sys/kern/subr_kdb.c | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 2017f824f6ad..2649d1d3a58f 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -122,13 +122,13 @@ static void pargs_free(struct pargs *pa); /* * Other process lists */ -struct pidhashhead *pidhashtbl; +struct pidhashhead *pidhashtbl = NULL; struct sx *pidhashtbl_lock; u_long pidhash; u_long pidhashlock; struct pgrphashhead *pgrphashtbl; u_long pgrphash; -struct proclist allproc; +struct proclist allproc = LIST_HEAD_INITIALIZER(allproc); struct sx __exclusive_cache_line allproc_lock; struct sx __exclusive_cache_line proctree_lock; struct mtx __exclusive_cache_line ppeers_lock; @@ -185,7 +185,6 @@ procinit(void) sx_init(&proctree_lock, "proctree"); mtx_init(&ppeers_lock, "p_peers", NULL, MTX_DEF); mtx_init(&procid_lock, "procid", NULL, MTX_DEF); - LIST_INIT(&allproc); pidhashtbl = hashinit(maxproc / 4, M_PROC, &pidhash); pidhashlock = (pidhash + 1) / 64; if (pidhashlock > 0) diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index 1fabb4044eb1..4f439ff103d7 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -608,6 +608,10 @@ kdb_thr_first(void) struct thread *thr; u_int i; + /* This function may be called early. */ + if (pidhashtbl == NULL) + return (&thread0); + for (i = 0; i <= pidhash; i++) { LIST_FOREACH(p, &pidhashtbl[i], p_hash) { thr = FIRST_THREAD_IN_PROC(p); @@ -651,6 +655,8 @@ kdb_thr_next(struct thread *thr) thr = TAILQ_NEXT(thr, td_plist); if (thr != NULL) return (thr); + if (pidhashtbl == NULL) + return (NULL); hash = p->p_pid & pidhash; for (;;) { p = LIST_NEXT(p, p_hash); From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 23:13:16 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B37BE660320; Mon, 30 Aug 2021 23:13:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gz5hr4Ndxz3DYw; Mon, 30 Aug 2021 23:13:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E7F0266E2; Mon, 30 Aug 2021 23:13:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UNDGn7076578; Mon, 30 Aug 2021 23:13:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UNDG7V076577; Mon, 30 Aug 2021 23:13:16 GMT (envelope-from git) Date: Mon, 30 Aug 2021 23:13:16 GMT Message-Id: <202108302313.17UNDG7V076577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: dd9f588238e3 - stable/13 - ktls: Don't mark existing received mbufs notready for TOE TLS. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dd9f588238e35e6887eeaa10f10e2be9666ed60d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 23:13:16 -0000 The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dd9f588238e35e6887eeaa10f10e2be9666ed60d commit dd9f588238e35e6887eeaa10f10e2be9666ed60d Author: John Baldwin AuthorDate: 2021-06-15 17:36:57 +0000 Commit: John Baldwin CommitDate: 2021-08-30 22:09:50 +0000 ktls: Don't mark existing received mbufs notready for TOE TLS. The TOE driver might receive decrypted TLS records that are enqueued to the socket buffer after ktls_try_toe() returns and before ktls_enable_rx() locks the receive buffer to call sb_mark_notready(). In that case, sb_mark_notready() would incorrectly treat the decrypted TLS record as an encrypted record and schedule it for decryption. This always resulted in the connection being dropped as the data in the control message did not look like a valid TLS header. To fix, don't try to handle software decryption of existing buffers in the socket buffer for TOE TLS in ktls_enable_rx(). If a TOE TLS driver needs to decrypt existing data in the socket buffer, the driver will need to manage that in its tod_alloc_tls_session method. Sponsored by: Chelsio Communications (cherry picked from commit faf0224ff27b93b743d50b3830bf5ce345b67e94) --- sys/kern/uipc_ktls.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 0f5cc7c1b28f..21e2386ac2bf 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -1043,8 +1043,10 @@ ktls_enable_rx(struct socket *so, struct tls_enable *en) so->so_rcv.sb_flags |= SB_TLS_RX; /* Mark existing data as not ready until it can be decrypted. */ - sb_mark_notready(&so->so_rcv); - ktls_check_rx(&so->so_rcv); + if (tls->mode != TCP_TLS_MODE_TOE) { + sb_mark_notready(&so->so_rcv); + ktls_check_rx(&so->so_rcv); + } SOCKBUF_UNLOCK(&so->so_rcv); counter_u64_add(ktls_offload_total, 1); From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 23:13:17 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF5F76601C2; Mon, 30 Aug 2021 23:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gz5hs4wdQz3DnX; Mon, 30 Aug 2021 23:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9210F2673A; Mon, 30 Aug 2021 23:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UNDHYm076602; Mon, 30 Aug 2021 23:13:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UNDHHO076601; Mon, 30 Aug 2021 23:13:17 GMT (envelope-from git) Date: Mon, 30 Aug 2021 23:13:17 GMT Message-Id: <202108302313.17UNDHHO076601@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7093abbebd0b - stable/13 - ktls: Init reset tag task for cloned sessions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7093abbebd0ba6011dc8a8fbfb93ac52fef0173d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 23:13:17 -0000 The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7093abbebd0ba6011dc8a8fbfb93ac52fef0173d commit 7093abbebd0ba6011dc8a8fbfb93ac52fef0173d Author: Andrew Gallatin AuthorDate: 2021-08-11 18:06:43 +0000 Commit: John Baldwin CommitDate: 2021-08-30 22:10:32 +0000 ktls: Init reset tag task for cloned sessions When cloning a ktls session (which is needed when we need to switch output NICs for a NIC TLS session), we need to also init the reset task, like we do when creating a new tls session. Reviewed by: jhb Sponsored by: Netflix (cherry picked from commit 95c51fafa40d56d0a32aff857261097acc65ec92) --- sys/kern/uipc_ktls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 21e2386ac2bf..43870ab8bf4d 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -643,6 +643,7 @@ ktls_clone_session(struct ktls_session *tls) counter_u64_add(ktls_offload_active, 1); refcount_init(&tls_new->refcount, 1); + TASK_INIT(&tls_new->reset_tag_task, 0, ktls_reset_send_tag, tls_new); /* Copy fields from existing session. */ tls_new->params = tls->params; From owner-dev-commits-src-branches@freebsd.org Mon Aug 30 23:13:19 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2CD986601CF; Mon, 30 Aug 2021 23:13:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gz5hv0bZ0z3DrH; Mon, 30 Aug 2021 23:13:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C4E6B267C5; Mon, 30 Aug 2021 23:13:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17UNDIxh076626; Mon, 30 Aug 2021 23:13:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UNDIFV076625; Mon, 30 Aug 2021 23:13:18 GMT (envelope-from git) Date: Mon, 30 Aug 2021 23:13:18 GMT Message-Id: <202108302313.17UNDIFV076625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: aae23f64c28b - stable/13 - ktls: Fix accounting for TLS 1.0 empty fragments. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: aae23f64c28b6654e35de56c4a2e056162ce20e4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 23:13:19 -0000 The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=aae23f64c28b6654e35de56c4a2e056162ce20e4 commit aae23f64c28b6654e35de56c4a2e056162ce20e4 Author: John Baldwin AuthorDate: 2021-08-16 17:42:46 +0000 Commit: John Baldwin CommitDate: 2021-08-30 22:13:37 +0000 ktls: Fix accounting for TLS 1.0 empty fragments. TLS 1.0 empty fragment mbufs have no payload and thus m_epg_npgs is zero. However, these mbufs need to occupy a "unit" of space for the purposes of M_NOTREADY tracking similar to regular mbufs. Previously this was done for the page count returned from ktls_frame() and passed to ktls_enqueue() as well as the page count passed to pru_ready(). However, sbready() and mb_free_notready() only use m_epg_nrdy to determine the number of "units" of space in an M_EXT mbuf, so when a TLS 1.0 fragment was marked ready it would mark one unit of the next mbuf in the socket buffer as ready as well. To fix, set m_epg_nrdy to 1 for empty fragments. This actually simplifies the code as now only ktls_frame() has to handle TLS 1.0 fragments explicitly and the rest of the KTLS functions can just use m_epg_nrdy. Reviewed by: gallatin Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31536 (cherry picked from commit d16cb228c1a62a9641ffb2f0bfcacc3bffec5db1) --- sys/kern/uipc_ktls.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 43870ab8bf4d..2605fb5b70b7 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -1579,12 +1579,12 @@ ktls_frame(struct mbuf *top, struct ktls_session *tls, int *enq_cnt, */ if (tls->mode == TCP_TLS_MODE_SW) { m->m_flags |= M_NOTREADY; - m->m_epg_nrdy = m->m_epg_npgs; if (__predict_false(tls_len == 0)) { /* TLS 1.0 empty fragment. */ - *enq_cnt += 1; + m->m_epg_nrdy = 1; } else - *enq_cnt += m->m_epg_npgs; + m->m_epg_nrdy = m->m_epg_npgs; + *enq_cnt += m->m_epg_nrdy; } } } @@ -2049,11 +2049,7 @@ retry_page: dst_iov[i].iov_len = len; } - if (__predict_false(m->m_epg_npgs == 0)) { - /* TLS 1.0 empty fragment. */ - npages++; - } else - npages += i; + npages += m->m_epg_nrdy; error = (*tls->sw_encrypt)(tls, (const struct tls_record_layer *)m->m_epg_hdr, From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 06:13:06 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81123665F91; Tue, 31 Aug 2021 06:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzH1G1m9qz3HRJ; Tue, 31 Aug 2021 06:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6D6B4153; Tue, 31 Aug 2021 06:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17V6D5LE036592; Tue, 31 Aug 2021 06:13:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V6D5rJ036591; Tue, 31 Aug 2021 06:13:05 GMT (envelope-from git) Date: Tue, 31 Aug 2021 06:13:05 GMT Message-Id: <202108310613.17V6D5rJ036591@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 1c327515a925 - stable/13 - sound(4): Fix some common typos in comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1c327515a925ca879d41de1a1ea16909f782c8b0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 06:13:06 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1c327515a925ca879d41de1a1ea16909f782c8b0 commit 1c327515a925ca879d41de1a1ea16909f782c8b0 Author: Gordon Bergling AuthorDate: 2021-08-26 15:15:55 +0000 Commit: Gordon Bergling CommitDate: 2021-08-31 06:12:40 +0000 sound(4): Fix some common typos in comments - s/doens't/doesn't/ - s/apropriate/appropriate/ - s/intepretation/interpretation/ (cherry picked from commit 58d868c88d21b46d3d6d40a2920e7ba8996723b8) --- sys/dev/sound/midi/sequencer.c | 4 ++-- sys/dev/sound/pcm/feeder_chain.c | 2 +- sys/dev/sound/pcm/feeder_matrix.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c index ed8ba6dde699..6c80b3ec261c 100644 --- a/sys/dev/sound/midi/sequencer.c +++ b/sys/dev/sound/midi/sequencer.c @@ -894,7 +894,7 @@ mseq_read(struct cdev *i_dev, struct uio *uio, int ioflag) /* * I think the semantics are to return as soon * as possible. - * Second thought, it doens't seem like midimoutain + * Second thought, it doesn't seem like midimoutain * expects that at all. * TODO: Look up in some sort of spec */ @@ -1441,7 +1441,7 @@ mseq_poll(struct cdev *i_dev, int events, struct thread *td) ret = 0; - /* Look up the apropriate queue and select it. */ + /* Look up the appropriate queue and select it. */ if ((events & (POLLOUT | POLLWRNORM)) != 0) { /* Start playing. */ scp->playing = 1; diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c index 73922ab55396..b2d48abd71d1 100644 --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -652,7 +652,7 @@ feeder_chain(struct pcm_channel *c) } /* - * The 'hardware' possibly have different intepretation of channel + * The 'hardware' possibly have different interpretation of channel * matrixing, so get it first ..... */ hwmatrix = CHANNEL_GETMATRIX(c->methods, c->devinfo, hwfmt); diff --git a/sys/dev/sound/pcm/feeder_matrix.c b/sys/dev/sound/pcm/feeder_matrix.c index 7d965860f886..c6a65113574a 100644 --- a/sys/dev/sound/pcm/feeder_matrix.c +++ b/sys/dev/sound/pcm/feeder_matrix.c @@ -699,7 +699,7 @@ feeder_matrix_compare(struct pcmchan_matrix *m_in, struct pcmchan_matrix *m_out) } /* - * XXX 4front intepretation of "surround" is ambigous and sort of + * XXX 4front interpretation of "surround" is ambigous and sort of * conflicting with "rear"/"back". Map it to "side". Well.. * who cares? */ From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 06:13:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CEE61666203; Tue, 31 Aug 2021 06:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzH1C5DYWz3HR5; Tue, 31 Aug 2021 06:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A2D14812; Tue, 31 Aug 2021 06:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17V6D3Mw036544; Tue, 31 Aug 2021 06:13:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V6D3Cr036543; Tue, 31 Aug 2021 06:13:03 GMT (envelope-from git) Date: Tue, 31 Aug 2021 06:13:03 GMT Message-Id: <202108310613.17V6D3Cr036543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 82c70f2f1697 - stable/13 - inet6(4): Fix a few common typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 82c70f2f1697a1b6ea611994ef837eeaaa27357c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 06:13:03 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=82c70f2f1697a1b6ea611994ef837eeaaa27357c commit 82c70f2f1697a1b6ea611994ef837eeaaa27357c Author: Gordon Bergling AuthorDate: 2021-08-28 16:53:59 +0000 Commit: Gordon Bergling CommitDate: 2021-08-31 06:11:24 +0000 inet6(4): Fix a few common typos in source code comments - s/reshedule/reschedule/ (cherry picked from commit 10e0082fff4ec9392db2763ce3b095bc010526df) --- sys/netinet6/nd6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 8dc5495d3ad9..465426d719b0 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -666,7 +666,7 @@ nd6_is_stale(struct llentry *lle, long *pdelay, int *do_switch) /* * V_nd6_delay still not passed since the first * hit in STALE state. - * Reshedule timer and return. + * Reschedule timer and return. */ *pdelay = (long)(nd_delay - delay) * hz; return (1); @@ -856,7 +856,7 @@ nd6_llinfo_timer(void *arg) if (nd6_is_stale(ln, &delay, &do_switch) != 0) { /* * No packet has used this entry and GC timeout - * has not been passed. Reshedule timer and + * has not been passed. Reschedule timer and * return. */ nd6_llinfo_settimer_locked(ln, delay); From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 06:13:05 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02033665BB7; Tue, 31 Aug 2021 06:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzH1D6S90z3HTd; Tue, 31 Aug 2021 06:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C23C640EE; Tue, 31 Aug 2021 06:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17V6D4nI036568; Tue, 31 Aug 2021 06:13:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V6D4kD036567; Tue, 31 Aug 2021 06:13:04 GMT (envelope-from git) Date: Tue, 31 Aug 2021 06:13:04 GMT Message-Id: <202108310613.17V6D4kD036567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 64986351d374 - stable/13 - inet(3): Fix a few common typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 64986351d374ddd7596877341c1d9d35ccb391d9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 06:13:05 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=64986351d374ddd7596877341c1d9d35ccb391d9 commit 64986351d374ddd7596877341c1d9d35ccb391d9 Author: Gordon Bergling AuthorDate: 2021-08-28 16:53:02 +0000 Commit: Gordon Bergling CommitDate: 2021-08-31 06:11:48 +0000 inet(3): Fix a few common typos in source code comments - s/funtion/function/ (cherry picked from commit 586c9dc37470a2b862b50c041d70229026dd530a) --- sys/netinet/in_pcbgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/in_pcbgroup.c b/sys/netinet/in_pcbgroup.c index cade2574db5d..11ed75be1198 100644 --- a/sys/netinet/in_pcbgroup.c +++ b/sys/netinet/in_pcbgroup.c @@ -186,7 +186,7 @@ in_pcbgroup_init(struct inpcbinfo *pcbinfo, u_int hashfields, * XXXRW: The notion of a bucket to CPU mapping is common at * both pcbgroup and RSS layers -- does that mean that we * should migrate it all from RSS to here, and just leave RSS - * responsible only for providing hashing and mapping funtions? + * responsible only for providing hashing and mapping functions? */ #ifdef RSS pcbgroup->ipg_cpu = rss_getcpu(pgn); From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 06:13:32 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A20466629A; Tue, 31 Aug 2021 06:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzH1m3Glyz3HYl; Tue, 31 Aug 2021 06:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C3EC4793; Tue, 31 Aug 2021 06:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17V6DW3S036747; Tue, 31 Aug 2021 06:13:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V6DW3o036746; Tue, 31 Aug 2021 06:13:32 GMT (envelope-from git) Date: Tue, 31 Aug 2021 06:13:32 GMT Message-Id: <202108310613.17V6DW3o036746@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: dbb74dd891e5 - stable/13 - Fix some common typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dbb74dd891e55d945cef3b31b5f788a30cbbd820 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 06:13:32 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=dbb74dd891e55d945cef3b31b5f788a30cbbd820 commit dbb74dd891e55d945cef3b31b5f788a30cbbd820 Author: Gordon Bergling AuthorDate: 2021-08-28 16:57:23 +0000 Commit: Gordon Bergling CommitDate: 2021-08-31 06:13:15 +0000 Fix some common typos in source code comments - s/priviledged/privileged/ - s/funtion/function/ - s/doens't/doesn't/ - s/sychronization/synchronization/ (cherry picked from commit 5bdf58e196096993758b3e50291db17104025b65) --- sys/arm/arm/trap-v6.c | 4 ++-- sys/dev/cxgbe/cudbg/fastlz_api.c | 2 +- sys/dev/mii/lxtphy.c | 2 +- sys/dev/oce/oce_mbox.c | 2 +- sys/dev/qlnx/qlnxe/ecore.h | 2 +- sys/dev/rtsx/rtsx.c | 2 +- sys/dev/sfxge/sfxge.c | 2 +- sys/geom/journal/g_journal.c | 2 +- sys/i386/i386/perfmon.c | 2 +- usr.bin/tip/tip/tip.h | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/arm/arm/trap-v6.c b/sys/arm/arm/trap-v6.c index cd141376d381..7bd5780af338 100644 --- a/sys/arm/arm/trap-v6.c +++ b/sys/arm/arm/trap-v6.c @@ -114,7 +114,7 @@ struct abort { * for cache operations working on virtual addresses. For now, we will * consider this abort as fatal. In fact, no cache maintenance on * not mapped virtual addresses should be called. As cache maintenance - * operation (except DMB, DSB, and Flush Prefetch Buffer) are priviledged, + * operation (except DMB, DSB, and Flush Prefetch Buffer) are privileged, * the abort is fatal for user mode as well for now. (This is good place to * note that cache maintenance on virtual address fill TLB.) * Acces Bit (L1 & L2): @@ -654,7 +654,7 @@ abort_align(struct trapframe *tf, u_int idx, u_int fsr, u_int far, * According to manual, FAULT_ICACHE is translation fault during cache * maintenance operation. In fact, no cache maintenance operation on * not mapped virtual addresses should be called. As cache maintenance - * operation (except DMB, DSB, and Flush Prefetch Buffer) are priviledged, + * operation (except DMB, DSB, and Flush Prefetch Buffer) are privileged, * the abort is concider as fatal for now. However, all the matter with * cache maintenance operation on virtual addresses could be really complex * and fuzzy in SMP case, so maybe in future standard fault mechanism diff --git a/sys/dev/cxgbe/cudbg/fastlz_api.c b/sys/dev/cxgbe/cudbg/fastlz_api.c index a513557ad352..7a8131f6da3e 100644 --- a/sys/dev/cxgbe/cudbg/fastlz_api.c +++ b/sys/dev/cxgbe/cudbg/fastlz_api.c @@ -442,7 +442,7 @@ int decompress_buffer(struct cudbg_buffer *pc_buff, remaining = chunk_size; checksum = 1L; for (;;) { - /* Write a funtion for this */ + /* Write a function for this */ r = (CUDBG_BLOCK_SIZE < remaining) ? CUDBG_BLOCK_SIZE : remaining; bytes_read = diff --git a/sys/dev/mii/lxtphy.c b/sys/dev/mii/lxtphy.c index 699c1d6f83b6..31900cc5a34b 100644 --- a/sys/dev/mii/lxtphy.c +++ b/sys/dev/mii/lxtphy.c @@ -203,7 +203,7 @@ lxtphy_status(struct mii_softc *sc) /* * Get link status from the CSR; we need to read the CSR * for media type anyhow, and the link status in the CSR - * doens't latch, so fewer register reads are required. + * doesn't latch, so fewer register reads are required. */ csr = PHY_READ(sc, MII_LXTPHY_CSR); if (csr & CSR_LINK) diff --git a/sys/dev/oce/oce_mbox.c b/sys/dev/oce/oce_mbox.c index 7470d7a13b07..321775c13d1e 100644 --- a/sys/dev/oce/oce_mbox.c +++ b/sys/dev/oce/oce_mbox.c @@ -118,7 +118,7 @@ oce_reset_fun(POCE_SOFTC sc) } /** - * @brief This funtions tells firmware we are + * @brief This functions tells firmware we are * done with commands. * @param sc software handle to the device * @returns 0 on success, ETIMEDOUT on failure diff --git a/sys/dev/qlnx/qlnxe/ecore.h b/sys/dev/qlnx/qlnxe/ecore.h index 33af8f124658..32a6b98156c5 100644 --- a/sys/dev/qlnx/qlnxe/ecore.h +++ b/sys/dev/qlnx/qlnxe/ecore.h @@ -702,7 +702,7 @@ struct ecore_hwfn { struct ecore_ptt *p_main_ptt; struct ecore_ptt *p_dpc_ptt; - /* PTP will be used only by the leading funtion. + /* PTP will be used only by the leading function. * Usage of all PTP-apis should be synchronized as result. */ struct ecore_ptt *p_ptp_ptt; diff --git a/sys/dev/rtsx/rtsx.c b/sys/dev/rtsx/rtsx.c index 4400fbef5412..5f6aa04835ef 100644 --- a/sys/dev/rtsx/rtsx.c +++ b/sys/dev/rtsx/rtsx.c @@ -624,7 +624,7 @@ rtsx_handle_card_present(struct rtsx_softc *sc) } /* - * This funtion is called at startup. + * This function is called at startup. */ static void rtsx_card_task(void *arg, int pending __unused) diff --git a/sys/dev/sfxge/sfxge.c b/sys/dev/sfxge/sfxge.c index 866f940a7b29..62daadf35ae5 100644 --- a/sys/dev/sfxge/sfxge.c +++ b/sys/dev/sfxge/sfxge.c @@ -984,7 +984,7 @@ sfxge_vpd_init(struct sfxge_softc *sc) if ((rc = efx_vpd_size(sc->enp, &sc->vpd_size)) != 0) { /* - * Unpriviledged functions deny VPD access. + * Unprivileged functions deny VPD access. * Simply skip VPD in this case. */ if (rc == EACCES) diff --git a/sys/geom/journal/g_journal.c b/sys/geom/journal/g_journal.c index 7c8c60183bff..97516ed293e7 100644 --- a/sys/geom/journal/g_journal.c +++ b/sys/geom/journal/g_journal.c @@ -256,7 +256,7 @@ struct meminfo { #endif /* - * We use our own malloc/realloc/free funtions, so we can collect statistics + * We use our own malloc/realloc/free functions, so we can collect statistics * and force journal switch when we're running out of cache. */ static void * diff --git a/sys/i386/i386/perfmon.c b/sys/i386/i386/perfmon.c index 3f35b59faa80..cb8c0acfc0dc 100644 --- a/sys/i386/i386/perfmon.c +++ b/sys/i386/i386/perfmon.c @@ -62,7 +62,7 @@ static d_open_t perfmon_open; static d_ioctl_t perfmon_ioctl; /* - * XXX perfmon_init_dev(void *) is a split from the perfmon_init() funtion. + * XXX perfmon_init_dev(void *) is a split from the perfmon_init() function. * This solves a problem for DEVFS users. It loads the "perfmon" driver after * the DEVFS subsystem has been kicked into action. The SI_ORDER_ANY is to * assure that it is the most lowest priority task which, guarantees the diff --git a/usr.bin/tip/tip/tip.h b/usr.bin/tip/tip/tip.h index ab6b2c4cd9a0..51178cb08365 100644 --- a/usr.bin/tip/tip/tip.h +++ b/usr.bin/tip/tip/tip.h @@ -249,7 +249,7 @@ EXTERN int gotdefterm; EXTERN FILE *fscript; /* FILE for scripting */ EXTERN int fildes[2]; /* file transfer synchronization channel */ -EXTERN int repdes[2]; /* read process sychronization channel */ +EXTERN int repdes[2]; /* read process synchronization channel */ EXTERN int FD; /* open file descriptor to remote host */ EXTERN int AC; /* open file descriptor to dialer (v831 only) */ EXTERN int vflag; /* print .tiprc initialization sequence */ From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 06:15:04 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB78766630D; Tue, 31 Aug 2021 06:15:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzH3X5spKz3J9G; Tue, 31 Aug 2021 06:15:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B172A4442; Tue, 31 Aug 2021 06:15:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17V6F4dC036966; Tue, 31 Aug 2021 06:15:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V6F4Jr036965; Tue, 31 Aug 2021 06:15:04 GMT (envelope-from git) Date: Tue, 31 Aug 2021 06:15:04 GMT Message-Id: <202108310615.17V6F4Jr036965@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: a007d9f143b7 - stable/12 - inet6(4): Fix a few common typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a007d9f143b7d9cde898a5e0a21d253c03296034 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 06:15:04 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a007d9f143b7d9cde898a5e0a21d253c03296034 commit a007d9f143b7d9cde898a5e0a21d253c03296034 Author: Gordon Bergling AuthorDate: 2021-08-28 16:53:59 +0000 Commit: Gordon Bergling CommitDate: 2021-08-31 06:14:47 +0000 inet6(4): Fix a few common typos in source code comments - s/reshedule/reschedule/ (cherry picked from commit 10e0082fff4ec9392db2763ce3b095bc010526df) --- sys/netinet6/nd6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 0a654fbd06e6..682a635ce5c2 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -656,7 +656,7 @@ nd6_is_stale(struct llentry *lle, long *pdelay, int *do_switch) /* * V_nd6_delay still not passed since the first * hit in STALE state. - * Reshedule timer and return. + * Reschedule timer and return. */ *pdelay = (long)(nd_delay - delay) * hz; return (1); @@ -828,7 +828,7 @@ nd6_llinfo_timer(void *arg) /* * No packet has used this entry and GC timeout - * has not been passed. Reshedule timer and + * has not been passed. Reschedule timer and * return. */ nd6_llinfo_settimer_locked(ln, delay); From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 06:15:33 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B61FB66640A; Tue, 31 Aug 2021 06:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzH454rs6z3JT4; Tue, 31 Aug 2021 06:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8FADD4816; Tue, 31 Aug 2021 06:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17V6FXiK037113; Tue, 31 Aug 2021 06:15:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V6FXLL037112; Tue, 31 Aug 2021 06:15:33 GMT (envelope-from git) Date: Tue, 31 Aug 2021 06:15:33 GMT Message-Id: <202108310615.17V6FXLL037112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 8849dfe3a585 - stable/12 - inet(3): Fix a few common typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8849dfe3a5859f2f1085b0dd7f3566e5d390f6c7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 06:15:33 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8849dfe3a5859f2f1085b0dd7f3566e5d390f6c7 commit 8849dfe3a5859f2f1085b0dd7f3566e5d390f6c7 Author: Gordon Bergling AuthorDate: 2021-08-28 16:53:02 +0000 Commit: Gordon Bergling CommitDate: 2021-08-31 06:15:18 +0000 inet(3): Fix a few common typos in source code comments - s/funtion/function/ (cherry picked from commit 586c9dc37470a2b862b50c041d70229026dd530a) --- sys/netinet/in_pcbgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/in_pcbgroup.c b/sys/netinet/in_pcbgroup.c index cade2574db5d..11ed75be1198 100644 --- a/sys/netinet/in_pcbgroup.c +++ b/sys/netinet/in_pcbgroup.c @@ -186,7 +186,7 @@ in_pcbgroup_init(struct inpcbinfo *pcbinfo, u_int hashfields, * XXXRW: The notion of a bucket to CPU mapping is common at * both pcbgroup and RSS layers -- does that mean that we * should migrate it all from RSS to here, and just leave RSS - * responsible only for providing hashing and mapping funtions? + * responsible only for providing hashing and mapping functions? */ #ifdef RSS pcbgroup->ipg_cpu = rss_getcpu(pgn); From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 06:16:05 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A35F9666590; Tue, 31 Aug 2021 06:16:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzH4j3xW0z3JPq; Tue, 31 Aug 2021 06:16:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EFB64443; Tue, 31 Aug 2021 06:16:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17V6G5QF037258; Tue, 31 Aug 2021 06:16:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V6G5Eq037257; Tue, 31 Aug 2021 06:16:05 GMT (envelope-from git) Date: Tue, 31 Aug 2021 06:16:05 GMT Message-Id: <202108310616.17V6G5Eq037257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 15a46b046db5 - stable/12 - sound(4): Fix some common typos in comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 15a46b046db50ab773cce73fbf884283259a6fd5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 06:16:05 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=15a46b046db50ab773cce73fbf884283259a6fd5 commit 15a46b046db50ab773cce73fbf884283259a6fd5 Author: Gordon Bergling AuthorDate: 2021-08-26 15:15:55 +0000 Commit: Gordon Bergling CommitDate: 2021-08-31 06:15:50 +0000 sound(4): Fix some common typos in comments - s/doens't/doesn't/ - s/apropriate/appropriate/ - s/intepretation/interpretation/ (cherry picked from commit 58d868c88d21b46d3d6d40a2920e7ba8996723b8) --- sys/dev/sound/midi/sequencer.c | 4 ++-- sys/dev/sound/pcm/feeder_chain.c | 2 +- sys/dev/sound/pcm/feeder_matrix.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c index 03b22cd10c41..0dbdf3c6d4b6 100644 --- a/sys/dev/sound/midi/sequencer.c +++ b/sys/dev/sound/midi/sequencer.c @@ -894,7 +894,7 @@ mseq_read(struct cdev *i_dev, struct uio *uio, int ioflag) /* * I think the semantics are to return as soon * as possible. - * Second thought, it doens't seem like midimoutain + * Second thought, it doesn't seem like midimoutain * expects that at all. * TODO: Look up in some sort of spec */ @@ -1444,7 +1444,7 @@ mseq_poll(struct cdev *i_dev, int events, struct thread *td) ret = 0; - /* Look up the apropriate queue and select it. */ + /* Look up the appropriate queue and select it. */ if ((events & (POLLOUT | POLLWRNORM)) != 0) { /* Start playing. */ scp->playing = 1; diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c index 73922ab55396..b2d48abd71d1 100644 --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -652,7 +652,7 @@ feeder_chain(struct pcm_channel *c) } /* - * The 'hardware' possibly have different intepretation of channel + * The 'hardware' possibly have different interpretation of channel * matrixing, so get it first ..... */ hwmatrix = CHANNEL_GETMATRIX(c->methods, c->devinfo, hwfmt); diff --git a/sys/dev/sound/pcm/feeder_matrix.c b/sys/dev/sound/pcm/feeder_matrix.c index 5e2bdbcb8471..ecb3c55a4825 100644 --- a/sys/dev/sound/pcm/feeder_matrix.c +++ b/sys/dev/sound/pcm/feeder_matrix.c @@ -700,7 +700,7 @@ feeder_matrix_compare(struct pcmchan_matrix *m_in, struct pcmchan_matrix *m_out) } /* - * XXX 4front intepretation of "surround" is ambigous and sort of + * XXX 4front interpretation of "surround" is ambigous and sort of * conflicting with "rear"/"back". Map it to "side". Well.. * who cares? */ From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 06:47:50 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FD53666F99; Tue, 31 Aug 2021 06:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzHnL2jJfz3lCV; Tue, 31 Aug 2021 06:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4600B4CB8; Tue, 31 Aug 2021 06:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17V6loxm077677; Tue, 31 Aug 2021 06:47:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V6lot0077676; Tue, 31 Aug 2021 06:47:50 GMT (envelope-from git) Date: Tue, 31 Aug 2021 06:47:50 GMT Message-Id: <202108310647.17V6lot0077676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 6f89edcd836e - stable/13 - pmap_extract.9: Fix pmap_extract_and_hold()'s function type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6f89edcd836e613d1be1ec28ec5e0108f45b6a62 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 06:47:50 -0000 The branch stable/13 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=6f89edcd836e613d1be1ec28ec5e0108f45b6a62 commit 6f89edcd836e613d1be1ec28ec5e0108f45b6a62 Author: Ka Ho Ng AuthorDate: 2021-08-27 13:42:49 +0000 Commit: Ka Ho Ng CommitDate: 2021-08-31 06:47:24 +0000 pmap_extract.9: Fix pmap_extract_and_hold()'s function type pmap_extract_and_hold() returns a vm_page_t instead of a physical page address. Sponsored by: The FreeBSD Foundation Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D31691 (cherry picked from commit 6e1df1d14c6dfcc209c1416ec0832e4d08191c72) --- share/man/man9/pmap_extract.9 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/man/man9/pmap_extract.9 b/share/man/man9/pmap_extract.9 index d2154ebe8a0b..77f3b47ec51e 100644 --- a/share/man/man9/pmap_extract.9 +++ b/share/man/man9/pmap_extract.9 @@ -38,7 +38,7 @@ .In vm/pmap.h .Ft vm_paddr_t .Fn pmap_extract "pmap_t pmap" "vm_offset_t va" -.Ft vm_paddr_t +.Ft vm_page_t .Fn pmap_extract_and_hold "pmap_t pmap" "vm_offset_t va" "vm_prot_t prot" .Sh DESCRIPTION The @@ -73,7 +73,9 @@ will be returned. .Pp The .Fn pmap_extract_and_hold -function will return the physical page address associated with the +function will return the +.Ft vm_page_t +associated with the virtual address .Fa va inside the physical map From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 11:51:45 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 171BB66D10C; Tue, 31 Aug 2021 11:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzQX06SZ3z4pKZ; Tue, 31 Aug 2021 11:51:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B157311757; Tue, 31 Aug 2021 11:51:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VBpipG096217; Tue, 31 Aug 2021 11:51:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VBpiRY096216; Tue, 31 Aug 2021 11:51:44 GMT (envelope-from git) Date: Tue, 31 Aug 2021 11:51:44 GMT Message-Id: <202108311151.17VBpiRY096216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: b8110a4d7302 - stable/13 - pfctl: fix killing states by ID MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b8110a4d7302069d8ecbbca3d0f64043136e4db3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 11:51:45 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b8110a4d7302069d8ecbbca3d0f64043136e4db3 commit b8110a4d7302069d8ecbbca3d0f64043136e4db3 Author: Kristof Provost AuthorDate: 2021-08-24 10:24:28 +0000 Commit: Kristof Provost CommitDate: 2021-08-31 07:47:20 +0000 pfctl: fix killing states by ID Since the conversion to the new DIOCKILLSTATESNV the kernel no longer exists the id and creatorid to be big-endian. As a result killing states by id (i.e. `pfctl -k id -k 12345`) no longer worked. Reported by: Özkan KIRIK MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit e59eff9ad3285838730acf48f6d066cec0e53114) --- sbin/pfctl/pfctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 6c689edf7c43..ad2cfd4e63bc 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -908,7 +908,6 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) if ((sscanf(state_kill[1], "%jx/%x", &kill.cmp.id, &kill.cmp.creatorid)) == 2) - HTONL(kill.cmp.creatorid); else if ((sscanf(state_kill[1], "%jx", &kill.cmp.id)) == 1) { kill.cmp.creatorid = 0; } else { @@ -920,7 +919,6 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) usage(); } - kill.cmp.id = htobe64(kill.cmp.id); if (pfctl_kill_states(dev, &kill, &killed)) err(1, "DIOCKILLSTATES"); From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 11:51:47 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AC3466CECD; Tue, 31 Aug 2021 11:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzQX31L1zz4pW6; Tue, 31 Aug 2021 11:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0110C111DD; Tue, 31 Aug 2021 11:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VBpkRd096380; Tue, 31 Aug 2021 11:51:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VBpkJf096374; Tue, 31 Aug 2021 11:51:46 GMT (envelope-from git) Date: Tue, 31 Aug 2021 11:51:46 GMT Message-Id: <202108311151.17VBpkJf096374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: c71646ccd7e2 - stable/12 - pf tests: test killing states by ID MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c71646ccd7e23598d54bbcc72dd63e92e2dad053 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 11:51:47 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c71646ccd7e23598d54bbcc72dd63e92e2dad053 commit c71646ccd7e23598d54bbcc72dd63e92e2dad053 Author: Kristof Provost AuthorDate: 2021-08-24 10:36:57 +0000 Commit: Kristof Provost CommitDate: 2021-08-31 07:47:54 +0000 pf tests: test killing states by ID MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit bbf832f34479d19bff0fa8dc43b48ab5553cc85e) --- tests/sys/netpfil/pf/killstate.sh | 65 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/tests/sys/netpfil/pf/killstate.sh b/tests/sys/netpfil/pf/killstate.sh index adf229945911..de9469b76cbd 100644 --- a/tests/sys/netpfil/pf/killstate.sh +++ b/tests/sys/netpfil/pf/killstate.sh @@ -447,6 +447,70 @@ interface_cleanup() pft_cleanup } +atf_test_case "id" "cleanup" +id_head() +{ + atf_set descr 'Test killing states by id' + atf_set require.user root + atf_set require.progs scapy +} + +id_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + jexec alcatraz pfctl -e + + pft_set_rules alcatraz "block all" \ + "pass in proto tcp" \ + "pass in proto icmp" + + # Sanity check & establish state + # Note: use pft_ping so we always use the same ID, so pf considers all + # echo requests part of the same flow. + atf_check -s exit:0 -o ignore ${common_dir}/pft_ping.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --replyif ${epair}a + + # Change rules to now deny the ICMP traffic + pft_set_rules noflush alcatraz "block all" + + # Established state means we can still ping alcatraz + atf_check -s exit:0 -o ignore ${common_dir}/pft_ping.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --replyif ${epair}a + + # Get the state ID + id=$(jexec alcatraz pfctl -ss -vvv | grep -A 3 icmp | + grep -A 3 192.0.2.2 | awk '/id:/ { printf("%s/%s", $2, $4); }') + + # Kill the wrong ID + jexec alcatraz pfctl -k id -k 1 + atf_check -s exit:0 -o ignore ${common_dir}/pft_ping.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --replyif ${epair}a + + # Kill the correct ID + jexec alcatraz pfctl -k id -k ${id} + atf_check -s exit:1 -o ignore ${common_dir}/pft_ping.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --replyif ${epair}a +} + +id_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4" @@ -455,4 +519,5 @@ atf_init_test_cases() atf_add_test_case "gateway" atf_add_test_case "match" atf_add_test_case "interface" + atf_add_test_case "id" } From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 11:51:47 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50A0566D287; Tue, 31 Aug 2021 11:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzQX30ww7z4pbm; Tue, 31 Aug 2021 11:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED5B011759; Tue, 31 Aug 2021 11:51:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VBpkpl096381; Tue, 31 Aug 2021 11:51:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VBpk51096379; Tue, 31 Aug 2021 11:51:46 GMT (envelope-from git) Date: Tue, 31 Aug 2021 11:51:46 GMT Message-Id: <202108311151.17VBpk51096379@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: d4c7ab9b1d00 - stable/13 - pfctl: build fix MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d4c7ab9b1d00075cad1e7edc39ae0ad941ef1e88 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 11:51:47 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d4c7ab9b1d00075cad1e7edc39ae0ad941ef1e88 commit d4c7ab9b1d00075cad1e7edc39ae0ad941ef1e88 Author: Kristof Provost AuthorDate: 2021-08-24 11:21:05 +0000 Commit: Kristof Provost CommitDate: 2021-08-31 07:47:47 +0000 pfctl: build fix Fix the build issue introduced in e59eff9ad328 (pfctl: fix killing states by ID) MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 9ce320820e6d760df11a88de11fbae024c18d23c) --- sbin/pfctl/pfctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index ad2cfd4e63bc..016075058b21 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -907,7 +907,8 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) kill.kill_match = true; if ((sscanf(state_kill[1], "%jx/%x", - &kill.cmp.id, &kill.cmp.creatorid)) == 2) + &kill.cmp.id, &kill.cmp.creatorid)) == 2) { + } else if ((sscanf(state_kill[1], "%jx", &kill.cmp.id)) == 1) { kill.cmp.creatorid = 0; } else { From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 11:51:46 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 267F266D111; Tue, 31 Aug 2021 11:51:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzQX16hpdz4pdW; Tue, 31 Aug 2021 11:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBB3D115A7; Tue, 31 Aug 2021 11:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VBpjOT096311; Tue, 31 Aug 2021 11:51:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VBpjDX096306; Tue, 31 Aug 2021 11:51:45 GMT (envelope-from git) Date: Tue, 31 Aug 2021 11:51:45 GMT Message-Id: <202108311151.17VBpjDX096306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 7b4013ac3220 - stable/12 - pfctl: fix killing states by ID MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7b4013ac3220327944cd96027dea620bf93ce228 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 11:51:46 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7b4013ac3220327944cd96027dea620bf93ce228 commit 7b4013ac3220327944cd96027dea620bf93ce228 Author: Kristof Provost AuthorDate: 2021-08-24 10:24:28 +0000 Commit: Kristof Provost CommitDate: 2021-08-31 07:47:43 +0000 pfctl: fix killing states by ID Since the conversion to the new DIOCKILLSTATESNV the kernel no longer exists the id and creatorid to be big-endian. As a result killing states by id (i.e. `pfctl -k id -k 12345`) no longer worked. Reported by: Özkan KIRIK MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit e59eff9ad3285838730acf48f6d066cec0e53114) --- sbin/pfctl/pfctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 6c689edf7c43..ad2cfd4e63bc 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -908,7 +908,6 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) if ((sscanf(state_kill[1], "%jx/%x", &kill.cmp.id, &kill.cmp.creatorid)) == 2) - HTONL(kill.cmp.creatorid); else if ((sscanf(state_kill[1], "%jx", &kill.cmp.id)) == 1) { kill.cmp.creatorid = 0; } else { @@ -920,7 +919,6 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) usage(); } - kill.cmp.id = htobe64(kill.cmp.id); if (pfctl_kill_states(dev, &kill, &killed)) err(1, "DIOCKILLSTATES"); From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 11:51:49 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B8F566CCDD; Tue, 31 Aug 2021 11:51:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzQX45Thyz4pYl; Tue, 31 Aug 2021 11:51:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D4D01175A; Tue, 31 Aug 2021 11:51:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VBpmXC096425; Tue, 31 Aug 2021 11:51:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VBpmmo096421; Tue, 31 Aug 2021 11:51:48 GMT (envelope-from git) Date: Tue, 31 Aug 2021 11:51:48 GMT Message-Id: <202108311151.17VBpmmo096421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: f1a8fe3aed9a - stable/12 - pfctl: build fix MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f1a8fe3aed9a513e0ab87055de1442462e7c1e9b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 11:51:49 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f1a8fe3aed9a513e0ab87055de1442462e7c1e9b commit f1a8fe3aed9a513e0ab87055de1442462e7c1e9b Author: Kristof Provost AuthorDate: 2021-08-24 11:21:05 +0000 Commit: Kristof Provost CommitDate: 2021-08-31 07:47:58 +0000 pfctl: build fix Fix the build issue introduced in e59eff9ad328 (pfctl: fix killing states by ID) MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 9ce320820e6d760df11a88de11fbae024c18d23c) --- sbin/pfctl/pfctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index ad2cfd4e63bc..016075058b21 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -907,7 +907,8 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) kill.kill_match = true; if ((sscanf(state_kill[1], "%jx/%x", - &kill.cmp.id, &kill.cmp.creatorid)) == 2) + &kill.cmp.id, &kill.cmp.creatorid)) == 2) { + } else if ((sscanf(state_kill[1], "%jx", &kill.cmp.id)) == 1) { kill.cmp.creatorid = 0; } else { From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 11:51:46 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2791366D116; Tue, 31 Aug 2021 11:51:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzQX205RBz4pYW; Tue, 31 Aug 2021 11:51:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4DE911780; Tue, 31 Aug 2021 11:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VBpj9u096328; Tue, 31 Aug 2021 11:51:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VBpjPl096327; Tue, 31 Aug 2021 11:51:45 GMT (envelope-from git) Date: Tue, 31 Aug 2021 11:51:45 GMT Message-Id: <202108311151.17VBpjPl096327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 5b7336a48931 - stable/13 - pf tests: test killing states by ID MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5b7336a48931da2d6d6cffce64ce19858cd27b80 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 11:51:46 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5b7336a48931da2d6d6cffce64ce19858cd27b80 commit 5b7336a48931da2d6d6cffce64ce19858cd27b80 Author: Kristof Provost AuthorDate: 2021-08-24 10:36:57 +0000 Commit: Kristof Provost CommitDate: 2021-08-31 07:47:27 +0000 pf tests: test killing states by ID MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit bbf832f34479d19bff0fa8dc43b48ab5553cc85e) --- tests/sys/netpfil/pf/killstate.sh | 65 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/tests/sys/netpfil/pf/killstate.sh b/tests/sys/netpfil/pf/killstate.sh index e140ee4d144d..91fa9b42c8be 100644 --- a/tests/sys/netpfil/pf/killstate.sh +++ b/tests/sys/netpfil/pf/killstate.sh @@ -519,6 +519,70 @@ interface_cleanup() pft_cleanup } +atf_test_case "id" "cleanup" +id_head() +{ + atf_set descr 'Test killing states by id' + atf_set require.user root + atf_set require.progs scapy +} + +id_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + jexec alcatraz pfctl -e + + pft_set_rules alcatraz "block all" \ + "pass in proto tcp" \ + "pass in proto icmp" + + # Sanity check & establish state + # Note: use pft_ping so we always use the same ID, so pf considers all + # echo requests part of the same flow. + atf_check -s exit:0 -o ignore ${common_dir}/pft_ping.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --replyif ${epair}a + + # Change rules to now deny the ICMP traffic + pft_set_rules noflush alcatraz "block all" + + # Established state means we can still ping alcatraz + atf_check -s exit:0 -o ignore ${common_dir}/pft_ping.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --replyif ${epair}a + + # Get the state ID + id=$(jexec alcatraz pfctl -ss -vvv | grep -A 3 icmp | + grep -A 3 192.0.2.2 | awk '/id:/ { printf("%s/%s", $2, $4); }') + + # Kill the wrong ID + jexec alcatraz pfctl -k id -k 1 + atf_check -s exit:0 -o ignore ${common_dir}/pft_ping.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --replyif ${epair}a + + # Kill the correct ID + jexec alcatraz pfctl -k id -k ${id} + atf_check -s exit:1 -o ignore ${common_dir}/pft_ping.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --replyif ${epair}a +} + +id_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4" @@ -528,4 +592,5 @@ atf_init_test_cases() atf_add_test_case "gateway" atf_add_test_case "match" atf_add_test_case "interface" + atf_add_test_case "id" } From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 13:42:55 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7070566F5AE; Tue, 31 Aug 2021 13:42:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzT0H2nz1z3txT; Tue, 31 Aug 2021 13:42:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D4CA13000; Tue, 31 Aug 2021 13:42:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VDgtQv045756; Tue, 31 Aug 2021 13:42:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VDgtp5045755; Tue, 31 Aug 2021 13:42:55 GMT (envelope-from git) Date: Tue, 31 Aug 2021 13:42:55 GMT Message-Id: <202108311342.17VDgtp5045755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d43cd27f0694 - stable/11 - Add Cirrus CI config file to support CI builds MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: d43cd27f0694cbde3b5787c0f101a0fd07e53125 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 13:42:55 -0000 The branch stable/11 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d43cd27f0694cbde3b5787c0f101a0fd07e53125 commit d43cd27f0694cbde3b5787c0f101a0fd07e53125 Author: Ed Maste AuthorDate: 2020-03-19 18:17:43 +0000 Commit: Ed Maste CommitDate: 2021-08-31 00:48:13 +0000 Add Cirrus CI config file to support CI builds Also followup commits: r346121: Cirrus-CI: pass OVMF env var to test script for upcoming changes r350302: cirrus.yml: use OVMF.fd from uefi-edk2-qemu-x86_64 package r350449: cirrus.yml: stop fetching OVMF.fd now that we're using the pkg r356867: Cirrus-CI: bump VM image to FreeBSD 12.1 Sponsored by: The FreeBSD Foundation (cherry picked from commit 9ce187bf83c0593d9639662417923f0e054c19d3) Cirrus-CI: use FreeBSD 12.2 image Direct commit to stable/12 as main has other changes here, using the llvm package to avoid building the toolchain. (cherry picked from commit 046f91f21ac619f7307a8e853f863ded4df7f322) Cirrus-CI: avoid boot smoke test on stable/12 The boot smoke test boots from a FAT filesystem (created in-memory by QEMU), but this does not work on stable/12: mountroot: waiting for device /dev/ada0s1... Mounting from msdosfs:/dev/ada0s1 failed with error 19. For now on stable/12 use Cirrus-CI as only a build test. Sponsored by: The FreeBSD Foundation (cherry picked from commit 05b9673637feedb3ef0cf51fd9b7e914b08f7554) Cirrus-CI: Add descriptive task name Previously it appeared only as "main" in places like GitHub's list of checks run as part of a pull request. MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 903526542ac2309c08c769e517ea173a9f67cdb2) "boot smoke test" dropped from task name for the MFC, because Cirrus runs a build test only on stable/12 (see 05b9673637fe for details). (cherry picked from commit 20c918af7a3de84a6fc7d840a712fc4aa4dcdb69) --- .cirrus.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 000000000000..356125f7d7b1 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,22 @@ +# $FreeBSD$ + +freebsd_instance: + image: freebsd-12-2-release-amd64 + cpu: 8 + memory: 24G + +env: + CIRRUS_CLONE_DEPTH: 1 + +task: + name: World and kernel amd64 build test + timeout_in: 90m + install_script: + - pkg install -y qemu-devel uefi-edk2-qemu-x86_64 + script: + - make -j$(sysctl -n hw.ncpu) WITHOUT_TOOLCHAIN=yes buildworld buildkernel +# FAT root fs fails on stable/12: +# Mounting from msdosfs:/dev/ada0s1 failed with error 19. +# +# test_script: +# - sh tools/boot/ci-qemu-test.sh From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 16:25:47 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A827671884; Tue, 31 Aug 2021 16:25:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzXcB743tz3NkN; Tue, 31 Aug 2021 16:25:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D0F8615282; Tue, 31 Aug 2021 16:25:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VGPk0a060116; Tue, 31 Aug 2021 16:25:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VGPkhA060115; Tue, 31 Aug 2021 16:25:46 GMT (envelope-from git) Date: Tue, 31 Aug 2021 16:25:46 GMT Message-Id: <202108311625.17VGPkhA060115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c40b21a7e2a0 - stable/11 - openssl: Fix a read buffer overrun in X509_CERT_AUX_print() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: c40b21a7e2a030434d6850c28a4217c46b33577b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 16:25:47 -0000 The branch stable/11 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c40b21a7e2a030434d6850c28a4217c46b33577b commit c40b21a7e2a030434d6850c28a4217c46b33577b Author: Matt Caswell AuthorDate: 2021-08-17 13:41:48 +0000 Commit: Ed Maste CommitDate: 2021-08-31 16:25:09 +0000 openssl: Fix a read buffer overrun in X509_CERT_AUX_print() This is a backport of commit c5dc9ab965f to 1.0.2. That commit fixed the same bug but in master/1.1.1 it is in the function X509_aux_print(). The original commit had the following description: Fix a read buffer overrun in X509_aux_print(). The ASN1_STRING_get0_data(3) manual explitely cautions the reader that the data is not necessarily NUL-terminated, and the function X509_alias_set1(3) does not sanitize the data passed into it in any way either, so we must assume the return value from X509_alias_get0(3) is merely a byte array and not necessarily a string in the sense of the C language. I found this bug while writing manual pages for X509_print_ex(3) and related functions. Theo Buehler checked my patch to fix the same bug in LibreSSL, see http://cvsweb.openbsd.org/src/lib/libcrypto/asn1/t_x509a.c#rev1.9 As an aside, note that the function still produces incomplete and misleading results when the data contains a NUL byte in the middle and that error handling is consistently absent throughout, even though the function provides an "int" return value obviously intended to be 1 for success and 0 for failure, and even though this function is called by another function that also wants to return 1 for success and 0 for failure and even does so in many of its code paths, though not in others. But let's stay focussed. Many things would be nice to have in the wide wild world, but a buffer overflow must not be allowed to remain in our backyard. CVE-2021-3712 Reviewed-by: Paul Dale --- crypto/openssl/crypto/asn1/t_x509a.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/openssl/crypto/asn1/t_x509a.c b/crypto/openssl/crypto/asn1/t_x509a.c index d1b897a469fd..b1bc9d0cd28b 100644 --- a/crypto/openssl/crypto/asn1/t_x509a.c +++ b/crypto/openssl/crypto/asn1/t_x509a.c @@ -104,7 +104,8 @@ int X509_CERT_AUX_print(BIO *out, X509_CERT_AUX *aux, int indent) } else BIO_printf(out, "%*sNo Rejected Uses.\n", indent, ""); if (aux->alias) - BIO_printf(out, "%*sAlias: %s\n", indent, "", aux->alias->data); + BIO_printf(out, "%*sAlias: %.*s\n", indent, "", aux->alias->length, + aux->alias->data); if (aux->keyid) { BIO_printf(out, "%*sKey Id: ", indent, ""); for (i = 0; i < aux->keyid->length; i++) From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:06:30 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD07D6730CD; Tue, 31 Aug 2021 19:06:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gzc9f5sFrz4rp6; Tue, 31 Aug 2021 19:06:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD2CF16D57; Tue, 31 Aug 2021 19:06:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ6Up9073675; Tue, 31 Aug 2021 19:06:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ6Uqm073674; Tue, 31 Aug 2021 19:06:30 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:06:30 GMT Message-Id: <202108311906.17VJ6Uqm073674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: ef314cd4bae2 - stable/13 - Fix null pointer subtraction in mergesort() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ef314cd4bae273be01eb45bae3af63680e65465c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:06:30 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ef314cd4bae273be01eb45bae3af63680e65465c commit ef314cd4bae273be01eb45bae3af63680e65465c Author: Dimitry Andric AuthorDate: 2021-08-27 17:45:43 +0000 Commit: Dimitry Andric CommitDate: 2021-08-31 19:05:43 +0000 Fix null pointer subtraction in mergesort() Clang 13 produces the following warning for this function: lib/libc/stdlib/merge.c:137:41: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction] if (!(size % ISIZE) && !(((char *)base - (char *)0) % ISIZE)) ^ ~~~~~~~~~ This is meant to check whether the size and base parameters are aligned to the size of an int, so use our __is_aligned() macro instead. Also remove the comment that indicated this "stupid subtraction" was done to pacify some ancient and unknown Cray compiler, and which has been there since the BSD 4.4 Lite Lib Sources were imported. (cherry picked from commit 4e5d32a445f90d37966cd6de571978551654e3f3) --- lib/libc/stdlib/merge.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/libc/stdlib/merge.c b/lib/libc/stdlib/merge.c index 853d6ae93fcb..7d8484ed10b9 100644 --- a/lib/libc/stdlib/merge.c +++ b/lib/libc/stdlib/merge.c @@ -129,12 +129,8 @@ mergesort(void *base, size_t nmemb, size_t size, cmp_t cmp) if (nmemb == 0) return (0); - /* - * XXX - * Stupid subtraction for the Cray. - */ iflag = 0; - if (!(size % ISIZE) && !(((char *)base - (char *)0) % ISIZE)) + if (__is_aligned(size, ISIZE) && __is_aligned(base, ISIZE)) iflag = 1; if ((list2 = malloc(nmemb * size + PSIZE)) == NULL) From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:06:31 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5F57673753; Tue, 31 Aug 2021 19:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gzc9g6C51z4rgN; Tue, 31 Aug 2021 19:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE4C41707E; Tue, 31 Aug 2021 19:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ6VsF073699; Tue, 31 Aug 2021 19:06:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ6VZw073698; Tue, 31 Aug 2021 19:06:31 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:06:31 GMT Message-Id: <202108311906.17VJ6VZw073698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: e9dbd59b309f - stable/13 - Silence more gtest warnings, now in fusefs tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e9dbd59b309fea6e49776843b1f023108de594e8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:06:32 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e9dbd59b309fea6e49776843b1f023108de594e8 commit e9dbd59b309fea6e49776843b1f023108de594e8 Author: Dimitry Andric AuthorDate: 2021-08-27 21:39:23 +0000 Commit: Dimitry Andric CommitDate: 2021-08-31 19:05:47 +0000 Silence more gtest warnings, now in fusefs tests Follow-up d396c67f26b0 by also silencing warnings about deprecated implicit copy constructors in the fusefs tests, which use googletest. Fixes: d396c67f26b0 (cherry picked from commit 5a3a8cb01ab8ef4aa16a1950b1ef804070ce1ac6) --- tests/sys/fs/fusefs/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index 832b30dc6911..c3706e940840 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -77,6 +77,8 @@ CXXWARNFLAGS.readdir.cc+= -Wno-cast-align .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80000 CXXWARNFLAGS+= -Wno-class-memaccess .endif +# Supress warnings about deprecated implicit copy constructors in gtest. +CXXWARNFLAGS+= -Wno-deprecated-copy CXXFLAGS+= -I${SRCTOP}/tests CXXFLAGS+= -I${FUSEFS} CXXFLAGS+= -I${MOUNT} From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:06:33 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F8A3673536; Tue, 31 Aug 2021 19:06:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gzc9j19Wyz4rV2; Tue, 31 Aug 2021 19:06:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 095B517400; Tue, 31 Aug 2021 19:06:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ6WVi073730; Tue, 31 Aug 2021 19:06:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ6WLk073729; Tue, 31 Aug 2021 19:06:32 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:06:32 GMT Message-Id: <202108311906.17VJ6WLk073729@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4eb23465de9d - stable/13 - Explicitly link zfsd with libspl to avoid undefined references MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4eb23465de9da2889af2df44a67fc561fab5fc1e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:06:33 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4eb23465de9da2889af2df44a67fc561fab5fc1e commit 4eb23465de9da2889af2df44a67fc561fab5fc1e Author: Dimitry Andric AuthorDate: 2021-08-28 18:23:15 +0000 Commit: Dimitry Andric CommitDate: 2021-08-31 19:05:52 +0000 Explicitly link zfsd with libspl to avoid undefined references Because lld 13.0.0 is more strict about undefined references when linking to shared libraries, it produces the following errors for zfsd: ld: error: /home/dim/obj/home/dim/src/llvm-13-update/amd64.amd64/tmp/usr/lib/libzfs_core.so: undefined reference to libspl_assertf [--no-allow-shlib-undefined] ld: error: /home/dim/obj/home/dim/src/llvm-13-update/amd64.amd64/tmp/usr/lib/libnvpair.so: undefined reference to libspl_assertf [--no-allow-shlib-undefined] ld: error: /home/dim/obj/home/dim/src/llvm-13-update/amd64.amd64/tmp/usr/lib/libavl.so: undefined reference to libspl_assertf [--no-allow-shlib-undefined] *** [zfsd.full] Error code 1 Fix this by adding libspl (where libspl_assertf lives) to zfsd's LIBADD. (cherry picked from commit 9fae476669574792d75706a5401bbdc927ab2b9a) --- cddl/usr.sbin/zfsd/Makefile.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common index c09f47e733dc..c18c796ce0ed 100644 --- a/cddl/usr.sbin/zfsd/Makefile.common +++ b/cddl/usr.sbin/zfsd/Makefile.common @@ -26,7 +26,7 @@ CFLAGS+= -I${SRCTOP}/cddl/usr.sbin # use issetugid(2) CFLAGS+= -D_MACHINE_FLOAT_H_ -DHAVE_ISSETUGID -LIBADD+= devdctl zfs zfs_core util geom bsdxml sbuf nvpair avl uutil zutil +LIBADD+= devdctl zfs zfs_core util geom bsdxml sbuf nvpair avl spl uutil zutil cscope: find ${.CURDIR} -type f -a \( -name "*.[ch]" -o -name "*.cc" \) \ From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:41 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB2E9673A03; Tue, 31 Aug 2021 19:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFK30GHz4shj; Tue, 31 Aug 2021 19:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 356071740C; Tue, 31 Aug 2021 19:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9fF4074097; Tue, 31 Aug 2021 19:09:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9fjp074096; Tue, 31 Aug 2021 19:09:41 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:41 GMT Message-Id: <202108311909.17VJ9fjp074096@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 90303162fbc5 - stable/13 - arm64: Use page_to_pvh() when the vm_page_t is known MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 90303162fbc59f89089b96b7d8b04460edc5ba97 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:41 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=90303162fbc59f89089b96b7d8b04460edc5ba97 commit 90303162fbc59f89089b96b7d8b04460edc5ba97 Author: Alan Cox AuthorDate: 2021-06-21 07:45:21 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:22 +0000 arm64: Use page_to_pvh() when the vm_page_t is known When support for a sparse pv_table was added, the implementation of pa_to_pvh() changed from a simple constant-time calculation to iterating over the array vm_phys_segs[]. To mitigate this issue, an alternative function, page_to_pvh(), was introduced that still runs in constant time but requires the vm_page_t to be known. However, three cases where the vm_page_t is known were not converted to page_to_pvh(). This change converts those three cases. Reviewed by: kib, markj (cherry picked from commit 6f6a166eaf5e59dedb761ea6152417433a841e3b) --- sys/arm64/arm64/pmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 343a3d69ddee..8670056e81f5 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -3495,7 +3495,7 @@ pmap_pv_promote_l2(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, va = va & ~L2_OFFSET; pv = pmap_pvh_remove(&m->md, pmap, va); KASSERT(pv != NULL, ("pmap_pv_promote_l2: pv not found")); - pvh = pa_to_pvh(pa); + pvh = page_to_pvh(m); TAILQ_INSERT_TAIL(&pvh->pv_list, pv, pv_next); pvh->pv_gen++; /* Free the remaining NPTEPG - 1 pv entries. */ @@ -4098,7 +4098,7 @@ havel3: if ((om->a.flags & PGA_WRITEABLE) != 0 && TAILQ_EMPTY(&om->md.pv_list) && ((om->flags & PG_FICTITIOUS) != 0 || - TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list))) + TAILQ_EMPTY(&page_to_pvh(om)->pv_list))) vm_page_aflag_clear(om, PGA_WRITEABLE); } else { KASSERT((orig_l3 & ATTR_AF) != 0, @@ -5209,7 +5209,7 @@ pmap_remove_pages(pmap_t pmap) case 1: pmap_resident_count_dec(pmap, L2_SIZE / PAGE_SIZE); - pvh = pa_to_pvh(tpte & ~ATTR_MASK); + pvh = page_to_pvh(m); TAILQ_REMOVE(&pvh->pv_list, pv,pv_next); pvh->pv_gen++; if (TAILQ_EMPTY(&pvh->pv_list)) { From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:42 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8FBAE67390F; Tue, 31 Aug 2021 19:09:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFL3XPzz4sfq; Tue, 31 Aug 2021 19:09:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58BD917489; Tue, 31 Aug 2021 19:09:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9gus074121; Tue, 31 Aug 2021 19:09:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9gQh074120; Tue, 31 Aug 2021 19:09:42 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:42 GMT Message-Id: <202108311909.17VJ9gQh074120@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 52d50956b826 - stable/13 - arm64: remove an unneeded test from pmap_clear_modify() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 52d50956b826d602b2fcf5d97cd587d4d0ded942 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:42 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=52d50956b826d602b2fcf5d97cd587d4d0ded942 commit 52d50956b826d602b2fcf5d97cd587d4d0ded942 Author: Alan Cox AuthorDate: 2021-06-23 05:10:20 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:22 +0000 arm64: remove an unneeded test from pmap_clear_modify() The page table entry for a 4KB page mapping must be valid if a PV entry for the mapping exists, so there is no point in testing each page table entry's validity when iterating over a PV list. Reviewed by: kib, markj (cherry picked from commit 62ea198e95f139e6b8041ec44f75d65aa26970d0) --- sys/arm64/arm64/pmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 8670056e81f5..0df53a60bcea 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -5873,8 +5873,7 @@ restart: l2 = pmap_l2(pmap, pv->pv_va); l3 = pmap_l2_to_l3(l2, pv->pv_va); oldl3 = pmap_load(l3); - if (pmap_l3_valid(oldl3) && - (oldl3 & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) == ATTR_SW_DBM){ + if ((oldl3 & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) == ATTR_SW_DBM){ pmap_set_bits(l3, ATTR_S1_AP(ATTR_S1_AP_RO)); pmap_invalidate_page(pmap, pv->pv_va); } From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:43 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7C3067355D; Tue, 31 Aug 2021 19:09:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFM4hhmz4sZC; Tue, 31 Aug 2021 19:09:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 796C8173ED; Tue, 31 Aug 2021 19:09:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9hvv074145; Tue, 31 Aug 2021 19:09:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9h5O074144; Tue, 31 Aug 2021 19:09:43 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:43 GMT Message-Id: <202108311909.17VJ9h5O074144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f62a4c089c38 - stable/13 - arm64: replace pa_to_pvh() with page_to_pvh() in pmap_remove_l2() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f62a4c089c387504fd64fe835381810afdcfc45e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:43 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f62a4c089c387504fd64fe835381810afdcfc45e commit f62a4c089c387504fd64fe835381810afdcfc45e Author: Alan Cox AuthorDate: 2021-06-23 19:14:31 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:23 +0000 arm64: replace pa_to_pvh() with page_to_pvh() in pmap_remove_l2() Revise pmap_remove_l2() to use the constant-time function page_to_pvh() instead of the linear-time function pa_to_pvh(). Reviewed by: kib, markj (cherry picked from commit 0c188c06c627b5de30eeeeb7cde00d071a80ecfa) --- sys/arm64/arm64/pmap.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 0df53a60bcea..4af87b24a92d 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -2851,8 +2851,7 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t sva, { struct md_page *pvh; pt_entry_t old_l2; - vm_offset_t eva, va; - vm_page_t m, ml3; + vm_page_t m, ml3, mt; PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT((sva & L2_OFFSET) == 0, ("pmap_remove_l2: sva is not aligned")); @@ -2870,19 +2869,18 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t sva, pmap->pm_stats.wired_count -= L2_SIZE / PAGE_SIZE; pmap_resident_count_dec(pmap, L2_SIZE / PAGE_SIZE); if (old_l2 & ATTR_SW_MANAGED) { + m = PHYS_TO_VM_PAGE(old_l2 & ~ATTR_MASK); + pvh = page_to_pvh(m); CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, old_l2 & ~ATTR_MASK); - pvh = pa_to_pvh(old_l2 & ~ATTR_MASK); pmap_pvh_free(pvh, pmap, sva); - eva = sva + L2_SIZE; - for (va = sva, m = PHYS_TO_VM_PAGE(old_l2 & ~ATTR_MASK); - va < eva; va += PAGE_SIZE, m++) { + for (mt = m; mt < &m[L2_SIZE / PAGE_SIZE]; mt++) { if (pmap_pte_dirty(pmap, old_l2)) - vm_page_dirty(m); + vm_page_dirty(mt); if (old_l2 & ATTR_AF) - vm_page_aflag_set(m, PGA_REFERENCED); - if (TAILQ_EMPTY(&m->md.pv_list) && + vm_page_aflag_set(mt, PGA_REFERENCED); + if (TAILQ_EMPTY(&mt->md.pv_list) && TAILQ_EMPTY(&pvh->pv_list)) - vm_page_aflag_clear(m, PGA_WRITEABLE); + vm_page_aflag_clear(mt, PGA_WRITEABLE); } } if (pmap == kernel_pmap) { From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:44 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C97C9673912; Tue, 31 Aug 2021 19:09:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFN5BrBz4snN; Tue, 31 Aug 2021 19:09:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 983951740D; Tue, 31 Aug 2021 19:09:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9i0H074174; Tue, 31 Aug 2021 19:09:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9i1k074172; Tue, 31 Aug 2021 19:09:44 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:44 GMT Message-Id: <202108311909.17VJ9i1k074172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: ac5046a3a46a - stable/13 - arm64: make it possible to define PV_STATS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ac5046a3a46a8498ad12f209ec3a810e32a8ab7a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:44 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ac5046a3a46a8498ad12f209ec3a810e32a8ab7a commit ac5046a3a46a8498ad12f209ec3a810e32a8ab7a Author: Alan Cox AuthorDate: 2021-06-24 23:09:23 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:23 +0000 arm64: make it possible to define PV_STATS Remove an #if 0 that results in a compilation error if PV_STATS is defined. Aside from this #if 0, there is nothing wrong with the PV_STATS code. (cherry picked from commit c94249decd16de71a00d837ee132954d9f259e49) --- sys/arm64/arm64/pmap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 4af87b24a92d..0220c0e8710b 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -2243,7 +2243,6 @@ pv_to_chunk(pv_entry_t pv) static const uint64_t pc_freemask[_NPCM] = { PC_FREE0, PC_FREE1, PC_FREE2 }; -#if 0 #ifdef PV_STATS static int pc_chunk_count, pc_chunk_allocs, pc_chunk_frees, pc_chunk_tryfail; @@ -2268,7 +2267,6 @@ SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, "Current number of spare pv entries"); #endif -#endif /* 0 */ /* * We are in a serious low memory condition. Resort to From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:46 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AC2267355F; Tue, 31 Aug 2021 19:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFQ19xFz4scT; Tue, 31 Aug 2021 19:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B97151748A; Tue, 31 Aug 2021 19:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9jlb074200; Tue, 31 Aug 2021 19:09:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9jT4074199; Tue, 31 Aug 2021 19:09:45 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:45 GMT Message-Id: <202108311909.17VJ9jT4074199@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 17093b04c34e - stable/13 - arm64: fix a potential KVA leak in pmap_demote_l1() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 17093b04c34e50f2de649b64d95e96492639472e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:46 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=17093b04c34e50f2de649b64d95e96492639472e commit 17093b04c34e50f2de649b64d95e96492639472e Author: Alan Cox AuthorDate: 2021-06-26 03:29:38 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:23 +0000 arm64: fix a potential KVA leak in pmap_demote_l1() In the unlikely event that the 1 GB page mapping being demoted is used to access the L1 page table page containing the 1 GB page mapping and the vm_page_alloc() to allocate a new L2 page table page fails, we would leak a page of kernel virtual address space. Fix this leak. (cherry picked from commit 5dd84e315a9f777772017f9f628aa67f08a6493a) --- sys/arm64/arm64/pmap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 0220c0e8710b..4a5dff98f308 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -6219,7 +6219,8 @@ pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va) VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { CTR2(KTR_PMAP, "pmap_demote_l1: failure for va %#lx" " in pmap %p", va, pmap); - return (NULL); + l2 = NULL; + goto fail; } l2phys = VM_PAGE_TO_PHYS(ml2); @@ -6248,6 +6249,7 @@ pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va) pmap_update_entry(pmap, l1, l2phys | L1_TABLE, va, PAGE_SIZE); +fail: if (tmpl1 != 0) { pmap_kremove(tmpl1); kva_free(tmpl1, PAGE_SIZE); From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:47 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3D22673561; Tue, 31 Aug 2021 19:09:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFR393bz4snT; Tue, 31 Aug 2021 19:09:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E300316D59; Tue, 31 Aug 2021 19:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9kVa074224; Tue, 31 Aug 2021 19:09:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9kuc074223; Tue, 31 Aug 2021 19:09:46 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:46 GMT Message-Id: <202108311909.17VJ9kuc074223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 156414adaf9d - stable/13 - arm64: eliminate a duplicated #define MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 156414adaf9d591b93097db68ed078e3fd1b49af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:47 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=156414adaf9d591b93097db68ed078e3fd1b49af commit 156414adaf9d591b93097db68ed078e3fd1b49af Author: Alan Cox AuthorDate: 2021-06-27 06:40:23 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:23 +0000 arm64: eliminate a duplicated #define (cherry picked from commit 19c288b3a6640742ab45200031661fe5be710d7f) --- sys/arm64/include/pte.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/arm64/include/pte.h b/sys/arm64/include/pte.h index 16a72be65fd0..5d4412d2c141 100644 --- a/sys/arm64/include/pte.h +++ b/sys/arm64/include/pte.h @@ -131,7 +131,6 @@ typedef uint64_t pt_entry_t; /* page table entry */ #define L3_SHIFT 12 #define L3_SIZE (1 << L3_SHIFT) #define L3_OFFSET (L3_SIZE - 1) -#define L3_SHIFT 12 #define L3_INVAL 0x0 /* 0x1 is reserved */ /* 0x2 also marks an invalid address */ From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:49 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC957673994; Tue, 31 Aug 2021 19:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFT4CMqz4sl7; Tue, 31 Aug 2021 19:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3090A1748C; Tue, 31 Aug 2021 19:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9nhm074272; Tue, 31 Aug 2021 19:09:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9nMJ074271; Tue, 31 Aug 2021 19:09:49 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:49 GMT Message-Id: <202108311909.17VJ9nMJ074271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 605e07a27ecb - stable/13 - amd64: a simplication to pmap_remove_{all, write} MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 605e07a27ecb2e32732a0750622f9a960a982071 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:49 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=605e07a27ecb2e32732a0750622f9a960a982071 commit 605e07a27ecb2e32732a0750622f9a960a982071 Author: Alan Cox AuthorDate: 2021-06-30 05:59:21 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:23 +0000 amd64: a simplication to pmap_remove_{all,write} Eliminate some unnecessary unlocking and relocking when we have to retry the operation to avoid deadlock. (All of the other pmap functions that iterate over a PV list already implemented retries without these same unlocking and relocking operations.) Reviewed by: kib, markj (cherry picked from commit 1a8bcf30f97e6153def2af781db2fe54f5c0d106) --- sys/amd64/amd64/pmap.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index d35422924b1f..16dcddc7786a 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -6192,8 +6192,8 @@ pmap_remove_all(vm_page_t m) lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : pa_to_pvh(VM_PAGE_TO_PHYS(m)); -retry: rw_wlock(lock); +retry: while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -6202,7 +6202,6 @@ retry: PMAP_LOCK(pmap); rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { - rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; } @@ -6221,7 +6220,6 @@ retry: PMAP_LOCK(pmap); rw_wlock(lock); if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { - rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; } @@ -8348,8 +8346,8 @@ pmap_remove_write(vm_page_t m) lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : pa_to_pvh(VM_PAGE_TO_PHYS(m)); -retry_pv_loop: rw_wlock(lock); +retry_pv_loop: TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -8359,7 +8357,6 @@ retry_pv_loop: rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); goto retry_pv_loop; } } @@ -8384,7 +8381,6 @@ retry_pv_loop: if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); goto retry_pv_loop; } } From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:53 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4584667356E; Tue, 31 Aug 2021 19:09:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFY16y8z4sjV; Tue, 31 Aug 2021 19:09:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8520173EE; Tue, 31 Aug 2021 19:09:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9qfO074350; Tue, 31 Aug 2021 19:09:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9qIp074349; Tue, 31 Aug 2021 19:09:52 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:52 GMT Message-Id: <202108311909.17VJ9qIp074349@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a5dd155bfb2d - stable/13 - arm64: Sync icache when creating executable superpage mappings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a5dd155bfb2d7bd8ee03b596abf11f8af47d73ca Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:53 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a5dd155bfb2d7bd8ee03b596abf11f8af47d73ca commit a5dd155bfb2d7bd8ee03b596abf11f8af47d73ca Author: Alan Cox AuthorDate: 2021-07-14 17:59:49 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:24 +0000 arm64: Sync icache when creating executable superpage mappings Reviewed by: andrew, kib, markj (cherry picked from commit 7fb152d22935e014afcad4ddc0b3a7e3c2795762) --- sys/arm64/arm64/pmap.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index fe26f1fea1c3..a8216c6b4d7b 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4239,7 +4239,7 @@ pmap_enter_2mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, if (pmap != kernel_pmap) new_l2 |= ATTR_S1_nG; return (pmap_enter_l2(pmap, va, new_l2, PMAP_ENTER_NOSLEEP | - PMAP_ENTER_NOREPLACE | PMAP_ENTER_NORECLAIM, NULL, lockp) == + PMAP_ENTER_NOREPLACE | PMAP_ENTER_NORECLAIM, m, lockp) == KERN_SUCCESS); } @@ -4269,8 +4269,6 @@ pmap_every_pte_zero(vm_paddr_t pa) * KERN_RESOURCE_SHORTAGE if PMAP_ENTER_NOSLEEP was specified and a page table * page allocation failed. Returns KERN_RESOURCE_SHORTAGE if * PMAP_ENTER_NORECLAIM was specified and a PV entry allocation failed. - * - * The parameter "m" is only used when creating a managed, writeable mapping. */ static int pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, @@ -4360,6 +4358,16 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, pmap->pm_stats.wired_count += L2_SIZE / PAGE_SIZE; pmap->pm_stats.resident_count += L2_SIZE / PAGE_SIZE; + /* + * Conditionally sync the icache. See pmap_enter() for details. + */ + if ((new_l2 & ATTR_S1_XN) == 0 && ((new_l2 & ~ATTR_MASK) != + (old_l2 & ~ATTR_MASK) || (old_l2 & ATTR_S1_XN) != 0) && + pmap != kernel_pmap && m->md.pv_memattr == VM_MEMATTR_WRITE_BACK) { + cpu_icache_sync_range(PHYS_TO_DMAP(new_l2 & ~ATTR_MASK), + L2_SIZE); + } + /* * Map the superpage. */ From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:48 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E64F6673A0F; Tue, 31 Aug 2021 19:09:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFS2vS7z4sl6; Tue, 31 Aug 2021 19:09:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F0941748B; Tue, 31 Aug 2021 19:09:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9lo4074248; Tue, 31 Aug 2021 19:09:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9lPl074247; Tue, 31 Aug 2021 19:09:47 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:47 GMT Message-Id: <202108311909.17VJ9lPl074247@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b2727ab88c8d - stable/13 - arm64: a few simplications to pmap_remove_{all, write} MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b2727ab88c8d2b2974124c3c2929b16e20949200 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:49 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b2727ab88c8d2b2974124c3c2929b16e20949200 commit b2727ab88c8d2b2974124c3c2929b16e20949200 Author: Alan Cox AuthorDate: 2021-06-29 02:57:04 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:23 +0000 arm64: a few simplications to pmap_remove_{all,write} Eliminate some unnecessary unlocking and relocking when we have to retry the operation to avoid deadlock. (All of the other pmap functions that iterate over a PV list already implemented retries without these same unlocking and relocking operations.) Avoid a pointer dereference by using an existing local variable that already holds the desired value. Eliminate some unnecessary repetition of code on a failed fcmpset. Specifically, there is no point in retesting the DBM bit because it cannot change state while the pmap lock is held. Reviewed by: kib, markj (cherry picked from commit 26a357245f2197eea4dbbae0956d5c71ef8ba4f1) --- sys/arm64/arm64/pmap.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 4a5dff98f308..01156f2c1ccd 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -3151,8 +3151,8 @@ pmap_remove_all(vm_page_t m) SLIST_INIT(&free); lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : page_to_pvh(m); -retry: rw_wlock(lock); +retry: while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -3161,7 +3161,6 @@ retry: PMAP_LOCK(pmap); rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { - rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; } @@ -3172,7 +3171,6 @@ retry: ("pmap_remove_all: no page table entry found")); KASSERT(lvl == 2, ("pmap_remove_all: invalid pte level %d", lvl)); - pmap_demote_l2_locked(pmap, pte, va, &lock); PMAP_UNLOCK(pmap); } @@ -3186,7 +3184,6 @@ retry: PMAP_LOCK(pmap); rw_wlock(lock); if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { - rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; } @@ -5433,8 +5430,8 @@ pmap_remove_write(vm_page_t m) return; lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : page_to_pvh(m); -retry_pv_loop: rw_wlock(lock); +retry: TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); PMAP_ASSERT_STAGE1(pmap); @@ -5445,12 +5442,11 @@ retry_pv_loop: rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); - goto retry_pv_loop; + goto retry; } } va = pv->pv_va; - pte = pmap_pte(pmap, pv->pv_va, &lvl); + pte = pmap_pte(pmap, va, &lvl); if ((pmap_load(pte) & ATTR_SW_DBM) != 0) (void)pmap_demote_l2_locked(pmap, pte, va, &lock); KASSERT(lock == VM_PAGE_TO_PV_LIST_LOCK(m), @@ -5470,17 +5466,15 @@ retry_pv_loop: if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); - goto retry_pv_loop; + goto retry; } } pte = pmap_pte(pmap, pv->pv_va, &lvl); oldpte = pmap_load(pte); -retry: if ((oldpte & ATTR_SW_DBM) != 0) { - if (!atomic_fcmpset_long(pte, &oldpte, + while (!atomic_fcmpset_64(pte, &oldpte, (oldpte | ATTR_S1_AP_RW_BIT) & ~ATTR_SW_DBM)) - goto retry; + cpu_spinwait(); if ((oldpte & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP(ATTR_S1_AP_RW)) vm_page_dirty(m); From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:51 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99D16673A10; Tue, 31 Aug 2021 19:09:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFV5QkPz4sql; Tue, 31 Aug 2021 19:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 804461740E; Tue, 31 Aug 2021 19:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9oZc074296; Tue, 31 Aug 2021 19:09:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9oIJ074295; Tue, 31 Aug 2021 19:09:50 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:50 GMT Message-Id: <202108311909.17VJ9oIJ074295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 380c653c7d4b - stable/13 - On a failed fcmpset don't pointlessly repeat tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 380c653c7d4b1b54cc0ea5f7f80a8ec8c71671f1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:51 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=380c653c7d4b1b54cc0ea5f7f80a8ec8c71671f1 commit 380c653c7d4b1b54cc0ea5f7f80a8ec8c71671f1 Author: Alan Cox AuthorDate: 2021-07-04 05:20:42 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:24 +0000 On a failed fcmpset don't pointlessly repeat tests In a few places, on a failed compare-and-set, both the amd64 pmap and the arm64 pmap repeat tests on bits that won't change state while the pmap is locked. Eliminate some of these unnecessary tests. Reviewed by: andrew, kib, markj (cherry picked from commit e41fde3ed71c1e4fce81eac002c9f5b0926e6c49) --- sys/amd64/amd64/pmap.c | 11 +++++------ sys/arm64/arm64/pmap.c | 15 ++++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 16dcddc7786a..9122a368823b 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -8347,7 +8347,7 @@ pmap_remove_write(vm_page_t m) pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : pa_to_pvh(VM_PAGE_TO_PHYS(m)); rw_wlock(lock); -retry_pv_loop: +retry: TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -8357,7 +8357,7 @@ retry_pv_loop: rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { PMAP_UNLOCK(pmap); - goto retry_pv_loop; + goto retry; } } PG_RW = pmap_rw_bit(pmap); @@ -8381,7 +8381,7 @@ retry_pv_loop: if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { PMAP_UNLOCK(pmap); - goto retry_pv_loop; + goto retry; } } PG_M = pmap_modified_bit(pmap); @@ -8391,12 +8391,11 @@ retry_pv_loop: ("pmap_remove_write: found a 2mpage in page %p's pv list", m)); pte = pmap_pde_to_pte(pde, pv->pv_va); -retry: oldpte = *pte; if (oldpte & PG_RW) { - if (!atomic_cmpset_long(pte, oldpte, oldpte & + while (!atomic_fcmpset_long(pte, &oldpte, oldpte & ~(PG_RW | PG_M))) - goto retry; + cpu_spinwait(); if ((oldpte & PG_M) != 0) vm_page_dirty(m); pmap_invalidate_page(pmap, pv->pv_va); diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 01156f2c1ccd..35cbfc4c308c 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -3244,10 +3244,12 @@ pmap_protect_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t sva, pt_entry_t mask, * Return if the L2 entry already has the desired access restrictions * in place. */ -retry: if ((old_l2 & mask) == nbits) return; + while (!atomic_fcmpset_64(l2, &old_l2, (old_l2 & ~mask) | nbits)) + cpu_spinwait(); + /* * When a dirty read/write superpage mapping is write protected, * update the dirty field of each of the superpage's constituent 4KB @@ -3261,9 +3263,6 @@ retry: vm_page_dirty(mt); } - if (!atomic_fcmpset_64(l2, &old_l2, (old_l2 & ~mask) | nbits)) - goto retry; - /* * Since a promotion must break the 4KB page mappings before making * the 2MB page mapping, a pmap_invalidate_page() suffices. @@ -3355,7 +3354,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) for (l3p = pmap_l2_to_l3(l2, sva); sva != va_next; l3p++, sva += L3_SIZE) { l3 = pmap_load(l3p); -retry: + /* * Go to the next L3 entry if the current one is * invalid or already has the desired access @@ -3372,6 +3371,10 @@ retry: continue; } + while (!atomic_fcmpset_64(l3p, &l3, (l3 & ~mask) | + nbits)) + cpu_spinwait(); + /* * When a dirty read/write mapping is write protected, * update the page's dirty field. @@ -3381,8 +3384,6 @@ retry: pmap_pte_dirty(pmap, l3)) vm_page_dirty(PHYS_TO_VM_PAGE(l3 & ~ATTR_MASK)); - if (!atomic_fcmpset_64(l3p, &l3, (l3 & ~mask) | nbits)) - goto retry; if (va == va_next) va = sva; } From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:52 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C2A567356A; Tue, 31 Aug 2021 19:09:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFX1y0wz4sZd; Tue, 31 Aug 2021 19:09:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76CB11736F; Tue, 31 Aug 2021 19:09:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9paW074326; Tue, 31 Aug 2021 19:09:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9pgC074325; Tue, 31 Aug 2021 19:09:51 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:51 GMT Message-Id: <202108311909.17VJ9pgC074325@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b9868ea45aa2 - stable/13 - arm64: Simplify fcmpset failure in pmap_promote_l2() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b9868ea45aa2506e354764309dad119164e2b796 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:52 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b9868ea45aa2506e354764309dad119164e2b796 commit b9868ea45aa2506e354764309dad119164e2b796 Author: Alan Cox AuthorDate: 2021-07-07 18:16:03 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:24 +0000 arm64: Simplify fcmpset failure in pmap_promote_l2() When the initial fcmpset in pmap_promote_l2() fails, there is no need to repeat the check for the physical address being 2MB aligned or for the accessed bit being set. While the pmap is locked the hardware can only transition the accessed bit from 0 to 1, and we have already determined that it is 1 when the fcmpset fails. (cherry picked from commit 0add3c9945c85c7f766f9225866e99e2a805819b) --- sys/arm64/arm64/pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 35cbfc4c308c..fe26f1fea1c3 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -3523,7 +3523,6 @@ pmap_promote_l2(pmap_t pmap, pd_entry_t *l2, vm_offset_t va, firstl3 = pmap_l2_to_l3(l2, sva); newl2 = pmap_load(firstl3); -setl2: if (((newl2 & (~ATTR_MASK | ATTR_AF)) & L2_OFFSET) != ATTR_AF) { atomic_add_long(&pmap_l2_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_l2: failure for va %#lx" @@ -3531,6 +3530,7 @@ setl2: return; } +setl2: if ((newl2 & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) == (ATTR_S1_AP(ATTR_S1_AP_RO) | ATTR_SW_DBM)) { /* From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:55 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C2771673919; Tue, 31 Aug 2021 19:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFb2DXMz4snp; Tue, 31 Aug 2021 19:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC7BA170B4; Tue, 31 Aug 2021 19:09:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9sra074398; Tue, 31 Aug 2021 19:09:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9suE074397; Tue, 31 Aug 2021 19:09:54 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:54 GMT Message-Id: <202108311909.17VJ9suE074397@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8024a900a4a7 - stable/13 - amd64: Don't repeat unnecessary tests when cmpset fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8024a900a4a76f11d972213f108e0cbdeb82564b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:56 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8024a900a4a76f11d972213f108e0cbdeb82564b commit 8024a900a4a76f11d972213f108e0cbdeb82564b Author: Alan Cox AuthorDate: 2021-07-24 08:50:27 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:24 +0000 amd64: Don't repeat unnecessary tests when cmpset fails When a cmpset for removing the PG_RW bit in pmap_promote_pde() fails, there is no need to repeat the alignment, PG_A, and PG_V tests just to reload the PTE's value. The only bit that we need be concerned with at this point is PG_M. Use fcmpset instead. (cherry picked from commit 3687797618b6c978ad733bd206a623e5df47dbe3) --- sys/amd64/amd64/pmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 705bbe712bff..0ac312a95a8c 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -6511,7 +6511,6 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, * within a 2MB page. */ firstpte = (pt_entry_t *)PHYS_TO_DMAP(*pde & PG_FRAME); -setpde: newpde = *firstpte; if ((newpde & ((PG_FRAME & PDRMASK) | PG_A | PG_V)) != (PG_A | PG_V) || !pmap_allow_2m_x_page(pmap, pmap_pde_ept_executable(pmap, @@ -6521,12 +6520,13 @@ setpde: " in pmap %p", va, pmap); return; } +setpde: if ((newpde & (PG_M | PG_RW)) == PG_RW) { /* * When PG_M is already clear, PG_RW can be cleared without * a TLB invalidation. */ - if (!atomic_cmpset_long(firstpte, newpde, newpde & ~PG_RW)) + if (!atomic_fcmpset_long(firstpte, &newpde, newpde & ~PG_RW)) goto setpde; newpde &= ~PG_RW; } @@ -6538,7 +6538,6 @@ setpde: */ pa = (newpde & (PG_PS_FRAME | PG_A | PG_V)) + NBPDR - PAGE_SIZE; for (pte = firstpte + NPTEPG - 1; pte > firstpte; pte--) { -setpte: oldpte = *pte; if ((oldpte & (PG_FRAME | PG_A | PG_V)) != pa) { atomic_add_long(&pmap_pde_p_failures, 1); @@ -6546,12 +6545,13 @@ setpte: " in pmap %p", va, pmap); return; } +setpte: if ((oldpte & (PG_M | PG_RW)) == PG_RW) { /* * When PG_M is already clear, PG_RW can be cleared * without a TLB invalidation. */ - if (!atomic_cmpset_long(pte, oldpte, oldpte & ~PG_RW)) + if (!atomic_fcmpset_long(pte, &oldpte, oldpte & ~PG_RW)) goto setpte; oldpte &= ~PG_RW; CTR2(KTR_PMAP, "pmap_promote_pde: protect for va %#lx" From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:09:54 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C1D36738B4; Tue, 31 Aug 2021 19:09:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcFZ0YLnz4sjg; Tue, 31 Aug 2021 19:09:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CEC7617370; Tue, 31 Aug 2021 19:09:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJ9rEe074374; Tue, 31 Aug 2021 19:09:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJ9rsm074373; Tue, 31 Aug 2021 19:09:53 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:09:53 GMT Message-Id: <202108311909.17VJ9rsm074373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1fe88bc8512b - stable/13 - amd64: Eliminate a redundant test from pmap_enter_object() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1fe88bc8512b8444a31534f4b196a1d62af7df33 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:09:54 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1fe88bc8512b8444a31534f4b196a1d62af7df33 commit 1fe88bc8512b8444a31534f4b196a1d62af7df33 Author: Alan Cox AuthorDate: 2021-07-24 03:50:10 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:09:24 +0000 amd64: Eliminate a redundant test from pmap_enter_object() The call to pmap_allow_2m_x_page() in pmap_enter_object() is redundant. Specifically, even without the call to pmap_allow_2m_x_page() in pmap_enter_object(), pmap_allow_2m_x_page() is eventually called by pmap_enter_pde(), so the outcome will be the same. Essentially, calling pmap_allow_2m_x_page() in pmap_enter_object() amounts to "optimizing" for the unexpected case. Reviewed by: kib (cherry picked from commit b7de535288362b072cf2801007e4d7e0e903d467) --- sys/amd64/amd64/pmap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 9122a368823b..705bbe712bff 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -7222,7 +7222,6 @@ pmap_enter_object(pmap_t pmap, vm_offset_t start, vm_offset_t end, va = start + ptoa(diff); if ((va & PDRMASK) == 0 && va + NBPDR <= end && m->psind == 1 && pmap_ps_enabled(pmap) && - pmap_allow_2m_x_page(pmap, (prot & VM_PROT_EXECUTE) != 0) && pmap_enter_2mpage(pmap, va, m, prot, &lock)) m = &m[NBPDR / PAGE_SIZE - 1]; else From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:11:25 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 76A69673D4D; Tue, 31 Aug 2021 19:11:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcHK2yLTz4tVy; Tue, 31 Aug 2021 19:11:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4EE35170C2; Tue, 31 Aug 2021 19:11:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJBPKd086136; Tue, 31 Aug 2021 19:11:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJBPLW086135; Tue, 31 Aug 2021 19:11:25 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:11:25 GMT Message-Id: <202108311911.17VJBPLW086135@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: a2ddb544867a - stable/12 - Fix null pointer subtraction in mergesort() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a2ddb544867a6100fc4b684772897134511bb72c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:11:25 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a2ddb544867a6100fc4b684772897134511bb72c commit a2ddb544867a6100fc4b684772897134511bb72c Author: Dimitry Andric AuthorDate: 2021-08-27 17:45:43 +0000 Commit: Dimitry Andric CommitDate: 2021-08-31 19:11:00 +0000 Fix null pointer subtraction in mergesort() Clang 13 produces the following warning for this function: lib/libc/stdlib/merge.c:137:41: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction] if (!(size % ISIZE) && !(((char *)base - (char *)0) % ISIZE)) ^ ~~~~~~~~~ This is meant to check whether the size and base parameters are aligned to the size of an int, so use our __is_aligned() macro instead. Also remove the comment that indicated this "stupid subtraction" was done to pacify some ancient and unknown Cray compiler, and which has been there since the BSD 4.4 Lite Lib Sources were imported. (cherry picked from commit 4e5d32a445f90d37966cd6de571978551654e3f3) --- lib/libc/stdlib/merge.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/libc/stdlib/merge.c b/lib/libc/stdlib/merge.c index 3a47e424e4da..566f8cba0a3d 100644 --- a/lib/libc/stdlib/merge.c +++ b/lib/libc/stdlib/merge.c @@ -131,12 +131,8 @@ mergesort(void *base, size_t nmemb, size_t size, cmp_t cmp) if (nmemb == 0) return (0); - /* - * XXX - * Stupid subtraction for the Cray. - */ iflag = 0; - if (!(size % ISIZE) && !(((char *)base - (char *)0) % ISIZE)) + if (__is_aligned(size, ISIZE) && __is_aligned(base, ISIZE)) iflag = 1; if ((list2 = malloc(nmemb * size + PSIZE)) == NULL) From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:11:27 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3BA9E673DCB; Tue, 31 Aug 2021 19:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcHL3wWPz4tlY; Tue, 31 Aug 2021 19:11:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 704EE170C3; Tue, 31 Aug 2021 19:11:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJBQ60086160; Tue, 31 Aug 2021 19:11:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJBQ1q086159; Tue, 31 Aug 2021 19:11:26 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:11:26 GMT Message-Id: <202108311911.17VJBQ1q086159@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: fe61b012dcae - stable/12 - Silence more gtest warnings, now in fusefs tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: fe61b012dcae0d2d0a8d3a775f58d14c299b9ed0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:11:27 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=fe61b012dcae0d2d0a8d3a775f58d14c299b9ed0 commit fe61b012dcae0d2d0a8d3a775f58d14c299b9ed0 Author: Dimitry Andric AuthorDate: 2021-08-27 21:39:23 +0000 Commit: Dimitry Andric CommitDate: 2021-08-31 19:11:05 +0000 Silence more gtest warnings, now in fusefs tests Follow-up d396c67f26b0 by also silencing warnings about deprecated implicit copy constructors in the fusefs tests, which use googletest. Fixes: d396c67f26b0 (cherry picked from commit 5a3a8cb01ab8ef4aa16a1950b1ef804070ce1ac6) --- tests/sys/fs/fusefs/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index c3cf1f14e5bf..b96a6bea19d3 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -75,6 +75,8 @@ CXXWARNFLAGS.readdir.cc+= -Wno-cast-align .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80000 CXXWARNFLAGS+= -Wno-class-memaccess .endif +# Supress warnings about deprecated implicit copy constructors in gtest. +CXXWARNFLAGS+= -Wno-deprecated-copy CXXFLAGS+= -I${SRCTOP}/tests CXXFLAGS+= -I${FUSEFS} CXXFLAGS+= -I${MOUNT} From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:13:37 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 980B2673DFF; Tue, 31 Aug 2021 19:13:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzcKs3tZxz4v3B; Tue, 31 Aug 2021 19:13:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DE5917706; Tue, 31 Aug 2021 19:13:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJDbtW087134; Tue, 31 Aug 2021 19:13:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJDbcN087133; Tue, 31 Aug 2021 19:13:37 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:13:37 GMT Message-Id: <202108311913.17VJDbcN087133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: bfa89a5dd105 - stable/12 - iflib: fix potential NULL dereference MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: bfa89a5dd1055447ee64e0a4cf77898ee970a3b1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:13:37 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bfa89a5dd1055447ee64e0a4cf77898ee970a3b1 commit bfa89a5dd1055447ee64e0a4cf77898ee970a3b1 Author: Kristof Provost AuthorDate: 2021-08-31 12:11:22 +0000 Commit: Kristof Provost CommitDate: 2021-08-31 19:12:50 +0000 iflib: fix potential NULL dereference iflib_softirq_alloc_generic() can be called with a NULL irq parameter (as done by for example the bnxt and ixl drivers). If iflib_irq_set_affinity() then returns an error we'd try to dereference the NULL irq pointer. Check irq, and pass '-1' (which taskqgroup_attach() expects) if we don't have an irq. Direct commit to stable/12, because this issue does not exist on main and stable/13. Reviewed by: kbowling Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31758 --- sys/net/iflib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 8dc1715e625d..f8d4c120b3ec 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -6200,7 +6200,7 @@ iflib_irq_set_affinity(if_ctx_t ctx, if_irq_t irq, iflib_intr_type_t type, base_cpuid = ctx->ifc_sysctl_core_offset; cpuid = get_cpuid_for_queue(ctx, base_cpuid, qid, type == IFLIB_INTR_TX); err = taskqgroup_attach_cpu(tqg, gtask, uniq, cpuid, - rman_get_start(irq->ii_res), name); + irq ? rman_get_start(irq->ii_res) : -1, name); if (err) { device_printf(dev, "taskqgroup_attach_cpu failed %d\n", err); return (err); @@ -6337,7 +6337,7 @@ iflib_softirq_alloc_generic(if_ctx_t ctx, if_irq_t irq, iflib_intr_type_t type, err = iflib_irq_set_affinity(ctx, irq, type, qid, gtask, tqg, q, name); if (err) { dev = ctx->ifc_dev; - taskqgroup_attach(tqg, gtask, q, rman_get_start(irq->ii_res), + taskqgroup_attach(tqg, gtask, q, irq ? rman_get_start(irq->ii_res) : -1, name); } } From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:26:08 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D8386674159; Tue, 31 Aug 2021 19:26:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzccJ5hsTz4y9W; Tue, 31 Aug 2021 19:26:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A75FC176E8; Tue, 31 Aug 2021 19:26:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJQ8dv000653; Tue, 31 Aug 2021 19:26:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJQ8xB000652; Tue, 31 Aug 2021 19:26:08 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:26:08 GMT Message-Id: <202108311926.17VJQ8xB000652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 3b2ae1c2bbfb - stable/12 - Expose clang's alignment builtins and use them for roundup2/rounddown2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3b2ae1c2bbfba2173c2b7f9c8f6a1382dcb4f081 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:26:08 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3b2ae1c2bbfba2173c2b7f9c8f6a1382dcb4f081 commit 3b2ae1c2bbfba2173c2b7f9c8f6a1382dcb4f081 Author: Alex Richardson AuthorDate: 2021-02-03 15:27:17 +0000 Commit: Dimitry Andric CommitDate: 2021-08-31 19:24:52 +0000 Expose clang's alignment builtins and use them for roundup2/rounddown2 This makes roundup2/rounddown2 type- and const-preserving and allows using it on pointer types without casting to uintptr_t first. Not performing pointer-to-integer conversions also helps the compiler's optimization passes and can therefore result in better code generation. When using it with integer values there should be no change other than the compiler checking that the alignment value is a valid power-of-two. I originally implemented these builtins for CHERI a few years ago and they have been very useful for CheriBSD. However, they are also useful for non-CHERI code so I was able to upstream them for Clang 10.0. Rationale from the clang documentation: Clang provides builtins to support checking and adjusting alignment of pointers and integers. These builtins can be used to avoid relying on implementation-defined behavior of arithmetic on integers derived from pointers. Additionally, these builtins retain type information and, unlike bitwise arithmetic, they can perform semantic checking on the alignment value. There is also a feature request for GCC, so GCC may also support it in the future: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641 Reviewed By: brooks, jhb, imp Differential Revision: https://reviews.freebsd.org/D28332 (cherry picked from commit 8fa6abb6f4f64f4f23e2920e2aea7996566851a4) --- sys/sys/cdefs.h | 19 +++++++++++++++++++ sys/sys/param.h | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index c8485fa58f54..a5e8abc173bd 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -876,4 +876,23 @@ #define __guarded_by(x) __lock_annotate(guarded_by(x)) #define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) +/* Alignment builtins for better type checking and improved code generation. */ +/* Provide fallback versions for other compilers (GCC/Clang < 10): */ +#if !__has_builtin(__builtin_is_aligned) +#define __builtin_is_aligned(x, align) \ + (((__uintptr_t)x & ((align) - 1)) == 0) +#endif +#if !__has_builtin(__builtin_align_up) +#define __builtin_align_up(x, align) \ + ((__typeof__(x))(((__uintptr_t)(x)+((align)-1))&(~((align)-1)))) +#endif +#if !__has_builtin(__builtin_align_down) +#define __builtin_align_down(x, align) \ + ((__typeof__(x))((x)&(~((align)-1)))) +#endif + +#define __align_up(x, y) __builtin_align_up(x, y) +#define __align_down(x, y) __builtin_align_down(x, y) +#define __is_aligned(x, y) __builtin_is_aligned(x, y) + #endif /* !_SYS_CDEFS_H_ */ diff --git a/sys/sys/param.h b/sys/sys/param.h index 15099849688d..b9f61eef0d58 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -296,9 +296,9 @@ #endif #define nitems(x) (sizeof((x)) / sizeof((x)[0])) #define rounddown(x, y) (((x)/(y))*(y)) -#define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is power of two */ +#define rounddown2(x, y) __align_down(x, y) /* if y is power of two */ #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ -#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ +#define roundup2(x, y) __align_up(x, y) /* if y is powers of two */ #define powerof2(x) ((((x)-1)&(x))==0) /* Macros for min/max. */ From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 19:57:38 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 416D367555B; Tue, 31 Aug 2021 19:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzdJf1Mh7z56ql; Tue, 31 Aug 2021 19:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15F2017EF6; Tue, 31 Aug 2021 19:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17VJvbJs042439; Tue, 31 Aug 2021 19:57:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VJvbeJ042438; Tue, 31 Aug 2021 19:57:37 GMT (envelope-from git) Date: Tue, 31 Aug 2021 19:57:37 GMT Message-Id: <202108311957.17VJvbeJ042438@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 1aaf3bbc74ce - stable/12 - fwohci: Cast bitfield to uint32_t before passing it to roundup2(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1aaf3bbc74ced642831682ee222c68ad42f96d8c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 19:57:38 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1aaf3bbc74ced642831682ee222c68ad42f96d8c commit 1aaf3bbc74ced642831682ee222c68ad42f96d8c Author: John Baldwin AuthorDate: 2021-02-17 21:12:06 +0000 Commit: Dimitry Andric CommitDate: 2021-08-31 19:56:51 +0000 fwohci: Cast bitfield to uint32_t before passing it to roundup2(). The fallback for __align_up() used by roundup2() uses __typeof__() which doesn't work for bitfields. This fixes the build on GCC which uses the fallback. Reviewed by: arichardson, markj Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D28599 (cherry picked from commit 50a61f8db532676d7dc37410540fff7209b7c072) (cherry picked from commit ae0219c10fe3a2ea9caa7bc88ddc7d0a7e988efd) --- sys/dev/firewire/fwohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index 03df023b7531..e54d0c4f53bd 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -2695,7 +2695,7 @@ fwohci_get_plen(struct fwohci_softc *sc, struct fwohci_dbch *dbch, struct fw_pkt info = &tinfo[fp->mode.common.tcode]; r = info->hdr_len + sizeof(uint32_t); if ((info->flag & FWTI_BLOCK_ASY) != 0) - r += roundup2(fp->mode.wreqb.len, sizeof(uint32_t)); + r += roundup2((uint32_t)fp->mode.wreqb.len, sizeof(uint32_t)); if (r == sizeof(uint32_t)) { /* XXX */ From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 02:00:55 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAC67679E08; Wed, 1 Sep 2021 02:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GznMq5PFnz4bFM; Wed, 1 Sep 2021 02:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A17C81C6C8; Wed, 1 Sep 2021 02:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18120tRM032804; Wed, 1 Sep 2021 02:00:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18120tlc032803; Wed, 1 Sep 2021 02:00:55 GMT (envelope-from git) Date: Wed, 1 Sep 2021 02:00:55 GMT Message-Id: <202109010200.18120tlc032803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: 0ad812e6cda6 - stable/11 - OpenSSL: Fix the RSA_SSLV23_PADDING padding type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 0ad812e6cda6c0138b821902b53cf070b79ddd5b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 02:00:55 -0000 The branch stable/11 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=0ad812e6cda6c0138b821902b53cf070b79ddd5b commit 0ad812e6cda6c0138b821902b53cf070b79ddd5b Author: Matt Caswell AuthorDate: 2021-09-01 01:57:12 +0000 Commit: Jung-uk Kim CommitDate: 2021-09-01 02:00:02 +0000 OpenSSL: Fix the RSA_SSLV23_PADDING padding type This also fixes the public function RSA_padding_check_SSLv23. Commit 6555a89 changed the padding check logic in RSA_padding_check_SSLv23 so that padding is rejected if the nul delimiter byte is not immediately preceded by at least 8 bytes containing 0x03. Prior to that commit the padding is rejected if it *is* preceded by at least 8 bytes containing 0x03. Presumably this change was made to be consistent with what it says in appendix E.3 of RFC 5246. Unfortunately that RFC is in error, and the original behaviour was correct. This is fixed in later errata issued for that RFC. Applications that use SSLv2 or call RSA_paddin_check_SSLv23 directly, or use the RSA_SSLV23_PADDING mode may be impacted. The effect of the original error is that an RSA message encrypted by an SSLv2 only client will fail to be decrypted properly by a TLS capable server, or a message encrypted by a TLS capable client will fail to decrypt on an SSLv2 only server. Most significantly an RSA message encrypted by a TLS capable client will be successfully decrypted by a TLS capable server. This last case should fail due to a rollback being detected. Thanks to D. Katz and Joel Luellwitz (both from Trustwave) for reporting this issue. CVE-2021-23839 https://github.com/openssl/openssl/commit/30919ab80a478f2d81f2e9acdcca3fa4740cd547 --- crypto/openssl/crypto/rsa/rsa_ssl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crypto/openssl/crypto/rsa/rsa_ssl.c b/crypto/openssl/crypto/rsa/rsa_ssl.c index 6f25acdac47a..bdc20c16c00a 100644 --- a/crypto/openssl/crypto/rsa/rsa_ssl.c +++ b/crypto/openssl/crypto/rsa/rsa_ssl.c @@ -104,7 +104,7 @@ int RSA_padding_add_SSLv23(unsigned char *to, int tlen, /* * Copy of RSA_padding_check_PKCS1_type_2 with a twist that rejects padding - * if nul delimiter is not preceded by 8 consecutive 0x03 bytes. It also + * if nul delimiter is preceded by 8 consecutive 0x03 bytes. It also * preserves error code reporting for backward compatibility. */ int RSA_padding_check_SSLv23(unsigned char *to, int tlen, @@ -171,7 +171,13 @@ int RSA_padding_check_SSLv23(unsigned char *to, int tlen, RSA_R_NULL_BEFORE_BLOCK_MISSING); mask = ~good; - good &= constant_time_ge(threes_in_row, 8); + /* + * Reject if nul delimiter is preceded by 8 consecutive 0x03 bytes. Note + * that RFC5246 incorrectly states this the other way around, i.e. reject + * if it is not preceded by 8 consecutive 0x03 bytes. However this is + * corrected in subsequent errata for that RFC. + */ + good &= constant_time_lt(threes_in_row, 8); err = constant_time_select_int(mask | good, err, RSA_R_SSLV3_ROLLBACK_ATTACK); mask = ~good; From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 04:34:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C44067BEBB; Wed, 1 Sep 2021 04:34:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gzrn76XGfz3rpL; Wed, 1 Sep 2021 04:34:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C88B31EAC5; Wed, 1 Sep 2021 04:34:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1814YZEL034207; Wed, 1 Sep 2021 04:34:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1814YZ5t034206; Wed, 1 Sep 2021 04:34:35 GMT (envelope-from git) Date: Wed, 1 Sep 2021 04:34:35 GMT Message-Id: <202109010434.1814YZ5t034206@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 70af7d622c35 - stable/13 - Fix a common typo in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 70af7d622c351a82e9a9444be053f49c26b1fdd6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 04:34:36 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=70af7d622c351a82e9a9444be053f49c26b1fdd6 commit 70af7d622c351a82e9a9444be053f49c26b1fdd6 Author: Gordon Bergling AuthorDate: 2021-08-29 09:45:09 +0000 Commit: Gordon Bergling CommitDate: 2021-09-01 04:33:35 +0000 Fix a common typo in source code comments - s/concurently/concurrently/ (cherry picked from commit 5d785ad65e000f9ff636a777599bfa414b88d970) --- sys/dev/acpica/acpi_video.c | 2 +- sys/dev/aic7xxx/aic79xx.h | 2 +- sys/dev/gpio/gpiopps.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/acpica/acpi_video.c b/sys/dev/acpica/acpi_video.c index dc4a4385f3b5..917c6548f3a2 100644 --- a/sys/dev/acpica/acpi_video.c +++ b/sys/dev/acpica/acpi_video.c @@ -233,7 +233,7 @@ acpi_video_push_evdev_event(struct evdev_dev *evdev, UINT32 notify) int i; uint16_t key; - /* Do not allow to execute 2 instances this routine concurently */ + /* Do not allow to execute 2 instances this routine concurrently */ ACPI_SERIAL_ASSERT(video_output); for (i = 0; i < nitems(acpi_video_evdev_map); i++) { diff --git a/sys/dev/aic7xxx/aic79xx.h b/sys/dev/aic7xxx/aic79xx.h index 38b152ef4051..f610f00af869 100644 --- a/sys/dev/aic7xxx/aic79xx.h +++ b/sys/dev/aic7xxx/aic79xx.h @@ -288,7 +288,7 @@ typedef enum { */ AHD_NONPACKFIFO_BUG = 0x4000, /* - * Writing to a DFF SCBPTR register may fail if concurent with + * Writing to a DFF SCBPTR register may fail if concurrent with * a hardware write to the other DFF SCBPTR register. This is * not currently a concern in our sequencer since all chips with * this bug have the AHD_NONPACKFIFO_BUG and all writes of concern diff --git a/sys/dev/gpio/gpiopps.c b/sys/dev/gpio/gpiopps.c index 8a6f1a6a3f6b..4700acf19bcd 100644 --- a/sys/dev/gpio/gpiopps.c +++ b/sys/dev/gpio/gpiopps.c @@ -130,7 +130,7 @@ gpiopps_ifltr(void *arg) * written only by the pps_capture() routine and read only by the * pps_event() routine. We don't need lock-based management of access * to the capture area because we have time-based access management: we - * can't be reading and writing concurently because we can't be running + * can't be reading and writing concurrently because we can't be running * both the threaded and filter handlers concurrently (because a new * hardware interrupt can't happen until the threaded handler for the * current interrupt exits, after which the system does the EOI that From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 04:34:37 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89DB867C108; Wed, 1 Sep 2021 04:34:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gzrn91Hkmz3s8y; Wed, 1 Sep 2021 04:34:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF0FB1ED95; Wed, 1 Sep 2021 04:34:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1814Ya5c034233; Wed, 1 Sep 2021 04:34:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1814Yak4034232; Wed, 1 Sep 2021 04:34:36 GMT (envelope-from git) Date: Wed, 1 Sep 2021 04:34:36 GMT Message-Id: <202109010434.1814Yak4034232@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 52237be90c70 - stable/13 - isci(4): Fix a common typo in src comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 52237be90c7087fe895487fe35e935f825f4e5f7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 04:34:37 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=52237be90c7087fe895487fe35e935f825f4e5f7 commit 52237be90c7087fe895487fe35e935f825f4e5f7 Author: Gordon Bergling AuthorDate: 2021-08-29 07:55:10 +0000 Commit: Gordon Bergling CommitDate: 2021-09-01 04:34:00 +0000 isci(4): Fix a common typo in src comments - s/exlusive/exclusive/ (cherry picked from commit 2dfcc3a91dd4d21c16269b7add3141c99dfa48ab) --- sys/dev/isci/isci_timer.c | 2 +- sys/dev/isci/scil/scic_user_callback.h | 2 +- sys/dev/isci/scil/scif_user_callback.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/isci/isci_timer.c b/sys/dev/isci/isci_timer.c index 60dfb63d83eb..9bba29c85242 100644 --- a/sys/dev/isci/isci_timer.c +++ b/sys/dev/isci/isci_timer.c @@ -109,7 +109,7 @@ scif_cb_timer_stop(SCI_CONTROLLER_HANDLE_T controller, void *timer) * a handle for this timer for use in further timer interactions. * * @warning The "timer_callback" method should be executed in a mutually - * exlusive manner from the controller completion handler + * exclusive manner from the controller completion handler * handler (refer to scic_controller_get_handler_methods()). * * @param[in] timer_callback This parameter specifies the callback method diff --git a/sys/dev/isci/scil/scic_user_callback.h b/sys/dev/isci/scil/scic_user_callback.h index 292237062ae3..2260f14c2705 100644 --- a/sys/dev/isci/scil/scic_user_callback.h +++ b/sys/dev/isci/scil/scic_user_callback.h @@ -76,7 +76,7 @@ extern "C" { * a handle for this timer for use in further timer interactions. * * @warning The "timer_callback" method should be executed in a mutually - * exlusive manner from the controller completion handler + * exclusive manner from the controller completion handler * handler (refer to scic_controller_get_handler_methods()). * * @param[in] controller This parameter specifies the controller with diff --git a/sys/dev/isci/scil/scif_user_callback.h b/sys/dev/isci/scil/scif_user_callback.h index 39c6718b6f3e..3a44b772ae20 100644 --- a/sys/dev/isci/scil/scif_user_callback.h +++ b/sys/dev/isci/scil/scif_user_callback.h @@ -80,7 +80,7 @@ extern "C" { * a handle for this timer for use in further timer interactions. * * @warning The "timer_callback" method should be executed in a mutually - * exlusive manner from the controller completion handler + * exclusive manner from the controller completion handler * handler (refer to scic_controller_get_handler_methods()). * * @param[in] timer_callback This parameter specifies the callback method From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 04:34:39 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A90B567BE55; Wed, 1 Sep 2021 04:34:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzrnB57yWz3ryg; Wed, 1 Sep 2021 04:34:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1FC251ED96; Wed, 1 Sep 2021 04:34:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1814YcuZ034262; Wed, 1 Sep 2021 04:34:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1814Ycdu034261; Wed, 1 Sep 2021 04:34:38 GMT (envelope-from git) Date: Wed, 1 Sep 2021 04:34:38 GMT Message-Id: <202109010434.1814Ycdu034261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 8fc67f27d09e - stable/13 - libsa: Fix a typo in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8fc67f27d09e994d27703c2ee3d05e6f3515ab78 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 04:34:39 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8fc67f27d09e994d27703c2ee3d05e6f3515ab78 commit 8fc67f27d09e994d27703c2ee3d05e6f3515ab78 Author: Gordon Bergling AuthorDate: 2021-08-29 08:09:58 +0000 Commit: Gordon Bergling CommitDate: 2021-09-01 04:34:20 +0000 libsa: Fix a typo in source code comments - s/mininum/minimum/ (cherry picked from commit 005fe24f2a4c873a96f446604e0453cf99e9bcd7) --- stand/libsa/ext2fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/libsa/ext2fs.c b/stand/libsa/ext2fs.c index 068e307253a9..b81654552af3 100644 --- a/stand/libsa/ext2fs.c +++ b/stand/libsa/ext2fs.c @@ -127,8 +127,8 @@ struct fs_ops ext2fs_fsops = { #define EXT2_R0_ISIZE 128 /* inode size */ #define EXT2_R0_FIRSTINO 11 /* first inode */ -#define EXT2_MINBSHIFT 10 /* mininum block shift */ -#define EXT2_MINFSHIFT 10 /* mininum frag shift */ +#define EXT2_MINBSHIFT 10 /* minimum block shift */ +#define EXT2_MINFSHIFT 10 /* minimum frag shift */ #define EXT2_NDADDR 12 /* # of direct blocks */ #define EXT2_NIADDR 3 /* # of indirect blocks */ From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 04:35:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9251467C233; Wed, 1 Sep 2021 04:35:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gzrpk3n16z3s9x; Wed, 1 Sep 2021 04:35:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A68B1ED1C; Wed, 1 Sep 2021 04:35:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1814Zw3Y034489; Wed, 1 Sep 2021 04:35:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1814Zw7Z034488; Wed, 1 Sep 2021 04:35:58 GMT (envelope-from git) Date: Wed, 1 Sep 2021 04:35:58 GMT Message-Id: <202109010435.1814Zw7Z034488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 42419d7c4dd9 - stable/12 - libsa: Fix a typo in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 42419d7c4dd96268086fe52f4d1606925fff4818 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 04:35:58 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=42419d7c4dd96268086fe52f4d1606925fff4818 commit 42419d7c4dd96268086fe52f4d1606925fff4818 Author: Gordon Bergling AuthorDate: 2021-08-29 08:09:58 +0000 Commit: Gordon Bergling CommitDate: 2021-09-01 04:34:56 +0000 libsa: Fix a typo in source code comments - s/mininum/minimum/ (cherry picked from commit 005fe24f2a4c873a96f446604e0453cf99e9bcd7) --- stand/libsa/ext2fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/libsa/ext2fs.c b/stand/libsa/ext2fs.c index 068e307253a9..b81654552af3 100644 --- a/stand/libsa/ext2fs.c +++ b/stand/libsa/ext2fs.c @@ -127,8 +127,8 @@ struct fs_ops ext2fs_fsops = { #define EXT2_R0_ISIZE 128 /* inode size */ #define EXT2_R0_FIRSTINO 11 /* first inode */ -#define EXT2_MINBSHIFT 10 /* mininum block shift */ -#define EXT2_MINFSHIFT 10 /* mininum frag shift */ +#define EXT2_MINBSHIFT 10 /* minimum block shift */ +#define EXT2_MINFSHIFT 10 /* minimum frag shift */ #define EXT2_NDADDR 12 /* # of direct blocks */ #define EXT2_NIADDR 3 /* # of indirect blocks */ From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 04:36:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05D3867C234; Wed, 1 Sep 2021 04:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gzrpl5WZpz3rvC; Wed, 1 Sep 2021 04:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96CFD1EB1A; Wed, 1 Sep 2021 04:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1814ZxIq034520; Wed, 1 Sep 2021 04:35:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1814ZxIj034519; Wed, 1 Sep 2021 04:35:59 GMT (envelope-from git) Date: Wed, 1 Sep 2021 04:35:59 GMT Message-Id: <202109010435.1814ZxIj034519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: c3cd63c8661c - stable/12 - isci(4): Fix a common typo in src comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c3cd63c8661ccf95d12c95e070bc9c8973ee8929 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 04:36:00 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c3cd63c8661ccf95d12c95e070bc9c8973ee8929 commit c3cd63c8661ccf95d12c95e070bc9c8973ee8929 Author: Gordon Bergling AuthorDate: 2021-08-29 07:55:10 +0000 Commit: Gordon Bergling CommitDate: 2021-09-01 04:35:19 +0000 isci(4): Fix a common typo in src comments - s/exlusive/exclusive/ (cherry picked from commit 2dfcc3a91dd4d21c16269b7add3141c99dfa48ab) --- sys/dev/isci/isci_timer.c | 2 +- sys/dev/isci/scil/scic_user_callback.h | 2 +- sys/dev/isci/scil/scif_user_callback.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/isci/isci_timer.c b/sys/dev/isci/isci_timer.c index 60dfb63d83eb..9bba29c85242 100644 --- a/sys/dev/isci/isci_timer.c +++ b/sys/dev/isci/isci_timer.c @@ -109,7 +109,7 @@ scif_cb_timer_stop(SCI_CONTROLLER_HANDLE_T controller, void *timer) * a handle for this timer for use in further timer interactions. * * @warning The "timer_callback" method should be executed in a mutually - * exlusive manner from the controller completion handler + * exclusive manner from the controller completion handler * handler (refer to scic_controller_get_handler_methods()). * * @param[in] timer_callback This parameter specifies the callback method diff --git a/sys/dev/isci/scil/scic_user_callback.h b/sys/dev/isci/scil/scic_user_callback.h index 292237062ae3..2260f14c2705 100644 --- a/sys/dev/isci/scil/scic_user_callback.h +++ b/sys/dev/isci/scil/scic_user_callback.h @@ -76,7 +76,7 @@ extern "C" { * a handle for this timer for use in further timer interactions. * * @warning The "timer_callback" method should be executed in a mutually - * exlusive manner from the controller completion handler + * exclusive manner from the controller completion handler * handler (refer to scic_controller_get_handler_methods()). * * @param[in] controller This parameter specifies the controller with diff --git a/sys/dev/isci/scil/scif_user_callback.h b/sys/dev/isci/scil/scif_user_callback.h index 39c6718b6f3e..3a44b772ae20 100644 --- a/sys/dev/isci/scil/scif_user_callback.h +++ b/sys/dev/isci/scil/scif_user_callback.h @@ -80,7 +80,7 @@ extern "C" { * a handle for this timer for use in further timer interactions. * * @warning The "timer_callback" method should be executed in a mutually - * exlusive manner from the controller completion handler + * exclusive manner from the controller completion handler * handler (refer to scic_controller_get_handler_methods()). * * @param[in] timer_callback This parameter specifies the callback method From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:07:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F299669DDA; Wed, 1 Sep 2021 13:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H049W1VLvz3KNs; Wed, 1 Sep 2021 13:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B59C25772; Wed, 1 Sep 2021 13:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181D7xZt020528; Wed, 1 Sep 2021 13:07:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181D7x6I020527; Wed, 1 Sep 2021 13:07:59 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:07:59 GMT Message-Id: <202109011307.181D7x6I020527@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 04d6503fd431 - stable/13 - fsetown: Fix process lookup bugs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 04d6503fd4310635a50d2118470e825401cac889 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:07:59 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=04d6503fd4310635a50d2118470e825401cac889 commit 04d6503fd4310635a50d2118470e825401cac889 Author: Mark Johnston AuthorDate: 2021-08-25 20:18:10 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 13:07:06 +0000 fsetown: Fix process lookup bugs - pget()/pfind() will acquire the PID hash bucket locks, which are sleepable sx locks, but this means that the sigio mutex cannot be held while calling these functions. Instead, use pget() to hold the process, after which we lock the sigio and proc locks, respectively. - funsetownlst() assumes that processes cannot be registered for SIGIO once they have P_WEXIT set. However, pfind() will happily return exiting processes, breaking the invariant. Add an explicit check for P_WEXIT in fsetown() to fix this. [1] Fixes: f52979098d3c ("Fix a pair of races in SIGIO registration") Reported by: syzkaller [1] Reviewed by: kib Sponsored by: The FreeBSD Foundation (cherry picked from commit 1d874ba4f8ba58296cd9df611f5346dad8e91664) --- sys/kern/kern_descrip.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index c7269e4b33a9..e6a6a36801e4 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1031,18 +1031,16 @@ funsetown_locked(struct sigio *sigio) if (sigio == NULL) return (NULL); - *(sigio->sio_myref) = NULL; + *sigio->sio_myref = NULL; if (sigio->sio_pgid < 0) { pg = sigio->sio_pgrp; PGRP_LOCK(pg); - SLIST_REMOVE(&sigio->sio_pgrp->pg_sigiolst, sigio, - sigio, sio_pgsigio); + SLIST_REMOVE(&pg->pg_sigiolst, sigio, sigio, sio_pgsigio); PGRP_UNLOCK(pg); } else { p = sigio->sio_proc; PROC_LOCK(p); - SLIST_REMOVE(&sigio->sio_proc->p_sigiolst, sigio, - sigio, sio_pgsigio); + SLIST_REMOVE(&p->p_sigiolst, sigio, sigio, sio_pgsigio); PROC_UNLOCK(p); } return (sigio); @@ -1156,18 +1154,25 @@ fsetown(pid_t pgid, struct sigio **sigiop) } ret = 0; + osigio = NULL; sigio = malloc(sizeof(struct sigio), M_SIGIO, M_WAITOK); sigio->sio_pgid = pgid; sigio->sio_ucred = crhold(curthread->td_ucred); sigio->sio_myref = sigiop; - sx_slock(&proctree_lock); - SIGIO_LOCK(); - osigio = funsetown_locked(*sigiop); if (pgid > 0) { - proc = pfind(pgid); - if (proc == NULL) { + ret = pget(pgid, PGET_NOTWEXIT | PGET_NOTID | PGET_HOLD, &proc); + SIGIO_LOCK(); + if (ret != 0) + goto fail; + + osigio = funsetown_locked(*sigiop); + + PROC_LOCK(proc); + _PRELE(proc); + if ((proc->p_flag & P_WEXIT) != 0) { + PROC_UNLOCK(proc); ret = ESRCH; goto fail; } @@ -1190,12 +1195,17 @@ fsetown(pid_t pgid, struct sigio **sigiop) SLIST_INSERT_HEAD(&proc->p_sigiolst, sigio, sio_pgsigio); PROC_UNLOCK(proc); } else /* if (pgid < 0) */ { + sx_slock(&proctree_lock); + SIGIO_LOCK(); pgrp = pgfind(-pgid); if (pgrp == NULL) { + sx_sunlock(&proctree_lock); ret = ESRCH; goto fail; } + osigio = funsetown_locked(*sigiop); + /* * Policy - Don't allow a process to FSETOWN a process * in another session. @@ -1205,16 +1215,17 @@ fsetown(pid_t pgid, struct sigio **sigiop) * group for maximum safety. */ if (pgrp->pg_session != curthread->td_proc->p_session) { + sx_sunlock(&proctree_lock); PGRP_UNLOCK(pgrp); ret = EPERM; goto fail; } - SLIST_INSERT_HEAD(&pgrp->pg_sigiolst, sigio, sio_pgsigio); sigio->sio_pgrp = pgrp; + SLIST_INSERT_HEAD(&pgrp->pg_sigiolst, sigio, sio_pgsigio); PGRP_UNLOCK(pgrp); + sx_sunlock(&proctree_lock); } - sx_sunlock(&proctree_lock); *sigiop = sigio; SIGIO_UNLOCK(); if (osigio != NULL) @@ -1223,7 +1234,6 @@ fsetown(pid_t pgid, struct sigio **sigiop) fail: SIGIO_UNLOCK(); - sx_sunlock(&proctree_lock); sigiofree(sigio); if (osigio != NULL) sigiofree(osigio); From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:08:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6678E66A0C4; Wed, 1 Sep 2021 13:08:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H049X2VNpz3KVN; Wed, 1 Sep 2021 13:08:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E0F725A43; Wed, 1 Sep 2021 13:08:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181D80Mj020552; Wed, 1 Sep 2021 13:08:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181D80qd020551; Wed, 1 Sep 2021 13:08:00 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:08:00 GMT Message-Id: <202109011308.181D80qd020551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d8b1ffc8e222 - stable/13 - fsetown: Simplify error handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d8b1ffc8e222c8724c55c3ba11623aafffada710 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:08:00 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d8b1ffc8e222c8724c55c3ba11623aafffada710 commit d8b1ffc8e222c8724c55c3ba11623aafffada710 Author: Mark Johnston AuthorDate: 2021-08-25 20:20:07 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 13:07:35 +0000 fsetown: Simplify error handling No functional change intended. Suggested by: kib Reviewed by: kib Sponsored by: The FreeBSD Foundation (cherry picked from commit a507a40f3b587bde7ab391f8f1400a25f33e65c1) --- sys/kern/kern_descrip.c | 106 ++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 61 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index e6a6a36801e4..f78e999ab3b5 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1153,88 +1153,72 @@ fsetown(pid_t pgid, struct sigio **sigiop) return (0); } - ret = 0; - osigio = NULL; - sigio = malloc(sizeof(struct sigio), M_SIGIO, M_WAITOK); sigio->sio_pgid = pgid; sigio->sio_ucred = crhold(curthread->td_ucred); sigio->sio_myref = sigiop; + osigio = NULL; + ret = 0; if (pgid > 0) { ret = pget(pgid, PGET_NOTWEXIT | PGET_NOTID | PGET_HOLD, &proc); SIGIO_LOCK(); - if (ret != 0) - goto fail; - - osigio = funsetown_locked(*sigiop); - - PROC_LOCK(proc); - _PRELE(proc); - if ((proc->p_flag & P_WEXIT) != 0) { - PROC_UNLOCK(proc); - ret = ESRCH; - goto fail; - } - - /* - * Policy - Don't allow a process to FSETOWN a process - * in another session. - * - * Remove this test to allow maximum flexibility or - * restrict FSETOWN to the current process or process - * group for maximum safety. - */ - if (proc->p_session != curthread->td_proc->p_session) { + if (ret == 0) { + osigio = funsetown_locked(*sigiop); + + PROC_LOCK(proc); + _PRELE(proc); + if ((proc->p_flag & P_WEXIT) != 0) { + ret = ESRCH; + } else if (proc->p_session != + curthread->td_proc->p_session) { + /* + * Policy - Don't allow a process to FSETOWN a + * process in another session. + * + * Remove this test to allow maximum flexibility + * or restrict FSETOWN to the current process or + * process group for maximum safety. + */ + ret = EPERM; + } else { + sigio->sio_proc = proc; + SLIST_INSERT_HEAD(&proc->p_sigiolst, sigio, + sio_pgsigio); + } PROC_UNLOCK(proc); - ret = EPERM; - goto fail; } - - sigio->sio_proc = proc; - SLIST_INSERT_HEAD(&proc->p_sigiolst, sigio, sio_pgsigio); - PROC_UNLOCK(proc); } else /* if (pgid < 0) */ { sx_slock(&proctree_lock); SIGIO_LOCK(); pgrp = pgfind(-pgid); if (pgrp == NULL) { - sx_sunlock(&proctree_lock); ret = ESRCH; - goto fail; - } - - osigio = funsetown_locked(*sigiop); - - /* - * Policy - Don't allow a process to FSETOWN a process - * in another session. - * - * Remove this test to allow maximum flexibility or - * restrict FSETOWN to the current process or process - * group for maximum safety. - */ - if (pgrp->pg_session != curthread->td_proc->p_session) { - sx_sunlock(&proctree_lock); + } else { + osigio = funsetown_locked(*sigiop); + + if (pgrp->pg_session != curthread->td_proc->p_session) { + /* + * Policy - Don't allow a process to FSETOWN a + * process in another session. + * + * Remove this test to allow maximum flexibility + * or restrict FSETOWN to the current process or + * process group for maximum safety. + */ + ret = EPERM; + } else { + sigio->sio_pgrp = pgrp; + SLIST_INSERT_HEAD(&pgrp->pg_sigiolst, sigio, + sio_pgsigio); + } PGRP_UNLOCK(pgrp); - ret = EPERM; - goto fail; } - - sigio->sio_pgrp = pgrp; - SLIST_INSERT_HEAD(&pgrp->pg_sigiolst, sigio, sio_pgsigio); - PGRP_UNLOCK(pgrp); sx_sunlock(&proctree_lock); } - *sigiop = sigio; - SIGIO_UNLOCK(); - if (osigio != NULL) - sigiofree(osigio); - return (0); - -fail: + if (ret == 0) + *sigiop = sigio; SIGIO_UNLOCK(); - sigiofree(sigio); if (osigio != NULL) sigiofree(osigio); return (ret); From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:08:01 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB76B66A2CE; Wed, 1 Sep 2021 13:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H049Y2xYhz3KjJ; Wed, 1 Sep 2021 13:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4975E25B17; Wed, 1 Sep 2021 13:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181D81xC020576; Wed, 1 Sep 2021 13:08:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181D81rj020575; Wed, 1 Sep 2021 13:08:01 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:08:01 GMT Message-Id: <202109011308.181D81rj020575@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 32d4139b3eb8 - stable/13 - fsetown: Avoid process group lock recursion MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 32d4139b3eb8a088add57a326e60ec8e7e2e8f08 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:08:02 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=32d4139b3eb8a088add57a326e60ec8e7e2e8f08 commit 32d4139b3eb8a088add57a326e60ec8e7e2e8f08 Author: Mark Johnston AuthorDate: 2021-08-28 19:50:44 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 13:07:39 +0000 fsetown: Avoid process group lock recursion Restore the pre-1d874ba4f8ba behaviour of disassociating the current SIGIO recipient before looking up the specified process or process group. This avoids a lock recursion in the scenario where a process group is configured to receive SIGIO for an fd when it has already been so configured. Reported by: pho Tested by: pho Reviewed by: kib (cherry picked from commit 7326e8589cc21431d62f25802eac7c5dd6f74122) --- sys/kern/kern_descrip.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index f78e999ab3b5..ed7fe83cf02f 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1158,14 +1158,12 @@ fsetown(pid_t pgid, struct sigio **sigiop) sigio->sio_ucred = crhold(curthread->td_ucred); sigio->sio_myref = sigiop; - osigio = NULL; ret = 0; if (pgid > 0) { ret = pget(pgid, PGET_NOTWEXIT | PGET_NOTID | PGET_HOLD, &proc); SIGIO_LOCK(); + osigio = funsetown_locked(*sigiop); if (ret == 0) { - osigio = funsetown_locked(*sigiop); - PROC_LOCK(proc); _PRELE(proc); if ((proc->p_flag & P_WEXIT) != 0) { @@ -1191,12 +1189,11 @@ fsetown(pid_t pgid, struct sigio **sigiop) } else /* if (pgid < 0) */ { sx_slock(&proctree_lock); SIGIO_LOCK(); + osigio = funsetown_locked(*sigiop); pgrp = pgfind(-pgid); if (pgrp == NULL) { ret = ESRCH; } else { - osigio = funsetown_locked(*sigiop); - if (pgrp->pg_session != curthread->td_proc->p_session) { /* * Policy - Don't allow a process to FSETOWN a From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:08:02 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B29E066A2D0; Wed, 1 Sep 2021 13:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H049Z4PMJz3Kcp; Wed, 1 Sep 2021 13:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 78F4E25AA9; Wed, 1 Sep 2021 13:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181D82Zl020600; Wed, 1 Sep 2021 13:08:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181D82tb020599; Wed, 1 Sep 2021 13:08:02 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:08:02 GMT Message-Id: <202109011308.181D82tb020599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 2d4c599e7d6a - stable/13 - vmm: Add credential to cdev object MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2d4c599e7d6a1890bd4794d8b3d43d8e182b42d4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:08:02 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2d4c599e7d6a1890bd4794d8b3d43d8e182b42d4 commit 2d4c599e7d6a1890bd4794d8b3d43d8e182b42d4 Author: Cyril Zhang AuthorDate: 2021-08-18 17:41:33 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 13:07:42 +0000 vmm: Add credential to cdev object Add a credential to the cdev object in sysctl_vmm_create(), then check that we have the correct credentials in sysctl_vmm_destroy(). This prevents a process in one jail from opening or destroying the /dev/vmm file corresponding to a VM in a sibling jail. Add regression tests. Reviewed by: jhb, markj Sponsored by: The FreeBSD Foundation (cherry picked from commit a85404906bc8f402318524b4ccd196712fc09fbd) --- etc/mtree/BSD.tests.dist | 2 ++ sys/amd64/vmm/vmm_dev.c | 15 ++++++-- tests/sys/Makefile | 1 + tests/sys/vmm/Makefile | 11 ++++++ tests/sys/vmm/utils.subr | 47 +++++++++++++++++++++++++ tests/sys/vmm/vmm_cred_jail.sh | 80 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 154 insertions(+), 2 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 60cdca439887..f7965dac2884 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -866,6 +866,8 @@ .. vm .. + vmm + .. .. usr.bin apply diff --git a/sys/amd64/vmm/vmm_dev.c b/sys/amd64/vmm/vmm_dev.c index 2da6225fdddd..2ce9470cf6dd 100644 --- a/sys/amd64/vmm/vmm_dev.c +++ b/sys/amd64/vmm/vmm_dev.c @@ -80,6 +80,7 @@ struct devmem_softc { struct vmmdev_softc { struct vm *vm; /* vm instance cookie */ struct cdev *cdev; + struct ucred *ucred; SLIST_ENTRY(vmmdev_softc) link; SLIST_HEAD(, devmem_softc) devmem; int flags; @@ -182,6 +183,12 @@ vmmdev_lookup(const char *name) break; } + if (sc == NULL) + return (NULL); + + if (cr_cansee(curthread->td_ucred, sc->ucred)) + return (NULL); + return (sc); } @@ -979,6 +986,9 @@ vmmdev_destroy(void *arg) if (sc->vm != NULL) vm_destroy(sc->vm); + if (sc->ucred != NULL) + crfree(sc->ucred); + if ((sc->flags & VSC_LINKED) != 0) { mtx_lock(&vmmdev_mtx); SLIST_REMOVE(&head, sc, vmmdev_softc, link); @@ -1096,6 +1106,7 @@ sysctl_vmm_create(SYSCTL_HANDLER_ARGS) goto out; sc = malloc(sizeof(struct vmmdev_softc), M_VMMDEV, M_WAITOK | M_ZERO); + sc->ucred = crhold(curthread->td_ucred); sc->vm = vm; SLIST_INIT(&sc->devmem); @@ -1117,8 +1128,8 @@ sysctl_vmm_create(SYSCTL_HANDLER_ARGS) goto out; } - error = make_dev_p(MAKEDEV_CHECKNAME, &cdev, &vmmdevsw, NULL, - UID_ROOT, GID_WHEEL, 0600, "vmm/%s", buf); + error = make_dev_p(MAKEDEV_CHECKNAME, &cdev, &vmmdevsw, sc->ucred, + UID_ROOT, GID_WHEEL, 0600, "vmm/%s", buf); if (error != 0) { vmmdev_destroy(sc); goto out; diff --git a/tests/sys/Makefile b/tests/sys/Makefile index 2781f7fb4ded..2ba60f41b76c 100644 --- a/tests/sys/Makefile +++ b/tests/sys/Makefile @@ -31,6 +31,7 @@ TESTS_SUBDIRS+= posixshm TESTS_SUBDIRS+= sys TESTS_SUBDIRS+= vfs TESTS_SUBDIRS+= vm +TESTS_SUBDIRS+= vmm .if ${MK_AUDIT} != "no" _audit= audit diff --git a/tests/sys/vmm/Makefile b/tests/sys/vmm/Makefile new file mode 100644 index 000000000000..544d98421a95 --- /dev/null +++ b/tests/sys/vmm/Makefile @@ -0,0 +1,11 @@ +PACKAGE= tests + +TESTSDIR= ${TESTSBASE}/sys/vmm + +BINDIR= ${TESTSDIR} + +ATF_TESTS_SH+= vmm_cred_jail + +${PACKAGE}FILES+= utils.subr + +.include diff --git a/tests/sys/vmm/utils.subr b/tests/sys/vmm/utils.subr new file mode 100644 index 000000000000..0de9c6c671ea --- /dev/null +++ b/tests/sys/vmm/utils.subr @@ -0,0 +1,47 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 The FreeBSD Foundation +# +# This software was developed by Cyril Zhang 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: +# 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. +# + +vmm_mkjail() +{ + jailname=$1 + jail -c name=${jailname} persist allow.vmm + echo $jailname >> created_jails.lst +} +vmm_cleanup() +{ + if [ -f created_jails.lst ] + then + for jailname in `cat created_jails.lst` + do + jail -r ${jailname} + done + rm created_jails.lst + fi +} diff --git a/tests/sys/vmm/vmm_cred_jail.sh b/tests/sys/vmm/vmm_cred_jail.sh new file mode 100644 index 000000000000..5dcb30e628c2 --- /dev/null +++ b/tests/sys/vmm/vmm_cred_jail.sh @@ -0,0 +1,80 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 The FreeBSD Foundation +# +# This software was developed by Cyril Zhang 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: +# 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. +# + +. $(atf_get_srcdir)/utils.subr + +atf_test_case vmm_cred_jail_host cleanup +vmm_cred_jail_host_head() +{ + atf_set "descr" "Tests deleting the host's VM from within a jail" + atf_set "require.user" "root" +} +vmm_cred_jail_host_body() +{ + if ! kldstat -qn vmm; then + atf_skip "vmm is not loaded" + fi + bhyvectl --vm=testvm --create + vmm_mkjail myjail + atf_check -s exit:1 -e ignore jexec myjail bhyvectl --vm=testvm --destroy +} +vmm_cred_jail_host_cleanup() +{ + bhyvectl --vm=testvm --destroy + vmm_cleanup +} + +atf_test_case vmm_cred_jail_other cleanup +vmm_cred_jail_other_head() +{ + atf_set "descr" "Tests deleting a jail's VM from within another jail" + atf_set "require.user" "root" +} +vmm_cred_jail_other_body() +{ + if ! kldstat -qn vmm; then + atf_skip "vmm is not loaded" + fi + vmm_mkjail myjail1 + vmm_mkjail myjail2 + atf_check -s exit:0 jexec myjail1 bhyvectl --vm=testvm --create + atf_check -s exit:1 -e ignore jexec myjail2 bhyvectl --vm=testvm --destroy +} +vmm_cred_jail_other_cleanup() +{ + bhyvectl --vm=testvm --destroy + vmm_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case vmm_cred_jail_host + atf_add_test_case vmm_cred_jail_other +} From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:28:29 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAA3C66AB9D; Wed, 1 Sep 2021 13:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04d95MV7z3Qpl; Wed, 1 Sep 2021 13:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0B5926097; Wed, 1 Sep 2021 13:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DSTpQ047492; Wed, 1 Sep 2021 13:28:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DSTmg047491; Wed, 1 Sep 2021 13:28:29 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:28:29 GMT Message-Id: <202109011328.181DSTmg047491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 91282dac0d25 - stable/12 - if_vlan: add the ALTQ support to if_vlan. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 91282dac0d2559712bdc0f3181085673e8d9eba9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:28:29 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=91282dac0d2559712bdc0f3181085673e8d9eba9 commit 91282dac0d2559712bdc0f3181085673e8d9eba9 Author: Luiz Otavio O Souza AuthorDate: 2021-08-21 09:41:03 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 07:38:02 +0000 if_vlan: add the ALTQ support to if_vlan. Inspired by the iflib implementation, allow ALTQ to be used with if_vlan interfaces. Reviewed by: donner Obtained from: pfsense MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31647 (cherry picked from commit 2e5ff01d0a1fabc757252f9c28ad5cddc98a652d) --- sys/net/if_vlan.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index a055c978c32f..ae1e05e8bc93 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -291,6 +291,10 @@ static int vlan_setflag(struct ifnet *ifp, int flag, int status, static int vlan_setflags(struct ifnet *ifp, int status); static int vlan_setmulti(struct ifnet *ifp); static int vlan_transmit(struct ifnet *ifp, struct mbuf *m); +#ifdef ALTQ +static void vlan_altq_start(struct ifnet *ifp); +static int vlan_altq_transmit(struct ifnet *ifp, struct mbuf *m); +#endif static int vlan_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro); static void vlan_unconfig(struct ifnet *ifp); @@ -1058,7 +1062,15 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) ifp->if_dunit = unit; ifp->if_init = vlan_init; +#ifdef ALTQ + ifp->if_start = vlan_altq_start; + ifp->if_transmit = vlan_altq_transmit; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = 0; + IFQ_SET_READY(&ifp->if_snd); +#else ifp->if_transmit = vlan_transmit; +#endif ifp->if_qflush = vlan_qflush; ifp->if_ioctl = vlan_ioctl; #ifdef RATELIMIT @@ -1102,6 +1114,10 @@ vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) struct ifvlan *ifv = ifp->if_softc; int unit = ifp->if_dunit; + +#ifdef ALTQ + IFQ_PURGE(&ifp->if_snd); +#endif ether_ifdetach(ifp); /* first, remove it from system-wide lists */ vlan_unconfig(ifp); /* now it can be unconfigured and freed */ /* @@ -1200,6 +1216,37 @@ vlan_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, return p->if_output(ifp, m, dst, ro); } +#ifdef ALTQ +static void +vlan_altq_start(if_t ifp) +{ + struct ifaltq *ifq = &ifp->if_snd; + struct mbuf *m; + + IFQ_LOCK(ifq); + IFQ_DEQUEUE_NOLOCK(ifq, m); + while (m != NULL) { + vlan_transmit(ifp, m); + IFQ_DEQUEUE_NOLOCK(ifq, m); + } + IFQ_UNLOCK(ifq); +} + +static int +vlan_altq_transmit(if_t ifp, struct mbuf *m) +{ + int err; + + if (ALTQ_IS_ENABLED(&ifp->if_snd)) { + IFQ_ENQUEUE(&ifp->if_snd, m, err); + if (err == 0) + vlan_altq_start(ifp); + } else + err = vlan_transmit(ifp, m); + + return (err); +} +#endif /* ALTQ */ /* * The ifp->if_qflush entry point for vlan(4) is a no-op. From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:28:31 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0EF6B66A8CA; Wed, 1 Sep 2021 13:28:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04dB6qBVz3Qfh; Wed, 1 Sep 2021 13:28:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B20C826098; Wed, 1 Sep 2021 13:28:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DSUMF047613; Wed, 1 Sep 2021 13:28:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DSUFN047612; Wed, 1 Sep 2021 13:28:30 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:28:30 GMT Message-Id: <202109011328.181DSUFN047612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 97f6c6688934 - stable/12 - pf tests: test ALTQ CBQ on top of if_vlan MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 97f6c66889343e1593d638cf743180f2a74cc7b5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:28:31 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=97f6c66889343e1593d638cf743180f2a74cc7b5 commit 97f6c66889343e1593d638cf743180f2a74cc7b5 Author: Kristof Provost AuthorDate: 2021-08-23 14:58:50 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 07:38:53 +0000 pf tests: test ALTQ CBQ on top of if_vlan The main purpose of this test is to verify that we can use ALTQ on top of if_vlan, but while we're here we also exercise the CBQ code. There's already a basis test for HFSC, so it makes sense to test another algorithm while we test if_vlan. Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31649 (cherry picked from commit e62175df4ec2c8fe2aa2e372f683ddb933768e62) --- tests/sys/common/vnet.subr | 7 ++++++ tests/sys/netpfil/pf/altq.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index d86afaf6aafa..e4d8ceaa610a 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -23,6 +23,13 @@ vnet_mkbridge() echo ${ifname} } +vnet_mkvlan() +{ + ifname=$(ifconfig vlan create) + echo ${ifname} >> created_interfaces.lst + echo ${ifname} +} + vnet_mkjail() { jailname=$1 diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 294c01e9f8bd..53cf10e47565 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -86,9 +86,69 @@ match_cleanup() altq_cleanup } +atf_test_case "cbq_vlan" "cleanup" +cbq_vlan_head() +{ + atf_set descr 'CBQ over VLAN test' + atf_set require.user root +} + +cbq_vlan_body() +{ + altq_init + is_altq_supported cbq + + epair=$(vnet_mkepair) + vnet_mkjail altq_cbq_vlan ${epair}b + + vlan=$(vnet_mkvlan) + ifconfig ${vlan} vlan 42 vlandev ${epair}a + ifconfig ${vlan} 192.0.2.1/24 up + ifconfig ${epair}a up + + vlanj=$(jexec altq_cbq_vlan ifconfig vlan create) + echo ${vlanj} >> created_interfaces.lst + + jexec altq_cbq_vlan ifconfig ${epair}b up + jexec altq_cbq_vlan ifconfig ${vlanj} vlan 42 vlandev ${epair}b + jexec altq_cbq_vlan ifconfig ${vlanj} 192.0.2.2/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -i .1 -c 3 -s 1200 192.0.2.2 + + jexec altq_cbq_vlan pfctl -e + pft_set_rules altq_cbq_vlan \ + "altq on ${vlanj} bandwidth 14000b cbq queue { default }" \ + "queue default bandwidth 14000b cbq(default) { slow } " \ + "queue slow bandwidth 6000b cbq(borrow)" \ + "match proto icmp queue slow" \ + "match proto tcp queue default" \ + "pass" + + # single ping succeeds just fine + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 + + # "Saturate the link" + ping -i .01 -c 50 -s 1200 192.0.2.2 + + # We should now be hitting the limits and get these packet dropped. + rcv=$(ping -i .1 -c 5 -s 1200 192.0.2.2 | tr "," "\n" | awk '/packets received/ { print $1; }') + echo "Received $rcv packets" + if [ ${rcv} -gt 1 ] + then + atf_fail "Received ${rcv} packets in a saturated link" + fi +} + +cbq_vlan_cleanup() +{ + altq_cleanup +} + atf_init_test_cases() { atf_add_test_case "hfsc" atf_add_test_case "match" + atf_add_test_case "cbq_vlan" } From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:28:30 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3A5166AB4E; Wed, 1 Sep 2021 13:28:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04dB4CQzz3Qpm; Wed, 1 Sep 2021 13:28:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72FFC25E21; Wed, 1 Sep 2021 13:28:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DSUuV047587; Wed, 1 Sep 2021 13:28:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DSUwR047586; Wed, 1 Sep 2021 13:28:30 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:28:30 GMT Message-Id: <202109011328.181DSUwR047586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 984c87891bf5 - stable/13 - if_vlan: add the ALTQ support to if_vlan. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 984c87891bf5e04fd2400be04e1957f1472b7d3c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:28:30 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=984c87891bf5e04fd2400be04e1957f1472b7d3c commit 984c87891bf5e04fd2400be04e1957f1472b7d3c Author: Luiz Otavio O Souza AuthorDate: 2021-08-21 09:41:03 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 13:27:00 +0000 if_vlan: add the ALTQ support to if_vlan. Inspired by the iflib implementation, allow ALTQ to be used with if_vlan interfaces. Reviewed by: donner Obtained from: pfsense MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31647 (cherry picked from commit 2e5ff01d0a1fabc757252f9c28ad5cddc98a652d) --- sys/net/if_vlan.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 2ff584a059e9..3114a3f8b76c 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -305,6 +305,10 @@ static int vlan_setflag(struct ifnet *ifp, int flag, int status, static int vlan_setflags(struct ifnet *ifp, int status); static int vlan_setmulti(struct ifnet *ifp); static int vlan_transmit(struct ifnet *ifp, struct mbuf *m); +#ifdef ALTQ +static void vlan_altq_start(struct ifnet *ifp); +static int vlan_altq_transmit(struct ifnet *ifp, struct mbuf *m); +#endif static int vlan_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro); static void vlan_unconfig(struct ifnet *ifp); @@ -1094,7 +1098,15 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) ifp->if_dunit = unit; ifp->if_init = vlan_init; +#ifdef ALTQ + ifp->if_start = vlan_altq_start; + ifp->if_transmit = vlan_altq_transmit; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = 0; + IFQ_SET_READY(&ifp->if_snd); +#else ifp->if_transmit = vlan_transmit; +#endif ifp->if_qflush = vlan_qflush; ifp->if_ioctl = vlan_ioctl; #if defined(KERN_TLS) || defined(RATELIMIT) @@ -1147,6 +1159,9 @@ vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) if (ifp->if_vlantrunk) return (EBUSY); +#ifdef ALTQ + IFQ_PURGE(&ifp->if_snd); +#endif ether_ifdetach(ifp); /* first, remove it from system-wide lists */ vlan_unconfig(ifp); /* now it can be unconfigured and freed */ /* @@ -1268,6 +1283,38 @@ vlan_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, return p->if_output(ifp, m, dst, ro); } +#ifdef ALTQ +static void +vlan_altq_start(if_t ifp) +{ + struct ifaltq *ifq = &ifp->if_snd; + struct mbuf *m; + + IFQ_LOCK(ifq); + IFQ_DEQUEUE_NOLOCK(ifq, m); + while (m != NULL) { + vlan_transmit(ifp, m); + IFQ_DEQUEUE_NOLOCK(ifq, m); + } + IFQ_UNLOCK(ifq); +} + +static int +vlan_altq_transmit(if_t ifp, struct mbuf *m) +{ + int err; + + if (ALTQ_IS_ENABLED(&ifp->if_snd)) { + IFQ_ENQUEUE(&ifp->if_snd, m, err); + if (err == 0) + vlan_altq_start(ifp); + } else + err = vlan_transmit(ifp, m); + + return (err); +} +#endif /* ALTQ */ + /* * The ifp->if_qflush entry point for vlan(4) is a no-op. */ From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:28:32 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D6EE66A8CB; Wed, 1 Sep 2021 13:28:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04dC5Shdz3Qs2; Wed, 1 Sep 2021 13:28:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F01226105; Wed, 1 Sep 2021 13:28:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DSVX9047642; Wed, 1 Sep 2021 13:28:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DSVRt047641; Wed, 1 Sep 2021 13:28:31 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:28:31 GMT Message-Id: <202109011328.181DSVRt047641@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: f610aafaed3c - stable/13 - pf tests: test ALTQ CBQ on top of if_vlan MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f610aafaed3c9d95073b156302280d43329c83fd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:28:32 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f610aafaed3c9d95073b156302280d43329c83fd commit f610aafaed3c9d95073b156302280d43329c83fd Author: Kristof Provost AuthorDate: 2021-08-23 14:58:50 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 13:27:01 +0000 pf tests: test ALTQ CBQ on top of if_vlan The main purpose of this test is to verify that we can use ALTQ on top of if_vlan, but while we're here we also exercise the CBQ code. There's already a basis test for HFSC, so it makes sense to test another algorithm while we test if_vlan. Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31649 (cherry picked from commit e62175df4ec2c8fe2aa2e372f683ddb933768e62) --- tests/sys/common/vnet.subr | 7 ++++++ tests/sys/netpfil/pf/altq.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index f9a9e9c428fd..590e8dea992e 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -24,6 +24,13 @@ vnet_mkbridge() echo ${ifname} } +vnet_mkvlan() +{ + ifname=$(ifconfig vlan create) + echo ${ifname} >> created_interfaces.lst + echo ${ifname} +} + vnet_mkloopback() { ifname=$(ifconfig lo create) diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 294c01e9f8bd..53cf10e47565 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -86,9 +86,69 @@ match_cleanup() altq_cleanup } +atf_test_case "cbq_vlan" "cleanup" +cbq_vlan_head() +{ + atf_set descr 'CBQ over VLAN test' + atf_set require.user root +} + +cbq_vlan_body() +{ + altq_init + is_altq_supported cbq + + epair=$(vnet_mkepair) + vnet_mkjail altq_cbq_vlan ${epair}b + + vlan=$(vnet_mkvlan) + ifconfig ${vlan} vlan 42 vlandev ${epair}a + ifconfig ${vlan} 192.0.2.1/24 up + ifconfig ${epair}a up + + vlanj=$(jexec altq_cbq_vlan ifconfig vlan create) + echo ${vlanj} >> created_interfaces.lst + + jexec altq_cbq_vlan ifconfig ${epair}b up + jexec altq_cbq_vlan ifconfig ${vlanj} vlan 42 vlandev ${epair}b + jexec altq_cbq_vlan ifconfig ${vlanj} 192.0.2.2/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -i .1 -c 3 -s 1200 192.0.2.2 + + jexec altq_cbq_vlan pfctl -e + pft_set_rules altq_cbq_vlan \ + "altq on ${vlanj} bandwidth 14000b cbq queue { default }" \ + "queue default bandwidth 14000b cbq(default) { slow } " \ + "queue slow bandwidth 6000b cbq(borrow)" \ + "match proto icmp queue slow" \ + "match proto tcp queue default" \ + "pass" + + # single ping succeeds just fine + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 + + # "Saturate the link" + ping -i .01 -c 50 -s 1200 192.0.2.2 + + # We should now be hitting the limits and get these packet dropped. + rcv=$(ping -i .1 -c 5 -s 1200 192.0.2.2 | tr "," "\n" | awk '/packets received/ { print $1; }') + echo "Received $rcv packets" + if [ ${rcv} -gt 1 ] + then + atf_fail "Received ${rcv} packets in a saturated link" + fi +} + +cbq_vlan_cleanup() +{ + altq_cleanup +} + atf_init_test_cases() { atf_add_test_case "hfsc" atf_add_test_case "match" + atf_add_test_case "cbq_vlan" } From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:28:32 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D21BA66A9A3; Wed, 1 Sep 2021 13:28:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04dD2LHHz3QcN; Wed, 1 Sep 2021 13:28:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DAF04259E9; Wed, 1 Sep 2021 13:28:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DSV6N047666; Wed, 1 Sep 2021 13:28:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DSVx8047665; Wed, 1 Sep 2021 13:28:31 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:28:31 GMT Message-Id: <202109011328.181DSVx8047665@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 80bbb82f231a - stable/12 - pf tests: ALTQ priority test MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 80bbb82f231a25f6aac85d3df86fcf816cec81df Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:28:33 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=80bbb82f231a25f6aac85d3df86fcf816cec81df commit 80bbb82f231a25f6aac85d3df86fcf816cec81df Author: Kristof Provost AuthorDate: 2021-08-26 08:25:57 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 07:39:06 +0000 pf tests: ALTQ priority test Test that ALTQ can prioritise one type of traffic over another. Do this by establishing a slow link and saturating it with ICMP echos. When prioritised TCP connections reliably go through. When not prioritised TCP connections reliably fail. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit cd46399b9ccf04f6ec00a532e52c8b1edb007af7) --- tests/sys/netpfil/pf/altq.sh | 94 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 1 deletion(-) diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 53cf10e47565..ebb28f34c22e 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -145,10 +145,102 @@ cbq_vlan_cleanup() altq_cleanup } +atf_test_case "prioritise" "cleanup" +prioritise_head() +{ + atf_set descr "Test prioritising one type of traffic over the other" + atf_set require.user root +} + +prioritise_body() +{ + altq_init + is_altq_supported cbq + + epair=$(vnet_mkepair) + vnet_mkjail altq_prioritise ${epair}b + + ifconfig ${epair}a 192.0.2.1/24 up + jexec altq_prioritise ifconfig ${epair}b 192.0.2.2/24 up + + jexec altq_prioritise /usr/sbin/inetd -p inetd-altq.pid \ + $(atf_get_srcdir)/../pf/echo_inetd.conf + + # Sanity check + atf_check -s exit:0 -o ignore ping -i .1 -c 3 -s 1200 192.0.2.2 + + jexec altq_prioritise pfctl -e + pft_set_rules altq_prioritise \ + "altq on ${epair}b bandwidth 6000b cbq queue { default, slow }" \ + "queue default priority 7 cbq(default)" \ + "queue slow priority 1 cbq" \ + "match proto icmp queue slow" \ + "match proto tcp queue default" \ + "pass" + + # single ping succeeds just fine + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 + + # Unsaturated TCP succeeds + reply=$(echo "foo" | nc -w 5 -N 192.0.2.2 7) + if [ "$reply" != "foo" ]; + then + atf_fail "Unsaturated echo failed" + fi + + # "Saturate the link" + ping -i .01 -c 50 -s 1200 192.0.2.2 + + # We should now be hitting the limits and get these packet dropped. + rcv=$(ping -i .1 -c 5 -s 1200 192.0.2.2 | tr "," "\n" | awk '/packets received/ { print $1; }') + echo "Received $rcv packets" + if [ ${rcv} -gt 1 ] + then + atf_fail "Received ${rcv} packets in a saturated link" + fi + + # TCP should still pass + for i in `seq 1 10` + do + reply=$(echo "foo_${i}" | nc -w 5 -N 192.0.2.2 7) + if [ "$reply" != "foo_${i}" ]; + then + atf_fail "Prioritised echo failed ${i}" + fi + + done + + # Now reverse priority + pft_set_rules altq_prioritise \ + "altq on ${epair}b bandwidth 6000b cbq queue { default, slow }" \ + "queue default priority 7 cbq(default)" \ + "queue slow priority 1 cbq" \ + "match proto tcp queue slow" \ + "match proto icmp queue default" \ + "pass" + + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 + ping -i .01 -c 50 -s 1200 192.0.2.2 + for i in `seq 1 10` + do + reply=$(echo "foo_${i}" | nc -w 5 -N 192.0.2.2 7) + if [ "$reply" == "foo_${i}" ]; + then + atf_fail "Unexpected echo success" + fi + + done +} + +prioritise_cleanup() +{ + altq_cleanup +} + atf_init_test_cases() { atf_add_test_case "hfsc" atf_add_test_case "match" atf_add_test_case "cbq_vlan" + atf_add_test_case "prioritise" } - From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:28:34 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F82566A6F1; Wed, 1 Sep 2021 13:28:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04dF1Gczz3Qhs; Wed, 1 Sep 2021 13:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BBA826106; Wed, 1 Sep 2021 13:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DSWqx047714; Wed, 1 Sep 2021 13:28:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DSWrc047713; Wed, 1 Sep 2021 13:28:32 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:28:32 GMT Message-Id: <202109011328.181DSWrc047713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 4585629b74e7 - stable/12 - if_bridge: add ALTQ support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4585629b74e7d98a0712238baff02940b54d7dee Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:28:34 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4585629b74e7d98a0712238baff02940b54d7dee commit 4585629b74e7d98a0712238baff02940b54d7dee Author: Luiz Otavio O Souza AuthorDate: 2021-08-25 09:07:44 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 07:39:40 +0000 if_bridge: add ALTQ support Similar to the recent addition of ALTQ support to if_vlan. Reviewed by: donner Obtained from: pfsense MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31675 (cherry picked from commit eb680a63de1dbf5c974f483975dcb2c60ec6fa08) --- sys/net/if_bridge.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 8b25c28eb554..22bcc84d44ef 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -301,6 +301,10 @@ static void bridge_init(void *); static void bridge_dummynet(struct mbuf *, struct ifnet *); static void bridge_stop(struct ifnet *, int); static int bridge_transmit(struct ifnet *, struct mbuf *); +#ifdef ALTQ +static void bridge_altq_start(if_t); +static int bridge_altq_transmit(if_t, struct mbuf *); +#endif static void bridge_qflush(struct ifnet *); static struct mbuf *bridge_input(struct ifnet *, struct mbuf *); static int bridge_output(struct ifnet *, struct mbuf *, struct sockaddr *, @@ -732,7 +736,15 @@ bridge_clone_create(struct if_clone *ifc, int unit, caddr_t params) if_initname(ifp, bridge_name, unit); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = bridge_ioctl; +#ifdef ALTQ + ifp->if_start = bridge_altq_start; + ifp->if_transmit = bridge_altq_transmit; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = 0; + IFQ_SET_READY(&ifp->if_snd); +#else ifp->if_transmit = bridge_transmit; +#endif ifp->if_qflush = bridge_qflush; ifp->if_init = bridge_init; ifp->if_type = IFT_BRIDGE; @@ -838,6 +850,9 @@ bridge_clone_destroy(struct ifnet *ifp) BRIDGE_LIST_UNLOCK(); bstp_detach(&sc->sc_stp); +#ifdef ALTQ + IFQ_PURGE(&ifp->if_snd); +#endif NET_EPOCH_EXIT_ET(et); ether_ifdetach(ifp); @@ -2256,6 +2271,38 @@ bridge_transmit(struct ifnet *ifp, struct mbuf *m) return (error); } +#ifdef ALTQ +static void +bridge_altq_start(if_t ifp) +{ + struct ifaltq *ifq = &ifp->if_snd; + struct mbuf *m; + + IFQ_LOCK(ifq); + IFQ_DEQUEUE_NOLOCK(ifq, m); + while (m != NULL) { + bridge_transmit(ifp, m); + IFQ_DEQUEUE_NOLOCK(ifq, m); + } + IFQ_UNLOCK(ifq); +} + +static int +bridge_altq_transmit(if_t ifp, struct mbuf *m) +{ + int err; + + if (ALTQ_IS_ENABLED(&ifp->if_snd)) { + IFQ_ENQUEUE(&ifp->if_snd, m, err); + if (err == 0) + bridge_altq_start(ifp); + } else + err = bridge_transmit(ifp, m); + + return (err); +} +#endif /* ALTQ */ + /* * The ifp->if_qflush entry point for if_bridge(4) is no-op. */ From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:28:33 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68BA366A6F0; Wed, 1 Sep 2021 13:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04dD5zkzz3QmQ; Wed, 1 Sep 2021 13:28:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1D562584F; Wed, 1 Sep 2021 13:28:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DSWTs047690; Wed, 1 Sep 2021 13:28:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DSW02047689; Wed, 1 Sep 2021 13:28:32 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:28:32 GMT Message-Id: <202109011328.181DSW02047689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 4defcd907832 - stable/13 - pf tests: ALTQ priority test MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4defcd9078323b0b01536d1cfe628ad484c1aeb0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:28:34 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4defcd9078323b0b01536d1cfe628ad484c1aeb0 commit 4defcd9078323b0b01536d1cfe628ad484c1aeb0 Author: Kristof Provost AuthorDate: 2021-08-26 08:25:57 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 13:27:01 +0000 pf tests: ALTQ priority test Test that ALTQ can prioritise one type of traffic over another. Do this by establishing a slow link and saturating it with ICMP echos. When prioritised TCP connections reliably go through. When not prioritised TCP connections reliably fail. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit cd46399b9ccf04f6ec00a532e52c8b1edb007af7) --- tests/sys/netpfil/pf/altq.sh | 94 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 1 deletion(-) diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 53cf10e47565..ebb28f34c22e 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -145,10 +145,102 @@ cbq_vlan_cleanup() altq_cleanup } +atf_test_case "prioritise" "cleanup" +prioritise_head() +{ + atf_set descr "Test prioritising one type of traffic over the other" + atf_set require.user root +} + +prioritise_body() +{ + altq_init + is_altq_supported cbq + + epair=$(vnet_mkepair) + vnet_mkjail altq_prioritise ${epair}b + + ifconfig ${epair}a 192.0.2.1/24 up + jexec altq_prioritise ifconfig ${epair}b 192.0.2.2/24 up + + jexec altq_prioritise /usr/sbin/inetd -p inetd-altq.pid \ + $(atf_get_srcdir)/../pf/echo_inetd.conf + + # Sanity check + atf_check -s exit:0 -o ignore ping -i .1 -c 3 -s 1200 192.0.2.2 + + jexec altq_prioritise pfctl -e + pft_set_rules altq_prioritise \ + "altq on ${epair}b bandwidth 6000b cbq queue { default, slow }" \ + "queue default priority 7 cbq(default)" \ + "queue slow priority 1 cbq" \ + "match proto icmp queue slow" \ + "match proto tcp queue default" \ + "pass" + + # single ping succeeds just fine + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 + + # Unsaturated TCP succeeds + reply=$(echo "foo" | nc -w 5 -N 192.0.2.2 7) + if [ "$reply" != "foo" ]; + then + atf_fail "Unsaturated echo failed" + fi + + # "Saturate the link" + ping -i .01 -c 50 -s 1200 192.0.2.2 + + # We should now be hitting the limits and get these packet dropped. + rcv=$(ping -i .1 -c 5 -s 1200 192.0.2.2 | tr "," "\n" | awk '/packets received/ { print $1; }') + echo "Received $rcv packets" + if [ ${rcv} -gt 1 ] + then + atf_fail "Received ${rcv} packets in a saturated link" + fi + + # TCP should still pass + for i in `seq 1 10` + do + reply=$(echo "foo_${i}" | nc -w 5 -N 192.0.2.2 7) + if [ "$reply" != "foo_${i}" ]; + then + atf_fail "Prioritised echo failed ${i}" + fi + + done + + # Now reverse priority + pft_set_rules altq_prioritise \ + "altq on ${epair}b bandwidth 6000b cbq queue { default, slow }" \ + "queue default priority 7 cbq(default)" \ + "queue slow priority 1 cbq" \ + "match proto tcp queue slow" \ + "match proto icmp queue default" \ + "pass" + + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 + ping -i .01 -c 50 -s 1200 192.0.2.2 + for i in `seq 1 10` + do + reply=$(echo "foo_${i}" | nc -w 5 -N 192.0.2.2 7) + if [ "$reply" == "foo_${i}" ]; + then + atf_fail "Unexpected echo success" + fi + + done +} + +prioritise_cleanup() +{ + altq_cleanup +} + atf_init_test_cases() { atf_add_test_case "hfsc" atf_add_test_case "match" atf_add_test_case "cbq_vlan" + atf_add_test_case "prioritise" } - From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:28:34 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC96C669EF4; Wed, 1 Sep 2021 13:28:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04dG1D5gz3QmZ; Wed, 1 Sep 2021 13:28:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF04E259EA; Wed, 1 Sep 2021 13:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DSXEI047738; Wed, 1 Sep 2021 13:28:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DSXpg047737; Wed, 1 Sep 2021 13:28:33 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:28:33 GMT Message-Id: <202109011328.181DSXpg047737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: cb5a0b7ca312 - stable/13 - if_bridge: add ALTQ support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cb5a0b7ca312b4979c7771bec7f36065d1131e95 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:28:35 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=cb5a0b7ca312b4979c7771bec7f36065d1131e95 commit cb5a0b7ca312b4979c7771bec7f36065d1131e95 Author: Luiz Otavio O Souza AuthorDate: 2021-08-25 09:07:44 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 13:27:01 +0000 if_bridge: add ALTQ support Similar to the recent addition of ALTQ support to if_vlan. Reviewed by: donner Obtained from: pfsense MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31675 (cherry picked from commit eb680a63de1dbf5c974f483975dcb2c60ec6fa08) --- sys/net/if_bridge.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 3e6b5ba8e0c2..926e7f9a1d19 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -298,6 +298,10 @@ static void bridge_init(void *); static void bridge_dummynet(struct mbuf *, struct ifnet *); static void bridge_stop(struct ifnet *, int); static int bridge_transmit(struct ifnet *, struct mbuf *); +#ifdef ALTQ +static void bridge_altq_start(if_t); +static int bridge_altq_transmit(if_t, struct mbuf *); +#endif static void bridge_qflush(struct ifnet *); static struct mbuf *bridge_input(struct ifnet *, struct mbuf *); static int bridge_output(struct ifnet *, struct mbuf *, struct sockaddr *, @@ -726,7 +730,15 @@ bridge_clone_create(struct if_clone *ifc, int unit, caddr_t params) if_initname(ifp, bridge_name, unit); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = bridge_ioctl; +#ifdef ALTQ + ifp->if_start = bridge_altq_start; + ifp->if_transmit = bridge_altq_transmit; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = 0; + IFQ_SET_READY(&ifp->if_snd); +#else ifp->if_transmit = bridge_transmit; +#endif ifp->if_qflush = bridge_qflush; ifp->if_init = bridge_init; ifp->if_type = IFT_BRIDGE; @@ -798,6 +810,9 @@ bridge_clone_destroy(struct ifnet *ifp) BRIDGE_LIST_UNLOCK(); bstp_detach(&sc->sc_stp); +#ifdef ALTQ + IFQ_PURGE(&ifp->if_snd); +#endif NET_EPOCH_EXIT(et); ether_ifdetach(ifp); @@ -2207,6 +2222,38 @@ bridge_transmit(struct ifnet *ifp, struct mbuf *m) return (error); } +#ifdef ALTQ +static void +bridge_altq_start(if_t ifp) +{ + struct ifaltq *ifq = &ifp->if_snd; + struct mbuf *m; + + IFQ_LOCK(ifq); + IFQ_DEQUEUE_NOLOCK(ifq, m); + while (m != NULL) { + bridge_transmit(ifp, m); + IFQ_DEQUEUE_NOLOCK(ifq, m); + } + IFQ_UNLOCK(ifq); +} + +static int +bridge_altq_transmit(if_t ifp, struct mbuf *m) +{ + int err; + + if (ALTQ_IS_ENABLED(&ifp->if_snd)) { + IFQ_ENQUEUE(&ifp->if_snd, m, err); + if (err == 0) + bridge_altq_start(ifp); + } else + err = bridge_transmit(ifp, m); + + return (err); +} +#endif /* ALTQ */ + /* * The ifp->if_qflush entry point for if_bridge(4) is no-op. */ From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:28:35 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7794066A6FA; Wed, 1 Sep 2021 13:28:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04dH0NLRz3QsL; Wed, 1 Sep 2021 13:28:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2579825EA3; Wed, 1 Sep 2021 13:28:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DSYi4047762; Wed, 1 Sep 2021 13:28:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DSYwT047761; Wed, 1 Sep 2021 13:28:34 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:28:34 GMT Message-Id: <202109011328.181DSYwT047761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 231384bd0c0b - stable/12 - pf tests: Test ALTQ on top of if_bridge MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 231384bd0c0bb6fa7f7d0f0c7d8c607413c4f68c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:28:35 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=231384bd0c0bb6fa7f7d0f0c7d8c607413c4f68c commit 231384bd0c0bb6fa7f7d0f0c7d8c607413c4f68c Author: Kristof Provost AuthorDate: 2021-08-25 09:08:38 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 07:39:51 +0000 pf tests: Test ALTQ on top of if_bridge Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31676 (cherry picked from commit 062463698eeafc7f75ce22541a244238f37ef2e2) --- tests/sys/netpfil/pf/altq.sh | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index ebb28f34c22e..2b5b1828595f 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -145,6 +145,54 @@ cbq_vlan_cleanup() altq_cleanup } +atf_test_case "codel_bridge" "cleanup" +codel_bridge_head() +{ + atf_set descr 'codel over if_bridge test' + atf_set require.user root +} + +codel_bridge_body() +{ + altq_init + is_altq_supported codel + + epair=$(vnet_mkepair) + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail altq_codel_bridge ${epair}b + + bridge=$(jexec altq_codel_bridge ifconfig bridge create) + jexec altq_codel_bridge ifconfig ${bridge} addm ${epair}b + jexec altq_codel_bridge ifconfig ${epair}b up + jexec altq_codel_bridge ifconfig ${bridge} 192.0.2.2/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -i .1 -c 3 -s 1200 192.0.2.2 + + jexec altq_codel_bridge pfctl -e + pft_set_rules altq_codel_bridge \ + "altq on ${bridge} bandwidth 1000b codelq queue { slow }" \ + "match queue slow" \ + "pass" + + # "Saturate the link" + ping -i .1 -c 5 -s 1200 192.0.2.2 + + # We should now be hitting the limits and get these packet dropped. + rcv=$(ping -i .1 -c 5 -s 1200 192.0.2.2 | tr "," "\n" | awk '/packets received/ { print $1; }') + echo "Received $rcv packets" + if [ ${rcv} -gt 1 ] + then + atf_fail "Received ${rcv} packets in a saturated link" + fi +} + +codel_bridge_cleanup() +{ + altq_cleanup +} + atf_test_case "prioritise" "cleanup" prioritise_head() { @@ -242,5 +290,6 @@ atf_init_test_cases() atf_add_test_case "hfsc" atf_add_test_case "match" atf_add_test_case "cbq_vlan" + atf_add_test_case "codel_bridge" atf_add_test_case "prioritise" } From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:28:35 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C3A766AC81; Wed, 1 Sep 2021 13:28:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04dH13VFz3QqJ; Wed, 1 Sep 2021 13:28:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01B4725EA4; Wed, 1 Sep 2021 13:28:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DSYHZ047786; Wed, 1 Sep 2021 13:28:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DSY2g047785; Wed, 1 Sep 2021 13:28:34 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:28:34 GMT Message-Id: <202109011328.181DSY2g047785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 518ea72e954b - stable/13 - pf tests: Test ALTQ on top of if_bridge MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 518ea72e954ba0d11cda908d54eab63b29e29956 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:28:35 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=518ea72e954ba0d11cda908d54eab63b29e29956 commit 518ea72e954ba0d11cda908d54eab63b29e29956 Author: Kristof Provost AuthorDate: 2021-08-25 09:08:38 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 13:27:01 +0000 pf tests: Test ALTQ on top of if_bridge Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31676 (cherry picked from commit 062463698eeafc7f75ce22541a244238f37ef2e2) --- tests/sys/netpfil/pf/altq.sh | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index ebb28f34c22e..2b5b1828595f 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -145,6 +145,54 @@ cbq_vlan_cleanup() altq_cleanup } +atf_test_case "codel_bridge" "cleanup" +codel_bridge_head() +{ + atf_set descr 'codel over if_bridge test' + atf_set require.user root +} + +codel_bridge_body() +{ + altq_init + is_altq_supported codel + + epair=$(vnet_mkepair) + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail altq_codel_bridge ${epair}b + + bridge=$(jexec altq_codel_bridge ifconfig bridge create) + jexec altq_codel_bridge ifconfig ${bridge} addm ${epair}b + jexec altq_codel_bridge ifconfig ${epair}b up + jexec altq_codel_bridge ifconfig ${bridge} 192.0.2.2/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -i .1 -c 3 -s 1200 192.0.2.2 + + jexec altq_codel_bridge pfctl -e + pft_set_rules altq_codel_bridge \ + "altq on ${bridge} bandwidth 1000b codelq queue { slow }" \ + "match queue slow" \ + "pass" + + # "Saturate the link" + ping -i .1 -c 5 -s 1200 192.0.2.2 + + # We should now be hitting the limits and get these packet dropped. + rcv=$(ping -i .1 -c 5 -s 1200 192.0.2.2 | tr "," "\n" | awk '/packets received/ { print $1; }') + echo "Received $rcv packets" + if [ ${rcv} -gt 1 ] + then + atf_fail "Received ${rcv} packets in a saturated link" + fi +} + +codel_bridge_cleanup() +{ + altq_cleanup +} + atf_test_case "prioritise" "cleanup" prioritise_head() { @@ -242,5 +290,6 @@ atf_init_test_cases() atf_add_test_case "hfsc" atf_add_test_case "match" atf_add_test_case "cbq_vlan" + atf_add_test_case "codel_bridge" atf_add_test_case "prioritise" } From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:31:08 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B9B8066B1E1; Wed, 1 Sep 2021 13:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04hD4crMz3hBc; Wed, 1 Sep 2021 13:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C60826114; Wed, 1 Sep 2021 13:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DV8b0057058; Wed, 1 Sep 2021 13:31:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DV8Ze057057; Wed, 1 Sep 2021 13:31:08 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:31:08 GMT Message-Id: <202109011331.181DV8Ze057057@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 166784e27501 - stable/13 - amd64 pmap: convert to counter(9), add PV and pagetable page counts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 166784e27501f96446566aeff62acf575f3f157d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:31:08 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=166784e27501f96446566aeff62acf575f3f157d commit 166784e27501f96446566aeff62acf575f3f157d Author: Jason A. Harmening AuthorDate: 2021-02-25 05:08:42 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 13:29:01 +0000 amd64 pmap: convert to counter(9), add PV and pagetable page counts This change converts most of the counters in the amd64 pmap from global atomics to scalable counter(9) counters. Per discussion with kib@, it also removes the handrolled per-CPU PCID save count as it isn't considered generally useful. The bulk of these counters remain guarded by PV_STATS, as it seems unlikely that they will be useful outside of very specific debugging scenarios. However, this change does add two new counters that are available without PV_STATS. pt_page_count and pv_page_count track the number of active physical-to-virtual list pages and page table pages, respectively. These will be useful in evaluating the memory footprint of pmap structures under various workloads, which will help to guide future changes in this area. Reviewed by: kib (cherry picked from commit e4b8deb222278b2a12c9c67021b406625f5be301) --- sys/amd64/amd64/genassym.c | 1 - sys/amd64/amd64/pmap.c | 274 +++++++++++++++++++++++++-------------------- sys/amd64/include/pcpu.h | 3 +- 3 files changed, 155 insertions(+), 123 deletions(-) diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c index f89c53e75508..7c29368828d0 100644 --- a/sys/amd64/amd64/genassym.c +++ b/sys/amd64/amd64/genassym.c @@ -227,7 +227,6 @@ ASSYM(PC_GS32P, offsetof(struct pcpu, pc_gs32p)); ASSYM(PC_LDT, offsetof(struct pcpu, pc_ldt)); ASSYM(PC_COMMONTSS, offsetof(struct pcpu, pc_common_tss)); ASSYM(PC_TSS, offsetof(struct pcpu, pc_tss)); -ASSYM(PC_PM_SAVE_CNT, offsetof(struct pcpu, pc_pm_save_cnt)); ASSYM(PC_KCR3, offsetof(struct pcpu, pc_kcr3)); ASSYM(PC_UCR3, offsetof(struct pcpu, pc_ucr3)); ASSYM(PC_UCR3_LOAD_MASK, offsetof(struct pcpu, pc_ucr3_load_mask)); diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 0ac312a95a8c..3086aa0b053f 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -536,21 +536,9 @@ static int pmap_pkru_copy(pmap_t dst_pmap, pmap_t src_pmap); static int pmap_pkru_deassign(pmap_t pmap, vm_offset_t sva, vm_offset_t eva); static void pmap_pkru_deassign_all(pmap_t pmap); -static int -pmap_pcid_save_cnt_proc(SYSCTL_HANDLER_ARGS) -{ - int i; - uint64_t res; - - res = 0; - CPU_FOREACH(i) { - res += cpuid_to_pcpu[i]->pc_pm_save_cnt; - } - return (sysctl_handle_64(oidp, &res, 0, req)); -} -SYSCTL_PROC(_vm_pmap, OID_AUTO, pcid_save_cnt, CTLTYPE_U64 | CTLFLAG_RD | - CTLFLAG_MPSAFE, NULL, 0, pmap_pcid_save_cnt_proc, "QU", - "Count of saved TLB context on switch"); +static COUNTER_U64_DEFINE_EARLY(pcid_save_cnt); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pcid_save_cnt, CTLFLAG_RD, + &pcid_save_cnt, "Count of saved TLB context on switch"); static LIST_HEAD(, pmap_invl_gen) pmap_invl_gen_tracker = LIST_HEAD_INITIALIZER(&pmap_invl_gen_tracker); @@ -770,19 +758,30 @@ pmap_di_store_invl(struct pmap_invl_gen *ptr, struct pmap_invl_gen *old_val, return (res); } +static COUNTER_U64_DEFINE_EARLY(pv_page_count); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pv_page_count, CTLFLAG_RD, + &pv_page_count, "Current number of allocated pv pages"); + +static COUNTER_U64_DEFINE_EARLY(pt_page_count); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pt_page_count, CTLFLAG_RD, + &pt_page_count, "Current number of allocated page table pages"); + #ifdef PV_STATS -static long invl_start_restart; -SYSCTL_LONG(_vm_pmap, OID_AUTO, invl_start_restart, CTLFLAG_RD, - &invl_start_restart, 0, - ""); -static long invl_finish_restart; -SYSCTL_LONG(_vm_pmap, OID_AUTO, invl_finish_restart, CTLFLAG_RD, - &invl_finish_restart, 0, - ""); + +static COUNTER_U64_DEFINE_EARLY(invl_start_restart); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, invl_start_restart, + CTLFLAG_RD, &invl_start_restart, + "Number of delayed TLB invalidation request restarts"); + +static COUNTER_U64_DEFINE_EARLY(invl_finish_restart); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, invl_finish_restart, CTLFLAG_RD, + &invl_finish_restart, + "Number of delayed TLB invalidation completion restarts"); + static int invl_max_qlen; SYSCTL_INT(_vm_pmap, OID_AUTO, invl_max_qlen, CTLFLAG_RD, &invl_max_qlen, 0, - ""); + "Maximum delayed TLB invalidation request queue length"); #endif #define di_delay locks_delay @@ -820,7 +819,7 @@ again: PV_STAT(i++); prevl = (uintptr_t)atomic_load_ptr(&p->next); if ((prevl & PMAP_INVL_GEN_NEXT_INVALID) != 0) { - PV_STAT(atomic_add_long(&invl_start_restart, 1)); + PV_STAT(counter_u64_add(invl_start_restart, 1)); lock_delay(&lda); goto again; } @@ -834,7 +833,7 @@ again: #endif if (!pmap_di_load_invl(p, &prev) || prev.next != NULL) { - PV_STAT(atomic_add_long(&invl_start_restart, 1)); + PV_STAT(counter_u64_add(invl_start_restart, 1)); lock_delay(&lda); goto again; } @@ -863,7 +862,7 @@ again: */ if (!pmap_di_store_invl(p, &prev, &new_prev)) { critical_exit(); - PV_STAT(atomic_add_long(&invl_start_restart, 1)); + PV_STAT(counter_u64_add(invl_start_restart, 1)); lock_delay(&lda); goto again; } @@ -927,7 +926,7 @@ again: for (p = &pmap_invl_gen_head; p != NULL; p = (void *)prevl) { prevl = (uintptr_t)atomic_load_ptr(&p->next); if ((prevl & PMAP_INVL_GEN_NEXT_INVALID) != 0) { - PV_STAT(atomic_add_long(&invl_finish_restart, 1)); + PV_STAT(counter_u64_add(invl_finish_restart, 1)); lock_delay(&lda); goto again; } @@ -940,7 +939,7 @@ again: * thread before us finished its DI and started it again. */ if (__predict_false(p == NULL)) { - PV_STAT(atomic_add_long(&invl_finish_restart, 1)); + PV_STAT(counter_u64_add(invl_finish_restart, 1)); lock_delay(&lda); goto again; } @@ -952,7 +951,7 @@ again: atomic_clear_ptr((uintptr_t *)&invl_gen->next, PMAP_INVL_GEN_NEXT_INVALID); critical_exit(); - PV_STAT(atomic_add_long(&invl_finish_restart, 1)); + PV_STAT(counter_u64_add(invl_finish_restart, 1)); lock_delay(&lda); goto again; } @@ -988,12 +987,15 @@ DB_SHOW_COMMAND(di_queue, pmap_di_queue) #endif #ifdef PV_STATS -static long invl_wait; -SYSCTL_LONG(_vm_pmap, OID_AUTO, invl_wait, CTLFLAG_RD, &invl_wait, 0, +static COUNTER_U64_DEFINE_EARLY(invl_wait); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, invl_wait, + CTLFLAG_RD, &invl_wait, "Number of times DI invalidation blocked pmap_remove_all/write"); -static long invl_wait_slow; -SYSCTL_LONG(_vm_pmap, OID_AUTO, invl_wait_slow, CTLFLAG_RD, &invl_wait_slow, 0, - "Number of slow invalidation waits for lockless DI"); + +static COUNTER_U64_DEFINE_EARLY(invl_wait_slow); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, invl_wait_slow, CTLFLAG_RD, + &invl_wait_slow, "Number of slow invalidation waits for lockless DI"); + #endif #ifdef NUMA @@ -1067,7 +1069,7 @@ pmap_delayed_invl_wait_l(vm_page_t m) while (*m_gen > pmap_invl_gen) { #ifdef PV_STATS if (!accounted) { - atomic_add_long(&invl_wait, 1); + counter_u64_add(invl_wait, 1); accounted = true; } #endif @@ -1087,7 +1089,7 @@ pmap_delayed_invl_wait_u(vm_page_t m) lock_delay_arg_init(&lda, &di_delay); while (*m_gen > atomic_load_long(&pmap_invl_gen_head.gen)) { if (fast || !pmap_invl_callout_inited) { - PV_STAT(atomic_add_long(&invl_wait, 1)); + PV_STAT(counter_u64_add(invl_wait, 1)); lock_delay(&lda); fast = false; } else { @@ -1120,7 +1122,7 @@ pmap_delayed_invl_wait_u(vm_page_t m) atomic_load_long(&pmap_invl_gen_head.gen)) { callout_reset(&pmap_invl_callout, 1, pmap_delayed_invl_callout_func, NULL); - PV_STAT(atomic_add_long(&invl_wait_slow, 1)); + PV_STAT(counter_u64_add(invl_wait_slow, 1)); pmap_delayed_invl_wait_block(m_gen, &pmap_invl_gen_head.gen); } @@ -2460,28 +2462,28 @@ SYSCTL_UINT(_vm_pmap, OID_AUTO, large_map_pml4_entries, static SYSCTL_NODE(_vm_pmap, OID_AUTO, pde, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "2MB page mapping counters"); -static u_long pmap_pde_demotions; -SYSCTL_ULONG(_vm_pmap_pde, OID_AUTO, demotions, CTLFLAG_RD, - &pmap_pde_demotions, 0, "2MB page demotions"); +static COUNTER_U64_DEFINE_EARLY(pmap_pde_demotions); +SYSCTL_COUNTER_U64(_vm_pmap_pde, OID_AUTO, demotions, + CTLFLAG_RD, &pmap_pde_demotions, "2MB page demotions"); -static u_long pmap_pde_mappings; -SYSCTL_ULONG(_vm_pmap_pde, OID_AUTO, mappings, CTLFLAG_RD, - &pmap_pde_mappings, 0, "2MB page mappings"); +static COUNTER_U64_DEFINE_EARLY(pmap_pde_mappings); +SYSCTL_COUNTER_U64(_vm_pmap_pde, OID_AUTO, mappings, CTLFLAG_RD, + &pmap_pde_mappings, "2MB page mappings"); -static u_long pmap_pde_p_failures; -SYSCTL_ULONG(_vm_pmap_pde, OID_AUTO, p_failures, CTLFLAG_RD, - &pmap_pde_p_failures, 0, "2MB page promotion failures"); +static COUNTER_U64_DEFINE_EARLY(pmap_pde_p_failures); +SYSCTL_COUNTER_U64(_vm_pmap_pde, OID_AUTO, p_failures, CTLFLAG_RD, + &pmap_pde_p_failures, "2MB page promotion failures"); -static u_long pmap_pde_promotions; -SYSCTL_ULONG(_vm_pmap_pde, OID_AUTO, promotions, CTLFLAG_RD, - &pmap_pde_promotions, 0, "2MB page promotions"); +static COUNTER_U64_DEFINE_EARLY(pmap_pde_promotions); +SYSCTL_COUNTER_U64(_vm_pmap_pde, OID_AUTO, promotions, CTLFLAG_RD, + &pmap_pde_promotions, "2MB page promotions"); static SYSCTL_NODE(_vm_pmap, OID_AUTO, pdpe, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "1GB page mapping counters"); -static u_long pmap_pdpe_demotions; -SYSCTL_ULONG(_vm_pmap_pdpe, OID_AUTO, demotions, CTLFLAG_RD, - &pmap_pdpe_demotions, 0, "1GB page demotions"); +static COUNTER_U64_DEFINE_EARLY(pmap_pdpe_demotions); +SYSCTL_COUNTER_U64(_vm_pmap_pdpe, OID_AUTO, demotions, CTLFLAG_RD, + &pmap_pdpe_demotions, "1GB page demotions"); /*************************************************** * Low level helper routines..... @@ -4017,6 +4019,8 @@ _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free) pmap_unwire_ptp(pmap, va, pml4pg, free); } + counter_u64_add(pt_page_count, -1); + /* * Put page on a list so that it is released after * *ALL* TLB shootdown is done @@ -4197,6 +4201,8 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags) pmltop_pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_WAITOK); + counter_u64_add(pt_page_count, 1); + pmltop_phys = VM_PAGE_TO_PHYS(pmltop_pg); pmap->pm_pmltop = (pml5_entry_t *)PHYS_TO_DMAP(pmltop_phys); @@ -4228,6 +4234,7 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags) if ((curproc->p_md.md_flags & P_MD_KPTI) != 0) { pmltop_pgu = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_WAITOK); + counter_u64_add(pt_page_count, 1); pmap->pm_pmltopu = (pml4_entry_t *)PHYS_TO_DMAP( VM_PAGE_TO_PHYS(pmltop_pgu)); if (pmap_is_la57(pmap)) @@ -4415,6 +4422,7 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, if ((m = vm_page_alloc(NULL, ptepindex, VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) return (NULL); + if ((m->flags & PG_ZERO) == 0) pmap_zero_page(m); @@ -4512,6 +4520,8 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, } pmap_resident_count_inc(pmap, 1); + counter_u64_add(pt_page_count, 1); + return (m); } @@ -4674,12 +4684,14 @@ pmap_release(pmap_t pmap) vm_page_unwire_noq(m); vm_page_free_zero(m); + counter_u64_add(pt_page_count, -1); if (pmap->pm_pmltopu != NULL) { m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pmap-> pm_pmltopu)); vm_page_unwire_noq(m); vm_page_free(m); + counter_u64_add(pt_page_count, -1); } if (pmap->pm_type == PT_X86 && (cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0) @@ -4795,6 +4807,7 @@ pmap_growkernel(vm_offset_t addr) panic("pmap_growkernel: no memory to grow kernel"); if ((nkpg->flags & PG_ZERO) == 0) pmap_zero_page(nkpg); + counter_u64_add(pt_page_count, 1); paddr = VM_PAGE_TO_PHYS(nkpg); *pdpe = (pdp_entry_t)(paddr | X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M); @@ -4817,6 +4830,7 @@ pmap_growkernel(vm_offset_t addr) panic("pmap_growkernel: no memory to grow kernel"); if ((nkpg->flags & PG_ZERO) == 0) pmap_zero_page(nkpg); + counter_u64_add(pt_page_count, 1); paddr = VM_PAGE_TO_PHYS(nkpg); newpdir = paddr | X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M; pde_store(pde, newpdir); @@ -4853,28 +4867,39 @@ pv_to_chunk(pv_entry_t pv) static const uint64_t pc_freemask[_NPCM] = { PC_FREE0, PC_FREE1, PC_FREE2 }; #ifdef PV_STATS -static int pc_chunk_count, pc_chunk_allocs, pc_chunk_frees, pc_chunk_tryfail; - -SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_count, CTLFLAG_RD, &pc_chunk_count, 0, - "Current number of pv entry chunks"); -SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_allocs, CTLFLAG_RD, &pc_chunk_allocs, 0, - "Current number of pv entry chunks allocated"); -SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_frees, CTLFLAG_RD, &pc_chunk_frees, 0, - "Current number of pv entry chunks frees"); -SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_tryfail, CTLFLAG_RD, &pc_chunk_tryfail, 0, - "Number of times tried to get a chunk page but failed."); - -static long pv_entry_frees, pv_entry_allocs, pv_entry_count; -static int pv_entry_spare; - -SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_frees, CTLFLAG_RD, &pv_entry_frees, 0, - "Current number of pv entry frees"); -SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_allocs, CTLFLAG_RD, &pv_entry_allocs, 0, - "Current number of pv entry allocs"); -SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, - "Current number of pv entries"); -SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, - "Current number of spare pv entries"); + +static COUNTER_U64_DEFINE_EARLY(pc_chunk_count); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pc_chunk_count, CTLFLAG_RD, + &pc_chunk_count, "Current number of pv entry cnunks"); + +static COUNTER_U64_DEFINE_EARLY(pc_chunk_allocs); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pc_chunk_allocs, CTLFLAG_RD, + &pc_chunk_allocs, "Total number of pv entry chunks allocated"); + +static COUNTER_U64_DEFINE_EARLY(pc_chunk_frees); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pc_chunk_frees, CTLFLAG_RD, + &pc_chunk_frees, "Total number of pv entry chunks freed"); + +static COUNTER_U64_DEFINE_EARLY(pc_chunk_tryfail); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pc_chunk_tryfail, CTLFLAG_RD, + &pc_chunk_tryfail, + "Number of failed attempts to get a pv entry chunk page"); + +static COUNTER_U64_DEFINE_EARLY(pv_entry_frees); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pv_entry_frees, CTLFLAG_RD, + &pv_entry_frees, "Total number of pv entries freed"); + +static COUNTER_U64_DEFINE_EARLY(pv_entry_allocs); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pv_entry_allocs, CTLFLAG_RD, + &pv_entry_allocs, "Total number of pv entries allocated"); + +static COUNTER_U64_DEFINE_EARLY(pv_entry_count); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, + &pv_entry_count, "Current number of pv entries"); + +static COUNTER_U64_DEFINE_EARLY(pv_entry_spare); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, + &pv_entry_spare, "Current number of spare pv entries"); #endif static void @@ -5047,15 +5072,15 @@ reclaim_pv_chunk_domain(pmap_t locked_pmap, struct rwlock **lockp, int domain) } /* Every freed mapping is for a 4 KB page. */ pmap_resident_count_dec(pmap, freed); - PV_STAT(atomic_add_long(&pv_entry_frees, freed)); - PV_STAT(atomic_add_int(&pv_entry_spare, freed)); - PV_STAT(atomic_subtract_long(&pv_entry_count, freed)); + PV_STAT(counter_u64_add(pv_entry_frees, freed)); + PV_STAT(counter_u64_add(pv_entry_spare, freed)); + PV_STAT(counter_u64_add(pv_entry_count, -freed)); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); if (pc->pc_map[0] == PC_FREE0 && pc->pc_map[1] == PC_FREE1 && pc->pc_map[2] == PC_FREE2) { - PV_STAT(atomic_subtract_int(&pv_entry_spare, _NPCPV)); - PV_STAT(atomic_subtract_int(&pc_chunk_count, 1)); - PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); + PV_STAT(counter_u64_add(pv_entry_spare, -_NPCPV)); + PV_STAT(counter_u64_add(pc_chunk_count, -1)); + PV_STAT(counter_u64_add(pc_chunk_frees, 1)); /* Entire chunk is free; return it. */ m_pc = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); dump_drop_page(m_pc->phys_addr); @@ -5128,9 +5153,9 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv) int idx, field, bit; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - PV_STAT(atomic_add_long(&pv_entry_frees, 1)); - PV_STAT(atomic_add_int(&pv_entry_spare, 1)); - PV_STAT(atomic_subtract_long(&pv_entry_count, 1)); + PV_STAT(counter_u64_add(pv_entry_frees, 1)); + PV_STAT(counter_u64_add(pv_entry_spare, 1)); + PV_STAT(counter_u64_add(pv_entry_count, -1)); pc = pv_to_chunk(pv); idx = pv - &pc->pc_pventry[0]; field = idx / 64; @@ -5154,9 +5179,10 @@ free_pv_chunk_dequeued(struct pv_chunk *pc) { vm_page_t m; - PV_STAT(atomic_subtract_int(&pv_entry_spare, _NPCPV)); - PV_STAT(atomic_subtract_int(&pc_chunk_count, 1)); - PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); + PV_STAT(counter_u64_add(pv_entry_spare, -_NPCPV)); + PV_STAT(counter_u64_add(pc_chunk_count, -1)); + PV_STAT(counter_u64_add(pc_chunk_frees, 1)); + counter_u64_add(pv_page_count, -1); /* entire chunk is free, return it */ m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); dump_drop_page(m->phys_addr); @@ -5219,7 +5245,7 @@ get_pv_entry(pmap_t pmap, struct rwlock **lockp) vm_page_t m; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - PV_STAT(atomic_add_long(&pv_entry_allocs, 1)); + PV_STAT(counter_u64_add(pv_entry_allocs, 1)); retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { @@ -5239,8 +5265,8 @@ retry: TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); } - PV_STAT(atomic_add_long(&pv_entry_count, 1)); - PV_STAT(atomic_subtract_int(&pv_entry_spare, 1)); + PV_STAT(counter_u64_add(pv_entry_count, 1)); + PV_STAT(counter_u64_add(pv_entry_spare, -1)); return (pv); } } @@ -5249,15 +5275,16 @@ retry: VM_ALLOC_WIRED); if (m == NULL) { if (lockp == NULL) { - PV_STAT(pc_chunk_tryfail++); + PV_STAT(counter_u64_add(pc_chunk_tryfail, 1)); return (NULL); } m = reclaim_pv_chunk(pmap, lockp); if (m == NULL) goto retry; - } - PV_STAT(atomic_add_int(&pc_chunk_count, 1)); - PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); + } else + counter_u64_add(pv_page_count, 1); + PV_STAT(counter_u64_add(pc_chunk_count, 1)); + PV_STAT(counter_u64_add(pc_chunk_allocs, 1)); dump_add_page(m->phys_addr); pc = (void *)PHYS_TO_DMAP(m->phys_addr); pc->pc_pmap = pmap; @@ -5270,8 +5297,8 @@ retry: mtx_unlock(&pvc->pvc_lock); pv = &pc->pc_pventry[0]; TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); - PV_STAT(atomic_add_long(&pv_entry_count, 1)); - PV_STAT(atomic_add_int(&pv_entry_spare, _NPCPV - 1)); + PV_STAT(counter_u64_add(pv_entry_count, 1)); + PV_STAT(counter_u64_add(pv_entry_spare, _NPCPV - 1)); return (pv); } @@ -5355,9 +5382,10 @@ retry: if (m == NULL) goto retry; reclaimed = true; - } - PV_STAT(atomic_add_int(&pc_chunk_count, 1)); - PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); + } else + counter_u64_add(pv_page_count, 1); + PV_STAT(counter_u64_add(pc_chunk_count, 1)); + PV_STAT(counter_u64_add(pc_chunk_allocs, 1)); dump_add_page(m->phys_addr); pc = (void *)PHYS_TO_DMAP(m->phys_addr); pc->pc_pmap = pmap; @@ -5366,7 +5394,7 @@ retry: pc->pc_map[2] = PC_FREE2; TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); TAILQ_INSERT_TAIL(&new_tail[vm_page_domain(m)], pc, pc_lru); - PV_STAT(atomic_add_int(&pv_entry_spare, _NPCPV)); + PV_STAT(counter_u64_add(pv_entry_spare, _NPCPV)); /* * The reclaim might have freed a chunk from the current pmap. @@ -5441,7 +5469,7 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_next); m->md.pv_gen++; /* Instantiate the remaining NPTEPG - 1 pv entries. */ - PV_STAT(atomic_add_long(&pv_entry_allocs, NPTEPG - 1)); + PV_STAT(counter_u64_add(pv_entry_allocs, NPTEPG - 1)); va_last = va + NBPDR - PAGE_SIZE; for (;;) { pc = TAILQ_FIRST(&pmap->pm_pvchunk); @@ -5471,8 +5499,8 @@ out: TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); } - PV_STAT(atomic_add_long(&pv_entry_count, NPTEPG - 1)); - PV_STAT(atomic_subtract_int(&pv_entry_spare, NPTEPG - 1)); + PV_STAT(counter_u64_add(pv_entry_count, NPTEPG - 1)); + PV_STAT(counter_u64_add(pv_entry_spare, -(NPTEPG - 1))); } #if VM_NRESERVLEVEL > 0 @@ -5732,6 +5760,8 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, return (FALSE); } + counter_u64_add(pt_page_count, 1); + if (!in_kernel) { mpte->ref_count = NPTEPG; pmap_resident_count_inc(pmap, 1); @@ -5796,7 +5826,7 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, if ((oldpde & PG_MANAGED) != 0) pmap_pv_demote_pde(pmap, va, oldpde & PG_PS_FRAME, lockp); - atomic_add_long(&pmap_pde_demotions, 1); + counter_u64_add(pmap_pde_demotions, 1); CTR2(KTR_PMAP, "pmap_demote_pde: success for va %#lx in pmap %p", va, pmap); return (TRUE); @@ -6515,7 +6545,7 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, if ((newpde & ((PG_FRAME & PDRMASK) | PG_A | PG_V)) != (PG_A | PG_V) || !pmap_allow_2m_x_page(pmap, pmap_pde_ept_executable(pmap, newpde))) { - atomic_add_long(&pmap_pde_p_failures, 1); + counter_u64_add(pmap_pde_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#lx" " in pmap %p", va, pmap); return; @@ -6540,7 +6570,7 @@ setpde: for (pte = firstpte + NPTEPG - 1; pte > firstpte; pte--) { oldpte = *pte; if ((oldpte & (PG_FRAME | PG_A | PG_V)) != pa) { - atomic_add_long(&pmap_pde_p_failures, 1); + counter_u64_add(pmap_pde_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#lx" " in pmap %p", va, pmap); return; @@ -6559,7 +6589,7 @@ setpte: (va & ~PDRMASK), pmap); } if ((oldpte & PG_PTE_PROMOTE) != (newpde & PG_PTE_PROMOTE)) { - atomic_add_long(&pmap_pde_p_failures, 1); + counter_u64_add(pmap_pde_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#lx" " in pmap %p", va, pmap); return; @@ -6581,7 +6611,7 @@ setpte: "mpte %p pidx %#lx va %#lx va pde pidx %#lx", mpte, mpte->pindex, va, pmap_pde_pindex(va))); if (pmap_insert_pt_page(pmap, mpte, true)) { - atomic_add_long(&pmap_pde_p_failures, 1); + counter_u64_add(pmap_pde_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#lx in pmap %p", va, pmap); @@ -6607,7 +6637,7 @@ setpte: else pde_store(pde, PG_PROMOTED | PG_PS | newpde); - atomic_add_long(&pmap_pde_promotions, 1); + counter_u64_add(pmap_pde_promotions, 1); CTR2(KTR_PMAP, "pmap_promote_pde: success for va %#lx" " in pmap %p", va, pmap); } @@ -7184,7 +7214,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, */ pde_store(pde, newpde); - atomic_add_long(&pmap_pde_mappings, 1); + counter_u64_add(pmap_pde_mappings, 1); CTR2(KTR_PMAP, "pmap_enter_pde: success for va %#lx in pmap %p", va, pmap); return (KERN_SUCCESS); @@ -7445,7 +7475,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object, pde_store(pde, pa | PG_PS | PG_M | PG_A | PG_U | PG_RW | PG_V); pmap_resident_count_inc(pmap, NBPDR / PAGE_SIZE); - atomic_add_long(&pmap_pde_mappings, 1); + counter_u64_add(pmap_pde_mappings, 1); } else { /* Continue on if the PDE is already valid. */ pdpg->ref_count--; @@ -7673,7 +7703,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, *pde = srcptepaddr & ~PG_W; pmap_resident_count_inc(dst_pmap, NBPDR / PAGE_SIZE); - atomic_add_long(&pmap_pde_mappings, 1); + counter_u64_add(pmap_pde_mappings, 1); } else pmap_abort_ptp(dst_pmap, addr, dst_pdpg); continue; @@ -8158,9 +8188,9 @@ pmap_remove_pages(pmap_t pmap) freed++; } } - PV_STAT(atomic_add_long(&pv_entry_frees, freed)); - PV_STAT(atomic_add_int(&pv_entry_spare, freed)); - PV_STAT(atomic_subtract_long(&pv_entry_count, freed)); + PV_STAT(counter_u64_add(pv_entry_frees, freed)); + PV_STAT(counter_u64_add(pv_entry_spare, freed)); + PV_STAT(counter_u64_add(pv_entry_count, -freed)); if (allfree) { TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); TAILQ_INSERT_TAIL(&free_chunks[pc_to_domain(pc)], pc, pc_list); @@ -9071,6 +9101,7 @@ pmap_demote_pdpe(pmap_t pmap, pdp_entry_t *pdpe, vm_offset_t va) " in pmap %p", va, pmap); return (FALSE); } + counter_u64_add(pt_page_count, 1); pdpgpa = VM_PAGE_TO_PHYS(pdpg); firstpde = (pd_entry_t *)PHYS_TO_DMAP(pdpgpa); newpdpe = pdpgpa | PG_M | PG_A | (oldpdpe & PG_U) | PG_RW | PG_V; @@ -9098,7 +9129,7 @@ pmap_demote_pdpe(pmap_t pmap, pdp_entry_t *pdpe, vm_offset_t va) */ pmap_invalidate_page(pmap, (vm_offset_t)vtopde(va)); - pmap_pdpe_demotions++; + counter_u64_add(pmap_pdpe_demotions, 1); CTR2(KTR_PMAP, "pmap_demote_pdpe: success for va %#lx" " in pmap %p", va, pmap); return (TRUE); @@ -9620,7 +9651,7 @@ pmap_activate_sw_pcid_pti(struct thread *td, pmap_t pmap, u_int cpuid) PCPU_SET(kcr3, kcr3 | CR3_PCID_SAVE); PCPU_SET(ucr3, ucr3 | CR3_PCID_SAVE); if (cached) - PCPU_INC(pm_save_cnt); + counter_u64_add(pcid_save_cnt, 1); pmap_activate_sw_pti_post(td, pmap); } @@ -9641,7 +9672,7 @@ pmap_activate_sw_pcid_nopti(struct thread *td __unused, pmap_t pmap, cached); PCPU_SET(curpmap, pmap); if (cached) - PCPU_INC(pm_save_cnt); + counter_u64_add(pcid_save_cnt, 1); } static void @@ -10086,8 +10117,11 @@ pmap_large_map_getptp_unlocked(void) m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_ZERO); - if (m != NULL && (m->flags & PG_ZERO) == 0) - pmap_zero_page(m); + if (m != NULL) { + if ((m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + counter_u64_add(pt_page_count, 1); + } return (m); } diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h index 4b163636c775..6326fbdae0be 100644 --- a/sys/amd64/include/pcpu.h +++ b/sys/amd64/include/pcpu.h @@ -76,7 +76,6 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); struct system_segment_descriptor *pc_ldt; \ /* Pointer to the CPU TSS descriptor */ \ struct system_segment_descriptor *pc_tss; \ - uint64_t pc_pm_save_cnt; \ u_int pc_cmci_mask; /* MCx banks for CMCI */ \ uint64_t pc_dbreg[16]; /* ddb debugging regs */ \ uint64_t pc_pti_stack[PC_PTI_STACK_SZ]; \ @@ -89,7 +88,7 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); uint32_t pc_ibpb_set; \ void *pc_mds_buf; \ void *pc_mds_buf64; \ - uint32_t pc_pad[2]; \ + uint32_t pc_pad[4]; \ uint8_t pc_mds_tmp[64]; \ u_int pc_ipi_bitmap; \ struct amd64tss pc_common_tss; \ From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:31:09 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C616966B0F5; Wed, 1 Sep 2021 13:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04hF4z1bz3hPh; Wed, 1 Sep 2021 13:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93102259F1; Wed, 1 Sep 2021 13:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DV9S3057083; Wed, 1 Sep 2021 13:31:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DV9Wa057082; Wed, 1 Sep 2021 13:31:09 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:31:09 GMT Message-Id: <202109011331.181DV9Wa057082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: bfff99f7d15c - stable/13 - factor out PT page allocation/freeing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bfff99f7d15ca4e4b426d31bbf400cbd4b404374 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:31:09 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bfff99f7d15ca4e4b426d31bbf400cbd4b404374 commit bfff99f7d15ca4e4b426d31bbf400cbd4b404374 Author: Jason A. Harmening AuthorDate: 2021-03-01 16:42:05 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 13:29:01 +0000 factor out PT page allocation/freeing As follow-on work to e4b8deb222278b2a, move page table page allocation and freeing into their own functions. Use these functions to provide separate kernel vs. user page table page accounting, and to wrap common tasks such as management of zero-filled page state. Requested by: markj, kib Reviewed by: kib (cherry picked from commit c2460d7cfe9fab30459ce495f08544a237a5baa3) --- sys/amd64/amd64/pmap.c | 201 +++++++++++++++++++++++++++---------------------- 1 file changed, 109 insertions(+), 92 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 3086aa0b053f..1d0b6aa0cce1 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -115,6 +115,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -762,9 +763,15 @@ static COUNTER_U64_DEFINE_EARLY(pv_page_count); SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pv_page_count, CTLFLAG_RD, &pv_page_count, "Current number of allocated pv pages"); -static COUNTER_U64_DEFINE_EARLY(pt_page_count); -SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, pt_page_count, CTLFLAG_RD, - &pt_page_count, "Current number of allocated page table pages"); +static COUNTER_U64_DEFINE_EARLY(user_pt_page_count); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, user_pt_page_count, CTLFLAG_RD, + &user_pt_page_count, + "Current number of allocated page table pages for userspace"); + +static COUNTER_U64_DEFINE_EARLY(kernel_pt_page_count); +SYSCTL_COUNTER_U64(_vm_pmap, OID_AUTO, kernel_pt_page_count, CTLFLAG_RD, + &kernel_pt_page_count, + "Current number of allocated page table pages for the kernel"); #ifdef PV_STATS @@ -1291,6 +1298,9 @@ static void _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free); static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t, struct spglist *); +static vm_page_t pmap_alloc_pt_page(pmap_t, vm_pindex_t, int); +static void pmap_free_pt_page(pmap_t, vm_page_t, bool); + /********************/ /* Inline functions */ /********************/ @@ -1457,22 +1467,26 @@ pmap_pte(pmap_t pmap, vm_offset_t va) } static __inline void -pmap_resident_count_inc(pmap_t pmap, int count) +pmap_resident_count_adj(pmap_t pmap, int count) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT(pmap->pm_stats.resident_count + count >= 0, + ("pmap %p resident count underflow %ld %d", pmap, + pmap->pm_stats.resident_count, count)); pmap->pm_stats.resident_count += count; } static __inline void -pmap_resident_count_dec(pmap_t pmap, int count) +pmap_pt_page_count_adj(pmap_t pmap, int count) { - - PMAP_LOCK_ASSERT(pmap, MA_OWNED); - KASSERT(pmap->pm_stats.resident_count >= count, - ("pmap %p resident count underflow %ld %d", pmap, - pmap->pm_stats.resident_count, count)); - pmap->pm_stats.resident_count -= count; + if (pmap == kernel_pmap) + counter_u64_add(kernel_pt_page_count, count); + else { + if (pmap != NULL) + pmap_resident_count_adj(pmap, count); + counter_u64_add(user_pt_page_count, count); + } } PMAP_INLINE pt_entry_t * @@ -2138,6 +2152,7 @@ pmap_bootstrap_la57(void *arg __unused) kernel_pmap->pm_cr3 = KPML5phys; kernel_pmap->pm_pmltop = v_pml5; + pmap_pt_page_count_adj(kernel_pmap, 1); } SYSINIT(la57, SI_SUB_KMEM, SI_ORDER_ANY, pmap_bootstrap_la57, NULL); @@ -4004,7 +4019,6 @@ _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free) pd = pmap_pde(pmap, va); *pd = 0; } - pmap_resident_count_dec(pmap, 1); if (m->pindex < NUPDE) { /* We just released a PT, unhold the matching PD */ pdpg = PHYS_TO_VM_PAGE(*pmap_pdpe(pmap, va) & PG_FRAME); @@ -4019,7 +4033,7 @@ _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free) pmap_unwire_ptp(pmap, va, pml4pg, free); } - counter_u64_add(pt_page_count, -1); + pmap_pt_page_count_adj(pmap, -1); /* * Put page on a list so that it is released after @@ -4184,6 +4198,44 @@ pmap_pinit_pml5_pti(vm_page_t pml5pgu) pmap_cache_bits(kernel_pmap, VM_MEMATTR_DEFAULT, FALSE); } +/* Allocate a page table page and do related bookkeeping */ +static vm_page_t +pmap_alloc_pt_page(pmap_t pmap, vm_pindex_t pindex, int flags) +{ + vm_page_t m; + + m = vm_page_alloc(NULL, pindex, flags | VM_ALLOC_NOOBJ); + if (__predict_false(m == NULL)) + return (NULL); + + pmap_pt_page_count_adj(pmap, 1); + + if ((flags & VM_ALLOC_ZERO) != 0 && (m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + + return (m); +} + +static void +pmap_free_pt_page(pmap_t pmap, vm_page_t m, bool zerofilled) +{ + /* + * This function assumes the page will need to be unwired, + * even though the counterpart allocation in pmap_alloc_pt_page() + * doesn't enforce VM_ALLOC_WIRED. However, all current uses + * of pmap_free_pt_page() require unwiring. The case in which + * a PT page doesn't require unwiring because its ref_count has + * naturally reached 0 is handled through _pmap_unwire_ptp(). + */ + vm_page_unwire_noq(m); + if (zerofilled) + vm_page_free_zero(m); + else + vm_page_free(m); + + pmap_pt_page_count_adj(pmap, -1); +} + /* * Initialize a preallocated and zeroed pmap structure, * such as one in a vmspace structure. @@ -4198,11 +4250,9 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags) /* * allocate the page directory page */ - pmltop_pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | + pmltop_pg = pmap_alloc_pt_page(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_WAITOK); - counter_u64_add(pt_page_count, 1); - pmltop_phys = VM_PAGE_TO_PHYS(pmltop_pg); pmap->pm_pmltop = (pml5_entry_t *)PHYS_TO_DMAP(pmltop_phys); @@ -4215,8 +4265,6 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags) pmap->pm_pmltopu = NULL; pmap->pm_type = pm_type; - if ((pmltop_pg->flags & PG_ZERO) == 0) - pagezero(pmap->pm_pmltop); /* * Do not install the host kernel mappings in the nested page @@ -4232,9 +4280,9 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags) else pmap_pinit_pml4(pmltop_pg); if ((curproc->p_md.md_flags & P_MD_KPTI) != 0) { - pmltop_pgu = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | - VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_WAITOK); - counter_u64_add(pt_page_count, 1); + pmltop_pgu = pmap_alloc_pt_page(NULL, 0, + VM_ALLOC_WIRED | VM_ALLOC_NORMAL | + VM_ALLOC_WAITOK); pmap->pm_pmltopu = (pml4_entry_t *)PHYS_TO_DMAP( VM_PAGE_TO_PHYS(pmltop_pgu)); if (pmap_is_la57(pmap)) @@ -4419,13 +4467,11 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, /* * Allocate a page table page. */ - if ((m = vm_page_alloc(NULL, ptepindex, VM_ALLOC_NOOBJ | - VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) + m = pmap_alloc_pt_page(pmap, ptepindex, + VM_ALLOC_WIRED | VM_ALLOC_ZERO); + if (m == NULL) return (NULL); - if ((m->flags & PG_ZERO) == 0) - pmap_zero_page(m); - /* * Map the pagetable page into the process address space, if * it isn't already there. @@ -4452,8 +4498,7 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, /* Wire up a new PDPE page */ pml4 = pmap_allocpte_getpml4(pmap, lockp, va, true); if (pml4 == NULL) { - vm_page_unwire_noq(m); - vm_page_free_zero(m); + pmap_free_pt_page(pmap, m, true); return (NULL); } KASSERT((*pml4 & PG_V) == 0, @@ -4480,8 +4525,7 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, /* Wire up a new PDE page */ pdp = pmap_allocpte_getpdp(pmap, lockp, va, true); if (pdp == NULL) { - vm_page_unwire_noq(m); - vm_page_free_zero(m); + pmap_free_pt_page(pmap, m, true); return (NULL); } KASSERT((*pdp & PG_V) == 0, @@ -4491,8 +4535,7 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, /* Wire up a new PTE page */ pdp = pmap_allocpte_getpdp(pmap, lockp, va, false); if (pdp == NULL) { - vm_page_unwire_noq(m); - vm_page_free_zero(m); + pmap_free_pt_page(pmap, m, true); return (NULL); } if ((*pdp & PG_V) == 0) { @@ -4501,8 +4544,7 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, lockp, va) == NULL) { pmap_allocpte_free_unref(pmap, va, pmap_pml4e(pmap, va)); - vm_page_unwire_noq(m); - vm_page_free_zero(m); + pmap_free_pt_page(pmap, m, true); return (NULL); } } else { @@ -4519,9 +4561,6 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, *pd = VM_PAGE_TO_PHYS(m) | PG_U | PG_RW | PG_V | PG_A | PG_M; } - pmap_resident_count_inc(pmap, 1); - counter_u64_add(pt_page_count, 1); - return (m); } @@ -4682,16 +4721,12 @@ pmap_release(pmap_t pmap) pmap->pm_pmltop[LMSPML4I + i] = 0; } - vm_page_unwire_noq(m); - vm_page_free_zero(m); - counter_u64_add(pt_page_count, -1); + pmap_free_pt_page(NULL, m, true); if (pmap->pm_pmltopu != NULL) { m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pmap-> pm_pmltopu)); - vm_page_unwire_noq(m); - vm_page_free(m); - counter_u64_add(pt_page_count, -1); + pmap_free_pt_page(NULL, m, false); } if (pmap->pm_type == PT_X86 && (cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0) @@ -4800,14 +4835,11 @@ pmap_growkernel(vm_offset_t addr) pdpe = pmap_pdpe(kernel_pmap, kernel_vm_end); if ((*pdpe & X86_PG_V) == 0) { /* We need a new PDP entry */ - nkpg = vm_page_alloc(NULL, kernel_vm_end >> PDPSHIFT, - VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | - VM_ALLOC_WIRED | VM_ALLOC_ZERO); + nkpg = pmap_alloc_pt_page(kernel_pmap, + kernel_vm_end >> PDPSHIFT, VM_ALLOC_WIRED | + VM_ALLOC_INTERRUPT | VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); - if ((nkpg->flags & PG_ZERO) == 0) - pmap_zero_page(nkpg); - counter_u64_add(pt_page_count, 1); paddr = VM_PAGE_TO_PHYS(nkpg); *pdpe = (pdp_entry_t)(paddr | X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M); @@ -4823,14 +4855,11 @@ pmap_growkernel(vm_offset_t addr) continue; } - nkpg = vm_page_alloc(NULL, pmap_pde_pindex(kernel_vm_end), - VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | - VM_ALLOC_ZERO); + nkpg = pmap_alloc_pt_page(kernel_pmap, + pmap_pde_pindex(kernel_vm_end), VM_ALLOC_WIRED | + VM_ALLOC_INTERRUPT | VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); - if ((nkpg->flags & PG_ZERO) == 0) - pmap_zero_page(nkpg); - counter_u64_add(pt_page_count, 1); paddr = VM_PAGE_TO_PHYS(nkpg); newpdir = paddr | X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M; pde_store(pde, newpdir); @@ -5071,7 +5100,7 @@ reclaim_pv_chunk_domain(pmap_t locked_pmap, struct rwlock **lockp, int domain) goto next_chunk; } /* Every freed mapping is for a 4 KB page. */ - pmap_resident_count_dec(pmap, freed); + pmap_resident_count_adj(pmap, -freed); PV_STAT(counter_u64_add(pv_entry_frees, freed)); PV_STAT(counter_u64_add(pv_entry_spare, freed)); PV_STAT(counter_u64_add(pv_entry_count, -freed)); @@ -5747,9 +5776,9 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, * priority (VM_ALLOC_INTERRUPT). Otherwise, the * priority is normal. */ - mpte = vm_page_alloc(NULL, pmap_pde_pindex(va), + mpte = pmap_alloc_pt_page(pmap, pmap_pde_pindex(va), (in_kernel ? VM_ALLOC_INTERRUPT : VM_ALLOC_NORMAL) | - VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); + VM_ALLOC_WIRED); /* * If the allocation of the new page table page fails, @@ -5760,12 +5789,8 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, return (FALSE); } - counter_u64_add(pt_page_count, 1); - - if (!in_kernel) { + if (!in_kernel) mpte->ref_count = NPTEPG; - pmap_resident_count_inc(pmap, 1); - } } mptepa = VM_PAGE_TO_PHYS(mpte); firstpte = (pt_entry_t *)PHYS_TO_DMAP(mptepa); @@ -5898,7 +5923,7 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva, pmap->pm_stats.wired_count -= NBPDR / PAGE_SIZE; if ((oldpde & PG_G) != 0) pmap_invalidate_pde_page(kernel_pmap, sva, oldpde); - pmap_resident_count_dec(pmap, NBPDR / PAGE_SIZE); + pmap_resident_count_adj(pmap, -NBPDR / PAGE_SIZE); if (oldpde & PG_MANAGED) { CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, oldpde & PG_PS_FRAME); pvh = pa_to_pvh(oldpde & PG_PS_FRAME); @@ -5923,7 +5948,7 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva, if (mpte != NULL) { KASSERT(mpte->valid == VM_PAGE_BITS_ALL, ("pmap_remove_pde: pte page not promoted")); - pmap_resident_count_dec(pmap, 1); + pmap_resident_count_adj(pmap, -1); KASSERT(mpte->ref_count == NPTEPG, ("pmap_remove_pde: pte page ref count error")); mpte->ref_count = 0; @@ -5952,7 +5977,7 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t va, oldpte = pte_load_clear(ptq); if (oldpte & PG_W) pmap->pm_stats.wired_count -= 1; - pmap_resident_count_dec(pmap, 1); + pmap_resident_count_adj(pmap, -1); if (oldpte & PG_MANAGED) { m = PHYS_TO_VM_PAGE(oldpte & PG_FRAME); if ((oldpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) @@ -6122,7 +6147,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) MPASS((*pdpe & (PG_MANAGED | PG_G)) == 0); anyvalid = 1; *pdpe = 0; - pmap_resident_count_dec(pmap, NBPDP / PAGE_SIZE); + pmap_resident_count_adj(pmap, -NBPDP / PAGE_SIZE); mt = PHYS_TO_VM_PAGE(*pmap_pml4e(pmap, sva) & PG_FRAME); pmap_unwire_ptp(pmap, sva, mt, &free); continue; @@ -6257,7 +6282,7 @@ retry: PG_A = pmap_accessed_bit(pmap); PG_M = pmap_modified_bit(pmap); PG_RW = pmap_rw_bit(pmap); - pmap_resident_count_dec(pmap, 1); + pmap_resident_count_adj(pmap, -1); pde = pmap_pde(pmap, pv->pv_va); KASSERT((*pde & PG_PS) == 0, ("pmap_remove_all: found" " a 2mpage in page %p's pv list", m)); @@ -6724,7 +6749,7 @@ restart: else if ((pten & PG_W) == 0 && (origpte & PG_W) != 0) pmap->pm_stats.wired_count -= pagesizes[psind] / PAGE_SIZE; if ((origpte & PG_V) == 0) - pmap_resident_count_inc(pmap, pagesizes[psind] / PAGE_SIZE); + pmap_resident_count_adj(pmap, pagesizes[psind] / PAGE_SIZE); return (KERN_SUCCESS); @@ -6959,7 +6984,7 @@ retry: */ if ((newpte & PG_W) != 0) pmap->pm_stats.wired_count++; - pmap_resident_count_inc(pmap, 1); + pmap_resident_count_adj(pmap, 1); } /* @@ -7206,7 +7231,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, */ if ((newpde & PG_W) != 0) pmap->pm_stats.wired_count += NBPDR / PAGE_SIZE; - pmap_resident_count_inc(pmap, NBPDR / PAGE_SIZE); + pmap_resident_count_adj(pmap, NBPDR / PAGE_SIZE); /* * Map the superpage. (This is not a promoted mapping; there will not @@ -7365,7 +7390,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, /* * Increment counters */ - pmap_resident_count_inc(pmap, 1); + pmap_resident_count_adj(pmap, 1); newpte = VM_PAGE_TO_PHYS(m) | PG_V | pmap_cache_bits(pmap, m->md.pat_mode, 0); @@ -7474,7 +7499,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object, if ((*pde & PG_V) == 0) { pde_store(pde, pa | PG_PS | PG_M | PG_A | PG_U | PG_RW | PG_V); - pmap_resident_count_inc(pmap, NBPDR / PAGE_SIZE); + pmap_resident_count_adj(pmap, NBPDR / PAGE_SIZE); counter_u64_add(pmap_pde_mappings, 1); } else { /* Continue on if the PDE is already valid. */ @@ -7678,7 +7703,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, "pdpe %#lx sva %#lx eva %#lx va_next %#lx", *pdpe, addr, end_addr, va_next)); *pdpe = srcptepaddr & ~PG_W; - pmap_resident_count_inc(dst_pmap, NBPDP / PAGE_SIZE); + pmap_resident_count_adj(dst_pmap, NBPDP / PAGE_SIZE); continue; } @@ -7701,7 +7726,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, pmap_pv_insert_pde(dst_pmap, addr, srcptepaddr, PMAP_ENTER_NORECLAIM, &lock))) { *pde = srcptepaddr & ~PG_W; - pmap_resident_count_inc(dst_pmap, NBPDR / + pmap_resident_count_adj(dst_pmap, NBPDR / PAGE_SIZE); counter_u64_add(pmap_pde_mappings, 1); } else @@ -7748,7 +7773,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, * (referenced) bits during the copy. */ *dst_pte = ptetemp & ~(PG_W | PG_M | PG_A); - pmap_resident_count_inc(dst_pmap, 1); + pmap_resident_count_adj(dst_pmap, 1); } else { pmap_abort_ptp(dst_pmap, addr, dstmpte); goto out; @@ -8152,7 +8177,7 @@ pmap_remove_pages(pmap_t pmap) /* Mark free */ pc->pc_map[field] |= bitmask; if (superpage) { - pmap_resident_count_dec(pmap, NBPDR / PAGE_SIZE); + pmap_resident_count_adj(pmap, -NBPDR / PAGE_SIZE); pvh = pa_to_pvh(tpte & PG_PS_FRAME); TAILQ_REMOVE(&pvh->pv_list, pv, pv_next); pvh->pv_gen++; @@ -8166,14 +8191,14 @@ pmap_remove_pages(pmap_t pmap) if (mpte != NULL) { KASSERT(mpte->valid == VM_PAGE_BITS_ALL, ("pmap_remove_pages: pte page not promoted")); - pmap_resident_count_dec(pmap, 1); + pmap_resident_count_adj(pmap, -1); KASSERT(mpte->ref_count == NPTEPG, ("pmap_remove_pages: pte page reference count error")); mpte->ref_count = 0; pmap_add_delayed_free_list(mpte, &free, FALSE); } } else { - pmap_resident_count_dec(pmap, 1); + pmap_resident_count_adj(pmap, -1); TAILQ_REMOVE(&m->md.pv_list, pv, pv_next); m->md.pv_gen++; if ((m->a.flags & PGA_WRITEABLE) != 0 && @@ -9095,13 +9120,13 @@ pmap_demote_pdpe(pmap_t pmap, pdp_entry_t *pdpe, vm_offset_t va) oldpdpe = *pdpe; KASSERT((oldpdpe & (PG_PS | PG_V)) == (PG_PS | PG_V), ("pmap_demote_pdpe: oldpdpe is missing PG_PS and/or PG_V")); - if ((pdpg = vm_page_alloc(NULL, va >> PDPSHIFT, VM_ALLOC_INTERRUPT | - VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { + pdpg = pmap_alloc_pt_page(pmap, va >> PDPSHIFT, + VM_ALLOC_WIRED | VM_ALLOC_INTERRUPT); + if (pdpg == NULL) { CTR2(KTR_PMAP, "pmap_demote_pdpe: failure for va %#lx" " in pmap %p", va, pmap); return (FALSE); } - counter_u64_add(pt_page_count, 1); pdpgpa = VM_PAGE_TO_PHYS(pdpg); firstpde = (pd_entry_t *)PHYS_TO_DMAP(pdpgpa); newpdpe = pdpgpa | PG_M | PG_A | (oldpdpe & PG_U) | PG_RW | PG_V; @@ -10113,16 +10138,8 @@ pmap_quick_remove_page(vm_offset_t addr) static vm_page_t pmap_large_map_getptp_unlocked(void) { - vm_page_t m; - - m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | - VM_ALLOC_ZERO); - if (m != NULL) { - if ((m->flags & PG_ZERO) == 0) - pmap_zero_page(m); - counter_u64_add(pt_page_count, 1); - } - return (m); + return (pmap_alloc_pt_page(kernel_pmap, 0, + VM_ALLOC_NORMAL | VM_ALLOC_ZERO)); } static vm_page_t From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:31:11 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39BD766B24F; Wed, 1 Sep 2021 13:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04hH088qz3hK4; Wed, 1 Sep 2021 13:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C123226115; Wed, 1 Sep 2021 13:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DVAxh057107; Wed, 1 Sep 2021 13:31:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DVAH6057106; Wed, 1 Sep 2021 13:31:10 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:31:10 GMT Message-Id: <202109011331.181DVAH6057106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4b38880259e8 - stable/13 - Clear the accessed bit when copying a managed superpage mapping MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4b38880259e81043978f4be27ef2289120c1b9d3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:31:11 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4b38880259e81043978f4be27ef2289120c1b9d3 commit 4b38880259e81043978f4be27ef2289120c1b9d3 Author: Alan Cox AuthorDate: 2021-07-13 07:30:43 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 13:29:01 +0000 Clear the accessed bit when copying a managed superpage mapping pmap_copy() is used to speculatively create mappings, so those mappings should not have their access bit preset. Reviewed by: kib, markj (cherry picked from commit 325ff9327459bc7307130675fa19367ff8b02310) --- sys/amd64/amd64/pmap.c | 17 ++++++++++++++++- sys/arm64/arm64/pmap.c | 18 ++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 1d0b6aa0cce1..b920426e6996 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -7717,6 +7717,9 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, continue; if (srcptepaddr & PG_PS) { + /* + * We can only virtual copy whole superpages. + */ if ((addr & PDRMASK) != 0 || addr + NBPDR > end_addr) continue; pde = pmap_alloc_pde(dst_pmap, addr, &dst_pdpg, NULL); @@ -7725,7 +7728,19 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, if (*pde == 0 && ((srcptepaddr & PG_MANAGED) == 0 || pmap_pv_insert_pde(dst_pmap, addr, srcptepaddr, PMAP_ENTER_NORECLAIM, &lock))) { - *pde = srcptepaddr & ~PG_W; + /* + * We leave the dirty bit unchanged because + * managed read/write superpage mappings are + * required to be dirty. However, managed + * superpage mappings are not required to + * have their accessed bit set, so we clear + * it because we don't know if this mapping + * will be used. + */ + srcptepaddr &= ~PG_W; + if ((srcptepaddr & PG_MANAGED) != 0) + srcptepaddr &= ~PG_A; + *pde = srcptepaddr; pmap_resident_count_adj(dst_pmap, NBPDR / PAGE_SIZE); counter_u64_add(pmap_pde_mappings, 1); diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index a8216c6b4d7b..f0419beace37 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4774,6 +4774,9 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, if (srcptepaddr == 0) continue; if ((srcptepaddr & ATTR_DESCR_MASK) == L2_BLOCK) { + /* + * We can only virtual copy whole superpages. + */ if ((addr & L2_OFFSET) != 0 || addr + L2_SIZE > end_addr) continue; @@ -4784,8 +4787,19 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, ((srcptepaddr & ATTR_SW_MANAGED) == 0 || pmap_pv_insert_l2(dst_pmap, addr, srcptepaddr, PMAP_ENTER_NORECLAIM, &lock))) { - mask = ATTR_SW_WIRED; - pmap_store(l2, srcptepaddr & ~mask); + /* + * We leave the dirty bit unchanged because + * managed read/write superpage mappings are + * required to be dirty. However, managed + * superpage mappings are not required to + * have their accessed bit set, so we clear + * it because we don't know if this mapping + * will be used. + */ + srcptepaddr &= ~ATTR_SW_WIRED; + if ((srcptepaddr & ATTR_SW_MANAGED) != 0) + srcptepaddr &= ~ATTR_AF; + pmap_store(l2, srcptepaddr); pmap_resident_count_inc(dst_pmap, L2_SIZE / PAGE_SIZE); atomic_add_long(&pmap_l2_mappings, 1); From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 13:31:12 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92B0466B48E; Wed, 1 Sep 2021 13:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H04hJ0k9zz3hPw; Wed, 1 Sep 2021 13:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E3AAE25856; Wed, 1 Sep 2021 13:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181DVBeK057131; Wed, 1 Sep 2021 13:31:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181DVB0F057130; Wed, 1 Sep 2021 13:31:11 GMT (envelope-from git) Date: Wed, 1 Sep 2021 13:31:11 GMT Message-Id: <202109011331.181DVB0F057130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 026f9acc3831 - stable/13 - pmap: Micro-optimize pmap_remove_pages() on amd64 and arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 026f9acc383102202b42e411f594f1bc7889ac04 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:31:12 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=026f9acc383102202b42e411f594f1bc7889ac04 commit 026f9acc383102202b42e411f594f1bc7889ac04 Author: Alan Cox AuthorDate: 2021-07-12 23:25:37 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 13:29:01 +0000 pmap: Micro-optimize pmap_remove_pages() on amd64 and arm64 Reduce the live ranges for three variables so that they do not span the call to PHYS_TO_VM_PAGE(). This enables the compiler to generate slightly smaller machine code. Reviewed by: kib, markj (cherry picked from commit d411b285bc293a37e062d8fb15b85212ce16abab) --- sys/amd64/amd64/pmap.c | 14 ++++++++++---- sys/arm64/arm64/pmap.c | 19 ++++++++++--------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index b920426e6996..b9a83cd8bbad 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -8158,6 +8158,16 @@ pmap_remove_pages(pmap_t pmap) continue; } + /* Mark free */ + pc->pc_map[field] |= bitmask; + + /* + * Because this pmap is not active on other + * processors, the dirty bit cannot have + * changed state since we last loaded pte. + */ + pte_clear(pte); + if (superpage) pa = tpte & PG_PS_FRAME; else @@ -8174,8 +8184,6 @@ pmap_remove_pages(pmap_t pmap) ("pmap_remove_pages: bad tpte %#jx", (uintmax_t)tpte)); - pte_clear(pte); - /* * Update the vm_page_t clean/reference bits. */ @@ -8189,8 +8197,6 @@ pmap_remove_pages(pmap_t pmap) CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, m); - /* Mark free */ - pc->pc_map[field] |= bitmask; if (superpage) { pmap_resident_count_adj(pmap, -NBPDR / PAGE_SIZE); pvh = pa_to_pvh(tpte & PG_PS_FRAME); diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index f0419beace37..1ae6d87dee51 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -5182,6 +5182,16 @@ pmap_remove_pages(pmap_t pmap) continue; } + /* Mark free */ + pc->pc_map[field] |= bitmask; + + /* + * Because this pmap is not active on other + * processors, the dirty bit cannot have + * changed state since we last loaded pte. + */ + pmap_clear(pte); + pa = tpte & ~ATTR_MASK; m = PHYS_TO_VM_PAGE(pa); @@ -5195,13 +5205,6 @@ pmap_remove_pages(pmap_t pmap) ("pmap_remove_pages: bad pte %#jx", (uintmax_t)tpte)); - /* - * Because this pmap is not active on other - * processors, the dirty bit cannot have - * changed state since we last loaded pte. - */ - pmap_clear(pte); - /* * Update the vm_page_t clean/reference bits. */ @@ -5219,8 +5222,6 @@ pmap_remove_pages(pmap_t pmap) CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, m); - /* Mark free */ - pc->pc_map[field] |= bitmask; switch (lvl) { case 1: pmap_resident_count_dec(pmap, From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 20:57:33 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB45D671759; Wed, 1 Sep 2021 20:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0GbK4W6fz3sh2; Wed, 1 Sep 2021 20:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F68F41EE; Wed, 1 Sep 2021 20:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181KvXrn047268; Wed, 1 Sep 2021 20:57:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181KvXBv047267; Wed, 1 Sep 2021 20:57:33 GMT (envelope-from git) Date: Wed, 1 Sep 2021 20:57:33 GMT Message-Id: <202109012057.181KvXBv047267@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 8ee90cc8d3f2 - stable/13 - pci_pci: Support growing windows in bus_adjust_resource for NEW_PCIB MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8ee90cc8d3f2c98e37effece00b998f46d0a3d82 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 20:57:33 -0000 The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=8ee90cc8d3f2c98e37effece00b998f46d0a3d82 commit 8ee90cc8d3f2c98e37effece00b998f46d0a3d82 Author: Jessica Clarke AuthorDate: 2021-08-07 18:27:32 +0000 Commit: Alexander Motin CommitDate: 2021-09-01 20:55:13 +0000 pci_pci: Support growing windows in bus_adjust_resource for NEW_PCIB If we allocate a new window for a bridge rather than reusing an existing one set up by firmware to cover all the devices then the new window only includes the range needed for the first device to allocate the resource. If a request comes in to adjust this resource in order to extend a downstream window for another device then this will fail as the rman doesn't have any space, so we must first grow the bridge's own window. This is needed to support successfully attaching more than one PCI device on SiFive's HiFive Unmatched, which has the following topology: Root Port <---> Bridge <---> Bridge <-+-> Bridge <---> (Unused) (pcib0) (pcib1) (pcib2) | (pcib3) +-> Bridge <---> xHCI | (pcib4) +-> Bridge <---> M.2 E-key | (pcib5) +-> Bridge <---> M.2 M-key | (pcib6) +-> Bridge <---> x16 slot (pcib7) Without this, the xHCI endpoint successfully attaches but NVMe M.2 M-key endpoint fails to attach as, when its adjacent bridge (pcib6) attempts to allocate a window from its parent (pcib2) on the other side of the switch, its parent attempts to grow its own window by calling bus_adjust_resource on its own parent (pcib1) which fails to call the root port device (pcib0) to request more memory to grow its own window. Had the root port been directly connected to the switch without the bridge in the middle then the existing code would have worked, but the extra hop broke it. Reviewed by: jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31035 --- sys/dev/pci/pci_pci.c | 77 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 15 deletions(-) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index d6fbb06a61ac..83106eaa455b 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -148,6 +148,30 @@ static int pci_clear_pcib; SYSCTL_INT(_hw_pci, OID_AUTO, clear_pcib, CTLFLAG_RDTUN, &pci_clear_pcib, 0, "Clear firmware-assigned resources for PCI-PCI bridge I/O windows."); +/* + * Get the corresponding window if this resource from a child device was + * sub-allocated from one of our window resource managers. + */ +static struct pcib_window * +pcib_get_resource_window(struct pcib_softc *sc, int type, struct resource *r) +{ + switch (type) { + case SYS_RES_IOPORT: + if (rman_is_region_manager(r, &sc->io.rman)) + return (&sc->io); + break; + case SYS_RES_MEMORY: + /* Prefetchable resources may live in either memory rman. */ + if (rman_get_flags(r) & RF_PREFETCHABLE && + rman_is_region_manager(r, &sc->pmem.rman)) + return (&sc->pmem); + if (rman_is_region_manager(r, &sc->mem.rman)) + return (&sc->mem); + break; + } + return (NULL); +} + /* * Is a resource from a child device sub-allocated from one of our * resource managers? @@ -156,21 +180,11 @@ static int pcib_is_resource_managed(struct pcib_softc *sc, int type, struct resource *r) { - switch (type) { #ifdef PCI_RES_BUS - case PCI_RES_BUS: + if (type == PCI_RES_BUS) return (rman_is_region_manager(r, &sc->bus.rman)); #endif - case SYS_RES_IOPORT: - return (rman_is_region_manager(r, &sc->io.rman)); - case SYS_RES_MEMORY: - /* Prefetchable resources may live in either memory rman. */ - if (rman_get_flags(r) & RF_PREFETCHABLE && - rman_is_region_manager(r, &sc->pmem.rman)) - return (1); - return (rman_is_region_manager(r, &sc->mem.rman)); - } - return (0); + return (pcib_get_resource_window(sc, type, r) != NULL); } static int @@ -2330,11 +2344,44 @@ pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *r, rman_res_t start, rman_res_t end) { struct pcib_softc *sc; + struct pcib_window *w; + int error; sc = device_get_softc(bus); - if (pcib_is_resource_managed(sc, type, r)) - return (rman_adjust_resource(r, start, end)); - return (bus_generic_adjust_resource(bus, child, type, r, start, end)); + + /* + * If the resource wasn't sub-allocated from one of our region + * managers then just pass the request up. + */ + if (!pcib_is_resource_managed(sc, type, r)) + return (bus_generic_adjust_resource(bus, child, type, r, + start, end)); + +#ifdef PCI_RES_BUS + if (type != PCI_RES_BUS) +#endif + { + /* + * Resource is managed and not a secondary bus number, must + * be from one of our windows. + */ + w = pcib_get_resource_window(sc, type, r); + KASSERT(w != NULL, + ("%s: no window for resource (%#jx-%#jx) type %d", + __func__, rman_get_start(r), rman_get_end(r), type)); + + /* + * If our window isn't big enough to grow the sub-allocation + * then we need to expand the window. + */ + if (start < w->base || end > w->limit) { + error = pcib_expand_window(sc, w, type, start, end); + if (error != 0) + return (error); + } + } + + return (rman_adjust_resource(r, start, end)); } int From owner-dev-commits-src-branches@freebsd.org Wed Sep 1 20:57:34 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0461671C98; Wed, 1 Sep 2021 20:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0GbL5MFDz3sv1; Wed, 1 Sep 2021 20:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99A583FBD; Wed, 1 Sep 2021 20:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181KvYKT047292; Wed, 1 Sep 2021 20:57:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181KvYAI047291; Wed, 1 Sep 2021 20:57:34 GMT (envelope-from git) Date: Wed, 1 Sep 2021 20:57:34 GMT Message-Id: <202109012057.181KvYAI047291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: c4bd6b589c8d - stable/13 - pcib(4): Write window registers after resource adjustment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c4bd6b589c8db00ef11e6c27943efba6129aacf1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 20:57:35 -0000 The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=c4bd6b589c8db00ef11e6c27943efba6129aacf1 commit c4bd6b589c8db00ef11e6c27943efba6129aacf1 Author: Alexander Motin AuthorDate: 2021-08-27 00:21:56 +0000 Commit: Alexander Motin CommitDate: 2021-09-01 20:55:13 +0000 pcib(4): Write window registers after resource adjustment When adjusting resources we should write updated window base/limit into the registers. Without this newly added address range won't be routed through the bridge properly. Use MIN()/MAX() against current window base/limit to not shrink it on the other side if the window is shared by several resources. Align passed resource start/end to the set window granularity to keep it properly aligned. Currently this is mostly called by other bridges having the same window alignment, but it may be change one day. Reviewed by: jrtc27, jhb MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D31693 --- sys/dev/pci/pci_pci.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 83106eaa455b..33e277ed01ae 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -2345,6 +2345,7 @@ pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *r, { struct pcib_softc *sc; struct pcib_window *w; + rman_res_t wmask; int error; sc = device_get_softc(bus); @@ -2375,9 +2376,18 @@ pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *r, * then we need to expand the window. */ if (start < w->base || end > w->limit) { - error = pcib_expand_window(sc, w, type, start, end); + wmask = ((rman_res_t)1 << w->step) - 1; + error = pcib_expand_window(sc, w, type, + MIN(start & ~wmask, w->base), + MAX(end | wmask, w->limit)); if (error != 0) return (error); + if (bootverbose) + device_printf(sc->dev, + "grew %s window to %#jx-%#jx\n", + w->name, (uintmax_t)w->base, + (uintmax_t)w->limit); + pcib_write_windows(sc, w->mask); } } From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 00:53:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D8C956755C8; Thu, 2 Sep 2021 00:53:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0Mq05k2tz3k34; Thu, 2 Sep 2021 00:53:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A9DA57766; Thu, 2 Sep 2021 00:53:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1820r0bN067152; Thu, 2 Sep 2021 00:53:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1820r0ql067151; Thu, 2 Sep 2021 00:53:00 GMT (envelope-from git) Date: Thu, 2 Sep 2021 00:53:00 GMT Message-Id: <202109020053.1820r0ql067151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: c59594cb307f - stable/13 - Style MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c59594cb307ff2fe7f41c57b4e2ebdc4f4add04d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 00:53:00 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c59594cb307ff2fe7f41c57b4e2ebdc4f4add04d commit c59594cb307ff2fe7f41c57b4e2ebdc4f4add04d Author: Konstantin Belousov AuthorDate: 2021-08-27 14:28:19 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-02 00:52:24 +0000 Style (cherry picked from commit 31607861e2ea3adae26a4ce3f6fbd61dfbc37894) --- sys/i386/i386/elf_machdep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c index ef808e65fd9a..1ba0257c2763 100644 --- a/sys/i386/i386/elf_machdep.c +++ b/sys/i386/i386/elf_machdep.c @@ -257,6 +257,7 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, if (*where != addr) *where = addr; break; + default: printf("kldload: unexpected relocation type %d, " "symbol index %d\n", rtype, symidx); From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 00:53:02 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02BB5675607; Thu, 2 Sep 2021 00:53:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0Mq16X5Qz3k1b; Thu, 2 Sep 2021 00:53:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C7B897059; Thu, 2 Sep 2021 00:53:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1820r19Q067176; Thu, 2 Sep 2021 00:53:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1820r13q067175; Thu, 2 Sep 2021 00:53:01 GMT (envelope-from git) Date: Thu, 2 Sep 2021 00:53:01 GMT Message-Id: <202109020053.1820r13q067175@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ebc0d29e14f0 - stable/13 - amd64: remove lfence after swapgs on syscall entry MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ebc0d29e14f08b76908ed872815ffe3d01df9a79 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 00:53:02 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ebc0d29e14f08b76908ed872815ffe3d01df9a79 commit ebc0d29e14f08b76908ed872815ffe3d01df9a79 Author: Konstantin Belousov AuthorDate: 2021-08-25 19:28:57 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-02 00:52:24 +0000 amd64: remove lfence after swapgs on syscall entry (cherry picked from commit 7aa47cace14948a7b8277a4b24a0ca9e0308990a) --- sys/amd64/amd64/exception.S | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S index 3fb518179406..bd9f235626eb 100644 --- a/sys/amd64/amd64/exception.S +++ b/sys/amd64/amd64/exception.S @@ -525,7 +525,6 @@ prot_addrf: SUPERALIGN_TEXT IDTVEC(fast_syscall_pti) swapgs - lfence cmpq $~0,PCPU(UCR3) je fast_syscall_common movq %rax,PCPU(SCRATCH_RAX) @@ -536,7 +535,6 @@ IDTVEC(fast_syscall_pti) SUPERALIGN_TEXT IDTVEC(fast_syscall) swapgs - lfence fast_syscall_common: movq %rsp,PCPU(SCRATCH_RSP) movq PCPU(RSP0),%rsp From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 06:14:10 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AF546792BC; Thu, 2 Sep 2021 06:14:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0VxZ3YbYz4nV5; Thu, 2 Sep 2021 06:14:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6126A13B6B; Thu, 2 Sep 2021 06:14:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1826EAbH093154; Thu, 2 Sep 2021 06:14:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1826EAsa093153; Thu, 2 Sep 2021 06:14:10 GMT (envelope-from git) Date: Thu, 2 Sep 2021 06:14:10 GMT Message-Id: <202109020614.1826EAsa093153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: aa9d47d9de1a - stable/13 - Fix a common typo in man pages and src comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: aa9d47d9de1a04280c2d734dccd8d44609678957 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 06:14:10 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=aa9d47d9de1a04280c2d734dccd8d44609678957 commit aa9d47d9de1a04280c2d734dccd8d44609678957 Author: Gordon Bergling AuthorDate: 2021-08-28 17:24:27 +0000 Commit: Gordon Bergling CommitDate: 2021-09-02 06:13:48 +0000 Fix a common typo in man pages and src comments - s/desciptor/descriptor/ (cherry picked from commit b1603638e38b3d8c23da6599e389db9a9218c240) --- sbin/mount_fusefs/mount_fusefs.8 | 2 +- share/man/man4/proto.4 | 2 +- sys/dev/aic7xxx/aic79xx.h | 2 +- sys/dev/aic7xxx/aic7xxx.h | 2 +- sys/dev/isci/scil/sci_memory_descriptor_list.h | 2 +- sys/dev/isci/scil/scif_sas_controller.h | 2 +- sys/dev/mge/if_mge.c | 2 +- sys/dev/nge/if_nge.c | 2 +- sys/dev/sk/if_sk.c | 2 +- sys/dev/ti/if_ti.c | 2 +- sys/dev/usb/input/uhid_snes.c | 2 +- sys/dev/vr/if_vr.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sbin/mount_fusefs/mount_fusefs.8 b/sbin/mount_fusefs/mount_fusefs.8 index b4ab86c57ae2..051a5c273ef7 100644 --- a/sbin/mount_fusefs/mount_fusefs.8 +++ b/sbin/mount_fusefs/mount_fusefs.8 @@ -309,7 +309,7 @@ If not set, the multiplexer path .Ar /dev/fuse is used. .It Ev FUSE_DEV_FD -File desciptor of an opened Fuse device to use. +File descriptor of an opened Fuse device to use. Overrides .Ev FUSE_DEV_NAME . .It Ev FUSE_NO_MOUNT diff --git a/share/man/man4/proto.4 b/share/man/man4/proto.4 index 39f585dad65c..bd861697c10d 100644 --- a/share/man/man4/proto.4 +++ b/share/man/man4/proto.4 @@ -267,7 +267,7 @@ single contigous region of physical memory. In practice this also tends to give a single contigous region in bus space. This may change over time. .It PROTO_IOC_BUSDMA_MEM_FREE -Free previously allocated memory and destroy the memory desciptor. +Free previously allocated memory and destroy the memory descriptor. The .Nm driver is not in a position to track whether the memory has been mapped in diff --git a/sys/dev/aic7xxx/aic79xx.h b/sys/dev/aic7xxx/aic79xx.h index f610f00af869..42059a351271 100644 --- a/sys/dev/aic7xxx/aic79xx.h +++ b/sys/dev/aic7xxx/aic79xx.h @@ -696,7 +696,7 @@ struct scb_data { /************************ Target Mode Definitions *****************************/ /* - * Connection desciptor for select-in requests in target mode. + * Connection descriptor for select-in requests in target mode. */ struct target_cmd { uint8_t scsiid; /* Our ID and the initiator's ID */ diff --git a/sys/dev/aic7xxx/aic7xxx.h b/sys/dev/aic7xxx/aic7xxx.h index a3abc456f8c5..f48e793fea6a 100644 --- a/sys/dev/aic7xxx/aic7xxx.h +++ b/sys/dev/aic7xxx/aic7xxx.h @@ -644,7 +644,7 @@ struct scb_data { /************************ Target Mode Definitions *****************************/ /* - * Connection desciptor for select-in requests in target mode. + * Connection descriptor for select-in requests in target mode. */ struct target_cmd { uint8_t scsiid; /* Our ID and the initiator's ID */ diff --git a/sys/dev/isci/scil/sci_memory_descriptor_list.h b/sys/dev/isci/scil/sci_memory_descriptor_list.h index 6b78fbc6055d..21516c13231c 100644 --- a/sys/dev/isci/scil/sci_memory_descriptor_list.h +++ b/sys/dev/isci/scil/sci_memory_descriptor_list.h @@ -96,7 +96,7 @@ typedef struct SCI_PHYSICAL_MEMORY_DESCRIPTOR void * virtual_address; /** - * This field contains the physical address associated with this desciptor + * This field contains the physical address associated with this descriptor * element. This field shall be zero when the descriptor is retrieved from * the SCI implementation. The user shall set this field prior * sci_controller_start() diff --git a/sys/dev/isci/scil/scif_sas_controller.h b/sys/dev/isci/scil/scif_sas_controller.h index fc7583e84367..3de39864811c 100644 --- a/sys/dev/isci/scil/scif_sas_controller.h +++ b/sys/dev/isci/scil/scif_sas_controller.h @@ -121,7 +121,7 @@ typedef struct SCIF_SAS_CONTROLLER SCI_BASE_CONTROLLER_STATE_HANDLER_T * state_handlers; /** - * This field contains the memory desciptors defining the physical + * This field contains the memory descriptors defining the physical * memory requirements for this controller. */ SCI_PHYSICAL_MEMORY_DESCRIPTOR_T mdes[SCIF_SAS_MAX_MEMORY_DESCRIPTORS]; diff --git a/sys/dev/mge/if_mge.c b/sys/dev/mge/if_mge.c index dc044749ae72..16deb330c06c 100644 --- a/sys/dev/mge/if_mge.c +++ b/sys/dev/mge/if_mge.c @@ -697,7 +697,7 @@ static void mge_free_dma(struct mge_softc *sc) { - /* Free desciptors and mbufs */ + /* Free descriptors and mbufs */ mge_free_desc(sc, sc->mge_rx_desc, MGE_RX_DESC_NUM, sc->mge_rx_dtag, 1); mge_free_desc(sc, sc->mge_tx_desc, MGE_TX_DESC_NUM, sc->mge_tx_dtag, 0); diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c index c099896d7bc8..67e1f03ebdd2 100644 --- a/sys/dev/nge/if_nge.c +++ b/sys/dev/nge/if_nge.c @@ -1950,7 +1950,7 @@ nge_encap(struct nge_softc *sc, struct mbuf **m_head) if ((m->m_flags & M_VLANTAG) != 0) desc->nge_extsts |= htole32(NGE_TXEXTSTS_VLANPKT | bswap16(m->m_pkthdr.ether_vtag)); - /* Set EOP on the last desciptor. */ + /* Set EOP on the last descriptor. */ desc->nge_cmdsts &= htole32(~NGE_CMDSTS_MORE); /* Set checksum offload in the first descriptor. */ diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index a6431044e30f..809cfa6f9e14 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -2445,7 +2445,7 @@ sk_encap(sc_if, m_head) } sc_if->sk_cdata.sk_tx_prod = frag; - /* set EOF on the last desciptor */ + /* set EOF on the last descriptor */ frag = (frag + SK_TX_RING_CNT - 1) % SK_TX_RING_CNT; f = &sc_if->sk_rdata.sk_tx_ring[frag]; f->sk_ctl |= htole32(SK_TXCTL_LASTFRAG | SK_TXCTL_EOF_INTR); diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index 06769bc97c9f..9871212d6379 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -53,7 +53,7 @@ * * The Tigon 2 contains 2 R4000 CPUs and requires a newer firmware * revision, which supports new features such as extended commands, - * extended jumbo receive ring desciptors and a mini receive ring. + * extended jumbo receive ring descriptors and a mini receive ring. * * Alteon Networks is to be commended for releasing such a vast amount * of development material for the Tigon NIC without requiring an NDA diff --git a/sys/dev/usb/input/uhid_snes.c b/sys/dev/usb/input/uhid_snes.c index 5b68560a47e9..181e38eba7b1 100644 --- a/sys/dev/usb/input/uhid_snes.c +++ b/sys/dev/usb/input/uhid_snes.c @@ -296,7 +296,7 @@ uhid_snes_ioctl(struct usb_fifo *fifo, u_long cmd, void *data, int fflags) ugd->ugd_actlen = size; if (ugd->ugd_data == NULL) - break; /*desciptor length only*/ + break; /* descriptor length only*/ error = copyout(sc->sc_repdesc_ptr, ugd->ugd_data, size); break; diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index e81c027cf2cd..3a3490b7095c 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -1934,7 +1934,7 @@ vr_encap(struct vr_softc *sc, struct mbuf **m_head) desc = &sc->vr_rdata.vr_tx_ring[prod]; /* - * Set EOP on the last desciptor and reuqest Tx completion + * Set EOP on the last descriptor and reuqest Tx completion * interrupt for every VR_TX_INTR_THRESH-th frames. */ VR_INC(sc->vr_cdata.vr_tx_pkts, VR_TX_INTR_THRESH); From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 06:16:43 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CDA3D67934C; Thu, 2 Sep 2021 06:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0W0W5Pjsz4p43; Thu, 2 Sep 2021 06:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1A6F14024; Thu, 2 Sep 2021 06:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1826GhDe093500; Thu, 2 Sep 2021 06:16:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1826Ghdo093499; Thu, 2 Sep 2021 06:16:43 GMT (envelope-from git) Date: Thu, 2 Sep 2021 06:16:43 GMT Message-Id: <202109020616.1826Ghdo093499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: e99900847a5c - stable/12 - Fix a common typo in man pages and src comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e99900847a5ceb7235878f40fba599e0538f7ec1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 06:16:43 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e99900847a5ceb7235878f40fba599e0538f7ec1 commit e99900847a5ceb7235878f40fba599e0538f7ec1 Author: Gordon Bergling AuthorDate: 2021-08-28 17:24:27 +0000 Commit: Gordon Bergling CommitDate: 2021-09-02 06:15:44 +0000 Fix a common typo in man pages and src comments - s/desciptor/descriptor/ (cherry picked from commit b1603638e38b3d8c23da6599e389db9a9218c240) --- sbin/mount_fusefs/mount_fusefs.8 | 2 +- share/man/man4/proto.4 | 2 +- sys/dev/aic7xxx/aic79xx.h | 2 +- sys/dev/aic7xxx/aic7xxx.h | 2 +- sys/dev/isci/scil/sci_memory_descriptor_list.h | 2 +- sys/dev/isci/scil/scif_sas_controller.h | 2 +- sys/dev/mge/if_mge.c | 2 +- sys/dev/nge/if_nge.c | 2 +- sys/dev/sk/if_sk.c | 2 +- sys/dev/ti/if_ti.c | 2 +- sys/dev/usb/input/uhid_snes.c | 2 +- sys/dev/vr/if_vr.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sbin/mount_fusefs/mount_fusefs.8 b/sbin/mount_fusefs/mount_fusefs.8 index da3af56c1632..9f59a25647ce 100644 --- a/sbin/mount_fusefs/mount_fusefs.8 +++ b/sbin/mount_fusefs/mount_fusefs.8 @@ -309,7 +309,7 @@ If not set, the multiplexer path .Ar /dev/fuse is used. .It Ev FUSE_DEV_FD -File desciptor of an opened Fuse device to use. +File descriptor of an opened Fuse device to use. Overrides .Ev FUSE_DEV_NAME . .It Ev FUSE_NO_MOUNT diff --git a/share/man/man4/proto.4 b/share/man/man4/proto.4 index 39f585dad65c..bd861697c10d 100644 --- a/share/man/man4/proto.4 +++ b/share/man/man4/proto.4 @@ -267,7 +267,7 @@ single contigous region of physical memory. In practice this also tends to give a single contigous region in bus space. This may change over time. .It PROTO_IOC_BUSDMA_MEM_FREE -Free previously allocated memory and destroy the memory desciptor. +Free previously allocated memory and destroy the memory descriptor. The .Nm driver is not in a position to track whether the memory has been mapped in diff --git a/sys/dev/aic7xxx/aic79xx.h b/sys/dev/aic7xxx/aic79xx.h index 38b152ef4051..bb3949c5f749 100644 --- a/sys/dev/aic7xxx/aic79xx.h +++ b/sys/dev/aic7xxx/aic79xx.h @@ -696,7 +696,7 @@ struct scb_data { /************************ Target Mode Definitions *****************************/ /* - * Connection desciptor for select-in requests in target mode. + * Connection descriptor for select-in requests in target mode. */ struct target_cmd { uint8_t scsiid; /* Our ID and the initiator's ID */ diff --git a/sys/dev/aic7xxx/aic7xxx.h b/sys/dev/aic7xxx/aic7xxx.h index a3abc456f8c5..f48e793fea6a 100644 --- a/sys/dev/aic7xxx/aic7xxx.h +++ b/sys/dev/aic7xxx/aic7xxx.h @@ -644,7 +644,7 @@ struct scb_data { /************************ Target Mode Definitions *****************************/ /* - * Connection desciptor for select-in requests in target mode. + * Connection descriptor for select-in requests in target mode. */ struct target_cmd { uint8_t scsiid; /* Our ID and the initiator's ID */ diff --git a/sys/dev/isci/scil/sci_memory_descriptor_list.h b/sys/dev/isci/scil/sci_memory_descriptor_list.h index 6b78fbc6055d..21516c13231c 100644 --- a/sys/dev/isci/scil/sci_memory_descriptor_list.h +++ b/sys/dev/isci/scil/sci_memory_descriptor_list.h @@ -96,7 +96,7 @@ typedef struct SCI_PHYSICAL_MEMORY_DESCRIPTOR void * virtual_address; /** - * This field contains the physical address associated with this desciptor + * This field contains the physical address associated with this descriptor * element. This field shall be zero when the descriptor is retrieved from * the SCI implementation. The user shall set this field prior * sci_controller_start() diff --git a/sys/dev/isci/scil/scif_sas_controller.h b/sys/dev/isci/scil/scif_sas_controller.h index fc7583e84367..3de39864811c 100644 --- a/sys/dev/isci/scil/scif_sas_controller.h +++ b/sys/dev/isci/scil/scif_sas_controller.h @@ -121,7 +121,7 @@ typedef struct SCIF_SAS_CONTROLLER SCI_BASE_CONTROLLER_STATE_HANDLER_T * state_handlers; /** - * This field contains the memory desciptors defining the physical + * This field contains the memory descriptors defining the physical * memory requirements for this controller. */ SCI_PHYSICAL_MEMORY_DESCRIPTOR_T mdes[SCIF_SAS_MAX_MEMORY_DESCRIPTORS]; diff --git a/sys/dev/mge/if_mge.c b/sys/dev/mge/if_mge.c index dfa2cff5590f..e9e1d4ed803d 100644 --- a/sys/dev/mge/if_mge.c +++ b/sys/dev/mge/if_mge.c @@ -697,7 +697,7 @@ static void mge_free_dma(struct mge_softc *sc) { - /* Free desciptors and mbufs */ + /* Free descriptors and mbufs */ mge_free_desc(sc, sc->mge_rx_desc, MGE_RX_DESC_NUM, sc->mge_rx_dtag, 1); mge_free_desc(sc, sc->mge_tx_desc, MGE_TX_DESC_NUM, sc->mge_tx_dtag, 0); diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c index 42896b6e9888..bf0510f7ca79 100644 --- a/sys/dev/nge/if_nge.c +++ b/sys/dev/nge/if_nge.c @@ -1949,7 +1949,7 @@ nge_encap(struct nge_softc *sc, struct mbuf **m_head) if ((m->m_flags & M_VLANTAG) != 0) desc->nge_extsts |= htole32(NGE_TXEXTSTS_VLANPKT | bswap16(m->m_pkthdr.ether_vtag)); - /* Set EOP on the last desciptor. */ + /* Set EOP on the last descriptor. */ desc->nge_cmdsts &= htole32(~NGE_CMDSTS_MORE); /* Set checksum offload in the first descriptor. */ diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index 675769b42072..d6fae635d70b 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -2444,7 +2444,7 @@ sk_encap(sc_if, m_head) } sc_if->sk_cdata.sk_tx_prod = frag; - /* set EOF on the last desciptor */ + /* set EOF on the last descriptor */ frag = (frag + SK_TX_RING_CNT - 1) % SK_TX_RING_CNT; f = &sc_if->sk_rdata.sk_tx_ring[frag]; f->sk_ctl |= htole32(SK_TXCTL_LASTFRAG | SK_TXCTL_EOF_INTR); diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index b25eb64d2479..3bbe280e38ea 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -53,7 +53,7 @@ * * The Tigon 2 contains 2 R4000 CPUs and requires a newer firmware * revision, which supports new features such as extended commands, - * extended jumbo receive ring desciptors and a mini receive ring. + * extended jumbo receive ring descriptors and a mini receive ring. * * Alteon Networks is to be commended for releasing such a vast amount * of development material for the Tigon NIC without requiring an NDA diff --git a/sys/dev/usb/input/uhid_snes.c b/sys/dev/usb/input/uhid_snes.c index 79089782a464..f635820472a5 100644 --- a/sys/dev/usb/input/uhid_snes.c +++ b/sys/dev/usb/input/uhid_snes.c @@ -297,7 +297,7 @@ uhid_snes_ioctl(struct usb_fifo *fifo, u_long cmd, void *data, int fflags) ugd->ugd_actlen = size; if (ugd->ugd_data == NULL) - break; /*desciptor length only*/ + break; /* descriptor length only*/ error = copyout(sc->sc_repdesc_ptr, ugd->ugd_data, size); break; diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index ff7433d8020a..dbbe3a7865e2 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -1921,7 +1921,7 @@ vr_encap(struct vr_softc *sc, struct mbuf **m_head) desc = &sc->vr_rdata.vr_tx_ring[prod]; /* - * Set EOP on the last desciptor and reuqest Tx completion + * Set EOP on the last descriptor and reuqest Tx completion * interrupt for every VR_TX_INTR_THRESH-th frames. */ VR_INC(sc->vr_cdata.vr_tx_pkts, VR_TX_INTR_THRESH); From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 14:56:34 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31C10660CA1; Thu, 2 Sep 2021 14:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0kXL0ytHz3vvr; Thu, 2 Sep 2021 14:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09DE71AD3D; Thu, 2 Sep 2021 14:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182EuX1B089106; Thu, 2 Sep 2021 14:56:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182EuX8H089105; Thu, 2 Sep 2021 14:56:33 GMT (envelope-from git) Date: Thu, 2 Sep 2021 14:56:33 GMT Message-Id: <202109021456.182EuX8H089105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: d1fe04cee8d7 - stable/13 - Revert "arm: Bump KSTACK_PAGES default to match i386/amd64" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d1fe04cee8d7908640142a4c683bd806b8782b43 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 14:56:34 -0000 The branch stable/13 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d1fe04cee8d7908640142a4c683bd806b8782b43 commit d1fe04cee8d7908640142a4c683bd806b8782b43 Author: Kevin Bowling AuthorDate: 2021-09-01 20:06:27 +0000 Commit: Kevin Bowling CommitDate: 2021-09-02 14:56:25 +0000 Revert "arm: Bump KSTACK_PAGES default to match i386/amd64" This reverts commit b684d812fcb04b2997fd755405a92c36b9f6e30e. It causes an issue on a pfsense routing workload where memory fragmentation prevents the necessary consecutive pages from being readily available. Reported by: pfsense (mjg, scottl) Approved by: ian MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D31244 (cherry picked from commit 5647f85ade3ae1db042560a3354b6a9945d619a4) --- sys/arm/include/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/include/param.h b/sys/arm/include/param.h index 45dc0f270c50..807b492324fa 100644 --- a/sys/arm/include/param.h +++ b/sys/arm/include/param.h @@ -114,7 +114,7 @@ #define MAXPAGESIZES 2 /* maximum number of supported page sizes */ #ifndef KSTACK_PAGES -#define KSTACK_PAGES 4 +#define KSTACK_PAGES 2 #endif /* !KSTACK_PAGES */ #ifndef FPCONTEXTSIZE From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 14:57:04 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E240B660F91; Thu, 2 Sep 2021 14:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0kXw61RTz3vyL; Thu, 2 Sep 2021 14:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6B671ADD2; Thu, 2 Sep 2021 14:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Ev4CE089273; Thu, 2 Sep 2021 14:57:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Ev4ax089272; Thu, 2 Sep 2021 14:57:04 GMT (envelope-from git) Date: Thu, 2 Sep 2021 14:57:04 GMT Message-Id: <202109021457.182Ev4ax089272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: b3480da08762 - stable/12 - Revert "arm: Bump KSTACK_PAGES default to match i386/amd64" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b3480da0876299485a393b546e68abe4fa698090 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 14:57:04 -0000 The branch stable/12 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b3480da0876299485a393b546e68abe4fa698090 commit b3480da0876299485a393b546e68abe4fa698090 Author: Kevin Bowling AuthorDate: 2021-09-01 20:06:27 +0000 Commit: Kevin Bowling CommitDate: 2021-09-02 14:56:55 +0000 Revert "arm: Bump KSTACK_PAGES default to match i386/amd64" This reverts commit b684d812fcb04b2997fd755405a92c36b9f6e30e. It causes an issue on a pfsense routing workload where memory fragmentation prevents the necessary consecutive pages from being readily available. Reported by: pfsense (mjg, scottl) Approved by: ian MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D31244 (cherry picked from commit 5647f85ade3ae1db042560a3354b6a9945d619a4) --- sys/arm/include/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/include/param.h b/sys/arm/include/param.h index 8ba4963406b3..39dcc5e341bf 100644 --- a/sys/arm/include/param.h +++ b/sys/arm/include/param.h @@ -124,7 +124,7 @@ #define MAXPAGESIZES 2 /* maximum number of supported page sizes */ #ifndef KSTACK_PAGES -#define KSTACK_PAGES 4 +#define KSTACK_PAGES 2 #endif /* !KSTACK_PAGES */ #ifndef FPCONTEXTSIZE From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 19:22:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF668664C4E; Thu, 2 Sep 2021 19:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0rRl5rB9z4gFC; Thu, 2 Sep 2021 19:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B09AE1EA18; Thu, 2 Sep 2021 19:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182JMx6w049890; Thu, 2 Sep 2021 19:22:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182JMxEP049889; Thu, 2 Sep 2021 19:22:59 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:22:59 GMT Message-Id: <202109021922.182JMxEP049889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d747e9d2cb50 - stable/13 - Cirrus-CI: reduce VM memory to 8G MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d747e9d2cb5091fa5b87d6801a6a9e0502886127 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:22:59 -0000 The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d747e9d2cb5091fa5b87d6801a6a9e0502886127 commit d747e9d2cb5091fa5b87d6801a6a9e0502886127 Author: Ed Maste AuthorDate: 2021-08-31 00:50:34 +0000 Commit: Ed Maste CommitDate: 2021-09-02 19:14:45 +0000 Cirrus-CI: reduce VM memory to 8G Cirrus-CI now provides a task memory use graph, and it is clear we do not need to provision the VM with 24GB. Sponsored by: The FreeBSD Foundation (cherry picked from commit bbf70270551d8defb427316e5d0e0f368b9aac96) --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2c98c1ff45b0..8c9ee1f6745b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -7,7 +7,7 @@ compute_engine_instance: image_project: freebsd-org-cloud-dev image: freebsd-13-0-release-amd64 cpu: 8 - memory: 24G + memory: 8G disk: 40 env: From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 19:23:24 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0224664F28; Thu, 2 Sep 2021 19:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0rSD5LJMz4gf2; Thu, 2 Sep 2021 19:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9FA3C1EA19; Thu, 2 Sep 2021 19:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182JNOrh050030; Thu, 2 Sep 2021 19:23:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182JNOas050029; Thu, 2 Sep 2021 19:23:24 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:23:24 GMT Message-Id: <202109021923.182JNOas050029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c95872e5670b - stable/12 - Cirrus-CI: reduce VM memory to 8G MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c95872e5670b958bfef0f633a9ea0fd11176af5a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:23:24 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c95872e5670b958bfef0f633a9ea0fd11176af5a commit c95872e5670b958bfef0f633a9ea0fd11176af5a Author: Ed Maste AuthorDate: 2021-08-31 00:50:34 +0000 Commit: Ed Maste CommitDate: 2021-09-02 19:22:55 +0000 Cirrus-CI: reduce VM memory to 8G Cirrus-CI now provides a task memory use graph, and it is clear we do not need to provision the VM with 24GB. Sponsored by: The FreeBSD Foundation (cherry picked from commit bbf70270551d8defb427316e5d0e0f368b9aac96) --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 356125f7d7b1..4c5cc7c31a77 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,7 +3,7 @@ freebsd_instance: image: freebsd-12-2-release-amd64 cpu: 8 - memory: 24G + memory: 8G env: CIRRUS_CLONE_DEPTH: 1 From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 19:23:41 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B322D664932; Thu, 2 Sep 2021 19:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0rSY4c0Bz4gZw; Thu, 2 Sep 2021 19:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87D961E94C; Thu, 2 Sep 2021 19:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182JNffr050164; Thu, 2 Sep 2021 19:23:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182JNf3W050163; Thu, 2 Sep 2021 19:23:41 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:23:41 GMT Message-Id: <202109021923.182JNf3W050163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2c4eef89272d - stable/11 - Cirrus-CI: reduce VM memory to 8G MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 2c4eef89272dbf6013fee40e3a1f1fa54f445d3d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:23:41 -0000 The branch stable/11 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2c4eef89272dbf6013fee40e3a1f1fa54f445d3d commit 2c4eef89272dbf6013fee40e3a1f1fa54f445d3d Author: Ed Maste AuthorDate: 2021-08-31 00:50:34 +0000 Commit: Ed Maste CommitDate: 2021-09-02 19:23:19 +0000 Cirrus-CI: reduce VM memory to 8G Cirrus-CI now provides a task memory use graph, and it is clear we do not need to provision the VM with 24GB. Sponsored by: The FreeBSD Foundation (cherry picked from commit bbf70270551d8defb427316e5d0e0f368b9aac96) --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 356125f7d7b1..4c5cc7c31a77 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,7 +3,7 @@ freebsd_instance: image: freebsd-12-2-release-amd64 cpu: 8 - memory: 24G + memory: 8G env: CIRRUS_CLONE_DEPTH: 1 From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 21:53:41 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B5586684B8; Thu, 2 Sep 2021 21:53:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0vnd3Qx8z4SHf; Thu, 2 Sep 2021 21:53:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D9B5207B5; Thu, 2 Sep 2021 21:53:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182LrfTA050669; Thu, 2 Sep 2021 21:53:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182LrfLN050668; Thu, 2 Sep 2021 21:53:41 GMT (envelope-from git) Date: Thu, 2 Sep 2021 21:53:41 GMT Message-Id: <202109022153.182LrfLN050668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: d01fe93c3dc9 - stable/13 - Don't error out on unused but set variables with clang 13 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d01fe93c3dc9ea2157e9602e5ec9464a6b8a100f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 21:53:41 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d01fe93c3dc9ea2157e9602e5ec9464a6b8a100f commit d01fe93c3dc9ea2157e9602e5ec9464a6b8a100f Author: Dimitry Andric AuthorDate: 2021-08-29 13:53:40 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 21:53:18 +0000 Don't error out on unused but set variables with clang 13 Clang 13.0.0 now has a -Wunused-but-set-variable warning similar to the one gcc has had for quite a while. Since this triggers *very* often for our kernel builds, don't make it a hard error, but leave the warning visible so is some incentive to fix the instances. (cherry picked from commit 395d46caaed73228b84dfaeb37c702304a46ba8f) --- sys/conf/kern.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 56bddb35398b..f6767ba76a46 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -25,6 +25,9 @@ NO_WUNNEEDED_INTERNAL_DECL= -Wno-error=unneeded-internal-declaration NO_WSOMETIMES_UNINITIALIZED= -Wno-error=sometimes-uninitialized NO_WCAST_QUAL= -Wno-error=cast-qual NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare +.if ${COMPILER_VERSION} >= 100000 +NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation +.endif # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. @@ -33,8 +36,8 @@ CWARNEXTRA?= -Wno-error=tautological-compare -Wno-error=empty-body \ -Wno-error=pointer-sign CWARNEXTRA+= -Wno-error=shift-negative-value CWARNEXTRA+= -Wno-address-of-packed-member -.if ${COMPILER_VERSION} >= 100000 -NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation +.if ${COMPILER_VERSION} >= 130000 +CWARNFLAGS+= -Wno-error=unused-but-set-variable .endif .endif # clang From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 21:53:42 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8D74668367; Thu, 2 Sep 2021 21:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0vnf4wtMz4SCK; Thu, 2 Sep 2021 21:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89B58207B6; Thu, 2 Sep 2021 21:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182LrgtX050695; Thu, 2 Sep 2021 21:53:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182LrgGq050694; Thu, 2 Sep 2021 21:53:42 GMT (envelope-from git) Date: Thu, 2 Sep 2021 21:53:42 GMT Message-Id: <202109022153.182LrgGq050694@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 7756b8f25e64 - stable/13 - xen: Fix warning by adding KERNBASE to modlist_paddr before casting MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7756b8f25e640a5428b46670aa402ebecb884e6d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 21:53:43 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7756b8f25e640a5428b46670aa402ebecb884e6d commit 7756b8f25e640a5428b46670aa402ebecb884e6d Author: Dimitry Andric AuthorDate: 2021-08-29 14:02:31 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 21:53:18 +0000 xen: Fix warning by adding KERNBASE to modlist_paddr before casting Clang 13 produces the following warning for hammer_time_xen(): sys/x86/xen/pv.c:183:19: error: the pointer incremented by -2147483648 refers past the last possible element for an array in 64-bit address space containing 256-bit (32-byte) elements (max possible 576460752303423488 elements) [-Werror,-Warray-bounds] (vm_paddr_t)start_info->modlist_paddr + KERNBASE; ^ ~~~~~~~~ sys/xen/interface/arch-x86/hvm/start_info.h:131:5: note: array 'modlist_paddr' declared here uint64_t modlist_paddr; /* Physical address of an array of */ ^ This is because the expression first casts start_info->modlist_paddr to struct hvm_modlist_entry * (via vmpaddr_t), and *then* adds KERNBASE, which is then interpreted as KERNBASE * sizeof(struct hvm_modlist_entry). Instead, parenthesize the addition to get the intended result, and cast it to struct hvm_modlist_entry * afterwards. Also remove the cast to vmpaddr_t since it is not necessary. Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D31711 (cherry picked from commit 8e3c56d6b676a175e974bad4c20797fb35017db8) --- sys/x86/xen/pv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c index 59c5b464aace..6501f4dc2c50 100644 --- a/sys/x86/xen/pv.c +++ b/sys/x86/xen/pv.c @@ -334,7 +334,7 @@ hammer_time_xen(vm_paddr_t start_info_paddr) HYPERVISOR_shutdown(SHUTDOWN_crash); } mod = (struct hvm_modlist_entry *) - (vm_paddr_t)start_info->modlist_paddr + KERNBASE; + (start_info->modlist_paddr + KERNBASE); if (mod[0].paddr >= physfree) { xc_printf("ERROR: unexpected module memory address\n"); HYPERVISOR_shutdown(SHUTDOWN_crash); From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 21:53:45 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28A1C6683C9; Thu, 2 Sep 2021 21:53:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0vnh72NKz4S9v; Thu, 2 Sep 2021 21:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C01D520B97; Thu, 2 Sep 2021 21:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Lriew050745; Thu, 2 Sep 2021 21:53:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182LriJq050744; Thu, 2 Sep 2021 21:53:44 GMT (envelope-from git) Date: Thu, 2 Sep 2021 21:53:44 GMT Message-Id: <202109022153.182LriJq050744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 7dfb8e02e357 - stable/13 - Fix acpica macros that subtract null pointers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7dfb8e02e357b2f808bf8eb9e5551f8e237d2dbe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 21:53:45 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7dfb8e02e357b2f808bf8eb9e5551f8e237d2dbe commit 7dfb8e02e357b2f808bf8eb9e5551f8e237d2dbe Author: Dimitry Andric AuthorDate: 2021-08-29 11:15:23 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 21:53:18 +0000 Fix acpica macros that subtract null pointers Clang 13.0.0 produces a new -Werror warning about the ACPI_TO_INTEGER(p) and ACPI_OFFSET(d, f) macros in acpica's actypes.h: sys/contrib/dev/acpica/components/dispatcher/dsopcode.c:708:31: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction] ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/contrib/dev/acpica/include/actypes.h:664:41: note: expanded from macro 'ACPI_PTR_TO_PHYSADDR' #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) ^~~~~~~~~~~~~~~~~~ sys/contrib/dev/acpica/include/actypes.h:661:41: note: expanded from macro 'ACPI_TO_INTEGER' #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/contrib/dev/acpica/include/actypes.h:656:82: note: expanded from macro 'ACPI_PTR_DIFF' #define ACPI_PTR_DIFF(a, b) ((ACPI_SIZE) (ACPI_CAST_PTR (UINT8, (a)) - ACPI_CAST_PTR (UINT8, (b)))) ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. This problem of undefined behavior was also reported to acpica by @cem in 2018: https://github.com/acpica/acpica/issues/407, but it seems there was never any fix committed for it upstream. Instead fix these locally, for ACPI_TO_INTEGER by simply casting the incoming pointer to ACPI_SIZE (which corresponds roughly to uintptr_t and size_t), and for ACPI_OFFSET by reusing our __offsetof definition from sys/cdefs.h. Reviewed by: emaste, kib, imp Differential Revision: https://reviews.freebsd.org/D31710 (cherry picked from commit 130a690ae16e1b845629e586203b508eff699f38) --- sys/contrib/dev/acpica/include/actypes.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/contrib/dev/acpica/include/actypes.h b/sys/contrib/dev/acpica/include/actypes.h index 48388c2198ed..8fa4818951e8 100644 --- a/sys/contrib/dev/acpica/include/actypes.h +++ b/sys/contrib/dev/acpica/include/actypes.h @@ -658,8 +658,13 @@ typedef UINT64 ACPI_INTEGER; /* Pointer/Integer type conversions */ #define ACPI_TO_POINTER(i) ACPI_CAST_PTR (void, (ACPI_SIZE) (i)) +#ifdef __FreeBSD__ +#define ACPI_TO_INTEGER(p) ((ACPI_SIZE) (p)) +#define ACPI_OFFSET(d, f) ((ACPI_SIZE) __offsetof(d, f)) +#else #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0) #define ACPI_OFFSET(d, f) ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0) +#endif #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 21:53:44 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4AB5668691; Thu, 2 Sep 2021 21:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0vnh1RWxz4SHq; Thu, 2 Sep 2021 21:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96E9520A95; Thu, 2 Sep 2021 21:53:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Lrh9V050719; Thu, 2 Sep 2021 21:53:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Lrh8M050718; Thu, 2 Sep 2021 21:53:43 GMT (envelope-from git) Date: Thu, 2 Sep 2021 21:53:43 GMT Message-Id: <202109022153.182Lrh8M050718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 87addf66101d - stable/13 - Remove -simplifycfg-dup-ret from CLANG_OPT_SMALL flags for clang 13 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 87addf66101ddee9eb2289b58ec2f8f21aa78bdd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 21:53:44 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=87addf66101ddee9eb2289b58ec2f8f21aa78bdd commit 87addf66101ddee9eb2289b58ec2f8f21aa78bdd Author: Dimitry Andric AuthorDate: 2021-08-29 13:39:16 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 21:53:18 +0000 Remove -simplifycfg-dup-ret from CLANG_OPT_SMALL flags for clang 13 After llvm/clang 13.0.0, the -simplifycfg-dup-ret backend flag is no longer supported. This was part of CLANG_OPT_SMALL, which is only still used for stand/i386/boot2 and stand/i386/isoboot, to achieve the very small binary size required. Luckily clang 13.0.0 does not need any additional flags for this (I get 240 bytes available when building boot2). (cherry picked from commit 22b8ab15c41a9efac201691b40e961b83698aa9c) --- share/mk/bsd.sys.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 031d49bbaca2..2d3bec26e50d 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -228,8 +228,10 @@ CFLAGS+=-nobuiltininc -idirafter ${COMPILER_RESOURCE_DIR}/include .endif .endif -CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ - -mllvm -simplifycfg-dup-ret +CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3 +.if ${COMPILER_VERSION} < 130000 +CLANG_OPT_SMALL+= -mllvm -simplifycfg-dup-ret +.endif CLANG_OPT_SMALL+= -mllvm -enable-load-pre=false CFLAGS.clang+= -Qunused-arguments # The libc++ headers use c++11 extensions. These are normally silenced because From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:40 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49C4666A182; Thu, 2 Sep 2021 23:58:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yYr1c2Nz3LsL; Thu, 2 Sep 2021 23:58:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F098224A6; Thu, 2 Sep 2021 23:58:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182NweIF010586; Thu, 2 Sep 2021 23:58:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwefR010585; Thu, 2 Sep 2021 23:58:40 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:40 GMT Message-Id: <202109022358.182NwefR010585@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2abf37d5cecb - stable/12 - Retire CLANG_NO_IAS34 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2abf37d5cecb16d8abffd5a6dedafba17496196e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:40 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2abf37d5cecb16d8abffd5a6dedafba17496196e commit 2abf37d5cecb16d8abffd5a6dedafba17496196e Author: Ed Maste AuthorDate: 2018-11-01 23:11:47 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:29:57 +0000 Retire CLANG_NO_IAS34 CLANG_NO_IAS34 was introduced in r276696 to allow then-HEAD kernels to be built with clang 3.4 in FreeBSD 10. As FreeBSD 11 and later includes a version of Clang with a sufficiently capable integrated assembler we do not need the workaround any longer. Sponsored by: The FreeBSD Foundation (cherry picked from commit ea96b3de2b3e4492e6bba3ab35961e3531a006bd) --- sys/conf/Makefile.amd64 | 3 --- sys/conf/Makefile.i386 | 3 --- sys/conf/kern.mk | 4 ---- sys/modules/bios/smapi/Makefile | 2 -- 4 files changed, 12 deletions(-) diff --git a/sys/conf/Makefile.amd64 b/sys/conf/Makefile.amd64 index 696ef55a3fb0..d34359f1d30b 100644 --- a/sys/conf/Makefile.amd64 +++ b/sys/conf/Makefile.amd64 @@ -37,9 +37,6 @@ INCLUDES+= -I$S/contrib/libfdt CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif -ASM_CFLAGS.acpi_wakecode.S= ${CLANG_NO_IAS34} -ASM_CFLAGS.mpboot.S= ${CLANG_NO_IAS34} - %BEFORE_DEPEND %OBJS diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index 6b1eca42f1bb..621ebff79e19 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -32,9 +32,6 @@ S= ../../.. INCLUDES+= -I$S/contrib/libfdt -ASM_CFLAGS.acpi_wakecode.S= ${CLANG_NO_IAS34} -ASM_CFLAGS.mpboot.s= ${CLANG_NO_IAS34} - %BEFORE_DEPEND %OBJS diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index fc42d0e0321a..04af60c98cb4 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -42,10 +42,6 @@ NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation .endif CLANG_NO_IAS= -no-integrated-as -.if ${COMPILER_VERSION} < 30500 -# XXX: clang < 3.5 integrated-as doesn't grok .codeNN directives -CLANG_NO_IAS34= -no-integrated-as -.endif .endif .if ${COMPILER_TYPE} == "gcc" diff --git a/sys/modules/bios/smapi/Makefile b/sys/modules/bios/smapi/Makefile index c488491bd525..90506d962dc6 100644 --- a/sys/modules/bios/smapi/Makefile +++ b/sys/modules/bios/smapi/Makefile @@ -8,5 +8,3 @@ SRCS= smapi.c smapi_bios.S \ bus_if.h device_if.h .include - -CFLAGS.smapi_bios.S= ${CLANG_NO_IAS34} From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:41 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69A5C669F9E; Thu, 2 Sep 2021 23:58:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yYs2Qqlz3MDd; Thu, 2 Sep 2021 23:58:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A75921D7F; Thu, 2 Sep 2021 23:58:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182NwfH4010610; Thu, 2 Sep 2021 23:58:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwfCE010609; Thu, 2 Sep 2021 23:58:41 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:41 GMT Message-Id: <202109022358.182NwfCE010609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 76a6b4ad3519 - stable/12 - stand: remove CLANG_NO_IAS from btx and gptboot MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 76a6b4ad3519c752f531f488f4cbbb1eea811db4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:41 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=76a6b4ad3519c752f531f488f4cbbb1eea811db4 commit 76a6b4ad3519c752f531f488f4cbbb1eea811db4 Author: Ed Maste AuthorDate: 2018-11-20 16:54:42 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:00 +0000 stand: remove CLANG_NO_IAS from btx and gptboot Many components under stand/ had CLANG_NO_IAS added when Clang's Integrated Assembler (IAS) did not handle .codeNN directives. Clang gained support quite some time ago, and we can now build stand/ with IAS. Note that in some cases there are small differences in the generated output, so CLANG_NO_IAS should be removed only after testing (or after finding no differences in the output). PR: 205250, 233094 Sponsored by: The FreeBSD Foundation (cherry picked from commit 02c4bf4391ec7296f5a002c139576ae8797853d1) --- stand/i386/btx/btx/Makefile | 3 --- stand/i386/btx/btxldr/Makefile | 3 --- stand/i386/gptboot/Makefile | 3 --- 3 files changed, 9 deletions(-) diff --git a/stand/i386/btx/btx/Makefile b/stand/i386/btx/btx/Makefile index 8afe98fe1156..ce74e4067c9a 100644 --- a/stand/i386/btx/btx/Makefile +++ b/stand/i386/btx/btx/Makefile @@ -29,6 +29,3 @@ ORG= 0x9000 LDFLAGS+=${LDFLAGS_BIN} .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.btx.S= ${CLANG_NO_IAS} diff --git a/stand/i386/btx/btxldr/Makefile b/stand/i386/btx/btxldr/Makefile index 6a112768f0b6..d494a5a83201 100644 --- a/stand/i386/btx/btxldr/Makefile +++ b/stand/i386/btx/btxldr/Makefile @@ -17,6 +17,3 @@ ORG=${LOADER_ADDRESS} LDFLAGS+=${LDFLAGS_BIN} .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.btxldr.S= ${CLANG_NO_IAS} diff --git a/stand/i386/gptboot/Makefile b/stand/i386/gptboot/Makefile index 345a7e762e7d..ed9031c335d5 100644 --- a/stand/i386/gptboot/Makefile +++ b/stand/i386/gptboot/Makefile @@ -63,6 +63,3 @@ gptboot.out: ${BTXCRT} gptboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS} ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.gptldr.S= ${CLANG_NO_IAS} From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:42 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBE1A669A5A; Thu, 2 Sep 2021 23:58:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yYt41l3z3M3V; Thu, 2 Sep 2021 23:58:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 66C7D225B7; Thu, 2 Sep 2021 23:58:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Nwgv7010634; Thu, 2 Sep 2021 23:58:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwgNI010633; Thu, 2 Sep 2021 23:58:42 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:42 GMT Message-Id: <202109022358.182NwgNI010633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: dd76aa32815e - stable/12 - stand: remove CLANG_NO_IAS from zfsldr MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: dd76aa32815ed6d87e8d0662de00a3b72185743e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:43 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=dd76aa32815ed6d87e8d0662de00a3b72185743e commit dd76aa32815ed6d87e8d0662de00a3b72185743e Author: Ed Maste AuthorDate: 2019-03-26 20:32:05 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:01 +0000 stand: remove CLANG_NO_IAS from zfsldr Many components under stand/ had CLANG_NO_IAS added when Clang's Integrated Assembler (IAS) did not handle .codeNN directives. Clang gained support quite some time ago, and we can now build stand/ with IAS. Note that in some cases there are small differences in the generated output, so CLANG_NO_IAS should be removed only after testing (or after finding no differences in the output). For zfsldr I compared objdump output between GNU as- and Clang IAS-built zfsldr and .text was identical (changes were limited to the object's ELF headers and debug info). Sponsored by: The FreeBSD Foundation (cherry picked from commit 698194ab249ffd23422048dc2157042fd5442288) --- stand/i386/zfsboot/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile index 094836965764..422bce0e5b88 100644 --- a/stand/i386/zfsboot/Makefile +++ b/stand/i386/zfsboot/Makefile @@ -80,6 +80,3 @@ zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o SRCS= zfsboot.c .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.zfsldr.S= ${CLANG_NO_IAS} From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:43 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6209669EAC; Thu, 2 Sep 2021 23:58:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yYv4s9Vz3M1J; Thu, 2 Sep 2021 23:58:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A0CB2234B; Thu, 2 Sep 2021 23:58:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182NwhIu010658; Thu, 2 Sep 2021 23:58:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwhRE010657; Thu, 2 Sep 2021 23:58:43 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:43 GMT Message-Id: <202109022358.182NwhRE010657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 8b2de9110244 - stable/12 - stand: remove CLANG_NO_IAS from boot2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8b2de9110244e6ab269123f101ed30007c041e47 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:44 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8b2de9110244e6ab269123f101ed30007c041e47 commit 8b2de9110244e6ab269123f101ed30007c041e47 Author: Ed Maste AuthorDate: 2019-08-15 14:54:18 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:03 +0000 stand: remove CLANG_NO_IAS from boot2 Many components under stand/ had CLANG_NO_IAS added when Clang's Integrated Assembler (IAS) did not handle .codeNN directives. Clang gained support quite some time ago, and we can now build stand/ with IAS. In most cases IAS- and GNU as-assembled boot components were identical, and CLANG_NO_IAS was already removed from other components. Clang IAS produces different output for some components, including boot2, so CLANG_NO_IAS was not previously removed for those. In the case of boot2 the difference is that IAS produces a larger encoding for one instruction (the testb at the beginning of read). GNU as produces: 2e f6 06 b0 08 80 while IAS includes an address size override prefix (67) and produces: 2e 67 f6 05 b3 08 00 00 80 This results in three fewer NOPs elsewhere in boot2 but no functional change, so switch to IAS for boot2. (We can separately pursue improved 16-bit IAS support with the LLVM developers.) Sponsored by: The FreeBSD Foundation (cherry picked from commit 3a6c85abcbc3fbe2e0388a8708b36b9aac4b7bb1) --- stand/i386/boot2/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/stand/i386/boot2/Makefile b/stand/i386/boot2/Makefile index 8df09a2c7c0c..3830199b2c4b 100644 --- a/stand/i386/boot2/Makefile +++ b/stand/i386/boot2/Makefile @@ -96,6 +96,3 @@ boot2.h: boot1.out REL1=`printf "%d" ${REL1}` > ${.TARGET} .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.boot1.S= ${CLANG_NO_IAS} From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:45 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 023E5669A5C; Thu, 2 Sep 2021 23:58:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yYw60Tlz3M85; Thu, 2 Sep 2021 23:58:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BED9224A7; Thu, 2 Sep 2021 23:58:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Nwixj010682; Thu, 2 Sep 2021 23:58:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Nwiie010681; Thu, 2 Sep 2021 23:58:44 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:44 GMT Message-Id: <202109022358.182Nwiie010681@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: baeb0b2fb4d0 - stable/12 - stand: remove CLANG_NO_IAS from cdboot MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: baeb0b2fb4d02155e992fdd9e9a586592d45e48a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:45 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=baeb0b2fb4d02155e992fdd9e9a586592d45e48a commit baeb0b2fb4d02155e992fdd9e9a586592d45e48a Author: Ed Maste AuthorDate: 2019-08-15 17:32:39 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:04 +0000 stand: remove CLANG_NO_IAS from cdboot Many components under stand/ had CLANG_NO_IAS added when Clang's Integrated Assembler (IAS) did not handle .codeNN directives. Clang gained support quite some time ago, and we can now build stand/ with IAS. In most cases IAS- and GNU as-assembled boot components were identical, and CLANG_NO_IAS was already removed from other components. Clang IAS produces different output for some components, including cdboot, so CLANG_NO_IAS was not previously removed for those. In the case of cdboot the difference is that IAS adds a size override prefix (67h) to many instructions to specify a 32-bit address, even though the two high bytes are zero. This wastes three bytes per instance, but as cdboot is not size-constrained it doesn't matter. Padding is also different in one case; Clang used two one-byte nops while GNU as used a single two-byte xchg %eax, %eax. In any case, there is no functional change. Sponsored by: The FreeBSD Foundation (cherry picked from commit 1596e9a43cbfef904232a3321136e2ae480565f9) --- stand/i386/cdboot/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/stand/i386/cdboot/Makefile b/stand/i386/cdboot/Makefile index 093ec49ec77a..0598d5d80dce 100644 --- a/stand/i386/cdboot/Makefile +++ b/stand/i386/cdboot/Makefile @@ -14,6 +14,3 @@ ORG= 0x7c00 LDFLAGS+=${LDFLAGS_BIN} .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.cdboot.S= ${CLANG_NO_IAS} From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:46 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46FC666A18E; Thu, 2 Sep 2021 23:58:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yYy0bf4z3MDv; Thu, 2 Sep 2021 23:58:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE365224A8; Thu, 2 Sep 2021 23:58:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182NwjhD010712; Thu, 2 Sep 2021 23:58:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwjOL010711; Thu, 2 Sep 2021 23:58:45 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:45 GMT Message-Id: <202109022358.182NwjOL010711@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: dc5259b56722 - stable/12 - stand: remove CLANG_NO_IAS from pxeldr MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: dc5259b56722031110395cc823b993751252d9a3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:46 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=dc5259b56722031110395cc823b993751252d9a3 commit dc5259b56722031110395cc823b993751252d9a3 Author: Ed Maste AuthorDate: 2019-08-15 17:59:22 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:05 +0000 stand: remove CLANG_NO_IAS from pxeldr Many components under stand/ had CLANG_NO_IAS added when Clang's Integrated Assembler (IAS) did not handle .codeNN directives. Clang gained support quite some time ago, and we can now build stand/ with IAS. In most cases IAS- and GNU as-assembled boot components were identical, and CLANG_NO_IAS was already removed from other components. Clang IAS produces different output for some components, including pxeldr, so CLANG_NO_IAS was not previously removed for those. In the case of pxeldr the difference is that IAS adds a size override prefix (67h) to three instructions to specify a 32-bit address, even though the two high bytes are zero and the address fits in 16 bits. this wastes three bytes per instruction and causes some additional nop npadding to be required elsewhere in the object, but pxeboot is not size-constrained so it doesn't matter. Sponsored by: The FreeBSD Foundation (cherry picked from commit aa2dd958b489d590be9573f1bd05ec5b8a12f016) --- stand/i386/pxeldr/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/stand/i386/pxeldr/Makefile b/stand/i386/pxeldr/Makefile index b0c9fbe0ee04..e1bcccc69112 100644 --- a/stand/i386/pxeldr/Makefile +++ b/stand/i386/pxeldr/Makefile @@ -43,6 +43,3 @@ ${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} -b ${BTXKERN} ${LOADERBIN} .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.pxeldr.S= ${CLANG_NO_IAS} From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:47 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D768266A119; Thu, 2 Sep 2021 23:58:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yYz16S0z3MBV; Thu, 2 Sep 2021 23:58:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA04E22600; Thu, 2 Sep 2021 23:58:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Nwk5p010737; Thu, 2 Sep 2021 23:58:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwkSb010736; Thu, 2 Sep 2021 23:58:46 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:46 GMT Message-Id: <202109022358.182NwkSb010736@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: cfd9d82ed8a6 - stable/12 - gptzfsboot: remove CLANG_NO_IAS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: cfd9d82ed8a6e531fe042b4cd9309c5e5824c725 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:48 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cfd9d82ed8a6e531fe042b4cd9309c5e5824c725 commit cfd9d82ed8a6e531fe042b4cd9309c5e5824c725 Author: Ed Maste AuthorDate: 2019-08-15 18:43:01 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:07 +0000 gptzfsboot: remove CLANG_NO_IAS Many components under stand/ had CLANG_NO_IAS added when Clang's Integrated Assembler did not handle .codeNN directives. Clang gained support quite some time ago, so we can build stand/ with IAS. In some cases there were small differences in generated object output. In the case of gptzfsboot however using GNU as or Clang IAS to assemble gptldr.S resulted in identical final gptzfsboot binary output. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11115 (cherry picked from commit 0a062e5ff6522fa7bac1c2e9c9f686eb55ca998c) --- stand/i386/gptzfsboot/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/stand/i386/gptzfsboot/Makefile b/stand/i386/gptzfsboot/Makefile index 56abb00ea086..ecb24e10c6d4 100644 --- a/stand/i386/gptzfsboot/Makefile +++ b/stand/i386/gptzfsboot/Makefile @@ -72,6 +72,3 @@ gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o \ zfsboot.o: ${ZFSSRC}/zfsimpl.c .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.gptldr.S= ${CLANG_NO_IAS} From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:48 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CD5466A19F; Thu, 2 Sep 2021 23:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yZ01mvZz3M3v; Thu, 2 Sep 2021 23:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D962225B8; Thu, 2 Sep 2021 23:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Nwmbt010761; Thu, 2 Sep 2021 23:58:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwmFs010760; Thu, 2 Sep 2021 23:58:48 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:48 GMT Message-Id: <202109022358.182NwmFs010760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 95ce44457bf2 - stable/12 - Remove CLANG_NO_IAS definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 95ce44457bf20e2ecc059d21d64c80827a5efa2a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:48 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=95ce44457bf20e2ecc059d21d64c80827a5efa2a commit 95ce44457bf20e2ecc059d21d64c80827a5efa2a Author: Ed Maste AuthorDate: 2019-09-01 16:47:48 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:08 +0000 Remove CLANG_NO_IAS definition CLANG_NO_IAS is not used anywhere in the tree. Sponsored by: The FreeBSD Foundation (cherry picked from commit 6c30aa54c3f580b72a5171b69bc541fba31831b8) --- share/mk/bsd.sys.mk | 7 ------- sys/conf/kern.mk | 2 -- 2 files changed, 9 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 61da8f31cb0f..0849c242f4cd 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -204,13 +204,6 @@ CWARNFLAGS+= -Wno-unknown-pragmas # This warning is utter nonsense CFLAGS+= -Wno-format-zero-length -# We need this conditional because many places that use it -# only enable it for some files with CLFAGS.$FILE+=${CLANG_NO_IAS}. -# unconditionally, and can't easily use the CFLAGS.clang= -# mechanism. -.if ${COMPILER_TYPE} == "clang" -CLANG_NO_IAS= -no-integrated-as -.endif CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ -mllvm -simplifycfg-dup-ret .if ${COMPILER_VERSION} >= 30500 && ${COMPILER_VERSION} < 30700 diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 04af60c98cb4..6c8480810a32 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -40,8 +40,6 @@ CWARNEXTRA+= -Wno-address-of-packed-member .if ${COMPILER_VERSION} >= 100000 NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation .endif - -CLANG_NO_IAS= -no-integrated-as .endif .if ${COMPILER_TYPE} == "gcc" From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:49 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA675669A67; Thu, 2 Sep 2021 23:58:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yZ13GY7z3MF5; Thu, 2 Sep 2021 23:58:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 400402234C; Thu, 2 Sep 2021 23:58:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Nwn6C010785; Thu, 2 Sep 2021 23:58:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwnrK010784; Thu, 2 Sep 2021 23:58:49 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:49 GMT Message-Id: <202109022358.182NwnrK010784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 783c47d7cb3f - stable/12 - Remove obsolete, non-use of CLANG_NO_IAS. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 783c47d7cb3f7a112859c81931e42629ae8c96ad Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:50 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=783c47d7cb3f7a112859c81931e42629ae8c96ad commit 783c47d7cb3f7a112859c81931e42629ae8c96ad Author: Brooks Davis AuthorDate: 2019-10-18 00:00:17 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:09 +0000 Remove obsolete, non-use of CLANG_NO_IAS. CLANG_NO_IAS was removed in r351661. (cherry picked from commit a1d5358777feafeb3b0bf977e018c9545f5315f7) --- lib/libz/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/libz/Makefile b/lib/libz/Makefile index 773bbda87b62..81526179e2d0 100644 --- a/lib/libz/Makefile +++ b/lib/libz/Makefile @@ -78,6 +78,3 @@ FILES= zlib.pc FILESDIR= ${LIBDATADIR}/pkgconfig .include - -## XXX: clang integrated-as doesn't grok .intel_syntax directives yet -#ACFLAGS.gvmat64.S= ${CLANG_NO_IAS} From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:50 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFC0F66A22A; Thu, 2 Sep 2021 23:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yZ25G5Nz3MGs; Thu, 2 Sep 2021 23:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C35022601; Thu, 2 Sep 2021 23:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182NwoKr010809; Thu, 2 Sep 2021 23:58:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Nwo0s010808; Thu, 2 Sep 2021 23:58:50 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:50 GMT Message-Id: <202109022358.182Nwo0s010808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 06d66775fc65 - stable/12 - gcc9: quiet Waddress-of-packed-member for user build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 06d66775fc65c854362812781509b0c45137b5ac Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:51 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=06d66775fc65c854362812781509b0c45137b5ac commit 06d66775fc65c854362812781509b0c45137b5ac Author: Ryan Libby AuthorDate: 2019-12-21 02:43:49 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:11 +0000 gcc9: quiet Waddress-of-packed-member for user build Disable the warning for WARNS <= 3. This is lame, but it's what we already do for the clang build. Reviewed by: dim Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D22889 (cherry picked from commit fc41af14c8298c88d5a2bee85ecf1864a3d37a51) --- share/mk/bsd.sys.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 0849c242f4cd..b8bf3d0cd25a 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -94,6 +94,9 @@ CWARNFLAGS.clang+= -Wno-unused-local-typedef .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 40000 CWARNFLAGS.clang+= -Wno-address-of-packed-member .endif +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 90100 +CWARNFLAGS.gcc+= -Wno-address-of-packed-member +.endif .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 70000 && \ ${MACHINE_CPUARCH} == "arm" && !${MACHINE_ARCH:Marmv[67]*} CWARNFLAGS.clang+= -Wno-atomic-alignment From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:52 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5450066A140; Thu, 2 Sep 2021 23:58:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yZ34ftwz3M8N; Thu, 2 Sep 2021 23:58:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E7DA2234D; Thu, 2 Sep 2021 23:58:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182NwpXT010833; Thu, 2 Sep 2021 23:58:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Nwp0T010832; Thu, 2 Sep 2021 23:58:51 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:51 GMT Message-Id: <202109022358.182Nwp0T010832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: a606cb388f97 - stable/12 - Remove tests for obsolete compilers in the build system MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a606cb388f975561c37dbabc2fee82c27ef09929 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:52 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a606cb388f975561c37dbabc2fee82c27ef09929 commit a606cb388f975561c37dbabc2fee82c27ef09929 Author: Eric van Gyzen AuthorDate: 2020-05-12 15:22:40 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:12 +0000 Remove tests for obsolete compilers in the build system Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions for older compilers. Reviewed by: imp (earlier version), emaste, jhb Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24802 (cherry picked from commit fac6dee9eb58b2b558fec2aea749460ca623f6d6) --- lib/libclang_rt/Makefile.inc | 2 +- lib/libthr/Makefile | 3 --- lib/msun/Makefile | 4 ++-- libexec/rtld-elf/Makefile | 4 ---- libexec/tftpd/tests/Makefile | 3 --- share/mk/bsd.compiler.mk | 14 +++--------- share/mk/bsd.sys.mk | 50 +++++++++++++------------------------------ stand/arm/uboot/Makefile | 2 +- stand/defs.mk | 4 ---- stand/efi/Makefile | 6 ------ stand/efi/boot1/Makefile | 4 ---- stand/efi/loader/Makefile | 4 ---- stand/i386/boot2/Makefile | 3 --- stand/i386/isoboot/Makefile | 3 --- stand/libsa/Makefile | 4 ---- sys/conf/Makefile.arm | 4 ---- sys/conf/kern.mk | 37 +++++++++++--------------------- sys/conf/kern.post.mk | 3 --- sys/conf/kern.pre.mk | 4 ---- sys/conf/kmod.mk | 11 ---------- sys/modules/Makefile | 2 -- usr.sbin/acpi/acpidb/Makefile | 2 +- usr.sbin/trpt/Makefile | 6 ------ usr.sbin/zic/zic/Makefile | 2 +- 24 files changed, 36 insertions(+), 145 deletions(-) diff --git a/lib/libclang_rt/Makefile.inc b/lib/libclang_rt/Makefile.inc index 07b66015acb1..53e0f7972768 100644 --- a/lib/libclang_rt/Makefile.inc +++ b/lib/libclang_rt/Makefile.inc @@ -32,7 +32,7 @@ CFLAGS+= ${PICFLAG} CFLAGS+= -fno-builtin CFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti -.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700 +.if ${COMPILER_TYPE} == clang CFLAGS+= -fno-sanitize=safe-stack .endif CFLAGS+= -fno-stack-protector diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index 5f3d52661c99..c77b6b565a87 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -29,10 +29,7 @@ CFLAGS+=-Winline CFLAGS.thr_stack.c+= -Wno-cast-align CFLAGS.rtld_malloc.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 diff --git a/lib/msun/Makefile b/lib/msun/Makefile index d56b33deabea..0a486bb5a086 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -119,12 +119,12 @@ COMMON_SRCS+= catrigl.c \ s_nextafterl.c s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c \ s_scalbnl.c s_sinl.c s_sincosl.c \ s_tanhl.c s_tanl.c s_truncl.c w_cabsl.c -# Work around this warning from gcc 6: +# Work around this warning from gcc: # lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of # 'long double' [-Werror=overflow] # if( y >= LDBL_MAX ) # See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=130067 -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000 +.if ${COMPILER_TYPE} == "gcc" CFLAGS.e_powl.c+= -Wno-error=overflow .endif .endif diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index a51acf68068a..be18f1759cc6 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -111,8 +111,4 @@ ${PROG_FULL}: ${VERSION_MAP} # GCC warns about redeclarations even though they have __exported # and are therefore not identical to the ones from the system headers. CFLAGS+= -Wno-redundant-decls -.if ${COMPILER_VERSION} < 40300 -# Silence -Wshadow false positives in ancient GCC -CFLAGS+= -Wno-shadow -.endif .endif diff --git a/libexec/tftpd/tests/Makefile b/libexec/tftpd/tests/Makefile index 9aa420cec1a5..390921e31de7 100644 --- a/libexec/tftpd/tests/Makefile +++ b/libexec/tftpd/tests/Makefile @@ -2,11 +2,8 @@ .include -# Skip on GCC 4.2, because it lacks __COUNTER__ -.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40300 ATF_TESTS_C= functional TEST_METADATA.functional+= timeout=15 -.endif LIBADD= util WARNS?= 6 diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk index cd87740730e9..4da0578d1b4e 100644 --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -182,20 +182,12 @@ ${X_}COMPILER_FREEBSD_VERSION= unknown .endif .endif -${X_}COMPILER_FEATURES= -.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 30300) || \ - (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 40800) -${X_}COMPILER_FEATURES+= c++11 -.endif -.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 30400) || \ - (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 50000) -${X_}COMPILER_FEATURES+= c++14 -.endif -.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 50000) || \ +${X_}COMPILER_FEATURES= c++11 c++14 +.if ${${X_}COMPILER_TYPE} == "clang" || \ (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 70000) ${X_}COMPILER_FEATURES+= c++17 .endif -.if ${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 60000 +.if ${${X_}COMPILER_TYPE} == "clang" ${X_}COMPILER_FEATURES+= retpoline .endif diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index b8bf3d0cd25a..53d6b22ee921 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -6,8 +6,7 @@ # Enable various levels of compiler warning checks. These may be # overridden (e.g. if using a non-gcc compiler) by defining MK_WARNS=no. -# for 4.2.1 GCC: http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Warning-Options.html -# for current GCC: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html +# for GCC: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html # for clang: https://clang.llvm.org/docs/DiagnosticsReference.html .include @@ -29,15 +28,6 @@ CFLAGS+= -std=${CSTD} CXXFLAGS+= -std=${CXXSTD} .endif -# -# Turn off -Werror for gcc 4.2.1. The compiler is on the glide path out of the -# system, and any warnings specific to it are no longer relevant as there are -# too many false positives. -# -.if ${COMPILER_VERSION} < 50000 -NO_WERROR.gcc= yes -.endif - # -pedantic is problematic because it also imposes namespace restrictions #CFLAGS+= -pedantic .if defined(WARNS) @@ -81,19 +71,13 @@ CWARNFLAGS+= -Wno-pointer-sign # is set to low values, these have to be disabled explicitly. .if ${WARNS} <= 6 CWARNFLAGS.clang+= -Wno-empty-body -Wno-string-plus-int -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30400 CWARNFLAGS.clang+= -Wno-unused-const-variable -.endif .endif # WARNS <= 6 .if ${WARNS} <= 3 CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-unused-value\ -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 CWARNFLAGS.clang+= -Wno-unused-local-typedef -.endif -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 40000 CWARNFLAGS.clang+= -Wno-address-of-packed-member -.endif .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 90100 CWARNFLAGS.gcc+= -Wno-address-of-packed-member .endif @@ -113,7 +97,7 @@ CWARNFLAGS.clang+= -Wno-array-bounds .endif # NO_WARRAY_BOUNDS .if defined(NO_WMISLEADING_INDENTATION) && \ ((${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 100000) || \ - (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100)) + ${COMPILER_TYPE} == "gcc") CWARNFLAGS+= -Wno-misleading-indentation .endif # NO_WMISLEADING_INDENTATION .endif # WARNS @@ -137,8 +121,10 @@ CWARNFLAGS+= -Werror CWARNFLAGS+= -Wno-format .endif # NO_WFORMAT || NO_WFORMAT.${COMPILER_TYPE} -# GCC 5.2.0 -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50200 +# GCC +# We should clean up warnings produced with these flags. +# They were originally added as a quick hack to enable gcc5/6. +.if ${COMPILER_TYPE} == "gcc" CWARNFLAGS+= -Wno-error=address \ -Wno-error=array-bounds \ -Wno-error=attributes \ @@ -150,15 +136,18 @@ CWARNFLAGS+= -Wno-error=address \ -Wno-error=extra \ -Wno-error=inline \ -Wno-error=logical-not-parentheses \ + -Wno-error=nonnull-compare \ + -Wno-error=shift-negative-value \ -Wno-error=strict-aliasing \ + -Wno-error=tautological-compare \ -Wno-error=uninitialized \ -Wno-error=unused-but-set-variable \ + -Wno-error=unused-const-variable \ -Wno-error=unused-function \ -Wno-error=unused-value -.endif # GCC 6.1.0 -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 +.if ${COMPILER_VERSION} >= 60100 CWARNFLAGS+= -Wno-error=empty-body \ -Wno-error=nonnull-compare \ -Wno-error=shift-negative-value \ @@ -167,7 +156,7 @@ CWARNFLAGS+= -Wno-error=empty-body \ .endif # GCC 7.1.0 -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 70100 +.if ${COMPILER_VERSION} >= 70100 CWARNFLAGS+= -Wno-error=bool-operation \ -Wno-error=deprecated \ -Wno-error=expansion-to-defined \ @@ -183,7 +172,7 @@ CWARNFLAGS+= -Wno-error=bool-operation \ .endif # GCC 8.1.0 -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80100 +.if ${COMPILER_VERSION} >= 80100 CWARNFLAGS+= -Wno-error=aggressive-loop-optimizations \ -Wno-error=cast-function-type \ -Wno-error=catch-value \ @@ -192,9 +181,10 @@ CWARNFLAGS+= -Wno-error=aggressive-loop-optimizations \ -Wno-error=sizeof-pointer-memaccess \ -Wno-error=stringop-truncation .endif +.endif # gcc # How to handle FreeBSD custom printf format specifiers. -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 +.if ${COMPILER_TYPE} == "clang" FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ .else FORMAT_EXTENSIONS= -fformat-extensions @@ -209,11 +199,7 @@ CFLAGS+= -Wno-format-zero-length CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ -mllvm -simplifycfg-dup-ret -.if ${COMPILER_VERSION} >= 30500 && ${COMPILER_VERSION} < 30700 -CLANG_OPT_SMALL+= -mllvm -enable-gvn=false -.else CLANG_OPT_SMALL+= -mllvm -enable-load-pre=false -.endif CFLAGS.clang+= -Qunused-arguments .if ${MACHINE_CPUARCH} == "sparc64" # Don't emit .cfi directives, since we must use GNU as on sparc64, for now. @@ -228,14 +214,8 @@ CXXFLAGS.clang+= -Wno-c++11-extensions .if ${MK_SSP} != "no" && \ ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" -.if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30500) || \ - (${COMPILER_TYPE} == "gcc" && \ - (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40900)) # Don't use -Wstack-protector as it breaks world with -Werror. SSP_CFLAGS?= -fstack-protector-strong -.else -SSP_CFLAGS?= -fstack-protector -.endif CFLAGS+= ${SSP_CFLAGS} .endif # SSP && !ARM && !MIPS diff --git a/stand/arm/uboot/Makefile b/stand/arm/uboot/Makefile index 0c906c99ee6f..f99282aa6e5a 100644 --- a/stand/arm/uboot/Makefile +++ b/stand/arm/uboot/Makefile @@ -24,7 +24,7 @@ UBLDR_LOADADDR?= 0x1000000 # Architecture-specific loader code SRCS= start.S conf.c self_reloc.c vers.c -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201 +.if ${COMPILER_TYPE} == "gcc" CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized .endif diff --git a/stand/defs.mk b/stand/defs.mk index c81be884f3ae..45d48ccdab8a 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -149,11 +149,7 @@ CFLAGS+= -fPIC -mno-red-zone # Do not generate movt/movw, because the relocation fixup for them does not # translate to the -Bsymbolic -pie format required by self_reloc() in loader(8). # Also, the fpu is not available in a standalone environment. -.if ${COMPILER_VERSION} < 30800 -CFLAGS.clang+= -mllvm -arm-use-movt=0 -.else CFLAGS.clang+= -mno-movt -.endif CFLAGS.clang+= -mfpu=none CFLAGS+= -fPIC .endif diff --git a/stand/efi/Makefile b/stand/efi/Makefile index 9ab6aa4291fb..94cb5bba5638 100644 --- a/stand/efi/Makefile +++ b/stand/efi/Makefile @@ -4,10 +4,6 @@ NO_OBJ=t .include -# In-tree GCC does not support __attribute__((ms_abi)), but gcc newer -# than 4.5 supports it. -.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500 - SUBDIR.yes+= libefi SUBDIR.${MK_FDT}+= fdt SUBDIR.yes+= .WAIT @@ -18,6 +14,4 @@ SUBDIR.${MK_FORTH}+= loader_4th SUBDIR.${MK_LOADER_LUA}+= loader_lua SUBDIR.yes+= loader_simp -.endif # ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500 - .include diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile index d4ac55598bb7..899b00d97341 100644 --- a/stand/efi/boot1/Makefile +++ b/stand/efi/boot1/Makefile @@ -42,10 +42,6 @@ CFLAGS.zfs_module.c+= -I${SYSDIR}/cddl/contrib/opensolaris/common/lz4 CFLAGS+= -DEFI_ZFS_BOOT .endif -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201 -CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized -.endif - CFLAGS+= -I${EFIINC} CFLAGS+= -I${EFIINCMD} CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index d290cae5d4c8..cda242924be0 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -32,10 +32,6 @@ CFLAGS+= -DEFI_ZFS_BOOT HAVE_ZFS= yes .endif -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201 -CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized -.endif - # We implement a slightly non-standard %S in that it always takes a # CHAR16 that's common in UEFI-land instead of a wchar_t. This only # seems to matter on arm64 where wchar_t defaults to an int instead diff --git a/stand/i386/boot2/Makefile b/stand/i386/boot2/Makefile index 3830199b2c4b..713929efc2b5 100644 --- a/stand/i386/boot2/Makefile +++ b/stand/i386/boot2/Makefile @@ -37,9 +37,6 @@ CFLAGS+=-fomit-frame-pointer \ CFLAGS.gcc+= -Os \ -fno-asynchronous-unwind-tables \ --param max-inline-insns-single=100 -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201 -CFLAGS.gcc+= -mno-align-long-strings -.endif CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL} diff --git a/stand/i386/isoboot/Makefile b/stand/i386/isoboot/Makefile index 597958065090..59033dfcd4c9 100644 --- a/stand/i386/isoboot/Makefile +++ b/stand/i386/isoboot/Makefile @@ -32,9 +32,6 @@ CFLAGS+=-DBOOTPROG=\"isoboot\" \ -Winline -Wno-pointer-sign CFLAGS.gcc+= --param max-inline-insns-single=100 -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201 -CFLAGS.gcc+= -Wno-uninitialized -.endif CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL} LD_FLAGS+=${LD_FLAGS_BIN} diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index 0ca994386f47..44db171b141f 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -46,11 +46,7 @@ SRCS+= subr_boot.c # Do not generate movt/movw, because the relocation fixup for them does not # translate to the -Bsymbolic -pie format required by self_reloc() in loader(8). # Also, the fpu is not available in a standalone environment. -.if ${COMPILER_VERSION} < 30800 -CFLAGS.clang+= -mllvm -arm-use-movt=0 -.else CFLAGS.clang+= -mno-movt -.endif CFLAGS.clang+= -mfpu=none .PATH: ${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins/arm/ diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm index 8c9069bad311..ba918c27cbc5 100644 --- a/sys/conf/Makefile.arm +++ b/sys/conf/Makefile.arm @@ -47,10 +47,6 @@ CFLAGS.clang += -mfpu=none .if !empty(DDB_ENABLED) CFLAGS += -funwind-tables -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 30500 -# clang < 3.5.0 requires us to tell it to emit assembly with unwind information -CFLAGS += -mllvm -arm-enable-ehabi -.endif .endif # "makeoptions KERNVIRTADDR=" is now optional, supply the default value. diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 6c8480810a32..d87752649679 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -31,19 +31,14 @@ NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare CWARNEXTRA?= -Wno-error=tautological-compare -Wno-error=empty-body \ -Wno-error=parentheses-equality -Wno-error=unused-function \ -Wno-error=pointer-sign -.if ${COMPILER_VERSION} >= 30700 CWARNEXTRA+= -Wno-error=shift-negative-value -.endif -.if ${COMPILER_VERSION} >= 40000 CWARNEXTRA+= -Wno-address-of-packed-member -.endif .if ${COMPILER_VERSION} >= 100000 NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation .endif -.endif +.endif # clang .if ${COMPILER_TYPE} == "gcc" -.if ${COMPILER_VERSION} >= 40800 # Catch-all for all the things that are in our tree, but for which we're # not yet ready for this compiler. NO_WUNUSED_BUT_SET_VARIABLE = -Wno-unused-but-set-variable @@ -55,14 +50,15 @@ CWARNEXTRA?= -Wno-error=address \ -Wno-error=enum-compare \ -Wno-error=inline \ -Wno-error=maybe-uninitialized \ + -Wno-error=misleading-indentation \ + -Wno-error=nonnull-compare \ -Wno-error=overflow \ -Wno-error=sequence-point \ - -Wno-error=unused-but-set-variable -.if ${COMPILER_VERSION} >= 60100 -CWARNEXTRA+= -Wno-error=misleading-indentation \ - -Wno-error=nonnull-compare \ -Wno-error=shift-overflow \ - -Wno-error=tautological-compare + -Wno-error=tautological-compare \ + -Wno-unused-but-set-variable +.if ${COMPILER_VERSION} >= 70100 +CWARNEXTRA+= -Wno-error=stringop-overflow .endif .if ${COMPILER_VERSION} >= 70200 CWARNEXTRA+= -Wno-error=memset-elt-size @@ -70,14 +66,10 @@ CWARNEXTRA+= -Wno-error=memset-elt-size .if ${COMPILER_VERSION} >= 80000 CWARNEXTRA+= -Wno-error=packed-not-aligned .endif -.else -# For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars. -CWARNEXTRA?= -Wno-uninitialized -# GCC 4.2 doesn't have -Wno-error=cast-qual, so just disable the warning for -# the few files that are already known to generate cast-qual warnings. -NO_WCAST_QUAL= -Wno-cast-qual -.endif +.if ${COMPILER_VERSION} >= 90100 +CWARNEXTRA+= -Wno-address-of-packed-member .endif +.endif # gcc # This warning is utter nonsense CWARNFLAGS+= -Wno-format-zero-length @@ -86,7 +78,7 @@ CWARNFLAGS+= -Wno-format-zero-length # to be disabled. WARNING: format checking is disabled in this case. .if ${MK_FORMAT_EXTENSIONS} == "no" FORMAT_EXTENSIONS= -Wno-format -.elif ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 +.elif ${COMPILER_TYPE} == "clang" FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ .else FORMAT_EXTENSIONS= -fformat-extensions @@ -201,12 +193,7 @@ CFLAGS.gcc+= -mno-spe # DDB happy. ELFv2, if available, has some other efficiency benefits. # .if ${MACHINE_ARCH} == "powerpc64" -.if ${COMPILER_VERSION} >= 40900 -CFLAGS.gcc+= -mabi=elfv2 -.else -CFLAGS.gcc+= -mcall-aixdesc -.endif -CFLAGS.clang+= -mabi=elfv2 +CFLAGS+= -mabi=elfv2 .endif # diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index cce9fcfd1c6d..b24909642dfe 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -311,10 +311,7 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .depend: .PRECIOUS ${SRCS} -.if ${COMPILER_TYPE} == "clang" || \ - (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000) _MAP_DEBUG_PREFIX= yes -.endif _ILINKS= machine .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64" diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 7f0099344d18..04f34b6e0c5c 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -93,11 +93,7 @@ CFLAGS.gcc+= -fms-extensions .if defined(CFLAGS_ARCH_PARAMS) CFLAGS.gcc+=${CFLAGS_ARCH_PARAMS} .endif -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000 -WERROR?= -Wno-error -.else WERROR?= -Werror -.endif # The following should be removed no earlier than LLVM11 being imported into the # tree, to ensure we don't regress the build. LLVM11 and GCC10 will switch the # default over to -fno-common, making this redundant. diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 610484ba7e36..3c63deb6ddd1 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -102,11 +102,7 @@ __KLD_SHARED=no .if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing) CFLAGS+= -fno-strict-aliasing .endif -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000 -WERROR?= -Wno-error -.else WERROR?= -Werror -.endif LINUXKPI_GENSRCS+= \ bus_if.h \ @@ -171,11 +167,7 @@ CFLAGS+= -fPIC # Temporary workaround for PR 196407, which contains the fascinating details. # Don't allow clang to use fpu instructions or registers in kernel modules. .if ${MACHINE_CPUARCH} == arm -.if ${COMPILER_VERSION} < 30800 -CFLAGS.clang+= -mllvm -arm-use-movt=0 -.else CFLAGS.clang+= -mno-movt -.endif CFLAGS.clang+= -mfpu=none CFLAGS+= -funwind-tables .endif @@ -285,10 +277,7 @@ ${FULLPROG}: ${OBJS} ${OBJCOPY} --strip-debug ${.TARGET} .endif -.if ${COMPILER_TYPE} == "clang" || \ - (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000) _MAP_DEBUG_PREFIX= yes -.endif _ILINKS=machine .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64" diff --git a/sys/modules/Makefile b/sys/modules/Makefile index f4b7d4f8a5bd..61603cf32ab4 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -684,10 +684,8 @@ _aac= aac _aacraid= aacraid _acpi= acpi .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) -.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} > 40201 _aesni= aesni .endif -.endif _amd_ecc_inject=amd_ecc_inject _amdsbwd= amdsbwd _amdsmn= amdsmn diff --git a/usr.sbin/acpi/acpidb/Makefile b/usr.sbin/acpi/acpidb/Makefile index 566794fa6f4b..5a6fceb2a4cb 100644 --- a/usr.sbin/acpi/acpidb/Makefile +++ b/usr.sbin/acpi/acpidb/Makefile @@ -87,6 +87,6 @@ LIBADD= pthread # integer to pointer, which is a GNU extension. # # Turn off the warning, because this is in contributed code. -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 60000 +.if ${COMPILER_TYPE} == "clang" CWARNFLAGS+= -Wno-null-pointer-arithmetic .endif diff --git a/usr.sbin/trpt/Makefile b/usr.sbin/trpt/Makefile index 4756cb1a0d03..33a3d1f81a7f 100644 --- a/usr.sbin/trpt/Makefile +++ b/usr.sbin/trpt/Makefile @@ -8,18 +8,12 @@ MAN= trpt.8 BINGRP= kmem BINMODE= 2555 -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000 -WARNS?= 4 -.endif - .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif .include -.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 50000 # Several included system headers tickle this warning in ways that are # difficult to work around in this program. CFLAGS+= -Wno-missing-variable-declarations -.endif diff --git a/usr.sbin/zic/zic/Makefile b/usr.sbin/zic/zic/Makefile index 36cc79009b45..17ffb33a57e7 100644 --- a/usr.sbin/zic/zic/Makefile +++ b/usr.sbin/zic/zic/Makefile @@ -15,7 +15,7 @@ CFLAGS+= -I${.CURDIR:H} -I${SRCTOP}/contrib/tzcode/stdtime WARNS?= 2 -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50300 +.if ${COMPILER_TYPE} == "gcc" CWARNFLAGS+= -Wno-error=strict-overflow .endif From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:53 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56241669CBA; Thu, 2 Sep 2021 23:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yZ50B9dz3M4D; Thu, 2 Sep 2021 23:58:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A2A2D224A9; Thu, 2 Sep 2021 23:58:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182NwqFh010863; Thu, 2 Sep 2021 23:58:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwqnR010862; Thu, 2 Sep 2021 23:58:52 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:52 GMT Message-Id: <202109022358.182NwqnR010862@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2ebf10e7a1ce - stable/12 - Revert part of r360964 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2ebf10e7a1ced5d3dc4059d0595743277464d915 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:53 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2ebf10e7a1ced5d3dc4059d0595743277464d915 commit 2ebf10e7a1ced5d3dc4059d0595743277464d915 Author: Eric van Gyzen AuthorDate: 2020-05-28 21:56:31 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:13 +0000 Revert part of r360964 ports/devel/linux_libusb builds FreeBSD libusb with GCC 4.8.5 from devel/linux-c7-devtools. Restore the tests for older GCC in bsd.sys.mk to accomodate such ports. Reported by: tijl Sponsored by: Dell EMC Isilon (cherry picked from commit 824214da6434b1f0a361f6e8b94e7668db306beb) --- share/mk/bsd.sys.mk | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 53d6b22ee921..d884fbea1739 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -124,7 +124,12 @@ CWARNFLAGS+= -Wno-format # GCC # We should clean up warnings produced with these flags. # They were originally added as a quick hack to enable gcc5/6. +# The base system requires at least GCC 6.4, but some ports +# use this file with older compilers. Request an exprun +# before changing these. .if ${COMPILER_TYPE} == "gcc" +# GCC 5.2.0 +.if ${COMPILER_VERSION} >= 50200 CWARNFLAGS+= -Wno-error=address \ -Wno-error=array-bounds \ -Wno-error=attributes \ @@ -136,15 +141,20 @@ CWARNFLAGS+= -Wno-error=address \ -Wno-error=extra \ -Wno-error=inline \ -Wno-error=logical-not-parentheses \ - -Wno-error=nonnull-compare \ - -Wno-error=shift-negative-value \ -Wno-error=strict-aliasing \ - -Wno-error=tautological-compare \ -Wno-error=uninitialized \ -Wno-error=unused-but-set-variable \ - -Wno-error=unused-const-variable \ -Wno-error=unused-function \ -Wno-error=unused-value +.endif + +# GCC 6.1.0 +.if ${COMPILER_VERSION} >= 60100 +CWARNFLAGS+= -Wno-error=nonnull-compare \ + -Wno-error=shift-negative-value \ + -Wno-error=tautological-compare \ + -Wno-error=unused-const-variable +.endif # GCC 6.1.0 .if ${COMPILER_VERSION} >= 60100 From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:54 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B74CA66A23D; Thu, 2 Sep 2021 23:58:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yZ61F1Mz3MH6; Thu, 2 Sep 2021 23:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C11C3224AA; Thu, 2 Sep 2021 23:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Nwrli010887; Thu, 2 Sep 2021 23:58:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwrBH010886; Thu, 2 Sep 2021 23:58:53 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:53 GMT Message-Id: <202109022358.182NwrBH010886@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 8fce2bfdfc6f - stable/12 - Turn off errors for -Wmaybe-uninitialized in GCC 6+. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8fce2bfdfc6f2d4f105e5e603369bf03b49670e7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:55 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8fce2bfdfc6f2d4f105e5e603369bf03b49670e7 commit 8fce2bfdfc6f2d4f105e5e603369bf03b49670e7 Author: John Baldwin AuthorDate: 2020-08-04 18:19:29 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:14 +0000 Turn off errors for -Wmaybe-uninitialized in GCC 6+. Recent changes to trigger this warning and seem like a false positive. Differential Revision: https://reviews.freebsd.org/D25726 (cherry picked from commit a02fb76280fd663aa46843423002d605a7bd0796) --- share/mk/bsd.sys.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index d884fbea1739..671a180dbfba 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -150,7 +150,8 @@ CWARNFLAGS+= -Wno-error=address \ # GCC 6.1.0 .if ${COMPILER_VERSION} >= 60100 -CWARNFLAGS+= -Wno-error=nonnull-compare \ +CWARNFLAGS+= -Wno-error=maybe-uninitialized \ + -Wno-error=nonnull-compare \ -Wno-error=shift-negative-value \ -Wno-error=tautological-compare \ -Wno-error=unused-const-variable From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:56 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21D3E66A1DB; Thu, 2 Sep 2021 23:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yZ73WsJz3MC9; Thu, 2 Sep 2021 23:58:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E2064224AB; Thu, 2 Sep 2021 23:58:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Nwsxm010911; Thu, 2 Sep 2021 23:58:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwsaZ010910; Thu, 2 Sep 2021 23:58:54 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:54 GMT Message-Id: <202109022358.182NwsaZ010910@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: c7bb9802495a - stable/12 - Disable errors for -Wredundant-decls for GCC 6+. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c7bb9802495a0c0b4efa2754c3257a783525a03d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:56 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=c7bb9802495a0c0b4efa2754c3257a783525a03d commit c7bb9802495a0c0b4efa2754c3257a783525a03d Author: John Baldwin AuthorDate: 2020-08-04 18:20:39 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:15 +0000 Disable errors for -Wredundant-decls for GCC 6+. GCC triggers warnings for this that clang does not for duplicate declarations of yylex(). Differential Revision: https://reviews.freebsd.org/D25727 (cherry picked from commit 0ea6e5109d681b55886f61822ec23a4404d3eac5) --- share/mk/bsd.sys.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 671a180dbfba..92c4e5b12241 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -152,6 +152,7 @@ CWARNFLAGS+= -Wno-error=address \ .if ${COMPILER_VERSION} >= 60100 CWARNFLAGS+= -Wno-error=maybe-uninitialized \ -Wno-error=nonnull-compare \ + -Wno-error=redundant-decls \ -Wno-error=shift-negative-value \ -Wno-error=tautological-compare \ -Wno-error=unused-const-variable From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10F4366A319; Thu, 2 Sep 2021 23:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yZ85BgCz3MHB; Thu, 2 Sep 2021 23:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09139224AC; Thu, 2 Sep 2021 23:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182NwtkQ010935; Thu, 2 Sep 2021 23:58:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwtVi010934; Thu, 2 Sep 2021 23:58:55 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:55 GMT Message-Id: <202109022358.182NwtVi010934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 5fd3c9a1f67a - stable/12 - Suppress -Wempty-body warnings in GCC 6.x and later. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5fd3c9a1f67ad92812775c280d7a2d374706a7c5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:57 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5fd3c9a1f67ad92812775c280d7a2d374706a7c5 commit 5fd3c9a1f67ad92812775c280d7a2d374706a7c5 Author: John Baldwin AuthorDate: 2020-08-31 21:57:01 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:17 +0000 Suppress -Wempty-body warnings in GCC 6.x and later. libc++ in LLVM 11 uses an empty else clause in include/c++/v1/__thread_support which triggers this warning. Reviewed by: dim, emaste Differential Revision: https://reviews.freebsd.org/D26257 (cherry picked from commit 73fd212c813d74ad593c93904c5d8edf763e6c54) --- share/mk/bsd.sys.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 92c4e5b12241..b4221953cc0c 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -150,7 +150,8 @@ CWARNFLAGS+= -Wno-error=address \ # GCC 6.1.0 .if ${COMPILER_VERSION} >= 60100 -CWARNFLAGS+= -Wno-error=maybe-uninitialized \ +CWARNFLAGS+= -Wno-error=empty-body \ + -Wno-error=maybe-uninitialized \ -Wno-error=nonnull-compare \ -Wno-error=redundant-decls \ -Wno-error=shift-negative-value \ From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E2B466A32D; Thu, 2 Sep 2021 23:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yZB3dw4z3M20; Thu, 2 Sep 2021 23:58:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C5D32234E; Thu, 2 Sep 2021 23:58:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Nwwx7010987; Thu, 2 Sep 2021 23:58:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwwZC010986; Thu, 2 Sep 2021 23:58:58 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:58 GMT Message-Id: <202109022358.182NwwZC010986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4409857538fc - stable/12 - Remove -simplifycfg-dup-ret from CLANG_OPT_SMALL flags for clang 13 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4409857538fc66cb6ab9217add5ff6138ea28459 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:59:00 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4409857538fc66cb6ab9217add5ff6138ea28459 commit 4409857538fc66cb6ab9217add5ff6138ea28459 Author: Dimitry Andric AuthorDate: 2021-08-29 13:39:16 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:26 +0000 Remove -simplifycfg-dup-ret from CLANG_OPT_SMALL flags for clang 13 After llvm/clang 13.0.0, the -simplifycfg-dup-ret backend flag is no longer supported. This was part of CLANG_OPT_SMALL, which is only still used for stand/i386/boot2 and stand/i386/isoboot, to achieve the very small binary size required. Luckily clang 13.0.0 does not need any additional flags for this (I get 240 bytes available when building boot2). (cherry picked from commit 22b8ab15c41a9efac201691b40e961b83698aa9c) --- share/mk/bsd.sys.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index b4221953cc0c..5ab65b48f3c5 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -210,8 +210,10 @@ CWARNFLAGS+= -Wno-unknown-pragmas # This warning is utter nonsense CFLAGS+= -Wno-format-zero-length -CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ - -mllvm -simplifycfg-dup-ret +CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3 +.if ${COMPILER_VERSION} < 130000 +CLANG_OPT_SMALL+= -mllvm -simplifycfg-dup-ret +.endif CLANG_OPT_SMALL+= -mllvm -enable-load-pre=false CFLAGS.clang+= -Qunused-arguments .if ${MACHINE_CPUARCH} == "sparc64" From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:58:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C5B0669CCF; Thu, 2 Sep 2021 23:58:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yZ92nZ0z3MHD; Thu, 2 Sep 2021 23:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33D1C224AD; Thu, 2 Sep 2021 23:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Nwv0d010959; Thu, 2 Sep 2021 23:58:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182NwvSF010958; Thu, 2 Sep 2021 23:58:57 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:57 GMT Message-Id: <202109022358.182NwvSF010958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 461cfd4192d2 - stable/12 - Fix acpica macros that subtract null pointers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 461cfd4192d2b7735b6cee0f42e6a7818f8f50b4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:59:00 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=461cfd4192d2b7735b6cee0f42e6a7818f8f50b4 commit 461cfd4192d2b7735b6cee0f42e6a7818f8f50b4 Author: Dimitry Andric AuthorDate: 2021-08-29 11:15:23 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:22 +0000 Fix acpica macros that subtract null pointers Clang 13.0.0 produces a new -Werror warning about the ACPI_TO_INTEGER(p) and ACPI_OFFSET(d, f) macros in acpica's actypes.h: sys/contrib/dev/acpica/components/dispatcher/dsopcode.c:708:31: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction] ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/contrib/dev/acpica/include/actypes.h:664:41: note: expanded from macro 'ACPI_PTR_TO_PHYSADDR' #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) ^~~~~~~~~~~~~~~~~~ sys/contrib/dev/acpica/include/actypes.h:661:41: note: expanded from macro 'ACPI_TO_INTEGER' #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/contrib/dev/acpica/include/actypes.h:656:82: note: expanded from macro 'ACPI_PTR_DIFF' #define ACPI_PTR_DIFF(a, b) ((ACPI_SIZE) (ACPI_CAST_PTR (UINT8, (a)) - ACPI_CAST_PTR (UINT8, (b)))) ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. This problem of undefined behavior was also reported to acpica by @cem in 2018: https://github.com/acpica/acpica/issues/407, but it seems there was never any fix committed for it upstream. Instead fix these locally, for ACPI_TO_INTEGER by simply casting the incoming pointer to ACPI_SIZE (which corresponds roughly to uintptr_t and size_t), and for ACPI_OFFSET by reusing our __offsetof definition from sys/cdefs.h. Reviewed by: emaste, kib, imp Differential Revision: https://reviews.freebsd.org/D31710 (cherry picked from commit 130a690ae16e1b845629e586203b508eff699f38) --- sys/contrib/dev/acpica/include/actypes.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/contrib/dev/acpica/include/actypes.h b/sys/contrib/dev/acpica/include/actypes.h index c7d2c9aa69e4..f7bb0d4d0170 100644 --- a/sys/contrib/dev/acpica/include/actypes.h +++ b/sys/contrib/dev/acpica/include/actypes.h @@ -658,8 +658,13 @@ typedef UINT64 ACPI_INTEGER; /* Pointer/Integer type conversions */ #define ACPI_TO_POINTER(i) ACPI_CAST_PTR (void, (ACPI_SIZE) (i)) +#ifdef __FreeBSD__ +#define ACPI_TO_INTEGER(p) ((ACPI_SIZE) (p)) +#define ACPI_OFFSET(d, f) ((ACPI_SIZE) __offsetof(d, f)) +#else #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0) #define ACPI_OFFSET(d, f) ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0) +#endif #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:59:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3375E66A1EF; Thu, 2 Sep 2021 23:59:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yZC5Pktz3M2B; Thu, 2 Sep 2021 23:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7094122602; Thu, 2 Sep 2021 23:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Nwx9A011013; Thu, 2 Sep 2021 23:58:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Nwxvq011012; Thu, 2 Sep 2021 23:58:59 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:59 GMT Message-Id: <202109022358.182Nwxvq011012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f4fed768bba4 - stable/12 - Don't error out on unused but set variables with clang 13 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f4fed768bba45a406f73ed1491d7e52fd1a8711d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:59:00 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f4fed768bba45a406f73ed1491d7e52fd1a8711d commit f4fed768bba45a406f73ed1491d7e52fd1a8711d Author: Dimitry Andric AuthorDate: 2021-08-29 13:53:40 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:30 +0000 Don't error out on unused but set variables with clang 13 Clang 13.0.0 now has a -Wunused-but-set-variable warning similar to the one gcc has had for quite a while. Since this triggers *very* often for our kernel builds, don't make it a hard error, but leave the warning visible so is some incentive to fix the instances. (cherry picked from commit 395d46caaed73228b84dfaeb37c702304a46ba8f) --- sys/conf/kern.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index d87752649679..34ffc8cb15ca 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -25,6 +25,9 @@ NO_WUNNEEDED_INTERNAL_DECL= -Wno-error=unneeded-internal-declaration NO_WSOMETIMES_UNINITIALIZED= -Wno-error=sometimes-uninitialized NO_WCAST_QUAL= -Wno-error=cast-qual NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare +.if ${COMPILER_VERSION} >= 100000 +NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation +.endif # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. @@ -33,8 +36,8 @@ CWARNEXTRA?= -Wno-error=tautological-compare -Wno-error=empty-body \ -Wno-error=pointer-sign CWARNEXTRA+= -Wno-error=shift-negative-value CWARNEXTRA+= -Wno-address-of-packed-member -.if ${COMPILER_VERSION} >= 100000 -NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation +.if ${COMPILER_VERSION} >= 130000 +CWARNFLAGS+= -Wno-error=unused-but-set-variable .endif .endif # clang From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:59:01 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D16166A269; Thu, 2 Sep 2021 23:59:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0yZF0RKCz3MHW; Thu, 2 Sep 2021 23:59:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96068223C1; Thu, 2 Sep 2021 23:59:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 182Nx0RI011037; Thu, 2 Sep 2021 23:59:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Nx08D011036; Thu, 2 Sep 2021 23:59:00 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:59:00 GMT Message-Id: <202109022359.182Nx08D011036@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: cc110974c4ed - stable/12 - xen: Fix warning by adding KERNBASE to modlist_paddr before casting MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: cc110974c4edae799e2682afcd32cbfc094e6237 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:59:01 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cc110974c4edae799e2682afcd32cbfc094e6237 commit cc110974c4edae799e2682afcd32cbfc094e6237 Author: Dimitry Andric AuthorDate: 2021-08-29 14:02:31 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 23:30:34 +0000 xen: Fix warning by adding KERNBASE to modlist_paddr before casting Clang 13 produces the following warning for hammer_time_xen(): sys/x86/xen/pv.c:183:19: error: the pointer incremented by -2147483648 refers past the last possible element for an array in 64-bit address space containing 256-bit (32-byte) elements (max possible 576460752303423488 elements) [-Werror,-Warray-bounds] (vm_paddr_t)start_info->modlist_paddr + KERNBASE; ^ ~~~~~~~~ sys/xen/interface/arch-x86/hvm/start_info.h:131:5: note: array 'modlist_paddr' declared here uint64_t modlist_paddr; /* Physical address of an array of */ ^ This is because the expression first casts start_info->modlist_paddr to struct hvm_modlist_entry * (via vmpaddr_t), and *then* adds KERNBASE, which is then interpreted as KERNBASE * sizeof(struct hvm_modlist_entry). Instead, parenthesize the addition to get the intended result, and cast it to struct hvm_modlist_entry * afterwards. Also remove the cast to vmpaddr_t since it is not necessary. Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D31711 (cherry picked from commit 8e3c56d6b676a175e974bad4c20797fb35017db8) --- sys/x86/xen/pv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c index e86efde1fe39..42e8c2bc73d9 100644 --- a/sys/x86/xen/pv.c +++ b/sys/x86/xen/pv.c @@ -335,7 +335,7 @@ hammer_time_xen(vm_paddr_t start_info_paddr) HYPERVISOR_shutdown(SHUTDOWN_crash); } mod = (struct hvm_modlist_entry *) - (vm_paddr_t)start_info->modlist_paddr + KERNBASE; + (start_info->modlist_paddr + KERNBASE); if (mod[0].paddr >= physfree) { xc_printf("ERROR: unexpected module memory address\n"); HYPERVISOR_shutdown(SHUTDOWN_crash); From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 00:43:12 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 204C066B837; Fri, 3 Sep 2021 00:43:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0zYC5pj3z3vXZ; Fri, 3 Sep 2021 00:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58ACA22EBC; Fri, 3 Sep 2021 00:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1830hB78077255; Fri, 3 Sep 2021 00:43:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1830hBmE077254; Fri, 3 Sep 2021 00:43:11 GMT (envelope-from git) Date: Fri, 3 Sep 2021 00:43:11 GMT Message-Id: <202109030043.1830hBmE077254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 8a6e5ade1699 - stable/13 - Fix mpr(4) and mps(4) state transitions and a use-after-free panic. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8a6e5ade1699f95e690858bb6618ca148f3098ce Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 00:43:12 -0000 The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=8a6e5ade1699f95e690858bb6618ca148f3098ce commit 8a6e5ade1699f95e690858bb6618ca148f3098ce Author: Kenneth D. Merry AuthorDate: 2021-06-03 19:46:11 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 00:33:28 +0000 Fix mpr(4) and mps(4) state transitions and a use-after-free panic. When the mpr(4) and mps(4) drivers probe a SATA device, they issue an ATA Identify command (via mp{s,r}sas_get_sata_identify()) before the target is fully setup in the driver. The drivers wait for completion of the identify command, and have a 5 second timeout. If the timeout fires, the command is marked with the SATA_ID_TIMEOUT flag so it can be freed later. That is where the use-after-free problem comes in. Once the ATA Identify times out, the driver sends a target reset, and then frees any identify commands that have timed out. But, once the target reset completes, commands that were queued to the drive are returned to the driver by the controller. At that point, the driver (in mp{s,r}_intr_locked()) looks up the command descriptor for that particular SMID, marks it CM_STATE_BUSY and sends it on for completion handling. The problem at this stage is that the command has already been freed, and put on the free queue, so its state is CM_STATE_FREE. If INVARIANTS are turned on, we get a panic as soon as this command is allocated, because its state is no longer CM_STATE_FREE, but rather CM_STATE_BUSY. So, the solution is to not free ATA Identify commands that get stuck until they actually return from the controller. Hopefully this works correctly on older firmware versions. If not, it could result in commands hanging around indefinitely. But, the alternative is a use-after-free panic or assertion (in the INVARIANTS case). This also tightens up the state transitions between CM_STATE_FREE, CM_STATE_BUSY and CM_STATE_INQUEUE, so that the state transitions happen once, and we have assertions to make sure that commands are in the correct state before transitioning to the next state. Also, for each state assertion, we print out the current state of the command if it is incorrect. mp{s,r}.c: Add a new sysctl variable, dump_reqs_alltypes, that controls the behavior of the dump_reqs sysctl. If dump_reqs_alltypes is non-zero, it will dump all commands, not just the commands that are in the CM_STATE_INQUEUE state. (You can see the commands that are in the queue by using mp{s,r}util debug dumpreqs.) Make sure that the INQUEUE -> BUSY state transition happens in one place, the mp{s,r}_complete_command routine. mp{s,r}_sas.c: Make sure we print the current command type in command state assertions. mp{s,r}_sas_lsi.c: Add a new completion handler, mp{s,r}sas_ata_id_complete. This completion handler will free data allocated for an ATA Identify command and free the command structure. In mp{s,r}_ata_id_timeout, do not set the command state to CM_STATE_BUSY. The command is still in queue in the controller. Since we were blocking waiting for this command to complete, there was no completion handler previously. Set the completion handler, so that whenever the command does come back, it will get freed properly. Do not free ATA Identify commands that have timed out in mp{s,r}sas_add_device(). Wait for them to actually come back from the controller. mp{s,r}var.h: Add a dump_reqs_alltypes variable for the new dump_reqs_alltypes sysctl. Make sure we print the current state for state transition asserts. This was tested in the Spectra Logic test bed (as described in the review), as well Netflix's Open Connect fleet (where panics dropped from a dozen or two a month to zero). Reviewed by: imp@ (who is handling the commit with ken's OK) Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D25476 (cherry picked from commit 175ad3d00318a345790eecf2f5a33cd16b119e55) --- sys/dev/mpr/mpr.c | 15 ++++++++++----- sys/dev/mpr/mpr_sas.c | 4 ++-- sys/dev/mpr/mpr_sas_lsi.c | 41 +++++++++++++++++++++++++++-------------- sys/dev/mpr/mprvar.h | 11 +++++++---- sys/dev/mps/mps.c | 17 +++++++++++------ sys/dev/mps/mps_sas.c | 4 ++-- sys/dev/mps/mps_sas_lsi.c | 46 +++++++++++++++++++++++++++++----------------- sys/dev/mps/mpsvar.h | 9 +++++---- 8 files changed, 93 insertions(+), 54 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 264123ed62ec..c43eccb7cb36 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -1141,7 +1141,8 @@ mpr_enqueue_request(struct mpr_softc *sc, struct mpr_command *cm) if (++sc->io_cmds_active > sc->io_cmds_highwater) sc->io_cmds_highwater++; - KASSERT(cm->cm_state == MPR_CM_STATE_BUSY, ("command not busy\n")); + KASSERT(cm->cm_state == MPR_CM_STATE_BUSY, + ("command not busy, state = %u\n", cm->cm_state)); cm->cm_state = MPR_CM_STATE_INQUEUE; if (sc->atomic_desc_capable) { @@ -1917,6 +1918,11 @@ mpr_setup_sysctl(struct mpr_softc *sc) CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE, sc, 0, mpr_dump_reqs, "I", "Dump Active Requests"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "dump_reqs_alltypes", CTLFLAG_RW, + &sc->dump_reqs_alltypes, 0, + "dump all request types not just inqueue"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "use_phy_num", CTLFLAG_RD, &sc->use_phynum, 0, "Use the phy number for enumeration"); @@ -2101,7 +2107,7 @@ mpr_dump_reqs(SYSCTL_HANDLER_ARGS) /* Best effort, no locking */ for (i = smid; i < numreqs; i++) { cm = &sc->commands[i]; - if (cm->cm_state != state) + if ((sc->dump_reqs_alltypes == 0) && (cm->cm_state != state)) continue; hdr.smid = i; hdr.state = cm->cm_state; @@ -2365,6 +2371,8 @@ mpr_complete_command(struct mpr_softc *sc, struct mpr_command *cm) return; } + KASSERT(cm->cm_state == MPR_CM_STATE_INQUEUE, + ("command not inqueue, state = %u\n", cm->cm_state)); cm->cm_state = MPR_CM_STATE_BUSY; if (cm->cm_flags & MPR_CM_FLAGS_POLLED) cm->cm_flags |= MPR_CM_FLAGS_COMPLETE; @@ -2544,9 +2552,6 @@ mpr_intr_locked(void *data) case MPI25_RPY_DESCRIPT_FLAGS_FAST_PATH_SCSI_IO_SUCCESS: case MPI26_RPY_DESCRIPT_FLAGS_PCIE_ENCAPSULATED_SUCCESS: cm = &sc->commands[le16toh(desc->SCSIIOSuccess.SMID)]; - KASSERT(cm->cm_state == MPR_CM_STATE_INQUEUE, - ("command not inqueue\n")); - cm->cm_state = MPR_CM_STATE_BUSY; cm->cm_reply = NULL; break; case MPI2_RPY_DESCRIPT_FLAGS_ADDRESS_REPLY: diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index a60881553f01..6d954b96e626 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -1194,7 +1194,7 @@ mprsas_tm_timeout(void *data) "out\n", tm); KASSERT(tm->cm_state == MPR_CM_STATE_INQUEUE, - ("command not inqueue\n")); + ("command not inqueue, state = %u\n", tm->cm_state)); tm->cm_state = MPR_CM_STATE_BUSY; mpr_reinit(sc); @@ -2437,7 +2437,7 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mpr_command *cm) if (cm->cm_flags & MPR_CM_FLAGS_ON_RECOVERY) { TAILQ_REMOVE(&cm->cm_targ->timedout_commands, cm, cm_recovery); KASSERT(cm->cm_state == MPR_CM_STATE_BUSY, - ("Not busy for CM_FLAGS_TIMEDOUT: %d\n", cm->cm_state)); + ("Not busy for CM_FLAGS_TIMEDOUT: %u\n", cm->cm_state)); cm->cm_flags &= ~MPR_CM_FLAGS_ON_RECOVERY; if (cm->cm_reply != NULL) mprsas_log_command(cm, MPR_RECOVERY, diff --git a/sys/dev/mpr/mpr_sas_lsi.c b/sys/dev/mpr/mpr_sas_lsi.c index 3d698cc4d431..0800fd0385a7 100644 --- a/sys/dev/mpr/mpr_sas_lsi.c +++ b/sys/dev/mpr/mpr_sas_lsi.c @@ -125,6 +125,7 @@ static int mprsas_add_pcie_device(struct mpr_softc *sc, u16 handle, static int mprsas_get_sata_identify(struct mpr_softc *sc, u16 handle, Mpi2SataPassthroughReply_t *mpi_reply, char *id_buffer, int sz, u32 devinfo); +static void mprsas_ata_id_complete(struct mpr_softc *, struct mpr_command *); static void mprsas_ata_id_timeout(struct mpr_softc *, struct mpr_command *); int mprsas_get_sas_address_for_sata_disk(struct mpr_softc *sc, u64 *sas_address, u16 handle, u32 device_info, u8 *is_SATA_SSD); @@ -1005,7 +1006,8 @@ mprsas_add_device(struct mpr_softc *sc, u16 handle, u8 linkrate) * An Abort Task TM should be used instead of a Target Reset, but that * would be much more difficult because targets have not been fully * discovered yet, and LUN's haven't been setup. So, just reset the - * target instead of the LUN. + * target instead of the LUN. The commands should complete once + * the target has been reset. */ for (i = 1; i < sc->num_reqs; i++) { cm = &sc->commands[i]; @@ -1033,16 +1035,6 @@ mprsas_add_device(struct mpr_softc *sc, u16 handle, u8 linkrate) } } out: - /* - * Free the commands that may not have been freed from the SATA ID call - */ - for (i = 1; i < sc->num_reqs; i++) { - cm = &sc->commands[i]; - if (cm->cm_flags & MPR_CM_FLAGS_SATA_ID_TIMEOUT) { - free(cm->cm_data, M_MPR); - mpr_free_command(sc, cm); - } - } mprsas_startup_decrement(sassc); return (error); } @@ -1218,8 +1210,8 @@ mprsas_get_sata_identify(struct mpr_softc *sc, u16 handle, out: /* * If the SATA_ID_TIMEOUT flag has been set for this command, don't free - * it. The command and buffer will be freed after sending an Abort - * Task TM. + * it. The command and buffer will be freed after we send a Target + * Reset TM and the command comes back from the controller. */ if ((cm->cm_flags & MPR_CM_FLAGS_SATA_ID_TIMEOUT) == 0) { mpr_free_command(sc, cm); @@ -1228,6 +1220,22 @@ out: return (error); } +/* + * This is completion handler to make sure that commands and allocated + * buffers get freed when timed out SATA ID commands finally complete after + * we've reset the target. In the normal case, we wait for the command to + * complete. + */ +static void +mprsas_ata_id_complete(struct mpr_softc *sc, struct mpr_command *cm) +{ + mpr_dprint(sc, MPR_INFO, "%s ATA ID completed late cm %p sc %p\n", + __func__, cm, sc); + + free(cm->cm_data, M_MPR); + mpr_free_command(sc, cm); +} + static void mprsas_ata_id_timeout(struct mpr_softc *sc, struct mpr_command *cm) { @@ -1242,7 +1250,12 @@ mprsas_ata_id_timeout(struct mpr_softc *sc, struct mpr_command *cm) * this command has timed out, it's no longer in the queue. */ cm->cm_flags |= MPR_CM_FLAGS_SATA_ID_TIMEOUT; - cm->cm_state = MPR_CM_STATE_BUSY; + + /* + * Since we will no longer be waiting for the command to complete, + * set a completion handler to make sure we free all resources. + */ + cm->cm_complete = mprsas_ata_id_complete; } static int diff --git a/sys/dev/mpr/mprvar.h b/sys/dev/mpr/mprvar.h index 5abcdd5d4299..524c93861b70 100644 --- a/sys/dev/mpr/mprvar.h +++ b/sys/dev/mpr/mprvar.h @@ -367,6 +367,7 @@ struct mpr_softc { u_int enable_ssu; int spinup_wait_time; int use_phynum; + int dump_reqs_alltypes; uint64_t chain_alloc_fail; uint64_t prp_page_alloc_fail; struct sysctl_ctx_list sysctl_ctx; @@ -617,7 +618,8 @@ mpr_free_command(struct mpr_softc *sc, struct mpr_command *cm) struct mpr_chain *chain, *chain_temp; struct mpr_prp_page *prp_page, *prp_page_temp; - KASSERT(cm->cm_state == MPR_CM_STATE_BUSY, ("state not busy\n")); + KASSERT(cm->cm_state == MPR_CM_STATE_BUSY, + ("state not busy, state = %u\n", cm->cm_state)); if (cm->cm_reply != NULL) mpr_free_reply(sc, cm->cm_reply_data); @@ -658,7 +660,7 @@ mpr_alloc_command(struct mpr_softc *sc) return (NULL); KASSERT(cm->cm_state == MPR_CM_STATE_FREE, - ("mpr: Allocating busy command\n")); + ("mpr: Allocating busy command, state = %u\n", cm->cm_state)); TAILQ_REMOVE(&sc->req_list, cm, cm_link); cm->cm_state = MPR_CM_STATE_BUSY; @@ -671,7 +673,8 @@ mpr_free_high_priority_command(struct mpr_softc *sc, struct mpr_command *cm) { struct mpr_chain *chain, *chain_temp; - KASSERT(cm->cm_state == MPR_CM_STATE_BUSY, ("state not busy\n")); + KASSERT(cm->cm_state == MPR_CM_STATE_BUSY, + ("state not busy, state = %u\n", cm->cm_state)); if (cm->cm_reply != NULL) mpr_free_reply(sc, cm->cm_reply_data); @@ -700,7 +703,7 @@ mpr_alloc_high_priority_command(struct mpr_softc *sc) return (NULL); KASSERT(cm->cm_state == MPR_CM_STATE_FREE, - ("mpr: Allocating busy command\n")); + ("mpr: Allocating busy command, state = %u\n", cm->cm_state)); TAILQ_REMOVE(&sc->high_priority_req_list, cm, cm_link); cm->cm_state = MPR_CM_STATE_BUSY; diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index 935b20a1bc5a..3adb16416fa9 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -1112,7 +1112,8 @@ mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm) rd.u.high = cm->cm_desc.Words.High; rd.word = htole64(rd.word); - KASSERT(cm->cm_state == MPS_CM_STATE_BUSY, ("command not busy\n")); + KASSERT(cm->cm_state == MPS_CM_STATE_BUSY, + ("command not busy, state = %u\n", cm->cm_state)); cm->cm_state = MPS_CM_STATE_INQUEUE; /* TODO-We may need to make below regwrite atomic */ @@ -1774,6 +1775,11 @@ mps_setup_sysctl(struct mps_softc *sc) CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE, sc, 0, mps_dump_reqs, "I", "Dump Active Requests"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "dump_reqs_alltypes", CTLFLAG_RW, + &sc->dump_reqs_alltypes, 0, + "dump all request types not just inqueue"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "use_phy_num", CTLFLAG_RD, &sc->use_phynum, 0, "Use the phy number for enumeration"); @@ -1947,7 +1953,7 @@ mps_dump_reqs(SYSCTL_HANDLER_ARGS) /* Best effort, no locking */ for (i = smid; i < numreqs; i++) { cm = &sc->commands[i]; - if (cm->cm_state != state) + if ((sc->dump_reqs_alltypes == 0) && (cm->cm_state != state)) continue; hdr.smid = i; hdr.state = cm->cm_state; @@ -2206,6 +2212,9 @@ mps_complete_command(struct mps_softc *sc, struct mps_command *cm) return; } + KASSERT(cm->cm_state == MPS_CM_STATE_INQUEUE, + ("command not inqueue, state = %u\n", cm->cm_state)); + cm->cm_state = MPS_CM_STATE_BUSY; if (cm->cm_flags & MPS_CM_FLAGS_POLLED) cm->cm_flags |= MPS_CM_FLAGS_COMPLETE; @@ -2382,9 +2391,6 @@ mps_intr_locked(void *data) switch (flags) { case MPI2_RPY_DESCRIPT_FLAGS_SCSI_IO_SUCCESS: cm = &sc->commands[le16toh(desc->SCSIIOSuccess.SMID)]; - KASSERT(cm->cm_state == MPS_CM_STATE_INQUEUE, - ("command not inqueue\n")); - cm->cm_state = MPS_CM_STATE_BUSY; cm->cm_reply = NULL; break; case MPI2_RPY_DESCRIPT_FLAGS_ADDRESS_REPLY: @@ -2460,7 +2466,6 @@ mps_intr_locked(void *data) cm = &sc->commands[ le16toh(desc->AddressReply.SMID)]; if (cm->cm_state == MPS_CM_STATE_INQUEUE) { - cm->cm_state = MPS_CM_STATE_BUSY; cm->cm_reply = reply; cm->cm_reply_data = le32toh( desc->AddressReply.ReplyFrameAddress); diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index 97160a40ce08..3124384b6cbb 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -1170,7 +1170,7 @@ mpssas_tm_timeout(void *data) "task mgmt %p timed out\n", tm); KASSERT(tm->cm_state == MPS_CM_STATE_INQUEUE, - ("command not inqueue\n")); + ("command not inqueue, state = %u\n", tm->cm_state)); tm->cm_state = MPS_CM_STATE_BUSY; mps_reinit(sc); @@ -2015,7 +2015,7 @@ mpssas_scsiio_complete(struct mps_softc *sc, struct mps_command *cm) if (cm->cm_flags & MPS_CM_FLAGS_ON_RECOVERY) { TAILQ_REMOVE(&cm->cm_targ->timedout_commands, cm, cm_recovery); KASSERT(cm->cm_state == MPS_CM_STATE_BUSY, - ("Not busy for CM_FLAGS_TIMEDOUT: %d\n", cm->cm_state)); + ("Not busy for CM_FLAGS_TIMEDOUT: %u\n", cm->cm_state)); cm->cm_flags &= ~MPS_CM_FLAGS_ON_RECOVERY; if (cm->cm_reply != NULL) mpssas_log_command(cm, MPS_RECOVERY, diff --git a/sys/dev/mps/mps_sas_lsi.c b/sys/dev/mps/mps_sas_lsi.c index cc207f7f1dfb..8cfb1700c705 100644 --- a/sys/dev/mps/mps_sas_lsi.c +++ b/sys/dev/mps/mps_sas_lsi.c @@ -123,6 +123,7 @@ static int mpssas_add_device(struct mps_softc *sc, u16 handle, u8 linkrate); static int mpssas_get_sata_identify(struct mps_softc *sc, u16 handle, Mpi2SataPassthroughReply_t *mpi_reply, char *id_buffer, int sz, u32 devinfo); +static void mpssas_ata_id_complete(struct mps_softc *, struct mps_command *); static void mpssas_ata_id_timeout(struct mps_softc *, struct mps_command *); int mpssas_get_sas_address_for_sata_disk(struct mps_softc *sc, u64 *sas_address, u16 handle, u32 device_info, u8 *is_SATA_SSD); @@ -780,7 +781,8 @@ mpssas_add_device(struct mps_softc *sc, u16 handle, u8 linkrate){ * An Abort Task TM should be used instead of a Target Reset, but that * would be much more difficult because targets have not been fully * discovered yet, and LUN's haven't been setup. So, just reset the - * target instead of the LUN. + * target instead of the LUN. The commands should complete once the + * target has been reset. */ for (i = 1; i < sc->num_reqs; i++) { cm = &sc->commands[i]; @@ -808,16 +810,6 @@ mpssas_add_device(struct mps_softc *sc, u16 handle, u8 linkrate){ } } out: - /* - * Free the commands that may not have been freed from the SATA ID call - */ - for (i = 1; i < sc->num_reqs; i++) { - cm = &sc->commands[i]; - if (cm->cm_flags & MPS_CM_FLAGS_SATA_ID_TIMEOUT) { - free(cm->cm_data, M_MPT2); - mps_free_command(sc, cm); - } - } mpssas_startup_decrement(sassc); return (error); } @@ -993,8 +985,8 @@ mpssas_get_sata_identify(struct mps_softc *sc, u16 handle, out: /* * If the SATA_ID_TIMEOUT flag has been set for this command, don't free - * it. The command and buffer will be freed after sending an Abort - * Task TM. + * it. The command and buffer will be freed after we send a Target + * Reset TM and the command comes back from the controller. */ if ((cm->cm_flags & MPS_CM_FLAGS_SATA_ID_TIMEOUT) == 0) { mps_free_command(sc, cm); @@ -1003,21 +995,41 @@ out: return (error); } +/* + * This is completion handler to make sure that commands and allocated + * buffers get freed when timed out SATA ID commands finally complete after + * we've reset the target. In the normal case, we wait for the command to + * complete. + */ static void -mpssas_ata_id_timeout(struct mps_softc *sc, struct mps_command *cm) +mpssas_ata_id_complete(struct mps_softc *sc, struct mps_command *cm) { + mps_dprint(sc, MPS_INFO, "%s ATA ID completed late cm %p sc %p\n", + __func__, cm, sc); + + free(cm->cm_data, M_MPT2); + mps_free_command(sc, cm); +} + +static void +mpssas_ata_id_timeout(struct mps_softc *sc, struct mps_command *cm) +{ mps_dprint(sc, MPS_INFO, "%s ATA ID command timeout cm %p sc %p\n", __func__, cm, sc); /* * The Abort Task cannot be sent from here because the driver has not * completed setting up targets. Instead, the command is flagged so - * that special handling will be used to send the abort. Now that - * this command has timed out, it's no longer in the queue. + * that special handling will be used to send a target reset. */ cm->cm_flags |= MPS_CM_FLAGS_SATA_ID_TIMEOUT; - cm->cm_state = MPS_CM_STATE_BUSY; + + /* + * Since we will no longer be waiting for the command to complete, + * set a completion handler to make sure we free all resources. + */ + cm->cm_complete = mpssas_ata_id_complete; } static int diff --git a/sys/dev/mps/mpsvar.h b/sys/dev/mps/mpsvar.h index 6e6c9fd28c2b..9cffd0f730d5 100644 --- a/sys/dev/mps/mpsvar.h +++ b/sys/dev/mps/mpsvar.h @@ -326,6 +326,7 @@ struct mps_softc { u_int enable_ssu; int spinup_wait_time; int use_phynum; + int dump_reqs_alltypes; uint64_t chain_alloc_fail; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -548,7 +549,7 @@ mps_free_command(struct mps_softc *sc, struct mps_command *cm) struct mps_chain *chain, *chain_temp; KASSERT(cm->cm_state == MPS_CM_STATE_BUSY, - ("state not busy: %d\n", cm->cm_state)); + ("state not busy: %u\n", cm->cm_state)); if (cm->cm_reply != NULL) mps_free_reply(sc, cm->cm_reply_data); @@ -584,7 +585,7 @@ mps_alloc_command(struct mps_softc *sc) return (NULL); KASSERT(cm->cm_state == MPS_CM_STATE_FREE, - ("mps: Allocating busy command: %d\n", cm->cm_state)); + ("mps: Allocating busy command: %u\n", cm->cm_state)); TAILQ_REMOVE(&sc->req_list, cm, cm_link); cm->cm_state = MPS_CM_STATE_BUSY; @@ -598,7 +599,7 @@ mps_free_high_priority_command(struct mps_softc *sc, struct mps_command *cm) struct mps_chain *chain, *chain_temp; KASSERT(cm->cm_state == MPS_CM_STATE_BUSY, - ("state not busy: %d\n", cm->cm_state)); + ("state not busy: %u\n", cm->cm_state)); if (cm->cm_reply != NULL) mps_free_reply(sc, cm->cm_reply_data); @@ -627,7 +628,7 @@ mps_alloc_high_priority_command(struct mps_softc *sc) return (NULL); KASSERT(cm->cm_state == MPS_CM_STATE_FREE, - ("mps: Allocating high priority busy command: %d\n", cm->cm_state)); + ("mps: Allocating high priority busy command: %u\n", cm->cm_state)); TAILQ_REMOVE(&sc->high_priority_req_list, cm, cm_link); cm->cm_state = MPS_CM_STATE_BUSY; From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 00:43:16 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F82D66B922; Fri, 3 Sep 2021 00:43:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0zYH115fz3vVj; Fri, 3 Sep 2021 00:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA0DD22CB1; Fri, 3 Sep 2021 00:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1830hElk077329; Fri, 3 Sep 2021 00:43:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1830hEZ6077328; Fri, 3 Sep 2021 00:43:14 GMT (envelope-from git) Date: Fri, 3 Sep 2021 00:43:14 GMT Message-Id: <202109030043.1830hEZ6077328@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: a996b55ab34c - stable/13 - mpr(4): Fix unmatched devq release. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a996b55ab34c3e2a67a9cc6bea9df1fc39af09d5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 00:43:16 -0000 The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=a996b55ab34c3e2a67a9cc6bea9df1fc39af09d5 commit a996b55ab34c3e2a67a9cc6bea9df1fc39af09d5 Author: Alexander Motin AuthorDate: 2021-08-20 18:37:55 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 00:35:27 +0000 mpr(4): Fix unmatched devq release. Before this change devq was frozen only if some command was sent to the target after reset started, but release was called always. This change freezes the devq immediately, leaving mprsas_action_scsiio() check only to cover race condition due to different lock devq use. This should also avoid unnecessary requeue of the commands, creating additional log noise and confusing some broken apps. MFC after: 2 weeks Sponsored by: iXsystems, Inc. (cherry picked from commit 9781c28c6d63cfa8438d1aa31f512a6b217a6b2b) --- sys/dev/mpr/mpr_sas.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index 7ead27cb51f9..043d24e82f44 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -237,7 +237,6 @@ mprsas_alloc_tm(struct mpr_softc *sc) void mprsas_free_tm(struct mpr_softc *sc, struct mpr_command *tm) { - int target_id = 0xFFFFFFFF; MPR_FUNCTRACE(sc); if (tm == NULL) @@ -248,13 +247,10 @@ mprsas_free_tm(struct mpr_softc *sc, struct mpr_command *tm) * free the resources used for freezing the devq. Must clear the * INRESET flag as well or scsi I/O will not work. */ - if (tm->cm_targ != NULL) { - tm->cm_targ->flags &= ~MPRSAS_TARGET_INRESET; - target_id = tm->cm_targ->tid; - } if (tm->cm_ccb) { - mpr_dprint(sc, MPR_INFO, "Unfreezing devq for target ID %d\n", - target_id); + mpr_dprint(sc, MPR_XINFO, "Unfreezing devq for target ID %d\n", + tm->cm_targ->tid); + tm->cm_targ->flags &= ~MPRSAS_TARGET_INRESET; xpt_release_devq(tm->cm_ccb->ccb_h.path, 1, TRUE); xpt_free_path(tm->cm_ccb->ccb_h.path); xpt_free_ccb(tm->cm_ccb); @@ -1923,13 +1919,11 @@ mprsas_action_scsiio(struct mprsas_softc *sassc, union ccb *ccb) } /* - * If target has a reset in progress, freeze the devq and return. The - * devq will be released when the TM reset is finished. + * If target has a reset in progress, the devq should be frozen. + * Geting here we likely hit a race, so just requeue. */ if (targ->flags & MPRSAS_TARGET_INRESET) { - ccb->ccb_h.status = CAM_BUSY | CAM_DEV_QFRZN; - mpr_dprint(sc, MPR_INFO, "%s: Freezing devq for target ID %d\n", - __func__, targ->tid); + ccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_DEV_QFRZN; xpt_freeze_devq(ccb->ccb_h.path, 1); xpt_done(ccb); return; @@ -3425,10 +3419,9 @@ mprsas_async(void *callback_arg, uint32_t code, struct cam_path *path, } /* - * Set the INRESET flag for this target so that no I/O will be sent to - * the target until the reset has completed. If an I/O request does - * happen, the devq will be frozen. The CCB holds the path which is - * used to release the devq. The devq is released and the CCB is freed + * Freeze the devq and set the INRESET flag so that no I/O will be sent to + * the target until the reset has completed. The CCB holds the path which + * is used to release the devq. The devq is released and the CCB is freed * when the TM completes. */ void @@ -3445,6 +3438,10 @@ mprsas_prepare_for_tm(struct mpr_softc *sc, struct mpr_command *tm, target->tid, lun_id) != CAM_REQ_CMP) { xpt_free_ccb(ccb); } else { + mpr_dprint(sc, MPR_XINFO, + "%s: Freezing devq for target ID %d\n", + __func__, target->tid); + xpt_freeze_devq(ccb->ccb_h.path, 1); tm->cm_ccb = ccb; tm->cm_targ = target; target->flags |= MPRSAS_TARGET_INRESET; From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 00:43:13 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1068066B91F; Fri, 3 Sep 2021 00:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0zYD5htvz3vVN; Fri, 3 Sep 2021 00:43:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A45022C6C; Fri, 3 Sep 2021 00:43:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1830hCQX077279; Fri, 3 Sep 2021 00:43:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1830hC2w077278; Fri, 3 Sep 2021 00:43:12 GMT (envelope-from git) Date: Fri, 3 Sep 2021 00:43:12 GMT Message-Id: <202109030043.1830hC2w077278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: a2784b47e481 - stable/13 - mpr/mps: Minor state machine fix MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a2784b47e481c86ec6011639158016d626828626 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 00:43:13 -0000 The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=a2784b47e481c86ec6011639158016d626828626 commit a2784b47e481c86ec6011639158016d626828626 Author: Warner Losh AuthorDate: 2021-06-03 19:46:19 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 00:34:22 +0000 mpr/mps: Minor state machine fix When a DMA chain can't be loaded, set the state to STATE_INQUEUE so that the mp[rs]_complete_command can properly fail the command. Sponsored by: Netflix (cherry picked from commit 33755dbb207878c10fd99de39dadf89fad713bc7) --- sys/dev/mpr/mpr.c | 1 + sys/dev/mps/mps.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index c43eccb7cb36..796f74c2547b 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -3703,6 +3703,7 @@ mpr_data_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) mpr_dprint(sc, MPR_INFO, "Out of chain frames, " "consider increasing hw.mpr.max_chains.\n"); cm->cm_flags |= MPR_CM_FLAGS_CHAIN_FAILED; + cm->cm_state = MPR_CM_STATE_INQUEUE; mpr_complete_command(sc, cm); return; } diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index 3adb16416fa9..b4e0142204ef 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -2978,6 +2978,7 @@ mps_data_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) mps_dprint(sc, MPS_INFO, "Out of chain frames, " "consider increasing hw.mps.max_chains.\n"); cm->cm_flags |= MPS_CM_FLAGS_CHAIN_FAILED; + cm->cm_state = MPS_CM_STATE_INQUEUE; mps_complete_command(sc, cm); return; } From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 00:43:15 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 758D466BBF4; Fri, 3 Sep 2021 00:43:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0zYG1V6hz3vdQ; Fri, 3 Sep 2021 00:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A925C22B50; Fri, 3 Sep 2021 00:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1830hDGD077303; Fri, 3 Sep 2021 00:43:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1830hDbS077302; Fri, 3 Sep 2021 00:43:13 GMT (envelope-from git) Date: Fri, 3 Sep 2021 00:43:13 GMT Message-Id: <202109030043.1830hDbS077302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 0149aaeb8f60 - stable/13 - mpr(4): Handle mprsas_alloc_tm() errors on device removal. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0149aaeb8f60d5581191c26e8293d926291b2b97 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 00:43:15 -0000 The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=0149aaeb8f60d5581191c26e8293d926291b2b97 commit 0149aaeb8f60d5581191c26e8293d926291b2b97 Author: Alexander Motin AuthorDate: 2021-08-20 13:46:51 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 00:35:27 +0000 mpr(4): Handle mprsas_alloc_tm() errors on device removal. SAS9305-16e with firmware 16.00.01.00 report HighPriorityCredit of only 8, while for comparison some other combinations I have report 100 or even 128. In case of large JBOD detach requirement to send target reset command to each target same time overflows the limit, and without adequate handling makes devices stuck in half-detached state, preventing later re-attach. To handle that in case of allocation error mark the target with new MPRSAS_TARGET_TOREMOVE flag, and retry the removal attempt next time something else free high priority command. With this patch I can successfully detach/attach 102 disk JBOD from/to the SAS9305-16e. MFC after: 2 weeks Sponsored by: iXsystems, Inc. (cherry picked from commit e3c5965c259f7029afe01612b248c3acf9f5b3e0) --- sys/dev/mpr/mpr_sas.c | 36 ++++++++++++++++++++++++++++++++---- sys/dev/mpr/mpr_sas.h | 4 ++-- sys/dev/mpr/mpr_sas_lsi.c | 1 + sys/dev/mpr/mprvar.h | 5 +++++ 4 files changed, 40 insertions(+), 6 deletions(-) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index 6d954b96e626..7ead27cb51f9 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -412,6 +412,34 @@ mprsas_remove_volume(struct mpr_softc *sc, struct mpr_command *tm) mprsas_free_tm(sc, tm); } +/* + * Retry mprsas_prepare_remove() if some previous attempt failed to allocate + * high priority command due to limit reached. + */ +void +mprsas_prepare_remove_retry(struct mprsas_softc *sassc) +{ + struct mprsas_target *target; + int i; + + if ((sassc->flags & MPRSAS_TOREMOVE) == 0) + return; + + for (i = 0; i < sassc->maxtargets; i++) { + target = &sassc->targets[i]; + if ((target->flags & MPRSAS_TARGET_TOREMOVE) == 0) + continue; + if (TAILQ_EMPTY(&sassc->sc->high_priority_req_list)) + return; + target->flags &= ~MPRSAS_TARGET_TOREMOVE; + if (target->flags & MPR_TARGET_FLAGS_VOLUME) + mprsas_prepare_volume_remove(sassc, target->handle); + else + mprsas_prepare_remove(sassc, target->handle); + } + sassc->flags &= ~MPRSAS_TOREMOVE; +} + /* * No Need to call "MPI2_SAS_OP_REMOVE_DEVICE" For Volume removal. * Otherwise Volume Delete is same as Bare Drive Removal. @@ -440,8 +468,8 @@ mprsas_prepare_volume_remove(struct mprsas_softc *sassc, uint16_t handle) cm = mprsas_alloc_tm(sc); if (cm == NULL) { - mpr_dprint(sc, MPR_ERROR, - "%s: command alloc failure\n", __func__); + targ->flags |= MPRSAS_TARGET_TOREMOVE; + sassc->flags |= MPRSAS_TOREMOVE; return; } @@ -506,8 +534,8 @@ mprsas_prepare_remove(struct mprsas_softc *sassc, uint16_t handle) tm = mprsas_alloc_tm(sc); if (tm == NULL) { - mpr_dprint(sc, MPR_ERROR, "%s: command alloc failure\n", - __func__); + targ->flags |= MPRSAS_TARGET_TOREMOVE; + sassc->flags |= MPRSAS_TOREMOVE; return; } diff --git a/sys/dev/mpr/mpr_sas.h b/sys/dev/mpr/mpr_sas.h index ea427ca8f821..4ec6be15613c 100644 --- a/sys/dev/mpr/mpr_sas.h +++ b/sys/dev/mpr/mpr_sas.h @@ -57,8 +57,7 @@ struct mprsas_target { #define MPR_TARGET_FLAGS_RAID_COMPONENT (1 << 4) #define MPR_TARGET_FLAGS_VOLUME (1 << 5) #define MPR_TARGET_IS_SATA_SSD (1 << 6) -#define MPRSAS_TARGET_INRECOVERY (MPRSAS_TARGET_INABORT | \ - MPRSAS_TARGET_INRESET | MPRSAS_TARGET_INCHIPRESET) +#define MPRSAS_TARGET_TOREMOVE (1 << 7) uint16_t tid; SLIST_HEAD(, mprsas_lun) luns; @@ -95,6 +94,7 @@ struct mprsas_softc { #define MPRSAS_DISCOVERY_TIMEOUT_PENDING (1 << 2) #define MPRSAS_QUEUE_FROZEN (1 << 3) #define MPRSAS_SHUTDOWN (1 << 4) +#define MPRSAS_TOREMOVE (1 << 5) u_int maxtargets; struct mprsas_target *targets; struct cam_devq *devq; diff --git a/sys/dev/mpr/mpr_sas_lsi.c b/sys/dev/mpr/mpr_sas_lsi.c index 0800fd0385a7..025395f6eedd 100644 --- a/sys/dev/mpr/mpr_sas_lsi.c +++ b/sys/dev/mpr/mpr_sas_lsi.c @@ -1428,6 +1428,7 @@ mprsas_volume_add(struct mpr_softc *sc, u16 handle) targ->tid = id; targ->handle = handle; targ->devname = wwid; + targ->flags = MPR_TARGET_FLAGS_VOLUME; TAILQ_INIT(&targ->commands); TAILQ_INIT(&targ->timedout_commands); while (!SLIST_EMPTY(&targ->luns)) { diff --git a/sys/dev/mpr/mprvar.h b/sys/dev/mpr/mprvar.h index 524c93861b70..93386f1f58d0 100644 --- a/sys/dev/mpr/mprvar.h +++ b/sys/dev/mpr/mprvar.h @@ -668,6 +668,8 @@ mpr_alloc_command(struct mpr_softc *sc) return (cm); } +void mprsas_prepare_remove_retry(struct mprsas_softc *sassc); + static __inline void mpr_free_high_priority_command(struct mpr_softc *sc, struct mpr_command *cm) { @@ -691,6 +693,9 @@ mpr_free_high_priority_command(struct mpr_softc *sc, struct mpr_command *cm) mpr_free_chain(sc, chain); } TAILQ_INSERT_TAIL(&sc->high_priority_req_list, cm, cm_link); + + if (sc->sassc) + mprsas_prepare_remove_retry(sc->sassc); } static __inline struct mpr_command * From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 01:08:55 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F11666BEBD; Fri, 3 Sep 2021 01:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H106v1W9Zz4ZTV; Fri, 3 Sep 2021 01:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B766233A9; Fri, 3 Sep 2021 01:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18318toh004628; Fri, 3 Sep 2021 01:08:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18318taN004627; Fri, 3 Sep 2021 01:08:55 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:08:55 GMT Message-Id: <202109030108.18318taN004627@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8a51116a8660 - stable/13 - Restore the definition of EFI_STAGING_SIZE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8a51116a86606f12c4ca447b23a1f94d36335d7e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:08:55 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8a51116a86606f12c4ca447b23a1f94d36335d7e commit 8a51116a86606f12c4ca447b23a1f94d36335d7e Author: Konstantin Belousov AuthorDate: 2021-08-26 19:32:42 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-03 01:08:35 +0000 Restore the definition of EFI_STAGING_SIZE (cherry picked from commit b850806921a735f3f307bc4b2634c7e9008f5a9c) --- stand/efi/loader/copy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c index b8ed4c8e027e..3f3d46346b7c 100644 --- a/stand/efi/loader/copy.c +++ b/stand/efi/loader/copy.c @@ -180,9 +180,9 @@ out: #ifndef EFI_STAGING_SIZE #if defined(__arm__) -#define EFI_STAGING_SIZE M(32) +#define EFI_STAGING_SIZE 32 #else -#define EFI_STAGING_SIZE M(64) +#define EFI_STAGING_SIZE 64 #endif #endif @@ -315,7 +315,7 @@ efi_copy_init(void) EFI_STATUS status; unsigned long nr_pages; - nr_pages = EFI_SIZE_TO_PAGES((EFI_STAGING_SIZE)); + nr_pages = EFI_SIZE_TO_PAGES(M(1) * (EFI_STAGING_SIZE)); #if defined(__i386__) || defined(__amd64__) /* From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 01:08:56 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6636F66BFFE; Fri, 3 Sep 2021 01:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H106w2V88z4ZTW; Fri, 3 Sep 2021 01:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D62E23505; Fri, 3 Sep 2021 01:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18318urh004652; Fri, 3 Sep 2021 01:08:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18318uVY004651; Fri, 3 Sep 2021 01:08:56 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:08:56 GMT Message-Id: <202109030108.18318uVY004651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0d693b8bbc5b - stable/13 - efi loader: disallow user to configure staging area size less than default MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0d693b8bbc5ba931d0f75541e2c7627f6d62dbb7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:08:56 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0d693b8bbc5ba931d0f75541e2c7627f6d62dbb7 commit 0d693b8bbc5ba931d0f75541e2c7627f6d62dbb7 Author: Konstantin Belousov AuthorDate: 2021-08-26 21:46:48 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-03 01:08:35 +0000 efi loader: disallow user to configure staging area size less than default (cherry picked from commit b54eec8366605d9c2303277cf2ab4b605289910a) --- stand/efi/loader/copy.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c index 3f3d46346b7c..cd1f9f00c88a 100644 --- a/stand/efi/loader/copy.c +++ b/stand/efi/loader/copy.c @@ -178,12 +178,13 @@ out: } #endif /* __i386__ || __amd64__ */ -#ifndef EFI_STAGING_SIZE #if defined(__arm__) -#define EFI_STAGING_SIZE 32 +#define DEFAULT_EFI_STAGING_SIZE 32 #else -#define EFI_STAGING_SIZE 64 +#define DEFAULT_EFI_STAGING_SIZE 64 #endif +#ifndef EFI_STAGING_SIZE +#define EFI_STAGING_SIZE DEFAULT_EFI_STAGING_SIZE #endif #if defined(__aarch64__) || defined(__amd64__) || defined(__arm__) || \ @@ -314,8 +315,12 @@ efi_copy_init(void) { EFI_STATUS status; unsigned long nr_pages; + vm_offset_t ess; - nr_pages = EFI_SIZE_TO_PAGES(M(1) * (EFI_STAGING_SIZE)); + ess = EFI_STAGING_SIZE; + if (ess < DEFAULT_EFI_STAGING_SIZE) + ess = DEFAULT_EFI_STAGING_SIZE; + nr_pages = EFI_SIZE_TO_PAGES(M(1) * ess); #if defined(__i386__) || defined(__amd64__) /* From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 01:08:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9B6966C200; Fri, 3 Sep 2021 01:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H106x3z6vz4Z7G; Fri, 3 Sep 2021 01:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65A92230EE; Fri, 3 Sep 2021 01:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18318vdG004676; Fri, 3 Sep 2021 01:08:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18318vPh004675; Fri, 3 Sep 2021 01:08:57 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:08:57 GMT Message-Id: <202109030108.18318vPh004675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 048a9b2d377a - stable/13 - amd64: correctly calculate KVA of the preloaded ucode blob MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 048a9b2d377ae92d8fda7885971ee4b5f0cbd2c5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:08:58 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=048a9b2d377ae92d8fda7885971ee4b5f0cbd2c5 commit 048a9b2d377ae92d8fda7885971ee4b5f0cbd2c5 Author: Konstantin Belousov AuthorDate: 2021-08-30 20:25:31 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-03 01:08:35 +0000 amd64: correctly calculate KVA of the preloaded ucode blob (cherry picked from commit 9939af1a161e5c219ece5e7c5bc02dcb9a9960f7) --- sys/amd64/amd64/machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 2c8711fd3d2a..0c8234c9e917 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1650,7 +1650,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) atomic_store_short((u_short *)0x472, 0x1234); } - physfree += ucode_load_bsp(physfree + KERNBASE); + physfree += ucode_load_bsp(physfree - kernphys + KERNSTART); physfree = roundup2(physfree, PAGE_SIZE); identify_cpu1(); From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 01:08:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4C5C66C203; Fri, 3 Sep 2021 01:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H106y4skqz4ZTl; Fri, 3 Sep 2021 01:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 868FA230EF; Fri, 3 Sep 2021 01:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18318waK004702; Fri, 3 Sep 2021 01:08:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18318w22004701; Fri, 3 Sep 2021 01:08:58 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:08:58 GMT Message-Id: <202109030108.18318w22004701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d5d99c1c0725 - stable/13 - ldd: Remove non-functional -v option MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d5d99c1c072534391da976226f719e07f0ec3205 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:08:59 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d5d99c1c072534391da976226f719e07f0ec3205 commit d5d99c1c072534391da976226f719e07f0ec3205 Author: Konstantin Belousov AuthorDate: 2021-08-28 17:28:54 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-03 01:08:35 +0000 ldd: Remove non-functional -v option (cherry picked from commit 17fc43bc01011ed05f614f266350d37f7020a59d) --- usr.bin/ldd/ldd.1 | 18 +----------------- usr.bin/ldd/ldd.c | 20 ++++++-------------- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/usr.bin/ldd/ldd.1 b/usr.bin/ldd/ldd.1 index 2a90d5ac537d..d263eabcf4ff 100644 --- a/usr.bin/ldd/ldd.1 +++ b/usr.bin/ldd/ldd.1 @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.Dd October 23, 2018 +.Dd August 28, 2021 .Dt LDD 1 .Os .Sh NAME @@ -9,7 +9,6 @@ .Sh SYNOPSIS .Nm .Op Fl a -.Op Fl v .Op Fl f Ar format .Ar program ... .Sh DESCRIPTION @@ -47,16 +46,6 @@ The .Fl a option displays the list of all objects that are needed by each loaded object. -This option does not work with -.Xr a.out 5 -binaries. -.Pp -The -.Fl v -option displays a verbose listing of the dynamic linking headers -encoded in the executable. -See the source code and include -files for the definitive meaning of all the fields. .Sh IMPLEMENTATION NOTES .Nm lists the dependencies of an executable by setting @@ -82,8 +71,3 @@ A .Nm utility first appeared in SunOS 4.0, it appeared in its current form in .Fx 1.1 . -.Pp -The -.Fl v -support is based on code written by -.An John Polstra Aq Mt jdp@polstra.com diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index f948b7312863..3353345d549d 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -83,7 +83,7 @@ static void usage(void); #define _PATH_LDD32 "/usr/bin/ldd32" static int -execldd32(char *file, char *fmt1, char *fmt2, int aflag, int vflag) +execldd32(char *file, char *fmt1, char *fmt2, int aflag) { char *argv[9]; int i, rval, status; @@ -94,8 +94,6 @@ execldd32(char *file, char *fmt1, char *fmt2, int aflag, int vflag) argv[i++] = strdup(_PATH_LDD32); if (aflag) argv[i++] = strdup("-a"); - if (vflag) - argv[i++] = strdup("-v"); if (fmt1 != NULL) { argv[i++] = strdup("-f"); argv[i++] = strdup(fmt1); @@ -136,12 +134,12 @@ int main(int argc, char *argv[]) { char *fmt1, *fmt2; - int rval, c, aflag, vflag; + int rval, c, aflag; - aflag = vflag = 0; + aflag = 0; fmt1 = fmt2 = NULL; - while ((c = getopt(argc, argv, "af:v")) != -1) { + while ((c = getopt(argc, argv, "af:")) != -1) { switch (c) { case 'a': aflag++; @@ -154,9 +152,6 @@ main(int argc, char *argv[]) } else fmt1 = optarg; break; - case 'v': - vflag++; - break; default: usage(); /* NOTREACHED */ @@ -165,9 +160,6 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - if (vflag && fmt1 != NULL) - errx(1, "-v may not be used with -f"); - if (argc <= 0) { usage(); /* NOTREACHED */ @@ -194,7 +186,7 @@ main(int argc, char *argv[]) break; #if __ELF_WORD_SIZE > 32 && defined(ELF32_SUPPORTED) case TYPE_ELF32: - rval |= execldd32(*argv, fmt1, fmt2, aflag, vflag); + rval |= execldd32(*argv, fmt1, fmt2, aflag); continue; #endif case TYPE_UNKNOWN: @@ -259,7 +251,7 @@ static void usage(void) { - fprintf(stderr, "usage: ldd [-a] [-v] [-f format] program ...\n"); + fprintf(stderr, "usage: ldd [-a] [-f format] program ...\n"); exit(1); } From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 01:09:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 24A2766BDB1; Fri, 3 Sep 2021 01:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H106z6bQDz4Z7R; Fri, 3 Sep 2021 01:08:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9762522BD9; Fri, 3 Sep 2021 01:08:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18318xMm004731; Fri, 3 Sep 2021 01:08:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18318xb0004730; Fri, 3 Sep 2021 01:08:59 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:08:59 GMT Message-Id: <202109030108.18318xb0004730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3abc8ac68a98 - stable/13 - msdosfs: unstaticise msdosfs_lookup_ MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3abc8ac68a98bc370d07b60b83f6b5f53ba029a4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:09:00 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3abc8ac68a98bc370d07b60b83f6b5f53ba029a4 commit 3abc8ac68a98bc370d07b60b83f6b5f53ba029a4 Author: Konstantin Belousov AuthorDate: 2021-08-01 17:11:40 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-03 01:08:35 +0000 msdosfs: unstaticise msdosfs_lookup_ (cherry picked from commit 92d4e088274c7ada268645588503f22f390c5fb8) --- sys/fs/msdosfs/denode.h | 2 ++ sys/fs/msdosfs/msdosfs_lookup.c | 11 ++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index b198a6a39d81..e179bcfa7dd5 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -266,6 +266,8 @@ extern struct vop_vector msdosfs_vnodeops; int msdosfs_lookup(struct vop_cachedlookup_args *); int msdosfs_inactive(struct vop_inactive_args *); int msdosfs_reclaim(struct vop_reclaim_args *); +int msdosfs_lookup_ino(struct vnode *vdp, struct vnode **vpp, + struct componentname *cnp, uint64_t *inum); #endif /* diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c index a32b0372243c..bdfff7bf3206 100644 --- a/sys/fs/msdosfs/msdosfs_lookup.c +++ b/sys/fs/msdosfs/msdosfs_lookup.c @@ -63,14 +63,11 @@ #include #include -static int msdosfs_lookup_(struct vnode *vdp, struct vnode **vpp, - struct componentname *cnp, uint64_t *inum); - int msdosfs_lookup(struct vop_cachedlookup_args *ap) { - return (msdosfs_lookup_(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); + return (msdosfs_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); } struct deget_dotdot { @@ -110,8 +107,8 @@ msdosfs_deget_dotdot(struct mount *mp, void *arg, int lkflags, * out to disk. This way disk blocks containing directory entries and in * memory denode's will be in synch. */ -static int -msdosfs_lookup_(struct vnode *vdp, struct vnode **vpp, +int +msdosfs_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, uint64_t *dd_inum) { struct mbnambuf nb; @@ -558,7 +555,7 @@ foundroot: * Recheck that ".." still points to the inode we * looked up before pdp lock was dropped. */ - error = msdosfs_lookup_(pdp, NULL, cnp, &inode1); + error = msdosfs_lookup_ino(pdp, NULL, cnp, &inode1); if (error) { vput(*vpp); *vpp = NULL; From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 01:09:01 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2DF2366BDB7; Fri, 3 Sep 2021 01:09:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H10706VPnz4ZTt; Fri, 3 Sep 2021 01:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8F162348C; Fri, 3 Sep 2021 01:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183190V0004755; Fri, 3 Sep 2021 01:09:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183190g5004754; Fri, 3 Sep 2021 01:09:00 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:09:00 GMT Message-Id: <202109030109.183190g5004754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 7b81dd6f3d6d - stable/13 - msdosfs deget(): add locking flags argument MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7b81dd6f3d6df9ad40b46cdbc8b0a46e911a326d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:09:01 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7b81dd6f3d6df9ad40b46cdbc8b0a46e911a326d commit 7b81dd6f3d6df9ad40b46cdbc8b0a46e911a326d Author: Konstantin Belousov AuthorDate: 2021-08-01 17:53:12 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-03 01:08:35 +0000 msdosfs deget(): add locking flags argument (cherry picked from commit ae7e8a02e6e93455e026036132c4d053b2c12ad9) --- sys/fs/msdosfs/denode.h | 2 +- sys/fs/msdosfs/msdosfs_denode.c | 13 ++++++++----- sys/fs/msdosfs/msdosfs_lookup.c | 15 +++++++++------ sys/fs/msdosfs/msdosfs_vfsops.c | 5 +++-- usr.sbin/makefs/msdos/msdosfs_denode.c | 2 +- usr.sbin/makefs/msdos/msdosfs_lookup.c | 2 +- usr.sbin/makefs/msdos/msdosfs_vfsops.c | 2 +- 7 files changed, 24 insertions(+), 17 deletions(-) diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index e179bcfa7dd5..fae05749bede 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -273,7 +273,7 @@ int msdosfs_lookup_ino(struct vnode *vdp, struct vnode **vpp, /* * Internal service routine prototypes. */ -int deget(struct msdosfsmount *, u_long, u_long, struct denode **); +int deget(struct msdosfsmount *, u_long, u_long, int, struct denode **); int uniqdosname(struct denode *, struct componentname *, u_char *); int readep(struct msdosfsmount *pmp, u_long dirclu, u_long dirofs, struct buf **bpp, struct direntry **epp); diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 158b3cdda4da..9573a85490f0 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -92,11 +92,12 @@ de_vncmpf(struct vnode *vp, void *arg) * diroffset is relative to the beginning of the root directory, * otherwise it is cluster relative. * diroffset - offset past begin of cluster of denode we want + * lkflags - locking flags (LK_NOWAIT) * depp - returns the address of the gotten denode. */ int deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, - struct denode **depp) + int lkflags, struct denode **depp) { int error; uint64_t inode; @@ -107,9 +108,11 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, struct buf *bp; #ifdef MSDOSFS_DEBUG - printf("deget(pmp %p, dirclust %lu, diroffset %lx, depp %p)\n", - pmp, dirclust, diroffset, depp); + printf("deget(pmp %p, dirclust %lu, diroffset %lx, flags %#x, " + "depp %p)\n", + pmp, dirclust, diroffset, flags, depp); #endif + MPASS((lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE); /* * On FAT32 filesystems, root is a (more or less) normal @@ -133,7 +136,7 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, */ inode = (uint64_t)pmp->pm_bpcluster * dirclust + diroffset; - error = vfs_hash_get(mntp, inode, LK_EXCLUSIVE, curthread, &nvp, + error = vfs_hash_get(mntp, inode, lkflags, curthread, &nvp, de_vncmpf, &inode); if (error) return (error); @@ -170,7 +173,7 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, *depp = NULL; return (error); } - error = vfs_hash_insert(nvp, inode, LK_EXCLUSIVE, curthread, &xvp, + error = vfs_hash_insert(nvp, inode, lkflags, curthread, &xvp, de_vncmpf, &inode); if (error) { *depp = NULL; diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c index bdfff7bf3206..d47f2969904b 100644 --- a/sys/fs/msdosfs/msdosfs_lookup.c +++ b/sys/fs/msdosfs/msdosfs_lookup.c @@ -86,7 +86,8 @@ msdosfs_deget_dotdot(struct mount *mp, void *arg, int lkflags, pmp = VFSTOMSDOSFS(mp); dd_arg = arg; - error = deget(pmp, dd_arg->cluster, dd_arg->blkoff, &rdp); + error = deget(pmp, dd_arg->cluster, dd_arg->blkoff, + LK_EXCLUSIVE, &rdp); if (error == 0) *rvp = DETOV(rdp); return (error); @@ -495,7 +496,7 @@ foundroot: *vpp = vdp; return (0); } - error = deget(pmp, cluster, blkoff, &tdp); + error = deget(pmp, cluster, blkoff, LK_EXCLUSIVE, &tdp); if (error) return (error); *vpp = DETOV(tdp); @@ -523,7 +524,8 @@ foundroot: if (dp->de_StartCluster == scn && isadir) return (EISDIR); - if ((error = deget(pmp, cluster, blkoff, &tdp)) != 0) + if ((error = deget(pmp, cluster, blkoff, LK_EXCLUSIVE, + &tdp)) != 0) return (error); *vpp = DETOV(tdp); cnp->cn_flags |= SAVENAME; @@ -569,7 +571,8 @@ foundroot: VREF(vdp); /* we want ourself, ie "." */ *vpp = vdp; } else { - if ((error = deget(pmp, cluster, blkoff, &tdp)) != 0) + if ((error = deget(pmp, cluster, blkoff, LK_EXCLUSIVE, + &tdp)) != 0) return (error); *vpp = DETOV(tdp); } @@ -708,7 +711,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, else diroffset = 0; } - return deget(pmp, dirclust, diroffset, depp); + return (deget(pmp, dirclust, diroffset, LK_EXCLUSIVE, depp)); } return 0; @@ -862,7 +865,7 @@ doscheckpath(struct denode *source, struct denode *target) brelse(bp); bp = NULL; /* NOTE: deget() clears dep on error */ - if ((error = deget(pmp, scn, 0, &dep)) != 0) + if ((error = deget(pmp, scn, 0, LK_EXCLUSIVE, &dep)) != 0) break; } out:; diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 187463cc7f4d..68c8a93a18af 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -847,7 +847,7 @@ msdosfs_root(struct mount *mp, int flags, struct vnode **vpp) #ifdef MSDOSFS_DEBUG printf("msdosfs_root(); mp %p, pmp %p\n", mp, pmp); #endif - error = deget(pmp, MSDOSFSROOT, MSDOSFSROOT_OFS, &ndep); + error = deget(pmp, MSDOSFSROOT, MSDOSFSROOT_OFS, LK_EXCLUSIVE, &ndep); if (error) return (error); *vpp = DETOV(ndep); @@ -988,7 +988,8 @@ msdosfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) struct denode *dep; int error; - error = deget(pmp, defhp->defid_dirclust, defhp->defid_dirofs, &dep); + error = deget(pmp, defhp->defid_dirclust, defhp->defid_dirofs, + LK_EXCLUSIVE, &dep); if (error) { *vpp = NULLVP; return (error); diff --git a/usr.sbin/makefs/msdos/msdosfs_denode.c b/usr.sbin/makefs/msdos/msdosfs_denode.c index 283ef2e83e0b..7d37c7df3a3d 100644 --- a/usr.sbin/makefs/msdos/msdosfs_denode.c +++ b/usr.sbin/makefs/msdos/msdosfs_denode.c @@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$"); */ int deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, - struct denode **depp) + int lkflags __unused, struct denode **depp) { int error; uint64_t inode; diff --git a/usr.sbin/makefs/msdos/msdosfs_lookup.c b/usr.sbin/makefs/msdos/msdosfs_lookup.c index 27ce216a488f..dd6acb7ee37c 100644 --- a/usr.sbin/makefs/msdos/msdosfs_lookup.c +++ b/usr.sbin/makefs/msdos/msdosfs_lookup.c @@ -188,7 +188,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, else diroffset = 0; } - return deget(pmp, dirclust, diroffset, depp); + return deget(pmp, dirclust, diroffset, 0, depp); } return 0; diff --git a/usr.sbin/makefs/msdos/msdosfs_vfsops.c b/usr.sbin/makefs/msdos/msdosfs_vfsops.c index 07fc91cccd4a..4a5c658b7949 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vfsops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vfsops.c @@ -353,7 +353,7 @@ msdosfs_root(struct msdosfsmount *pmp, struct vnode *vp) { int error; *vp = *pmp->pm_devvp; - if ((error = deget(pmp, MSDOSFSROOT, MSDOSFSROOT_OFS, &ndep)) != 0) { + if ((error = deget(pmp, MSDOSFSROOT, MSDOSFSROOT_OFS, 0, &ndep)) != 0) { errno = error; return -1; } From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 01:09:02 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5176766C301; Fri, 3 Sep 2021 01:09:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H10720jqfz4ZMm; Fri, 3 Sep 2021 01:09:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E93F122BDA; Fri, 3 Sep 2021 01:09:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18319108004779; Fri, 3 Sep 2021 01:09:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183191ZS004778; Fri, 3 Sep 2021 01:09:01 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:09:01 GMT Message-Id: <202109030109.183191ZS004778@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2c9cbc2d45b9 - stable/13 - msdosfs: fix rename MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2c9cbc2d45b94f3f3cc1515fe5481eabfe18b31f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:09:02 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2c9cbc2d45b94f3f3cc1515fe5481eabfe18b31f commit 2c9cbc2d45b94f3f3cc1515fe5481eabfe18b31f Author: Konstantin Belousov AuthorDate: 2021-08-01 17:46:59 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-03 01:08:35 +0000 msdosfs: fix rename (cherry picked from commit 95d42526e92cb2a9842d71d3c585aabf32da7534) --- sys/fs/msdosfs/denode.h | 5 +- sys/fs/msdosfs/msdosfs_denode.c | 1 + sys/fs/msdosfs/msdosfs_lookup.c | 79 ++++---- sys/fs/msdosfs/msdosfs_vnops.c | 430 +++++++++++++++++++++------------------- 4 files changed, 274 insertions(+), 241 deletions(-) diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index fae05749bede..03e3fa8577ad 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -267,7 +267,7 @@ int msdosfs_lookup(struct vop_cachedlookup_args *); int msdosfs_inactive(struct vop_inactive_args *); int msdosfs_reclaim(struct vop_reclaim_args *); int msdosfs_lookup_ino(struct vnode *vdp, struct vnode **vpp, - struct componentname *cnp, uint64_t *inum); + struct componentname *cnp, daddr_t *scnp, u_long *blkoffp); #endif /* @@ -286,6 +286,7 @@ int createde(struct denode *dep, struct denode *ddep, struct denode **depp, stru int deupdat(struct denode *dep, int waitfor); int removede(struct denode *pdep, struct denode *dep); int detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred); -int doscheckpath( struct denode *source, struct denode *target); +int doscheckpath( struct denode *source, struct denode *target, + daddr_t *wait_scn); #endif /* _KERNEL || MAKEFS */ #endif /* !_FS_MSDOSFS_DENODE_H_ */ diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 9573a85490f0..de73579c7d16 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -166,6 +166,7 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, ldep->de_diroffset = diroffset; ldep->de_inode = inode; lockmgr(nvp->v_vnlock, LK_EXCLUSIVE, NULL); + VN_LOCK_AREC(nvp); /* for doscheckpath */ fc_purge(ldep, 0); /* init the FAT cache for this denode */ error = insmntque(nvp, mntp); if (error != 0) { diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c index d47f2969904b..2c3d02db37a0 100644 --- a/sys/fs/msdosfs/msdosfs_lookup.c +++ b/sys/fs/msdosfs/msdosfs_lookup.c @@ -67,7 +67,8 @@ int msdosfs_lookup(struct vop_cachedlookup_args *ap) { - return (msdosfs_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); + return (msdosfs_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL, + NULL)); } struct deget_dotdot { @@ -109,8 +110,8 @@ msdosfs_deget_dotdot(struct mount *mp, void *arg, int lkflags, * memory denode's will be in synch. */ int -msdosfs_lookup_ino(struct vnode *vdp, struct vnode **vpp, - struct componentname *cnp, uint64_t *dd_inum) +msdosfs_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname + *cnp, daddr_t *scnp, u_long *blkoffp) { struct mbnambuf nb; daddr_t bn; @@ -119,11 +120,11 @@ msdosfs_lookup_ino(struct vnode *vdp, struct vnode **vpp, int slotoffset = 0; int frcn; u_long cluster; - int blkoff; + u_long blkoff; int diroff; int blsize; int isadir; /* ~0 if found direntry is a directory */ - u_long scn; /* starting cluster number */ + daddr_t scn; /* starting cluster number */ struct vnode *pdp; struct denode *dp; struct denode *tdp; @@ -464,8 +465,9 @@ foundroot: if (FAT32(pmp) && scn == MSDOSFSROOT) scn = pmp->pm_rootdirblk; - if (dd_inum != NULL) { - *dd_inum = (uint64_t)pmp->pm_bpcluster * scn + blkoff; + if (scnp != NULL) { + *scnp = cluster; + *blkoffp = blkoff; return (0); } @@ -557,12 +559,15 @@ foundroot: * Recheck that ".." still points to the inode we * looked up before pdp lock was dropped. */ - error = msdosfs_lookup_ino(pdp, NULL, cnp, &inode1); + error = msdosfs_lookup_ino(pdp, NULL, cnp, &scn, &blkoff); if (error) { vput(*vpp); *vpp = NULL; return (error); } + if (FAT32(pmp) && scn == MSDOSFSROOT) + scn = pmp->pm_rootdirblk; + inode1 = scn * pmp->pm_bpcluster + blkoff; if (VTODE(*vpp)->de_inode != inode1) { vput(*vpp); goto restart; @@ -794,10 +799,9 @@ dosdirempty(struct denode *dep) * * Returns 0 if target is NOT a subdirectory of source. * Otherwise returns a non-zero error number. - * The target inode is always unlocked on return. */ int -doscheckpath(struct denode *source, struct denode *target) +doscheckpath(struct denode *source, struct denode *target, daddr_t *wait_scn) { daddr_t scn; struct msdosfsmount *pmp; @@ -806,26 +810,25 @@ doscheckpath(struct denode *source, struct denode *target) struct buf *bp = NULL; int error = 0; - dep = target; + *wait_scn = 0; + + pmp = target->de_pmp; + KASSERT(pmp == source->de_pmp, + ("doscheckpath: source and target on different filesystems")); + if ((target->de_Attributes & ATTR_DIRECTORY) == 0 || - (source->de_Attributes & ATTR_DIRECTORY) == 0) { - error = ENOTDIR; - goto out; - } - if (dep->de_StartCluster == source->de_StartCluster) { - error = EEXIST; - goto out; - } - if (dep->de_StartCluster == MSDOSFSROOT) - goto out; - pmp = dep->de_pmp; -#ifdef DIAGNOSTIC - if (pmp != source->de_pmp) - panic("doscheckpath: source and target on different filesystems"); -#endif - if (FAT32(pmp) && dep->de_StartCluster == pmp->pm_rootdirblk) - goto out; + (source->de_Attributes & ATTR_DIRECTORY) == 0) + return (ENOTDIR); + + if (target->de_StartCluster == source->de_StartCluster) + return (EEXIST); + + if (target->de_StartCluster == MSDOSFSROOT || + (FAT32(pmp) && target->de_StartCluster == pmp->pm_rootdirblk)) + return (0); + dep = target; + vget(DETOV(dep), LK_EXCLUSIVE); for (;;) { if ((dep->de_Attributes & ATTR_DIRECTORY) == 0) { error = ENOTDIR; @@ -833,19 +836,22 @@ doscheckpath(struct denode *source, struct denode *target) } scn = dep->de_StartCluster; error = bread(pmp->pm_devvp, cntobn(pmp, scn), - pmp->pm_bpcluster, NOCRED, &bp); - if (error) + pmp->pm_bpcluster, NOCRED, &bp); + if (error != 0) break; - ep = (struct direntry *) bp->b_data + 1; + ep = (struct direntry *)bp->b_data + 1; if ((ep->deAttributes & ATTR_DIRECTORY) == 0 || bcmp(ep->deName, ".. ", 11) != 0) { error = ENOTDIR; + brelse(bp); break; } + scn = getushort(ep->deStartCluster); if (FAT32(pmp)) scn |= getushort(ep->deHighClust) << 16; + brelse(bp); if (scn == source->de_StartCluster) { error = EINVAL; @@ -862,15 +868,14 @@ doscheckpath(struct denode *source, struct denode *target) } vput(DETOV(dep)); - brelse(bp); - bp = NULL; + dep = NULL; /* NOTE: deget() clears dep on error */ - if ((error = deget(pmp, scn, 0, LK_EXCLUSIVE, &dep)) != 0) + error = deget(pmp, scn, 0, LK_EXCLUSIVE | LK_NOWAIT, &dep); + if (error != 0) { + *wait_scn = scn; break; + } } -out:; - if (bp) - brelse(bp); #ifdef MSDOSFS_DEBUG if (error == ENOTDIR) printf("doscheckpath(): .. not a directory?\n"); diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 8885ac856588..0ef8e187545d 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -937,24 +937,27 @@ msdosfs_link(struct vop_link_args *ap) static int msdosfs_rename(struct vop_rename_args *ap) { - struct vnode *tdvp = ap->a_tdvp; - struct vnode *fvp = ap->a_fvp; - struct vnode *fdvp = ap->a_fdvp; - struct vnode *tvp = ap->a_tvp; - struct componentname *tcnp = ap->a_tcnp; - struct componentname *fcnp = ap->a_fcnp; - struct denode *ip, *xp, *dp, *zp; + struct vnode *fdvp, *fvp, *tdvp, *tvp, *vp; + struct componentname *fcnp, *tcnp; + struct denode *fdip, *fip, *tdip, *tip, *nip; u_char toname[12], oldname[11]; u_long from_diroffset, to_diroffset; + bool doingdirectory, newparent; u_char to_count; - int doingdirectory = 0, newparent = 0; int error; - u_long cn, pcl; - daddr_t bn; + u_long cn, pcl, blkoff; + daddr_t bn, wait_scn, scn; struct msdosfsmount *pmp; + struct mount *mp; struct direntry *dotdotp; struct buf *bp; + tdvp = ap->a_tdvp; + fvp = ap->a_fvp; + fdvp = ap->a_fdvp; + tvp = ap->a_tvp; + tcnp = ap->a_tcnp; + fcnp = ap->a_fcnp; pmp = VFSTOMSDOSFS(fdvp->v_mount); #ifdef DIAGNOSTIC @@ -965,19 +968,11 @@ msdosfs_rename(struct vop_rename_args *ap) /* * Check for cross-device rename. */ + mp = fvp->v_mount; if (fvp->v_mount != tdvp->v_mount || - (tvp && fvp->v_mount != tvp->v_mount)) { + (tvp != NULL && fvp->v_mount != tvp->v_mount)) { error = EXDEV; -abortit: - if (tdvp == tvp) - vrele(tdvp); - else - vput(tdvp); - if (tvp) - vput(tvp); - vrele(fdvp); - vrele(fvp); - return (error); + goto abortit; } /* @@ -988,11 +983,99 @@ abortit: goto abortit; } - error = vn_lock(fvp, LK_EXCLUSIVE); - if (error) - goto abortit; - dp = VTODE(fdvp); - ip = VTODE(fvp); + /* + * When the target exists, both the directory + * and target vnodes are passed locked. + */ + VOP_UNLOCK(tdvp); + if (tvp != NULL && tvp != tdvp) + VOP_UNLOCK(tvp); + +relock: + doingdirectory = newparent = false; + + error = vn_lock(fdvp, LK_EXCLUSIVE); + if (error != 0) + goto releout; + if (vn_lock(tdvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { + VOP_UNLOCK(fdvp); + error = vn_lock(tdvp, LK_EXCLUSIVE); + if (error != 0) + goto releout; + VOP_UNLOCK(tdvp); + goto relock; + } + + error = msdosfs_lookup_ino(fdvp, NULL, fcnp, &scn, &blkoff); + if (error != 0) { + VOP_UNLOCK(fdvp); + VOP_UNLOCK(tdvp); + goto releout; + } + error = deget(pmp, scn, blkoff, LK_EXCLUSIVE | LK_NOWAIT, &nip); + if (error != 0) { + VOP_UNLOCK(fdvp); + VOP_UNLOCK(tdvp); + if (error != EBUSY) + goto releout; + error = deget(pmp, scn, blkoff, LK_EXCLUSIVE, &nip); + if (error != 0) + goto releout; + vp = fvp; + fvp = DETOV(nip); + VOP_UNLOCK(fvp); + vrele(vp); + goto relock; + } + vrele(fvp); + fvp = DETOV(nip); + from_diroffset = fdip->de_fndoffset; + + error = msdosfs_lookup_ino(tdvp, NULL, tcnp, &scn, &blkoff); + if (error != 0 && error != EJUSTRETURN) { + VOP_UNLOCK(fdvp); + VOP_UNLOCK(tdvp); + VOP_UNLOCK(fvp); + goto releout; + } + if (error == EJUSTRETURN && tvp != NULL) { + vrele(tvp); + tvp = NULL; + } + if (error == 0) { + nip = NULL; + error = deget(pmp, scn, blkoff, LK_EXCLUSIVE | LK_NOWAIT, + &nip); + if (tvp != NULL) { + vrele(tvp); + tvp = NULL; + } + if (error != 0) { + VOP_UNLOCK(fdvp); + VOP_UNLOCK(tdvp); + VOP_UNLOCK(fvp); + if (error != EBUSY) + goto releout; + error = deget(pmp, scn, blkoff, LK_EXCLUSIVE, + &nip); + if (error != 0) + goto releout; + vput(DETOV(nip)); + goto relock; + } + tvp = DETOV(nip); + } + + fdip = VTODE(fdvp); + fip = VTODE(fvp); + tdip = VTODE(tdvp); + tip = tvp != NULL ? VTODE(tvp) : NULL; + + /* + * Remember direntry place to use for destination + */ + to_diroffset = tdip->de_fndoffset; + to_count = tdip->de_fndcnt; /* * Be sure we are not renaming ".", "..", or an alias of ".". This @@ -1000,35 +1083,20 @@ abortit: * "ls" or "pwd" with the "." directory entry missing, and "cd .." * doesn't work if the ".." entry is missing. */ - if (ip->de_Attributes & ATTR_DIRECTORY) { + if ((fip->de_Attributes & ATTR_DIRECTORY) != 0) { /* * Avoid ".", "..", and aliases of "." for obvious reasons. */ if ((fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.') || - dp == ip || - (fcnp->cn_flags & ISDOTDOT) || - (tcnp->cn_flags & ISDOTDOT) || - (ip->de_flag & DE_RENAME)) { - VOP_UNLOCK(fvp); + fdip == fip || + (fcnp->cn_flags & ISDOTDOT) != 0 || + (tcnp->cn_flags & ISDOTDOT) != 0) { error = EINVAL; - goto abortit; + goto unlock; } - ip->de_flag |= DE_RENAME; - doingdirectory++; + doingdirectory = true; } - /* - * When the target exists, both the directory - * and target vnodes are returned locked. - */ - dp = VTODE(tdvp); - xp = tvp ? VTODE(tvp) : NULL; - /* - * Remember direntry place to use for destination - */ - to_diroffset = dp->de_fndoffset; - to_count = dp->de_fndcnt; - /* * If ".." must be changed (ie the directory gets a new * parent) then the source directory must not be in the @@ -1040,55 +1108,59 @@ abortit: * call to doscheckpath(). */ error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); - VOP_UNLOCK(fvp); - if (VTODE(fdvp)->de_StartCluster != VTODE(tdvp)->de_StartCluster) - newparent = 1; + if (fdip->de_StartCluster != tdip->de_StartCluster) + newparent = true; if (doingdirectory && newparent) { - if (error) /* write access check above */ - goto bad; - if (xp != NULL) - vput(tvp); - /* - * doscheckpath() vput()'s dp, - * so we have to do a relookup afterwards - */ - error = doscheckpath(ip, dp); - if (error) - goto out; + if (error != 0) /* write access check above */ + goto unlock; + error = doscheckpath(fip, tdip, &wait_scn); + if (wait_scn != 0) { + VOP_UNLOCK(fdvp); + VOP_UNLOCK(tdvp); + VOP_UNLOCK(fvp); + if (tvp != NULL && tvp != tdvp) + VOP_UNLOCK(tvp); + error = deget(pmp, wait_scn, 0, LK_EXCLUSIVE, + &nip); + if (error == 0) { + vput(DETOV(nip)); + goto relock; + } + } + if (error != 0) + goto unlock; if ((tcnp->cn_flags & SAVESTART) == 0) panic("msdosfs_rename: lost to startdir"); - error = relookup(tdvp, &tvp, tcnp); - if (error) - goto out; - dp = VTODE(tdvp); - xp = tvp ? VTODE(tvp) : NULL; } - if (xp != NULL) { + if (tip != NULL) { /* * Target must be empty if a directory and have no links * to it. Also, ensure source and target are compatible * (both directories, or both not directories). */ - if (xp->de_Attributes & ATTR_DIRECTORY) { - if (!dosdirempty(xp)) { + if ((tip->de_Attributes & ATTR_DIRECTORY) != 0) { + if (!dosdirempty(tip)) { error = ENOTEMPTY; - goto bad; + goto unlock; } if (!doingdirectory) { error = ENOTDIR; - goto bad; + goto unlock; } cache_purge(tdvp); } else if (doingdirectory) { error = EISDIR; - goto bad; + goto unlock; } - error = removede(dp, xp); - if (error) - goto bad; + error = msdosfs_lookup_ino(tdvp, NULL, tcnp, &scn, &blkoff); + MPASS(error == 0); + error = removede(tdip, tip); + if (error != 0) + goto unlock; vput(tvp); - xp = NULL; + tvp = NULL; + tip = NULL; } /* @@ -1096,146 +1168,83 @@ abortit: * into the denode and directory entry for the destination * file/directory. */ - error = uniqdosname(VTODE(tdvp), tcnp, toname); - if (error) - goto abortit; + error = uniqdosname(tdip, tcnp, toname); + if (error != 0) + goto unlock; /* - * Since from wasn't locked at various places above, - * have to do a relookup here. + * First write a new entry in the destination + * directory and mark the entry in the source directory + * as deleted. Then move the denode to the correct hash + * chain for its new location in the filesystem. And, if + * we moved a directory, then update its .. entry to point + * to the new parent directory. */ - fcnp->cn_flags &= ~MODMASK; - fcnp->cn_flags |= LOCKPARENT | LOCKLEAF; - if ((fcnp->cn_flags & SAVESTART) == 0) - panic("msdosfs_rename: lost from startdir"); - if (!newparent) - VOP_UNLOCK(tdvp); - if (relookup(fdvp, &fvp, fcnp) == 0) - vrele(fdvp); - if (fvp == NULL) { - /* - * From name has disappeared. - */ - if (doingdirectory) - panic("rename: lost dir entry"); - if (newparent) - VOP_UNLOCK(tdvp); - vrele(tdvp); - vrele(ap->a_fvp); - /* - * fdvp may be locked and has a reference. We need to - * release the lock and reference, unless to and from - * directories are the same. In that case it is already - * unlocked. - */ - if (tdvp != fdvp) - vput(fdvp); - return 0; + memcpy(oldname, fip->de_Name, 11); + memcpy(fip->de_Name, toname, 11); /* update denode */ + error = msdosfs_lookup_ino(tdvp, NULL, tcnp, &scn, &blkoff); + MPASS(error == EJUSTRETURN); + error = createde(fip, tdip, NULL, tcnp); + if (error != 0) { + memcpy(fip->de_Name, oldname, 11); + goto unlock; } - xp = VTODE(fvp); - zp = VTODE(fdvp); - from_diroffset = zp->de_fndoffset; /* - * Ensure that the directory entry still exists and has not - * changed till now. If the source is a file the entry may - * have been unlinked or renamed. In either case there is - * no further work to be done. If the source is a directory - * then it cannot have been rmdir'ed or renamed; this is - * prohibited by the DE_RENAME flag. + * If fip is for a directory, then its name should always + * be "." since it is for the directory entry in the + * directory itself (msdosfs_lookup() always translates + * to the "." entry so as to get a unique denode, except + * for the root directory there are different + * complications). However, we just corrupted its name + * to pass the correct name to createde(). Undo this. */ - if (xp != ip) { - if (doingdirectory) - panic("rename: lost dir entry"); - if (newparent) - VOP_UNLOCK(fdvp); - vrele(ap->a_fvp); - xp = NULL; - } else { - vrele(fvp); - xp = NULL; - - /* - * First write a new entry in the destination - * directory and mark the entry in the source directory - * as deleted. Then move the denode to the correct hash - * chain for its new location in the filesystem. And, if - * we moved a directory, then update its .. entry to point - * to the new parent directory. - */ - memcpy(oldname, ip->de_Name, 11); - memcpy(ip->de_Name, toname, 11); /* update denode */ - dp->de_fndoffset = to_diroffset; - dp->de_fndcnt = to_count; - error = createde(ip, dp, (struct denode **)0, tcnp); - if (error) { - memcpy(ip->de_Name, oldname, 11); - if (newparent) - VOP_UNLOCK(fdvp); - VOP_UNLOCK(fvp); - goto bad; - } - /* - * If ip is for a directory, then its name should always - * be "." since it is for the directory entry in the - * directory itself (msdosfs_lookup() always translates - * to the "." entry so as to get a unique denode, except - * for the root directory there are different - * complications). However, we just corrupted its name - * to pass the correct name to createde(). Undo this. - */ - if ((ip->de_Attributes & ATTR_DIRECTORY) != 0) - memcpy(ip->de_Name, oldname, 11); - ip->de_refcnt++; - zp->de_fndoffset = from_diroffset; - error = removede(zp, ip); - if (error) { - /* XXX should downgrade to ro here, fs is corrupt */ - if (newparent) - VOP_UNLOCK(fdvp); - VOP_UNLOCK(fvp); - goto bad; - } - if (!doingdirectory) { - error = pcbmap(dp, de_cluster(pmp, to_diroffset), 0, - &ip->de_dirclust, 0); - if (error) { - /* XXX should downgrade to ro here, fs is corrupt */ - if (newparent) - VOP_UNLOCK(fdvp); - VOP_UNLOCK(fvp); - goto bad; - } - if (ip->de_dirclust == MSDOSFSROOT) - ip->de_diroffset = to_diroffset; - else - ip->de_diroffset = to_diroffset & pmp->pm_crbomask; + if ((fip->de_Attributes & ATTR_DIRECTORY) != 0) + memcpy(fip->de_Name, oldname, 11); + fip->de_refcnt++; + error = msdosfs_lookup_ino(fdvp, NULL, fcnp, &scn, &blkoff); + MPASS(error == 0); + error = removede(fdip, fip); + if (error != 0) { + /* XXX should downgrade to ro here, fs is corrupt */ + goto unlock; + } + if (!doingdirectory) { + error = pcbmap(tdip, de_cluster(pmp, to_diroffset), 0, + &fip->de_dirclust, 0); + if (error != 0) { + /* + * XXX should downgrade to ro here, + * fs is corrupt + */ + goto unlock; } - reinsert(ip); - if (newparent) - VOP_UNLOCK(fdvp); + if (fip->de_dirclust == MSDOSFSROOT) + fip->de_diroffset = to_diroffset; + else + fip->de_diroffset = to_diroffset & pmp->pm_crbomask; } + reinsert(fip); /* * If we moved a directory to a new parent directory, then we must * fixup the ".." entry in the moved directory. */ if (doingdirectory && newparent) { - cn = ip->de_StartCluster; + cn = fip->de_StartCluster; if (cn == MSDOSFSROOT) { /* this should never happen */ panic("msdosfs_rename(): updating .. in root directory?"); } else bn = cntobn(pmp, cn); error = bread(pmp->pm_devvp, bn, pmp->pm_bpcluster, - NOCRED, &bp); - if (error) { + NOCRED, &bp); + if (error != 0) { /* XXX should downgrade to ro here, fs is corrupt */ - VOP_UNLOCK(fvp); - goto bad; + goto unlock; } dotdotp = (struct direntry *)bp->b_data + 1; - pcl = dp->de_StartCluster; + pcl = tdip->de_StartCluster; if (FAT32(pmp) && pcl == pmp->pm_rootdirblk) pcl = MSDOSFSROOT; putushort(dotdotp->deStartCluster, pcl); @@ -1245,8 +1254,7 @@ abortit: bdwrite(bp); else if ((error = bwrite(bp)) != 0) { /* XXX should downgrade to ro here, fs is corrupt */ - VOP_UNLOCK(fvp); - goto bad; + goto unlock; } } @@ -1258,17 +1266,35 @@ abortit: * namecache entries that were installed for this direntry. */ cache_purge(fvp); - VOP_UNLOCK(fvp); -bad: - if (xp) - vput(tvp); + +unlock: + vput(fdvp); + vput(fvp); + if (tvp != NULL) { + if (tvp != tdvp) + vput(tvp); + else + vrele(tvp); + } vput(tdvp); -out: - ip->de_flag &= ~DE_RENAME; + return (error); +releout: + vrele(tdvp); + if (tvp != NULL) + vrele(tvp); + vrele(fdvp); + vrele(fvp); + return (error); +abortit: + if (tdvp == tvp) + vrele(tdvp); + else + vput(tdvp); + if (tvp != NULL) + vput(tvp); vrele(fdvp); vrele(fvp); return (error); - } static struct { @@ -1428,7 +1454,7 @@ msdosfs_rmdir(struct vop_rmdir_args *ap) * non-empty.) */ error = 0; - if (!dosdirempty(ip) || ip->de_flag & DE_RENAME) { + if (!dosdirempty(ip)) { error = ENOTEMPTY; goto out; } From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 01:09:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 585A366C28A; Fri, 3 Sep 2021 01:09:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H10731GwBz4Z7Z; Fri, 3 Sep 2021 01:09:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C2E8233AA; Fri, 3 Sep 2021 01:09:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183192T1004803; Fri, 3 Sep 2021 01:09:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183192MO004802; Fri, 3 Sep 2021 01:09:02 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:09:02 GMT Message-Id: <202109030109.183192MO004802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: af096248c94d - stable/13 - msdosfs: add doscheckpath lock MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: af096248c94d48f895dc549006045312c13a4209 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:09:03 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=af096248c94d48f895dc549006045312c13a4209 commit af096248c94d48f895dc549006045312c13a4209 Author: Konstantin Belousov AuthorDate: 2021-08-07 20:18:26 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-03 01:08:36 +0000 msdosfs: add doscheckpath lock (cherry picked from commit 6ae13c0feb96a1ea97e814213271b41b3d090d2d) --- sys/fs/msdosfs/msdosfs_lookup.c | 1 + sys/fs/msdosfs/msdosfs_vfsops.c | 3 +++ sys/fs/msdosfs/msdosfs_vnops.c | 11 ++++++++++- sys/fs/msdosfs/msdosfsmount.h | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c index 2c3d02db37a0..9940800a72c2 100644 --- a/sys/fs/msdosfs/msdosfs_lookup.c +++ b/sys/fs/msdosfs/msdosfs_lookup.c @@ -813,6 +813,7 @@ doscheckpath(struct denode *source, struct denode *target, daddr_t *wait_scn) *wait_scn = 0; pmp = target->de_pmp; + lockmgr_assert(&pmp->pm_checkpath_lock, KA_XLOCKED); KASSERT(pmp == source->de_pmp, ("doscheckpath: source and target on different filesystems")); diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 68c8a93a18af..0f6d41b3c77c 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -469,6 +469,7 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp) pmp->pm_bo = bo; lockinit(&pmp->pm_fatlock, 0, msdosfs_lock_msg, 0, 0); + lockinit(&pmp->pm_checkpath_lock, 0, "msdoscp", 0, 0); /* * Initialize ownerships and permissions, since nothing else will @@ -740,6 +741,7 @@ error_exit: } if (pmp) { lockdestroy(&pmp->pm_fatlock); + lockdestroy(&pmp->pm_checkpath_lock); free(pmp->pm_inusemap, M_MSDOSFSFAT); free(pmp, M_MSDOSFSMNT); mp->mnt_data = NULL; @@ -829,6 +831,7 @@ msdosfs_unmount(struct mount *mp, int mntflags) dev_rel(pmp->pm_dev); free(pmp->pm_inusemap, M_MSDOSFSFAT); lockdestroy(&pmp->pm_fatlock); + lockdestroy(&pmp->pm_checkpath_lock); free(pmp, M_MSDOSFSMNT); mp->mnt_data = NULL; MNT_ILOCK(mp); diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 0ef8e187545d..421afc3ec290 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -942,7 +942,7 @@ msdosfs_rename(struct vop_rename_args *ap) struct denode *fdip, *fip, *tdip, *tip, *nip; u_char toname[12], oldname[11]; u_long from_diroffset, to_diroffset; - bool doingdirectory, newparent; + bool checkpath_locked, doingdirectory, newparent; u_char to_count; int error; u_long cn, pcl, blkoff; @@ -991,6 +991,8 @@ msdosfs_rename(struct vop_rename_args *ap) if (tvp != NULL && tvp != tdvp) VOP_UNLOCK(tvp); + checkpath_locked = false; + relock: doingdirectory = newparent = false; @@ -1113,8 +1115,12 @@ relock: if (doingdirectory && newparent) { if (error != 0) /* write access check above */ goto unlock; + lockmgr(&pmp->pm_checkpath_lock, LK_EXCLUSIVE, NULL); + checkpath_locked = true; error = doscheckpath(fip, tdip, &wait_scn); if (wait_scn != 0) { + lockmgr(&pmp->pm_checkpath_lock, LK_RELEASE, NULL); + checkpath_locked = false; VOP_UNLOCK(fdvp); VOP_UNLOCK(tdvp); VOP_UNLOCK(fvp); @@ -1268,6 +1274,8 @@ relock: cache_purge(fvp); unlock: + if (checkpath_locked) + lockmgr(&pmp->pm_checkpath_lock, LK_RELEASE, NULL); vput(fdvp); vput(fvp); if (tvp != NULL) { @@ -1279,6 +1287,7 @@ unlock: vput(tdvp); return (error); releout: + MPASS(!checkpath_locked); vrele(tdvp); if (tvp != NULL) vrele(tvp); diff --git a/sys/fs/msdosfs/msdosfsmount.h b/sys/fs/msdosfs/msdosfsmount.h index 75b187860270..46a02e611cf5 100644 --- a/sys/fs/msdosfs/msdosfsmount.h +++ b/sys/fs/msdosfs/msdosfsmount.h @@ -114,6 +114,7 @@ struct msdosfsmount { void *pm_d2u; /* DOS->Local iconv handle */ #ifndef MAKEFS struct lock pm_fatlock; /* lockmgr protecting allocations */ + struct lock pm_checkpath_lock; /* protects doscheckpath result */ #endif }; From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 01:09:04 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B7EF66BC79; Fri, 3 Sep 2021 01:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H10742LGfz4ZQW; Fri, 3 Sep 2021 01:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DC1D233AB; Fri, 3 Sep 2021 01:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183194pr004827; Fri, 3 Sep 2021 01:09:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183194IX004826; Fri, 3 Sep 2021 01:09:04 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:09:04 GMT Message-Id: <202109030109.183194IX004826@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 69ab01b6d91b - stable/13 - msdosfs: drop now unused DE_RENAME MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 69ab01b6d91bcaf9030e9b75403c6624f62030d8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:09:04 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=69ab01b6d91bcaf9030e9b75403c6624f62030d8 commit 69ab01b6d91bcaf9030e9b75403c6624f62030d8 Author: Konstantin Belousov AuthorDate: 2021-08-07 20:21:27 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-03 01:08:36 +0000 msdosfs: drop now unused DE_RENAME (cherry picked from commit 85fb840ebf3c213e45939188303bd5fe0aca4422) --- sys/fs/msdosfs/denode.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index 03e3fa8577ad..93712e44c520 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -172,7 +172,6 @@ struct denode { #define DE_CREATE 0x0008 /* Creation time update */ #define DE_ACCESS 0x0010 /* Access time update */ #define DE_MODIFIED 0x0020 /* Denode has been modified */ -#define DE_RENAME 0x0040 /* Denode is in the process of being renamed */ /* Maximum size of a file on a FAT filesystem */ #define MSDOSFS_FILESIZE_MAX 0xFFFFFFFFLL From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 01:09:06 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 08C6D66C2B5; Fri, 3 Sep 2021 01:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H10754hMkz4ZVJ; Fri, 3 Sep 2021 01:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56E6B233AC; Fri, 3 Sep 2021 01:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183195JT004857; Fri, 3 Sep 2021 01:09:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183195Ee004856; Fri, 3 Sep 2021 01:09:05 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:09:05 GMT Message-Id: <202109030109.183195Ee004856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ae322395284d - stable/13 - vfs_hash_insert: ensure that predicate is true MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ae322395284dc666e41b92beb862ea0c743fcff1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:09:06 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ae322395284dc666e41b92beb862ea0c743fcff1 commit ae322395284dc666e41b92beb862ea0c743fcff1 Author: Konstantin Belousov AuthorDate: 2021-08-17 13:47:25 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-03 01:08:36 +0000 vfs_hash_insert: ensure that predicate is true (cherry picked from commit 7c1e4aab7934933f0669c2b922976b30ed628a3f) --- sys/kern/vfs_hash.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_hash.c b/sys/kern/vfs_hash.c index e10e9b57e316..c5d67c8b2b33 100644 --- a/sys/kern/vfs_hash.c +++ b/sys/kern/vfs_hash.c @@ -93,8 +93,14 @@ vfs_hash_get(const struct mount *mp, u_int hash, int flags, struct thread *td, error = vget_finish(vp, flags, vs); if (error == ENOENT && (flags & LK_NOWAIT) == 0) break; - if (error) + if (error != 0) return (error); + if (vp->v_hash != hash || + (fn != NULL && fn(vp, arg))) { + vput(vp); + /* Restart the bucket walk. */ + break; + } *vpp = vp; return (0); } From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 01:09:06 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D41FF66C2C9; Fri, 3 Sep 2021 01:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H10764Q1Sz4ZgF; Fri, 3 Sep 2021 01:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 714C323406; Fri, 3 Sep 2021 01:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183196Ua004881; Fri, 3 Sep 2021 01:09:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1831966v004880; Fri, 3 Sep 2021 01:09:06 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:09:06 GMT Message-Id: <202109030109.1831966v004880@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6103f34e543d - stable/13 - vfs_hash_rehash(): require the vnode to be exclusively locked MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6103f34e543df0147bfa3e68a9666479954cdca9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:09:07 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6103f34e543df0147bfa3e68a9666479954cdca9 commit 6103f34e543df0147bfa3e68a9666479954cdca9 Author: Konstantin Belousov AuthorDate: 2021-08-18 11:14:42 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-03 01:08:36 +0000 vfs_hash_rehash(): require the vnode to be exclusively locked (cherry picked from commit f19063ab029b067e1763780aebca4bd620453110) --- sys/kern/vfs_hash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/vfs_hash.c b/sys/kern/vfs_hash.c index c5d67c8b2b33..2e446e69a314 100644 --- a/sys/kern/vfs_hash.c +++ b/sys/kern/vfs_hash.c @@ -196,6 +196,7 @@ vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread *td, void vfs_hash_rehash(struct vnode *vp, u_int hash) { + ASSERT_VOP_ELOCKED(vp, "rehash requires excl lock"); rw_wlock(&vfs_hash_lock); LIST_REMOVE(vp, v_hashlist); From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 06:39:17 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9226C6703AD; Fri, 3 Sep 2021 06:39:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H17S53Pzrz4s21; Fri, 3 Sep 2021 06:39:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F395276E3; Fri, 3 Sep 2021 06:39:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1836dHER044775; Fri, 3 Sep 2021 06:39:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1836dHV2044774; Fri, 3 Sep 2021 06:39:17 GMT (envelope-from git) Date: Fri, 3 Sep 2021 06:39:17 GMT Message-Id: <202109030639.1836dHV2044774@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 26302099fb91 - stable/13 - ipfw_nat64: fix direct output mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 26302099fb9176a33936af002fa6de6864cea6b2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 06:39:17 -0000 The branch stable/13 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=26302099fb9176a33936af002fa6de6864cea6b2 commit 26302099fb9176a33936af002fa6de6864cea6b2 Author: Andrey V. Elsukov AuthorDate: 2021-08-26 10:48:23 +0000 Commit: Andrey V. Elsukov CommitDate: 2021-09-03 06:35:43 +0000 ipfw_nat64: fix direct output mode In nat64_find_route[46] handle NHF_GATEWAY flag and use destination address from next hop to do link layer address lookup. PR: 255928 Reviewed by: melifaro Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D31680 (cherry picked from commit da3a09d8941dc29f20447e263b3a6d60370c6203) --- sys/netpfil/ipfw/nat64/nat64_translate.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/sys/netpfil/ipfw/nat64/nat64_translate.c b/sys/netpfil/ipfw/nat64/nat64_translate.c index 29666a7d3a9a..aa6f47656d9d 100644 --- a/sys/netpfil/ipfw/nat64/nat64_translate.c +++ b/sys/netpfil/ipfw/nat64/nat64_translate.c @@ -622,27 +622,22 @@ static struct nhop_object * nat64_find_route6(struct sockaddr_in6 *dst, struct mbuf *m) { struct nhop_object *nh; + NET_EPOCH_ASSERT(); - nh = fib6_lookup(M_GETFIB(m), &dst->sin6_addr, 0, 0, 0); + nh = fib6_lookup(M_GETFIB(m), &dst->sin6_addr, 0, NHR_NONE, 0); if (nh == NULL) - return NULL; + return (NULL); if (nh->nh_flags & (NHF_BLACKHOLE | NHF_REJECT)) - return NULL; - /* - * XXX: we need to use destination address with embedded scope - * zone id, because LLTABLE uses such form of addresses for lookup. - */ + return (NULL); + dst->sin6_family = AF_INET6; dst->sin6_len = sizeof(*dst); - dst->sin6_addr = ifatoia6(nh->nh_ifa)->ia_addr.sin6_addr; - if (IN6_IS_SCOPE_LINKLOCAL(&dst->sin6_addr)) - dst->sin6_addr.s6_addr16[1] = - htons(nh->nh_ifp->if_index & 0xffff); + if (nh->nh_flags & NHF_GATEWAY) + dst->sin6_addr = nh->gw6_sa.sin6_addr; dst->sin6_port = 0; dst->sin6_scope_id = 0; dst->sin6_flowinfo = 0; - - return nh; + return (nh); } #define NAT64_ICMP6_PLEN 64 @@ -776,17 +771,18 @@ nat64_find_route4(struct sockaddr_in *dst, struct mbuf *m) struct nhop_object *nh; NET_EPOCH_ASSERT(); - nh = fib4_lookup(M_GETFIB(m), dst->sin_addr, 0, 0, 0); + nh = fib4_lookup(M_GETFIB(m), dst->sin_addr, 0, NHR_NONE, 0); if (nh == NULL) - return NULL; + return (NULL); if (nh->nh_flags & (NHF_BLACKHOLE | NHF_BROADCAST | NHF_REJECT)) - return NULL; + return (NULL); dst->sin_family = AF_INET; dst->sin_len = sizeof(*dst); - dst->sin_addr = IA_SIN(nh->nh_ifa)->sin_addr; + if (nh->nh_flags & NHF_GATEWAY) + dst->sin_addr = nh->gw4_sa.sin_addr; dst->sin_port = 0; - return nh; + return (nh); } #define NAT64_ICMP_PLEN 64 From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 17:05:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9746678C29; Fri, 3 Sep 2021 17:05:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1PL73x6pz3k7C; Fri, 3 Sep 2021 17:05:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E15B2FCE3; Fri, 3 Sep 2021 17:05:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183H53an088875; Fri, 3 Sep 2021 17:05:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183H5347088874; Fri, 3 Sep 2021 17:05:03 GMT (envelope-from git) Date: Fri, 3 Sep 2021 17:05:03 GMT Message-Id: <202109031705.183H5347088874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: edc7b289b2b2 - stable/12 - Revert the changes that removed support for old gcc, as stable/12 still uses gcc 4.2.1 for mips, powerpc and sparc64. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: edc7b289b2b2681ec65c80011540fa17e1799936 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 17:05:03 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=edc7b289b2b2681ec65c80011540fa17e1799936 commit edc7b289b2b2681ec65c80011540fa17e1799936 Author: Dimitry Andric AuthorDate: 2021-09-03 10:41:44 +0000 Commit: Dimitry Andric CommitDate: 2021-09-03 17:03:47 +0000 Revert the changes that removed support for old gcc, as stable/12 still uses gcc 4.2.1 for mips, powerpc and sparc64. Revert "Revert part of r360964" This reverts commit 2ebf10e7a1ced5d3dc4059d0595743277464d915. Revert "Remove tests for obsolete compilers in the build system" This reverts commit a606cb388f975561c37dbabc2fee82c27ef09929. --- lib/libclang_rt/Makefile.inc | 2 +- lib/libthr/Makefile | 3 +++ lib/msun/Makefile | 4 +-- libexec/rtld-elf/Makefile | 4 +++ libexec/tftpd/tests/Makefile | 3 +++ share/mk/bsd.compiler.mk | 14 +++++++--- share/mk/bsd.sys.mk | 59 ++++++++++++++++++++++++------------------- stand/arm/uboot/Makefile | 2 +- stand/defs.mk | 4 +++ stand/efi/Makefile | 6 +++++ stand/efi/boot1/Makefile | 4 +++ stand/efi/loader/Makefile | 4 +++ stand/i386/boot2/Makefile | 3 +++ stand/i386/isoboot/Makefile | 3 +++ stand/libsa/Makefile | 4 +++ sys/conf/Makefile.arm | 4 +++ sys/conf/kern.mk | 35 +++++++++++++++++-------- sys/conf/kern.post.mk | 3 +++ sys/conf/kern.pre.mk | 4 +++ sys/conf/kmod.mk | 11 ++++++++ sys/modules/Makefile | 2 ++ usr.sbin/acpi/acpidb/Makefile | 2 +- usr.sbin/trpt/Makefile | 6 +++++ usr.sbin/zic/zic/Makefile | 2 +- 24 files changed, 142 insertions(+), 46 deletions(-) diff --git a/lib/libclang_rt/Makefile.inc b/lib/libclang_rt/Makefile.inc index 53e0f7972768..07b66015acb1 100644 --- a/lib/libclang_rt/Makefile.inc +++ b/lib/libclang_rt/Makefile.inc @@ -32,7 +32,7 @@ CFLAGS+= ${PICFLAG} CFLAGS+= -fno-builtin CFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti -.if ${COMPILER_TYPE} == clang +.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700 CFLAGS+= -fno-sanitize=safe-stack .endif CFLAGS+= -fno-stack-protector diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index c77b6b565a87..5f3d52661c99 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -29,7 +29,10 @@ CFLAGS+=-Winline CFLAGS.thr_stack.c+= -Wno-cast-align CFLAGS.rtld_malloc.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 diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 0a486bb5a086..d56b33deabea 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -119,12 +119,12 @@ COMMON_SRCS+= catrigl.c \ s_nextafterl.c s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c \ s_scalbnl.c s_sinl.c s_sincosl.c \ s_tanhl.c s_tanl.c s_truncl.c w_cabsl.c -# Work around this warning from gcc: +# Work around this warning from gcc 6: # lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of # 'long double' [-Werror=overflow] # if( y >= LDBL_MAX ) # See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=130067 -.if ${COMPILER_TYPE} == "gcc" +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000 CFLAGS.e_powl.c+= -Wno-error=overflow .endif .endif diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index be18f1759cc6..a51acf68068a 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -111,4 +111,8 @@ ${PROG_FULL}: ${VERSION_MAP} # GCC warns about redeclarations even though they have __exported # and are therefore not identical to the ones from the system headers. CFLAGS+= -Wno-redundant-decls +.if ${COMPILER_VERSION} < 40300 +# Silence -Wshadow false positives in ancient GCC +CFLAGS+= -Wno-shadow +.endif .endif diff --git a/libexec/tftpd/tests/Makefile b/libexec/tftpd/tests/Makefile index 390921e31de7..9aa420cec1a5 100644 --- a/libexec/tftpd/tests/Makefile +++ b/libexec/tftpd/tests/Makefile @@ -2,8 +2,11 @@ .include +# Skip on GCC 4.2, because it lacks __COUNTER__ +.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40300 ATF_TESTS_C= functional TEST_METADATA.functional+= timeout=15 +.endif LIBADD= util WARNS?= 6 diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk index 4da0578d1b4e..cd87740730e9 100644 --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -182,12 +182,20 @@ ${X_}COMPILER_FREEBSD_VERSION= unknown .endif .endif -${X_}COMPILER_FEATURES= c++11 c++14 -.if ${${X_}COMPILER_TYPE} == "clang" || \ +${X_}COMPILER_FEATURES= +.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 30300) || \ + (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 40800) +${X_}COMPILER_FEATURES+= c++11 +.endif +.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 30400) || \ + (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 50000) +${X_}COMPILER_FEATURES+= c++14 +.endif +.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 50000) || \ (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 70000) ${X_}COMPILER_FEATURES+= c++17 .endif -.if ${${X_}COMPILER_TYPE} == "clang" +.if ${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 60000 ${X_}COMPILER_FEATURES+= retpoline .endif diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 5ab65b48f3c5..26f5c59063ae 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -6,7 +6,8 @@ # Enable various levels of compiler warning checks. These may be # overridden (e.g. if using a non-gcc compiler) by defining MK_WARNS=no. -# for GCC: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html +# for 4.2.1 GCC: http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Warning-Options.html +# for current GCC: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html # for clang: https://clang.llvm.org/docs/DiagnosticsReference.html .include @@ -28,6 +29,15 @@ CFLAGS+= -std=${CSTD} CXXFLAGS+= -std=${CXXSTD} .endif +# +# Turn off -Werror for gcc 4.2.1. The compiler is on the glide path out of the +# system, and any warnings specific to it are no longer relevant as there are +# too many false positives. +# +.if ${COMPILER_VERSION} < 50000 +NO_WERROR.gcc= yes +.endif + # -pedantic is problematic because it also imposes namespace restrictions #CFLAGS+= -pedantic .if defined(WARNS) @@ -71,13 +81,19 @@ CWARNFLAGS+= -Wno-pointer-sign # is set to low values, these have to be disabled explicitly. .if ${WARNS} <= 6 CWARNFLAGS.clang+= -Wno-empty-body -Wno-string-plus-int +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30400 CWARNFLAGS.clang+= -Wno-unused-const-variable +.endif .endif # WARNS <= 6 .if ${WARNS} <= 3 CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-unused-value\ -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 CWARNFLAGS.clang+= -Wno-unused-local-typedef +.endif +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 40000 CWARNFLAGS.clang+= -Wno-address-of-packed-member +.endif .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 90100 CWARNFLAGS.gcc+= -Wno-address-of-packed-member .endif @@ -97,7 +113,7 @@ CWARNFLAGS.clang+= -Wno-array-bounds .endif # NO_WARRAY_BOUNDS .if defined(NO_WMISLEADING_INDENTATION) && \ ((${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 100000) || \ - ${COMPILER_TYPE} == "gcc") + (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100)) CWARNFLAGS+= -Wno-misleading-indentation .endif # NO_WMISLEADING_INDENTATION .endif # WARNS @@ -121,15 +137,8 @@ CWARNFLAGS+= -Werror CWARNFLAGS+= -Wno-format .endif # NO_WFORMAT || NO_WFORMAT.${COMPILER_TYPE} -# GCC -# We should clean up warnings produced with these flags. -# They were originally added as a quick hack to enable gcc5/6. -# The base system requires at least GCC 6.4, but some ports -# use this file with older compilers. Request an exprun -# before changing these. -.if ${COMPILER_TYPE} == "gcc" # GCC 5.2.0 -.if ${COMPILER_VERSION} >= 50200 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50200 CWARNFLAGS+= -Wno-error=address \ -Wno-error=array-bounds \ -Wno-error=attributes \ @@ -149,18 +158,7 @@ CWARNFLAGS+= -Wno-error=address \ .endif # GCC 6.1.0 -.if ${COMPILER_VERSION} >= 60100 -CWARNFLAGS+= -Wno-error=empty-body \ - -Wno-error=maybe-uninitialized \ - -Wno-error=nonnull-compare \ - -Wno-error=redundant-decls \ - -Wno-error=shift-negative-value \ - -Wno-error=tautological-compare \ - -Wno-error=unused-const-variable -.endif - -# GCC 6.1.0 -.if ${COMPILER_VERSION} >= 60100 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 CWARNFLAGS+= -Wno-error=empty-body \ -Wno-error=nonnull-compare \ -Wno-error=shift-negative-value \ @@ -169,7 +167,7 @@ CWARNFLAGS+= -Wno-error=empty-body \ .endif # GCC 7.1.0 -.if ${COMPILER_VERSION} >= 70100 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 70100 CWARNFLAGS+= -Wno-error=bool-operation \ -Wno-error=deprecated \ -Wno-error=expansion-to-defined \ @@ -185,7 +183,7 @@ CWARNFLAGS+= -Wno-error=bool-operation \ .endif # GCC 8.1.0 -.if ${COMPILER_VERSION} >= 80100 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80100 CWARNFLAGS+= -Wno-error=aggressive-loop-optimizations \ -Wno-error=cast-function-type \ -Wno-error=catch-value \ @@ -194,10 +192,9 @@ CWARNFLAGS+= -Wno-error=aggressive-loop-optimizations \ -Wno-error=sizeof-pointer-memaccess \ -Wno-error=stringop-truncation .endif -.endif # gcc # How to handle FreeBSD custom printf format specifiers. -.if ${COMPILER_TYPE} == "clang" +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ .else FORMAT_EXTENSIONS= -fformat-extensions @@ -214,7 +211,11 @@ CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3 .if ${COMPILER_VERSION} < 130000 CLANG_OPT_SMALL+= -mllvm -simplifycfg-dup-ret .endif +.if ${COMPILER_VERSION} >= 30500 && ${COMPILER_VERSION} < 30700 +CLANG_OPT_SMALL+= -mllvm -enable-gvn=false +.else CLANG_OPT_SMALL+= -mllvm -enable-load-pre=false +.endif CFLAGS.clang+= -Qunused-arguments .if ${MACHINE_CPUARCH} == "sparc64" # Don't emit .cfi directives, since we must use GNU as on sparc64, for now. @@ -229,8 +230,14 @@ CXXFLAGS.clang+= -Wno-c++11-extensions .if ${MK_SSP} != "no" && \ ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" +.if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30500) || \ + (${COMPILER_TYPE} == "gcc" && \ + (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40900)) # Don't use -Wstack-protector as it breaks world with -Werror. SSP_CFLAGS?= -fstack-protector-strong +.else +SSP_CFLAGS?= -fstack-protector +.endif CFLAGS+= ${SSP_CFLAGS} .endif # SSP && !ARM && !MIPS diff --git a/stand/arm/uboot/Makefile b/stand/arm/uboot/Makefile index f99282aa6e5a..0c906c99ee6f 100644 --- a/stand/arm/uboot/Makefile +++ b/stand/arm/uboot/Makefile @@ -24,7 +24,7 @@ UBLDR_LOADADDR?= 0x1000000 # Architecture-specific loader code SRCS= start.S conf.c self_reloc.c vers.c -.if ${COMPILER_TYPE} == "gcc" +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201 CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized .endif diff --git a/stand/defs.mk b/stand/defs.mk index 45d48ccdab8a..c81be884f3ae 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -149,7 +149,11 @@ CFLAGS+= -fPIC -mno-red-zone # Do not generate movt/movw, because the relocation fixup for them does not # translate to the -Bsymbolic -pie format required by self_reloc() in loader(8). # Also, the fpu is not available in a standalone environment. +.if ${COMPILER_VERSION} < 30800 +CFLAGS.clang+= -mllvm -arm-use-movt=0 +.else CFLAGS.clang+= -mno-movt +.endif CFLAGS.clang+= -mfpu=none CFLAGS+= -fPIC .endif diff --git a/stand/efi/Makefile b/stand/efi/Makefile index 94cb5bba5638..9ab6aa4291fb 100644 --- a/stand/efi/Makefile +++ b/stand/efi/Makefile @@ -4,6 +4,10 @@ NO_OBJ=t .include +# In-tree GCC does not support __attribute__((ms_abi)), but gcc newer +# than 4.5 supports it. +.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500 + SUBDIR.yes+= libefi SUBDIR.${MK_FDT}+= fdt SUBDIR.yes+= .WAIT @@ -14,4 +18,6 @@ SUBDIR.${MK_FORTH}+= loader_4th SUBDIR.${MK_LOADER_LUA}+= loader_lua SUBDIR.yes+= loader_simp +.endif # ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500 + .include diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile index 899b00d97341..d4ac55598bb7 100644 --- a/stand/efi/boot1/Makefile +++ b/stand/efi/boot1/Makefile @@ -42,6 +42,10 @@ CFLAGS.zfs_module.c+= -I${SYSDIR}/cddl/contrib/opensolaris/common/lz4 CFLAGS+= -DEFI_ZFS_BOOT .endif +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201 +CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized +.endif + CFLAGS+= -I${EFIINC} CFLAGS+= -I${EFIINCMD} CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index cda242924be0..d290cae5d4c8 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -32,6 +32,10 @@ CFLAGS+= -DEFI_ZFS_BOOT HAVE_ZFS= yes .endif +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201 +CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized +.endif + # We implement a slightly non-standard %S in that it always takes a # CHAR16 that's common in UEFI-land instead of a wchar_t. This only # seems to matter on arm64 where wchar_t defaults to an int instead diff --git a/stand/i386/boot2/Makefile b/stand/i386/boot2/Makefile index 713929efc2b5..3830199b2c4b 100644 --- a/stand/i386/boot2/Makefile +++ b/stand/i386/boot2/Makefile @@ -37,6 +37,9 @@ CFLAGS+=-fomit-frame-pointer \ CFLAGS.gcc+= -Os \ -fno-asynchronous-unwind-tables \ --param max-inline-insns-single=100 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201 +CFLAGS.gcc+= -mno-align-long-strings +.endif CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL} diff --git a/stand/i386/isoboot/Makefile b/stand/i386/isoboot/Makefile index 59033dfcd4c9..597958065090 100644 --- a/stand/i386/isoboot/Makefile +++ b/stand/i386/isoboot/Makefile @@ -32,6 +32,9 @@ CFLAGS+=-DBOOTPROG=\"isoboot\" \ -Winline -Wno-pointer-sign CFLAGS.gcc+= --param max-inline-insns-single=100 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201 +CFLAGS.gcc+= -Wno-uninitialized +.endif CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL} LD_FLAGS+=${LD_FLAGS_BIN} diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index 44db171b141f..0ca994386f47 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -46,7 +46,11 @@ SRCS+= subr_boot.c # Do not generate movt/movw, because the relocation fixup for them does not # translate to the -Bsymbolic -pie format required by self_reloc() in loader(8). # Also, the fpu is not available in a standalone environment. +.if ${COMPILER_VERSION} < 30800 +CFLAGS.clang+= -mllvm -arm-use-movt=0 +.else CFLAGS.clang+= -mno-movt +.endif CFLAGS.clang+= -mfpu=none .PATH: ${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins/arm/ diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm index ba918c27cbc5..8c9069bad311 100644 --- a/sys/conf/Makefile.arm +++ b/sys/conf/Makefile.arm @@ -47,6 +47,10 @@ CFLAGS.clang += -mfpu=none .if !empty(DDB_ENABLED) CFLAGS += -funwind-tables +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 30500 +# clang < 3.5.0 requires us to tell it to emit assembly with unwind information +CFLAGS += -mllvm -arm-enable-ehabi +.endif .endif # "makeoptions KERNVIRTADDR=" is now optional, supply the default value. diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 34ffc8cb15ca..c93be4b1b24c 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -34,14 +34,19 @@ NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation CWARNEXTRA?= -Wno-error=tautological-compare -Wno-error=empty-body \ -Wno-error=parentheses-equality -Wno-error=unused-function \ -Wno-error=pointer-sign +.if ${COMPILER_VERSION} >= 30700 CWARNEXTRA+= -Wno-error=shift-negative-value +.endif +.if ${COMPILER_VERSION} >= 40000 CWARNEXTRA+= -Wno-address-of-packed-member +.endif .if ${COMPILER_VERSION} >= 130000 CWARNFLAGS+= -Wno-error=unused-but-set-variable .endif .endif # clang .if ${COMPILER_TYPE} == "gcc" +.if ${COMPILER_VERSION} >= 40800 # Catch-all for all the things that are in our tree, but for which we're # not yet ready for this compiler. NO_WUNUSED_BUT_SET_VARIABLE = -Wno-unused-but-set-variable @@ -53,15 +58,14 @@ CWARNEXTRA?= -Wno-error=address \ -Wno-error=enum-compare \ -Wno-error=inline \ -Wno-error=maybe-uninitialized \ - -Wno-error=misleading-indentation \ - -Wno-error=nonnull-compare \ -Wno-error=overflow \ -Wno-error=sequence-point \ + -Wno-error=unused-but-set-variable +.if ${COMPILER_VERSION} >= 60100 +CWARNEXTRA+= -Wno-error=misleading-indentation \ + -Wno-error=nonnull-compare \ -Wno-error=shift-overflow \ - -Wno-error=tautological-compare \ - -Wno-unused-but-set-variable -.if ${COMPILER_VERSION} >= 70100 -CWARNEXTRA+= -Wno-error=stringop-overflow + -Wno-error=tautological-compare .endif .if ${COMPILER_VERSION} >= 70200 CWARNEXTRA+= -Wno-error=memset-elt-size @@ -69,10 +73,14 @@ CWARNEXTRA+= -Wno-error=memset-elt-size .if ${COMPILER_VERSION} >= 80000 CWARNEXTRA+= -Wno-error=packed-not-aligned .endif -.if ${COMPILER_VERSION} >= 90100 -CWARNEXTRA+= -Wno-address-of-packed-member +.else +# For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars. +CWARNEXTRA?= -Wno-uninitialized +# GCC 4.2 doesn't have -Wno-error=cast-qual, so just disable the warning for +# the few files that are already known to generate cast-qual warnings. +NO_WCAST_QUAL= -Wno-cast-qual +.endif .endif -.endif # gcc # This warning is utter nonsense CWARNFLAGS+= -Wno-format-zero-length @@ -81,7 +89,7 @@ CWARNFLAGS+= -Wno-format-zero-length # to be disabled. WARNING: format checking is disabled in this case. .if ${MK_FORMAT_EXTENSIONS} == "no" FORMAT_EXTENSIONS= -Wno-format -.elif ${COMPILER_TYPE} == "clang" +.elif ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ .else FORMAT_EXTENSIONS= -fformat-extensions @@ -196,7 +204,12 @@ CFLAGS.gcc+= -mno-spe # DDB happy. ELFv2, if available, has some other efficiency benefits. # .if ${MACHINE_ARCH} == "powerpc64" -CFLAGS+= -mabi=elfv2 +.if ${COMPILER_VERSION} >= 40900 +CFLAGS.gcc+= -mabi=elfv2 +.else +CFLAGS.gcc+= -mcall-aixdesc +.endif +CFLAGS.clang+= -mabi=elfv2 .endif # diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index b24909642dfe..cce9fcfd1c6d 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -311,7 +311,10 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .depend: .PRECIOUS ${SRCS} +.if ${COMPILER_TYPE} == "clang" || \ + (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000) _MAP_DEBUG_PREFIX= yes +.endif _ILINKS= machine .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64" diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 04f34b6e0c5c..7f0099344d18 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -93,7 +93,11 @@ CFLAGS.gcc+= -fms-extensions .if defined(CFLAGS_ARCH_PARAMS) CFLAGS.gcc+=${CFLAGS_ARCH_PARAMS} .endif +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000 +WERROR?= -Wno-error +.else WERROR?= -Werror +.endif # The following should be removed no earlier than LLVM11 being imported into the # tree, to ensure we don't regress the build. LLVM11 and GCC10 will switch the # default over to -fno-common, making this redundant. diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 3c63deb6ddd1..610484ba7e36 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -102,7 +102,11 @@ __KLD_SHARED=no .if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing) CFLAGS+= -fno-strict-aliasing .endif +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000 +WERROR?= -Wno-error +.else WERROR?= -Werror +.endif LINUXKPI_GENSRCS+= \ bus_if.h \ @@ -167,7 +171,11 @@ CFLAGS+= -fPIC # Temporary workaround for PR 196407, which contains the fascinating details. # Don't allow clang to use fpu instructions or registers in kernel modules. .if ${MACHINE_CPUARCH} == arm +.if ${COMPILER_VERSION} < 30800 +CFLAGS.clang+= -mllvm -arm-use-movt=0 +.else CFLAGS.clang+= -mno-movt +.endif CFLAGS.clang+= -mfpu=none CFLAGS+= -funwind-tables .endif @@ -277,7 +285,10 @@ ${FULLPROG}: ${OBJS} ${OBJCOPY} --strip-debug ${.TARGET} .endif +.if ${COMPILER_TYPE} == "clang" || \ + (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000) _MAP_DEBUG_PREFIX= yes +.endif _ILINKS=machine .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64" diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 61603cf32ab4..f4b7d4f8a5bd 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -684,8 +684,10 @@ _aac= aac _aacraid= aacraid _acpi= acpi .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) +.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} > 40201 _aesni= aesni .endif +.endif _amd_ecc_inject=amd_ecc_inject _amdsbwd= amdsbwd _amdsmn= amdsmn diff --git a/usr.sbin/acpi/acpidb/Makefile b/usr.sbin/acpi/acpidb/Makefile index 5a6fceb2a4cb..566794fa6f4b 100644 --- a/usr.sbin/acpi/acpidb/Makefile +++ b/usr.sbin/acpi/acpidb/Makefile @@ -87,6 +87,6 @@ LIBADD= pthread # integer to pointer, which is a GNU extension. # # Turn off the warning, because this is in contributed code. -.if ${COMPILER_TYPE} == "clang" +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 60000 CWARNFLAGS+= -Wno-null-pointer-arithmetic .endif diff --git a/usr.sbin/trpt/Makefile b/usr.sbin/trpt/Makefile index 33a3d1f81a7f..4756cb1a0d03 100644 --- a/usr.sbin/trpt/Makefile +++ b/usr.sbin/trpt/Makefile @@ -8,12 +8,18 @@ MAN= trpt.8 BINGRP= kmem BINMODE= 2555 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000 +WARNS?= 4 +.endif + .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif .include +.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 50000 # Several included system headers tickle this warning in ways that are # difficult to work around in this program. CFLAGS+= -Wno-missing-variable-declarations +.endif diff --git a/usr.sbin/zic/zic/Makefile b/usr.sbin/zic/zic/Makefile index 17ffb33a57e7..36cc79009b45 100644 --- a/usr.sbin/zic/zic/Makefile +++ b/usr.sbin/zic/zic/Makefile @@ -15,7 +15,7 @@ CFLAGS+= -I${.CURDIR:H} -I${SRCTOP}/contrib/tzcode/stdtime WARNS?= 2 -.if ${COMPILER_TYPE} == "gcc" +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50300 CWARNFLAGS+= -Wno-error=strict-overflow .endif From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 17:11:35 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99942678F00; Fri, 3 Sep 2021 17:11:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1PTg1G4zz3l63; Fri, 3 Sep 2021 17:11:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B3FA243; Fri, 3 Sep 2021 17:11:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183HBYXr099256; Fri, 3 Sep 2021 17:11:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183HBYsB099255; Fri, 3 Sep 2021 17:11:34 GMT (envelope-from git) Date: Fri, 3 Sep 2021 17:11:34 GMT Message-Id: <202109031711.183HBYsB099255@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: 6a817b64ab2a - stable/13 - Import OpenSSL 1.1.1l MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6a817b64ab2aa8c2e40a0d3b63c1432b7f2d6c46 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 17:11:35 -0000 The branch stable/13 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=6a817b64ab2aa8c2e40a0d3b63c1432b7f2d6c46 commit 6a817b64ab2aa8c2e40a0d3b63c1432b7f2d6c46 Author: Jung-uk Kim AuthorDate: 2021-09-01 04:26:38 +0000 Commit: Jung-uk Kim CommitDate: 2021-09-03 17:09:29 +0000 Import OpenSSL 1.1.1l (cherry picked from commit 9a3ae0cdef9ac9a4b8c5cc66305d9a516ce8d4a0) --- crypto/openssl/CHANGES | 65 ++++++++ crypto/openssl/NEWS | 5 + crypto/openssl/README | 2 +- crypto/openssl/apps/crl2p7.c | 18 +- crypto/openssl/apps/enc.c | 4 +- crypto/openssl/apps/s_server.c | 13 +- crypto/openssl/apps/s_socket.c | 12 +- crypto/openssl/crypto/armcap.c | 15 ++ crypto/openssl/crypto/asn1/a_object.c | 15 +- crypto/openssl/crypto/asn1/a_strex.c | 4 +- crypto/openssl/crypto/asn1/asn1_lib.c | 2 +- crypto/openssl/crypto/asn1/bio_asn1.c | 7 +- crypto/openssl/crypto/asn1/bio_ndef.c | 3 + crypto/openssl/crypto/asn1/d2i_pr.c | 73 +++++--- crypto/openssl/crypto/asn1/t_spki.c | 2 +- crypto/openssl/crypto/bio/b_addr.c | 4 +- crypto/openssl/crypto/bio/b_sock2.c | 5 +- crypto/openssl/crypto/bn/bn_div.c | 9 +- crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl | 54 ++++-- crypto/openssl/crypto/dsa/dsa_prn.c | 14 +- crypto/openssl/crypto/ec/ec2_oct.c | 43 ++++- crypto/openssl/crypto/ec/ec_asn1.c | 2 +- crypto/openssl/crypto/err/openssl.txt | 5 + crypto/openssl/crypto/evp/e_aes.c | 192 +++++++++++----------- crypto/openssl/crypto/evp/e_camellia.c | 10 +- crypto/openssl/crypto/hmac/hm_ameth.c | 5 +- crypto/openssl/crypto/pkcs12/p12_key.c | 4 +- crypto/openssl/crypto/poly1305/poly1305_ameth.c | 4 +- crypto/openssl/crypto/ppccap.c | 6 + crypto/openssl/crypto/rand/rand_unix.c | 10 +- crypto/openssl/crypto/rsa/rsa_prn.c | 8 +- crypto/openssl/crypto/siphash/siphash_ameth.c | 4 +- crypto/openssl/crypto/sm2/sm2_crypt.c | 2 +- crypto/openssl/crypto/sm2/sm2_pmeth.c | 2 +- crypto/openssl/crypto/sparcv9cap.c | 3 +- crypto/openssl/crypto/srp/srp_vfy.c | 13 +- crypto/openssl/crypto/store/loader_file.c | 3 +- crypto/openssl/crypto/ts/ts_rsp_verify.c | 3 +- crypto/openssl/crypto/ts/ts_verify_ctx.c | 4 +- crypto/openssl/crypto/uid.c | 8 +- crypto/openssl/crypto/x509/t_x509.c | 6 +- crypto/openssl/crypto/x509/x509_vpm.c | 6 +- crypto/openssl/crypto/x509v3/v3_akey.c | 12 +- crypto/openssl/crypto/x509v3/v3_alt.c | 2 +- crypto/openssl/crypto/x509v3/v3_cpols.c | 2 +- crypto/openssl/crypto/x509v3/v3_ncons.c | 2 +- crypto/openssl/crypto/x509v3/v3_pci.c | 2 +- crypto/openssl/crypto/x509v3/v3_utl.c | 13 +- crypto/openssl/crypto/x509v3/v3err.c | 6 +- crypto/openssl/doc/man1/enc.pod | 4 +- crypto/openssl/doc/man1/s_client.pod | 2 +- crypto/openssl/doc/man1/s_server.pod | 2 +- crypto/openssl/doc/man3/BIO_f_ssl.pod | 7 +- crypto/openssl/doc/man3/BIO_push.pod | 6 +- crypto/openssl/doc/man3/BN_cmp.pod | 41 +++-- crypto/openssl/doc/man3/d2i_PrivateKey.pod | 6 +- crypto/openssl/doc/man7/x509.pod | 6 +- crypto/openssl/include/crypto/sm2.h | 2 +- crypto/openssl/include/crypto/x509.h | 2 +- crypto/openssl/include/openssl/e_os2.h | 5 +- crypto/openssl/include/openssl/opensslv.h | 4 +- crypto/openssl/include/openssl/sslerr.h | 5 +- crypto/openssl/include/openssl/x509v3err.h | 4 +- crypto/openssl/ssl/bio_ssl.c | 3 +- crypto/openssl/ssl/d1_lib.c | 3 +- crypto/openssl/ssl/record/rec_layer_s3.c | 8 +- crypto/openssl/ssl/record/ssl3_buffer.c | 3 +- crypto/openssl/ssl/record/ssl3_record.c | 36 ++-- crypto/openssl/ssl/s3_msg.c | 4 +- crypto/openssl/ssl/ssl_cert.c | 35 ++-- crypto/openssl/ssl/ssl_err.c | 7 +- crypto/openssl/ssl/ssl_lib.c | 59 ++++++- crypto/openssl/ssl/ssl_local.h | 2 +- crypto/openssl/ssl/statem/extensions.c | 31 +++- crypto/openssl/ssl/statem/extensions_srvr.c | 9 +- crypto/openssl/ssl/statem/statem_clnt.c | 5 +- crypto/openssl/ssl/statem/statem_local.h | 4 +- crypto/openssl/ssl/statem/statem_srvr.c | 9 +- crypto/openssl/ssl/t1_lib.c | 11 +- 79 files changed, 701 insertions(+), 332 deletions(-) diff --git a/crypto/openssl/CHANGES b/crypto/openssl/CHANGES index 7f8057bb6f0a..fae493da34cf 100644 --- a/crypto/openssl/CHANGES +++ b/crypto/openssl/CHANGES @@ -7,6 +7,71 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1k and 1.1.1l [24 Aug 2021] + + *) Fixed an SM2 Decryption Buffer Overflow. + + In order to decrypt SM2 encrypted data an application is expected to call the + API function EVP_PKEY_decrypt(). Typically an application will call this + function twice. The first time, on entry, the "out" parameter can be NULL and, + on exit, the "outlen" parameter is populated with the buffer size required to + hold the decrypted plaintext. The application can then allocate a sufficiently + sized buffer and call EVP_PKEY_decrypt() again, but this time passing a non-NULL + value for the "out" parameter. + + A bug in the implementation of the SM2 decryption code means that the + calculation of the buffer size required to hold the plaintext returned by the + first call to EVP_PKEY_decrypt() can be smaller than the actual size required by + the second call. This can lead to a buffer overflow when EVP_PKEY_decrypt() is + called by the application a second time with a buffer that is too small. + + A malicious attacker who is able present SM2 content for decryption to an + application could cause attacker chosen data to overflow the buffer by up to a + maximum of 62 bytes altering the contents of other data held after the + buffer, possibly changing application behaviour or causing the application to + crash. The location of the buffer is application dependent but is typically + heap allocated. + (CVE-2021-3711) + [Matt Caswell] + + *) Fixed various read buffer overruns processing ASN.1 strings + + ASN.1 strings are represented internally within OpenSSL as an ASN1_STRING + structure which contains a buffer holding the string data and a field holding + the buffer length. This contrasts with normal C strings which are repesented as + a buffer for the string data which is terminated with a NUL (0) byte. + + Although not a strict requirement, ASN.1 strings that are parsed using OpenSSL's + own "d2i" functions (and other similar parsing functions) as well as any string + whose value has been set with the ASN1_STRING_set() function will additionally + NUL terminate the byte array in the ASN1_STRING structure. + + However, it is possible for applications to directly construct valid ASN1_STRING + structures which do not NUL terminate the byte array by directly setting the + "data" and "length" fields in the ASN1_STRING array. This can also happen by + using the ASN1_STRING_set0() function. + + Numerous OpenSSL functions that print ASN.1 data have been found to assume that + the ASN1_STRING byte array will be NUL terminated, even though this is not + guaranteed for strings that have been directly constructed. Where an application + requests an ASN.1 structure to be printed, and where that ASN.1 structure + contains ASN1_STRINGs that have been directly constructed by the application + without NUL terminating the "data" field, then a read buffer overrun can occur. + + The same thing can also occur during name constraints processing of certificates + (for example if a certificate has been directly constructed by the application + instead of loading it via the OpenSSL parsing functions, and the certificate + contains non NUL terminated ASN1_STRING structures). It can also occur in the + X509_get1_email(), X509_REQ_get1_email() and X509_get1_ocsp() functions. + + If a malicious actor can cause an application to directly construct an + ASN1_STRING and then process it through one of the affected OpenSSL functions + then this issue could be hit. This might result in a crash (causing a Denial of + Service attack). It could also result in the disclosure of private memory + contents (such as private keys, or sensitive plaintext). + (CVE-2021-3712) + [Matt Caswell] + Changes between 1.1.1j and 1.1.1k [25 Mar 2021] *) Fixed a problem with verifying a certificate chain when using the diff --git a/crypto/openssl/NEWS b/crypto/openssl/NEWS index 05991a0c214a..5a1207c66ed4 100644 --- a/crypto/openssl/NEWS +++ b/crypto/openssl/NEWS @@ -5,6 +5,11 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1k and OpenSSL 1.1.1l [24 Aug 2021] + + o Fixed an SM2 Decryption Buffer Overflow (CVE-2021-3711) + o Fixed various read buffer overruns processing ASN.1 strings (CVE-2021-3712) + Major changes between OpenSSL 1.1.1j and OpenSSL 1.1.1k [25 Mar 2021] o Fixed a problem with verifying a certificate chain when using the diff --git a/crypto/openssl/README b/crypto/openssl/README index b92a8bd3a4b5..7dc4e6790c34 100644 --- a/crypto/openssl/README +++ b/crypto/openssl/README @@ -1,5 +1,5 @@ - OpenSSL 1.1.1k 25 Mar 2021 + OpenSSL 1.1.1l 24 Aug 2021 Copyright (c) 1998-2021 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson diff --git a/crypto/openssl/apps/crl2p7.c b/crypto/openssl/apps/crl2p7.c index 88fabcb22c36..3f619bf5278e 100644 --- a/crypto/openssl/apps/crl2p7.c +++ b/crypto/openssl/apps/crl2p7.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -120,19 +120,20 @@ int crl2pkcs7_main(int argc, char **argv) if (!ASN1_INTEGER_set(p7s->version, 1)) goto end; - if ((crl_stack = sk_X509_CRL_new_null()) == NULL) - goto end; - p7s->crl = crl_stack; + if (crl != NULL) { + if ((crl_stack = sk_X509_CRL_new_null()) == NULL) + goto end; + p7s->crl = crl_stack; sk_X509_CRL_push(crl_stack, crl); crl = NULL; /* now part of p7 for OPENSSL_freeing */ } - if ((cert_stack = sk_X509_new_null()) == NULL) - goto end; - p7s->cert = cert_stack; + if (certflst != NULL) { + if ((cert_stack = sk_X509_new_null()) == NULL) + goto end; + p7s->cert = cert_stack; - if (certflst != NULL) for (i = 0; i < sk_OPENSSL_STRING_num(certflst); i++) { certfile = sk_OPENSSL_STRING_value(certflst, i); if (add_certs_from_file(cert_stack, certfile) < 0) { @@ -141,6 +142,7 @@ int crl2pkcs7_main(int argc, char **argv) goto end; } } + } out = bio_open_default(outfile, 'w', outformat); if (out == NULL) diff --git a/crypto/openssl/apps/enc.c b/crypto/openssl/apps/enc.c index ddf51e0dba15..65710771a089 100644 --- a/crypto/openssl/apps/enc.c +++ b/crypto/openssl/apps/enc.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -81,7 +81,7 @@ const OPTIONS enc_options[] = { {"", OPT_CIPHER, '-', "Any supported cipher"}, OPT_R_OPTIONS, #ifdef ZLIB - {"z", OPT_Z, '-', "Use zlib as the 'encryption'"}, + {"z", OPT_Z, '-', "Compress or decompress encrypted data using zlib"}, #endif #ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, diff --git a/crypto/openssl/apps/s_server.c b/crypto/openssl/apps/s_server.c index ddc0b4bcd76d..c11aeee440a2 100644 --- a/crypto/openssl/apps/s_server.c +++ b/crypto/openssl/apps/s_server.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * Copyright 2005 Nokia. All rights reserved. * @@ -133,6 +133,17 @@ static unsigned int psk_server_cb(SSL *ssl, const char *identity, if (s_debug) BIO_printf(bio_s_out, "psk_server_cb\n"); + + if (SSL_version(ssl) >= TLS1_3_VERSION) { + /* + * This callback is designed for use in TLSv1.2. It is possible to use + * a single callback for all protocol versions - but it is preferred to + * use a dedicated callback for TLSv1.3. For TLSv1.3 we have + * psk_find_session_cb. + */ + return 0; + } + if (identity == NULL) { BIO_printf(bio_err, "Error: client did not send PSK identity\n"); goto out_err; diff --git a/crypto/openssl/apps/s_socket.c b/crypto/openssl/apps/s_socket.c index 76f928900207..aee366d5f457 100644 --- a/crypto/openssl/apps/s_socket.c +++ b/crypto/openssl/apps/s_socket.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -214,6 +214,8 @@ int do_server(int *accept_sock, const char *host, const char *port, const BIO_ADDRINFO *next; int sock_family, sock_type, sock_protocol, sock_port; const BIO_ADDR *sock_address; + int sock_family_fallback = AF_UNSPEC; + const BIO_ADDR *sock_address_fallback = NULL; int sock_options = BIO_SOCK_REUSEADDR; int ret = 0; @@ -244,6 +246,10 @@ int do_server(int *accept_sock, const char *host, const char *port, && BIO_ADDRINFO_protocol(next) == sock_protocol) { if (sock_family == AF_INET && BIO_ADDRINFO_family(next) == AF_INET6) { + /* In case AF_INET6 is returned but not supported by the + * kernel, retry with the first detected address family */ + sock_family_fallback = sock_family; + sock_address_fallback = sock_address; sock_family = AF_INET6; sock_address = BIO_ADDRINFO_address(next); } else if (sock_family == AF_INET6 @@ -253,6 +259,10 @@ int do_server(int *accept_sock, const char *host, const char *port, } asock = BIO_socket(sock_family, sock_type, sock_protocol, 0); + if (asock == INVALID_SOCKET && sock_family_fallback != AF_UNSPEC) { + asock = BIO_socket(sock_family_fallback, sock_type, sock_protocol, 0); + sock_address = sock_address_fallback; + } if (asock == INVALID_SOCKET || !BIO_listen(asock, sock_address, sock_options)) { BIO_ADDRINFO_free(res); diff --git a/crypto/openssl/crypto/armcap.c b/crypto/openssl/crypto/armcap.c index 8bf96f10214f..c5685bde5891 100644 --- a/crypto/openssl/crypto/armcap.c +++ b/crypto/openssl/crypto/armcap.c @@ -68,6 +68,12 @@ void OPENSSL_cpuid_setup(void) __attribute__ ((constructor)); # include # define OSSL_IMPLEMENT_GETAUXVAL # endif +# elif defined(__ANDROID_API__) +/* see https://developer.android.google.cn/ndk/guides/cpu-features */ +# if __ANDROID_API__ >= 18 +# include +# define OSSL_IMPLEMENT_GETAUXVAL +# endif # endif # if defined(__FreeBSD__) # include @@ -87,6 +93,15 @@ static unsigned long getauxval(unsigned long key) # endif # endif +/* + * Android: according to https://developer.android.com/ndk/guides/cpu-features, + * getauxval is supported starting with API level 18 + */ +# if defined(__ANDROID__) && defined(__ANDROID_API__) && __ANDROID_API__ >= 18 +# include +# define OSSL_IMPLEMENT_GETAUXVAL +# endif + /* * ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas * AArch64 used AT_HWCAP. diff --git a/crypto/openssl/crypto/asn1/a_object.c b/crypto/openssl/crypto/asn1/a_object.c index d67a723c9611..8ade9e50a7cb 100644 --- a/crypto/openssl/crypto/asn1/a_object.c +++ b/crypto/openssl/crypto/asn1/a_object.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -286,16 +286,13 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, } } - /* - * only the ASN1_OBJECTs from the 'table' will have values for ->sn or - * ->ln - */ if ((a == NULL) || ((*a) == NULL) || !((*a)->flags & ASN1_OBJECT_FLAG_DYNAMIC)) { if ((ret = ASN1_OBJECT_new()) == NULL) return NULL; - } else + } else { ret = (*a); + } p = *pp; /* detach data from object */ @@ -313,6 +310,12 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, ret->flags |= ASN1_OBJECT_FLAG_DYNAMIC_DATA; } memcpy(data, p, length); + /* If there are dynamic strings, free them here, and clear the flag */ + if ((ret->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) != 0) { + OPENSSL_free((char *)ret->sn); + OPENSSL_free((char *)ret->ln); + ret->flags &= ~ASN1_OBJECT_FLAG_DYNAMIC_STRINGS; + } /* reattach data to object, after which it remains const */ ret->data = data; ret->length = length; diff --git a/crypto/openssl/crypto/asn1/a_strex.c b/crypto/openssl/crypto/asn1/a_strex.c index 4879b33785e9..284dde274c9f 100644 --- a/crypto/openssl/crypto/asn1/a_strex.c +++ b/crypto/openssl/crypto/asn1/a_strex.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -280,6 +280,8 @@ static int do_dump(unsigned long lflags, char_io *io_ch, void *arg, t.type = str->type; t.value.ptr = (char *)str; der_len = i2d_ASN1_TYPE(&t, NULL); + if (der_len <= 0) + return -1; if ((der_buf = OPENSSL_malloc(der_len)) == NULL) { ASN1err(ASN1_F_DO_DUMP, ERR_R_MALLOC_FAILURE); return -1; diff --git a/crypto/openssl/crypto/asn1/asn1_lib.c b/crypto/openssl/crypto/asn1/asn1_lib.c index 8e62f3307443..3d99d1383d42 100644 --- a/crypto/openssl/crypto/asn1/asn1_lib.c +++ b/crypto/openssl/crypto/asn1/asn1_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/asn1/bio_asn1.c b/crypto/openssl/crypto/asn1/bio_asn1.c index 86ee56632305..914d77c866c6 100644 --- a/crypto/openssl/crypto/asn1/bio_asn1.c +++ b/crypto/openssl/crypto/asn1/bio_asn1.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -138,6 +138,11 @@ static int asn1_bio_free(BIO *b) if (ctx == NULL) return 0; + if (ctx->prefix_free != NULL) + ctx->prefix_free(b, &ctx->ex_buf, &ctx->ex_len, &ctx->ex_arg); + if (ctx->suffix_free != NULL) + ctx->suffix_free(b, &ctx->ex_buf, &ctx->ex_len, &ctx->ex_arg); + OPENSSL_free(ctx->buf); OPENSSL_free(ctx); BIO_set_data(b, NULL); diff --git a/crypto/openssl/crypto/asn1/bio_ndef.c b/crypto/openssl/crypto/asn1/bio_ndef.c index d7d7d80eea91..760e4846a474 100644 --- a/crypto/openssl/crypto/asn1/bio_ndef.c +++ b/crypto/openssl/crypto/asn1/bio_ndef.c @@ -142,6 +142,9 @@ static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, ndef_aux = *(NDEF_SUPPORT **)parg; + if (ndef_aux == NULL) + return 0; + OPENSSL_free(ndef_aux->derbuf); ndef_aux->derbuf = NULL; diff --git a/crypto/openssl/crypto/asn1/d2i_pr.c b/crypto/openssl/crypto/asn1/d2i_pr.c index 7b127d2092fa..2094963036fe 100644 --- a/crypto/openssl/crypto/asn1/d2i_pr.c +++ b/crypto/openssl/crypto/asn1/d2i_pr.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -78,13 +78,53 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, * type */ +static EVP_PKEY *key_as_pkcs8(const unsigned char **pp, long length, int *carry_on) +{ + const unsigned char *p = *pp; + PKCS8_PRIV_KEY_INFO *p8 = d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, length); + EVP_PKEY *ret; + + if (p8 == NULL) + return NULL; + + ret = EVP_PKCS82PKEY(p8); + if (ret == NULL) + *carry_on = 0; + + PKCS8_PRIV_KEY_INFO_free(p8); + + if (ret != NULL) + *pp = p; + + return ret; +} + EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, long length) { STACK_OF(ASN1_TYPE) *inkey; const unsigned char *p; int keytype; + EVP_PKEY *ret = NULL; + int carry_on = 1; + + ERR_set_mark(); + ret = key_as_pkcs8(pp, length, &carry_on); + if (ret != NULL) { + ERR_clear_last_mark(); + if (a != NULL) + *a = ret; + return ret; + } + + if (carry_on == 0) { + ERR_clear_last_mark(); + ASN1err(ASN1_F_D2I_AUTOPRIVATEKEY, + ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE); + return NULL; + } p = *pp; + /* * Dirty trick: read in the ASN1 data into a STACK_OF(ASN1_TYPE): by * analyzing it we can determine the passed structure: this assumes the @@ -100,28 +140,15 @@ EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, keytype = EVP_PKEY_DSA; else if (sk_ASN1_TYPE_num(inkey) == 4) keytype = EVP_PKEY_EC; - else if (sk_ASN1_TYPE_num(inkey) == 3) { /* This seems to be PKCS8, not - * traditional format */ - PKCS8_PRIV_KEY_INFO *p8 = d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, length); - EVP_PKEY *ret; - - sk_ASN1_TYPE_pop_free(inkey, ASN1_TYPE_free); - if (!p8) { - ASN1err(ASN1_F_D2I_AUTOPRIVATEKEY, - ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE); - return NULL; - } - ret = EVP_PKCS82PKEY(p8); - PKCS8_PRIV_KEY_INFO_free(p8); - if (ret == NULL) - return NULL; - *pp = p; - if (a) { - *a = ret; - } - return ret; - } else + else keytype = EVP_PKEY_RSA; sk_ASN1_TYPE_pop_free(inkey, ASN1_TYPE_free); - return d2i_PrivateKey(keytype, a, pp, length); + + ret = d2i_PrivateKey(keytype, a, pp, length); + if (ret != NULL) + ERR_pop_to_mark(); + else + ERR_clear_last_mark(); + + return ret; } diff --git a/crypto/openssl/crypto/asn1/t_spki.c b/crypto/openssl/crypto/asn1/t_spki.c index 64ee77eeecba..3d4aea8ad9a4 100644 --- a/crypto/openssl/crypto/asn1/t_spki.c +++ b/crypto/openssl/crypto/asn1/t_spki.c @@ -1,5 +1,5 @@ /* - * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/bio/b_addr.c b/crypto/openssl/crypto/bio/b_addr.c index b023bbda406b..8ea32bce401b 100644 --- a/crypto/openssl/crypto/bio/b_addr.c +++ b/crypto/openssl/crypto/bio/b_addr.c @@ -1,5 +1,5 @@ /* - * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -689,7 +689,7 @@ int BIO_lookup_ex(const char *host, const char *service, int lookup_type, hints.ai_protocol = protocol; # ifdef AI_ADDRCONFIG # ifdef AF_UNSPEC - if (family == AF_UNSPEC) + if (host != NULL && family == AF_UNSPEC) # endif hints.ai_flags |= AI_ADDRCONFIG; # endif diff --git a/crypto/openssl/crypto/bio/b_sock2.c b/crypto/openssl/crypto/bio/b_sock2.c index 80ef348d9254..771729880e4a 100644 --- a/crypto/openssl/crypto/bio/b_sock2.c +++ b/crypto/openssl/crypto/bio/b_sock2.c @@ -1,5 +1,5 @@ /* - * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -255,7 +255,8 @@ int BIO_listen(int sock, const BIO_ADDR *addr, int options) } } -# ifdef IPV6_V6ONLY + /* On OpenBSD it is always ipv6 only with ipv6 sockets thus read-only */ +# if defined(IPV6_V6ONLY) && !defined(__OpenBSD__) if (BIO_ADDR_family(addr) == AF_INET6) { /* * Note: Windows default of IPV6_V6ONLY is ON, and Linux is OFF. diff --git a/crypto/openssl/crypto/bn/bn_div.c b/crypto/openssl/crypto/bn/bn_div.c index 286d69c895fd..0da9f39b31a9 100644 --- a/crypto/openssl/crypto/bn/bn_div.c +++ b/crypto/openssl/crypto/bn/bn_div.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -268,7 +268,7 @@ int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, BIGNUM *tmp, *snum, *sdiv, *res; BN_ULONG *resp, *wnum, *wnumtop; BN_ULONG d0, d1; - int num_n, div_n; + int num_n, div_n, num_neg; assert(divisor->top > 0 && divisor->d[divisor->top - 1] != 0); @@ -326,7 +326,8 @@ int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, /* Setup quotient */ if (!bn_wexpand(res, loop)) goto err; - res->neg = (num->neg ^ divisor->neg); + num_neg = num->neg; + res->neg = (num_neg ^ divisor->neg); res->top = loop; res->flags |= BN_FLG_FIXED_TOP; resp = &(res->d[loop]); @@ -442,7 +443,7 @@ int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, *--resp = q; } /* snum holds remainder, it's as wide as divisor */ - snum->neg = num->neg; + snum->neg = num_neg; snum->top = div_n; snum->flags |= BN_FLG_FIXED_TOP; if (rm != NULL) diff --git a/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl b/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl index 227ee59ff2ba..c0e5d863dcb2 100755 --- a/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl +++ b/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -471,7 +471,7 @@ sub SSSE3ROUND { # critical path is 20 "SIMD ticks" per round &por ($b,$t); } -my $xframe = $win64 ? 32+8 : 8; +my $xframe = $win64 ? 160+8 : 8; $code.=<<___; .type ChaCha20_ssse3,\@function,5 @@ -2499,7 +2499,7 @@ sub AVX512ROUND { # critical path is 14 "SIMD ticks" per round &vprold ($b,$b,7); } -my $xframe = $win64 ? 32+8 : 8; +my $xframe = $win64 ? 160+8 : 8; $code.=<<___; .type ChaCha20_avx512,\@function,5 @@ -2515,8 +2515,16 @@ ChaCha20_avx512: sub \$64+$xframe,%rsp ___ $code.=<<___ if ($win64); - movaps %xmm6,-0x28(%r9) - movaps %xmm7,-0x18(%r9) + movaps %xmm6,-0xa8(%r9) + movaps %xmm7,-0x98(%r9) + movaps %xmm8,-0x88(%r9) + movaps %xmm9,-0x78(%r9) + movaps %xmm10,-0x68(%r9) + movaps %xmm11,-0x58(%r9) + movaps %xmm12,-0x48(%r9) + movaps %xmm13,-0x38(%r9) + movaps %xmm14,-0x28(%r9) + movaps %xmm15,-0x18(%r9) .Lavx512_body: ___ $code.=<<___; @@ -2683,8 +2691,16 @@ $code.=<<___; vzeroall ___ $code.=<<___ if ($win64); - movaps -0x28(%r9),%xmm6 - movaps -0x18(%r9),%xmm7 + movaps -0xa8(%r9),%xmm6 + movaps -0x98(%r9),%xmm7 + movaps -0x88(%r9),%xmm8 + movaps -0x78(%r9),%xmm9 + movaps -0x68(%r9),%xmm10 + movaps -0x58(%r9),%xmm11 + movaps -0x48(%r9),%xmm12 + movaps -0x38(%r9),%xmm13 + movaps -0x28(%r9),%xmm14 + movaps -0x18(%r9),%xmm15 ___ $code.=<<___; lea (%r9),%rsp @@ -2711,8 +2727,16 @@ ChaCha20_avx512vl: sub \$64+$xframe,%rsp ___ $code.=<<___ if ($win64); - movaps %xmm6,-0x28(%r9) - movaps %xmm7,-0x18(%r9) + movaps %xmm6,-0xa8(%r9) + movaps %xmm7,-0x98(%r9) + movaps %xmm8,-0x88(%r9) + movaps %xmm9,-0x78(%r9) + movaps %xmm10,-0x68(%r9) + movaps %xmm11,-0x58(%r9) + movaps %xmm12,-0x48(%r9) + movaps %xmm13,-0x38(%r9) + movaps %xmm14,-0x28(%r9) + movaps %xmm15,-0x18(%r9) .Lavx512vl_body: ___ $code.=<<___; @@ -2836,8 +2860,16 @@ $code.=<<___; vzeroall ___ $code.=<<___ if ($win64); - movaps -0x28(%r9),%xmm6 - movaps -0x18(%r9),%xmm7 + movaps -0xa8(%r9),%xmm6 + movaps -0x98(%r9),%xmm7 + movaps -0x88(%r9),%xmm8 + movaps -0x78(%r9),%xmm9 + movaps -0x68(%r9),%xmm10 + movaps -0x58(%r9),%xmm11 + movaps -0x48(%r9),%xmm12 + movaps -0x38(%r9),%xmm13 + movaps -0x28(%r9),%xmm14 + movaps -0x18(%r9),%xmm15 ___ $code.=<<___; lea (%r9),%rsp diff --git a/crypto/openssl/crypto/dsa/dsa_prn.c b/crypto/openssl/crypto/dsa/dsa_prn.c index a4a1fd5650e4..070b881e1fae 100644 --- a/crypto/openssl/crypto/dsa/dsa_prn.c +++ b/crypto/openssl/crypto/dsa/dsa_prn.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -49,9 +49,11 @@ int DSA_print(BIO *bp, const DSA *x, int off) EVP_PKEY *pk; int ret; pk = EVP_PKEY_new(); - if (pk == NULL || !EVP_PKEY_set1_DSA(pk, (DSA *)x)) + if (pk == NULL) return 0; - ret = EVP_PKEY_print_private(bp, pk, off, NULL); + ret = EVP_PKEY_set1_DSA(pk, (DSA *)x); + if (ret) + ret = EVP_PKEY_print_private(bp, pk, off, NULL); EVP_PKEY_free(pk); return ret; } @@ -61,9 +63,11 @@ int DSAparams_print(BIO *bp, const DSA *x) EVP_PKEY *pk; int ret; pk = EVP_PKEY_new(); - if (pk == NULL || !EVP_PKEY_set1_DSA(pk, (DSA *)x)) + if (pk == NULL) return 0; - ret = EVP_PKEY_print_params(bp, pk, 4, NULL); + ret = EVP_PKEY_set1_DSA(pk, (DSA *)x); + if (ret) + ret = EVP_PKEY_print_params(bp, pk, 4, NULL); EVP_PKEY_free(pk); return ret; } diff --git a/crypto/openssl/crypto/ec/ec2_oct.c b/crypto/openssl/crypto/ec/ec2_oct.c index 48543265eeab..788e6501fbcd 100644 --- a/crypto/openssl/crypto/ec/ec2_oct.c +++ b/crypto/openssl/crypto/ec/ec2_oct.c @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2011-2021 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (the "License"). You may not use @@ -247,9 +247,21 @@ int ec_GF2m_simple_oct2point(const EC_GROUP *group, EC_POINT *point, ECerr(EC_F_EC_GF2M_SIMPLE_OCT2POINT, EC_R_BUFFER_TOO_SMALL); return 0; } - form = buf[0]; - y_bit = form & 1; - form = form & ~1U; + + /* + * The first octet is the point converison octet PC, see X9.62, page 4 + * and section 4.4.2. It must be: + * 0x00 for the point at infinity + * 0x02 or 0x03 for compressed form + * 0x04 for uncompressed form + * 0x06 or 0x07 for hybrid form. + * For compressed or hybrid forms, we store the last bit of buf[0] as + * y_bit and clear it from buf[0] so as to obtain a POINT_CONVERSION_*. + * We error if buf[0] contains any but the above values. + */ + y_bit = buf[0] & 1; + form = buf[0] & ~1U; + if ((form != 0) && (form != POINT_CONVERSION_COMPRESSED) && (form != POINT_CONVERSION_UNCOMPRESSED) && (form != POINT_CONVERSION_HYBRID)) { @@ -261,6 +273,7 @@ int ec_GF2m_simple_oct2point(const EC_GROUP *group, EC_POINT *point, return 0; } + /* The point at infinity is represented by a single zero octet. */ if (form == 0) { if (len != 1) { ECerr(EC_F_EC_GF2M_SIMPLE_OCT2POINT, EC_R_INVALID_ENCODING); @@ -312,11 +325,23 @@ int ec_GF2m_simple_oct2point(const EC_GROUP *group, EC_POINT *point, goto err; } if (form == POINT_CONVERSION_HYBRID) { - if (!group->meth->field_div(group, yxi, y, x, ctx)) - goto err; - if (y_bit != BN_is_odd(yxi)) { - ECerr(EC_F_EC_GF2M_SIMPLE_OCT2POINT, EC_R_INVALID_ENCODING); - goto err; + /* + * Check that the form in the encoding was set correctly + * according to X9.62 4.4.2.a, 4(c), see also first paragraph + * of X9.62, 4.4.1.b. + */ + if (BN_is_zero(x)) { + if (y_bit != 0) { + ECerr(ERR_LIB_EC, EC_R_INVALID_ENCODING); + goto err; + } + } else { + if (!group->meth->field_div(group, yxi, y, x, ctx)) + goto err; + if (y_bit != BN_is_odd(yxi)) { + ECerr(ERR_LIB_EC, EC_R_INVALID_ENCODING); + goto err; + } } } diff --git a/crypto/openssl/crypto/ec/ec_asn1.c b/crypto/openssl/crypto/ec/ec_asn1.c index e497a259095d..c8ee1e6f1762 100644 --- a/crypto/openssl/crypto/ec/ec_asn1.c +++ b/crypto/openssl/crypto/ec/ec_asn1.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/err/openssl.txt b/crypto/openssl/crypto/err/openssl.txt index b22e8a735ccf..846c896359cb 100644 --- a/crypto/openssl/crypto/err/openssl.txt +++ b/crypto/openssl/crypto/err/openssl.txt @@ -1160,6 +1160,7 @@ SSL_F_FINAL_EC_PT_FORMATS:485:final_ec_pt_formats SSL_F_FINAL_EMS:486:final_ems SSL_F_FINAL_KEY_SHARE:503:final_key_share SSL_F_FINAL_MAXFRAGMENTLEN:557:final_maxfragmentlen +SSL_F_FINAL_PSK:639:final_psk SSL_F_FINAL_RENEGOTIATE:483:final_renegotiate SSL_F_FINAL_SERVER_NAME:558:final_server_name SSL_F_FINAL_SIG_ALGS:497:final_sig_algs @@ -1653,6 +1654,7 @@ X509V3_F_I2S_ASN1_ENUMERATED:121:i2s_ASN1_ENUMERATED X509V3_F_I2S_ASN1_IA5STRING:149:i2s_ASN1_IA5STRING X509V3_F_I2S_ASN1_INTEGER:120:i2s_ASN1_INTEGER X509V3_F_I2V_AUTHORITY_INFO_ACCESS:138:i2v_AUTHORITY_INFO_ACCESS +X509V3_F_I2V_AUTHORITY_KEYID:173:i2v_AUTHORITY_KEYID X509V3_F_LEVEL_ADD_NODE:168:level_add_node X509V3_F_NOTICE_SECTION:132:notice_section X509V3_F_NREF_NOS:133:nref_nos @@ -1693,6 +1695,7 @@ X509V3_F_V2I_SUBJECT_ALT:154:v2i_subject_alt X509V3_F_V2I_TLS_FEATURE:165:v2i_TLS_FEATURE X509V3_F_V3_GENERIC_EXTENSION:116:v3_generic_extension X509V3_F_X509V3_ADD1_I2D:140:X509V3_add1_i2d +X509V3_F_X509V3_ADD_LEN_VALUE:174:x509v3_add_len_value X509V3_F_X509V3_ADD_VALUE:105:X509V3_add_value X509V3_F_X509V3_EXT_ADD:104:X509V3_EXT_add X509V3_F_X509V3_EXT_ADD_ALIAS:106:X509V3_EXT_add_alias @@ -2742,6 +2745,7 @@ SSL_R_MISSING_DSA_SIGNING_CERT:165:missing dsa signing cert SSL_R_MISSING_ECDSA_SIGNING_CERT:381:missing ecdsa signing cert SSL_R_MISSING_FATAL:256:missing fatal SSL_R_MISSING_PARAMETERS:290:missing parameters +SSL_R_MISSING_PSK_KEX_MODES_EXTENSION:310:missing psk kex modes extension SSL_R_MISSING_RSA_CERTIFICATE:168:missing rsa certificate SSL_R_MISSING_RSA_ENCRYPTING_CERT:169:missing rsa encrypting cert SSL_R_MISSING_RSA_SIGNING_CERT:170:missing rsa signing cert @@ -2785,6 +2789,7 @@ SSL_R_NO_VALID_SCTS:216:no valid scts SSL_R_NO_VERIFY_COOKIE_CALLBACK:403:no verify cookie callback SSL_R_NULL_SSL_CTX:195:null ssl ctx SSL_R_NULL_SSL_METHOD_PASSED:196:null ssl method passed +SSL_R_OCSP_CALLBACK_FAILURE:294:ocsp callback failure SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED:197:old session cipher not returned SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED:344:\ old session compression algorithm not returned diff --git a/crypto/openssl/crypto/evp/e_aes.c b/crypto/openssl/crypto/evp/e_aes.c index 4640c7528a20..715fac9f88df 100644 --- a/crypto/openssl/crypto/evp/e_aes.c +++ b/crypto/openssl/crypto/evp/e_aes.c @@ -1,5 +1,5 @@ /* - * Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -611,22 +611,22 @@ void aes_t4_decrypt(const unsigned char *in, unsigned char *out, */ void aes128_t4_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, const AES_KEY *key, - unsigned char *ivec); + unsigned char *ivec, int /*unused*/); void aes128_t4_cbc_decrypt(const unsigned char *in, unsigned char *out, size_t len, const AES_KEY *key, - unsigned char *ivec); + unsigned char *ivec, int /*unused*/); void aes192_t4_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, const AES_KEY *key, - unsigned char *ivec); + unsigned char *ivec, int /*unused*/); void aes192_t4_cbc_decrypt(const unsigned char *in, unsigned char *out, size_t len, const AES_KEY *key, - unsigned char *ivec); + unsigned char *ivec, int /*unused*/); void aes256_t4_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, const AES_KEY *key, - unsigned char *ivec); + unsigned char *ivec, int /*unused*/); void aes256_t4_cbc_decrypt(const unsigned char *in, unsigned char *out, size_t len, const AES_KEY *key, - unsigned char *ivec); + unsigned char *ivec, int /*unused*/); void aes128_t4_ctr32_encrypt(const unsigned char *in, unsigned char *out, size_t blocks, const AES_KEY *key, unsigned char *ivec); @@ -1168,9 +1168,9 @@ typedef struct { *** 1969 LINES SKIPPED *** From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 17:11:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 96F8D678D3C; Fri, 3 Sep 2021 17:11:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1PTh3LpZz3l8l; Fri, 3 Sep 2021 17:11:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5680C30A; Fri, 3 Sep 2021 17:11:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183HBaPF099286; Fri, 3 Sep 2021 17:11:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183HBavT099283; Fri, 3 Sep 2021 17:11:36 GMT (envelope-from git) Date: Fri, 3 Sep 2021 17:11:36 GMT Message-Id: <202109031711.183HBavT099283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: f2e93641f746 - stable/13 - OpenSSL: Regen manual pages for 1.1.1l MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f2e93641f7465ce20fbb4ea75341e69b234e5df1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 17:11:36 -0000 The branch stable/13 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=f2e93641f7465ce20fbb4ea75341e69b234e5df1 commit f2e93641f7465ce20fbb4ea75341e69b234e5df1 Author: Jung-uk Kim AuthorDate: 2021-09-01 04:09:34 +0000 Commit: Jung-uk Kim CommitDate: 2021-09-03 17:10:23 +0000 OpenSSL: Regen manual pages for 1.1.1l (cherry picked from commit d594d17b8569fb7bc22263e7da3fd626b99d9203) --- secure/lib/libcrypto/Makefile.inc | 4 +- secure/lib/libcrypto/man/man3/ADMISSIONS.3 | 4 +- .../libcrypto/man/man3/ASN1_INTEGER_get_int64.3 | 4 +- secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 | 4 +- secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 | 4 +- .../lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 | 4 +- secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 | 4 +- secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 | 4 +- .../lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 | 4 +- secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 | 4 +- secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 | 4 +- .../lib/libcrypto/man/man3/ASN1_generate_nconf.3 | 4 +- secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 | 4 +- secure/lib/libcrypto/man/man3/ASYNC_start_job.3 | 4 +- secure/lib/libcrypto/man/man3/BF_encrypt.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_ADDR.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_connect.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_ctrl.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_f_base64.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_f_buffer.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_f_cipher.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_f_md.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_f_null.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_f_ssl.3 | 11 ++---- secure/lib/libcrypto/man/man3/BIO_find_type.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_get_data.3 | 4 +- .../lib/libcrypto/man/man3/BIO_get_ex_new_index.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_new.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_new_CMS.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_printf.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_push.3 | 10 ++--- secure/lib/libcrypto/man/man3/BIO_read.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_accept.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_bio.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_connect.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_fd.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_file.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_mem.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_null.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_socket.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_set_callback.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_should_retry.3 | 4 +- secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 | 4 +- secure/lib/libcrypto/man/man3/BN_CTX_new.3 | 4 +- secure/lib/libcrypto/man/man3/BN_CTX_start.3 | 4 +- secure/lib/libcrypto/man/man3/BN_add.3 | 4 +- secure/lib/libcrypto/man/man3/BN_add_word.3 | 4 +- secure/lib/libcrypto/man/man3/BN_bn2bin.3 | 4 +- secure/lib/libcrypto/man/man3/BN_cmp.3 | 44 ++++++++++++---------- secure/lib/libcrypto/man/man3/BN_copy.3 | 4 +- secure/lib/libcrypto/man/man3/BN_generate_prime.3 | 4 +- secure/lib/libcrypto/man/man3/BN_mod_inverse.3 | 4 +- .../lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 | 4 +- .../lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 | 4 +- secure/lib/libcrypto/man/man3/BN_new.3 | 4 +- secure/lib/libcrypto/man/man3/BN_num_bytes.3 | 4 +- secure/lib/libcrypto/man/man3/BN_rand.3 | 4 +- secure/lib/libcrypto/man/man3/BN_security_bits.3 | 4 +- secure/lib/libcrypto/man/man3/BN_set_bit.3 | 4 +- secure/lib/libcrypto/man/man3/BN_swap.3 | 4 +- secure/lib/libcrypto/man/man3/BN_zero.3 | 4 +- secure/lib/libcrypto/man/man3/BUF_MEM_new.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_add0_cert.3 | 4 +- .../libcrypto/man/man3/CMS_add1_recipient_cert.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_add1_signer.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_compress.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_decrypt.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_encrypt.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_final.3 | 4 +- .../libcrypto/man/man3/CMS_get0_RecipientInfos.3 | 4 +- .../lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_get0_type.3 | 4 +- .../libcrypto/man/man3/CMS_get1_ReceiptRequest.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_sign.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_uncompress.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_verify.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 | 4 +- secure/lib/libcrypto/man/man3/CONF_modules_free.3 | 4 +- .../libcrypto/man/man3/CONF_modules_load_file.3 | 4 +- .../libcrypto/man/man3/CRYPTO_THREAD_run_once.3 | 4 +- .../libcrypto/man/man3/CRYPTO_get_ex_new_index.3 | 4 +- secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 | 4 +- .../man/man3/CTLOG_STORE_get0_log_by_id.3 | 4 +- secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 | 4 +- secure/lib/libcrypto/man/man3/CTLOG_new.3 | 4 +- .../libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 | 4 +- secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 | 4 +- secure/lib/libcrypto/man/man3/DES_random_key.3 | 4 +- secure/lib/libcrypto/man/man3/DH_generate_key.3 | 4 +- .../libcrypto/man/man3/DH_generate_parameters.3 | 4 +- secure/lib/libcrypto/man/man3/DH_get0_pqg.3 | 4 +- secure/lib/libcrypto/man/man3/DH_get_1024_160.3 | 4 +- secure/lib/libcrypto/man/man3/DH_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/DH_new.3 | 4 +- secure/lib/libcrypto/man/man3/DH_new_by_nid.3 | 4 +- secure/lib/libcrypto/man/man3/DH_set_method.3 | 4 +- secure/lib/libcrypto/man/man3/DH_size.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_SIG_new.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_do_sign.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_dup_DH.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_generate_key.3 | 4 +- .../libcrypto/man/man3/DSA_generate_parameters.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_new.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_set_method.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_sign.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_size.3 | 4 +- secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 | 4 +- secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 | 4 +- secure/lib/libcrypto/man/man3/DTLSv1_listen.3 | 4 +- secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 | 4 +- .../lib/libcrypto/man/man3/ECPKParameters_print.3 | 4 +- .../lib/libcrypto/man/man3/EC_GFp_simple_method.3 | 4 +- secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 | 4 +- secure/lib/libcrypto/man/man3/EC_GROUP_new.3 | 4 +- .../lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 | 4 +- secure/lib/libcrypto/man/man3/EC_KEY_new.3 | 4 +- secure/lib/libcrypto/man/man3/EC_POINT_add.3 | 4 +- secure/lib/libcrypto/man/man3/EC_POINT_new.3 | 4 +- secure/lib/libcrypto/man/man3/ENGINE_add.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_clear_error.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_error_string.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_get_error.3 | 4 +- .../libcrypto/man/man3/ERR_load_crypto_strings.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_load_strings.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_print_errors.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_put_error.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_remove_state.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_set_mark.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 | 4 +- .../man/man3/EVP_CIPHER_CTX_get_cipher_data.3 | 4 +- .../lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_DigestInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 | 4 +- .../lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_OpenInit.3 | 4 +- .../lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 | 4 +- .../man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 | 4 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 | 4 +- .../man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 | 4 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 | 4 +- .../man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 | 4 +- .../libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_cmp.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 | 4 +- .../man/man3/EVP_PKEY_get_default_digest_nid.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 | 4 +- .../libcrypto/man/man3/EVP_PKEY_meth_get_count.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 | 4 +- .../libcrypto/man/man3/EVP_PKEY_print_private.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 | 4 +- .../libcrypto/man/man3/EVP_PKEY_verify_recover.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_SealInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_SignInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_aes.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_aria.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_blake2b512.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_camellia.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_chacha20.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_des.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_md2.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_md4.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_md5.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_mdc2.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_rc4.3 | 4 +- .../lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_ripemd160.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_sha1.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_sha224.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_sha3_224.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_sm3.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_whirlpool.3 | 4 +- secure/lib/libcrypto/man/man3/HMAC.3 | 4 +- secure/lib/libcrypto/man/man3/MD5.3 | 4 +- secure/lib/libcrypto/man/man3/MDC2_Init.3 | 4 +- secure/lib/libcrypto/man/man3/Makefile | 1 + secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 | 4 +- secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 | 4 +- secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 | 4 +- .../libcrypto/man/man3/OCSP_request_add1_nonce.3 | 4 +- .../lib/libcrypto/man/man3/OCSP_resp_find_status.3 | 4 +- .../lib/libcrypto/man/man3/OCSP_response_status.3 | 4 +- secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 | 4 +- secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 | 4 +- .../lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 | 4 +- secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 | 4 +- .../libcrypto/man/man3/OPENSSL_VERSION_NUMBER.3 | 4 +- secure/lib/libcrypto/man/man3/OPENSSL_config.3 | 4 +- .../lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 | 4 +- secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 | 4 +- .../lib/libcrypto/man/man3/OPENSSL_init_crypto.3 | 4 +- secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 | 4 +- .../libcrypto/man/man3/OPENSSL_instrument_bus.3 | 4 +- .../man/man3/OPENSSL_load_builtin_modules.3 | 4 +- secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 | 4 +- .../lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 | 4 +- secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 | 4 +- secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 | 4 +- secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 | 4 +- secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 | 4 +- secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 | 4 +- .../man/man3/OpenSSL_add_all_algorithms.3 | 4 +- secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 | 4 +- secure/lib/libcrypto/man/man3/PEM_read.3 | 4 +- secure/lib/libcrypto/man/man3/PEM_read_CMS.3 | 4 +- .../libcrypto/man/man3/PEM_read_bio_PrivateKey.3 | 4 +- secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 | 4 +- .../libcrypto/man/man3/PEM_write_bio_CMS_stream.3 | 4 +- .../man/man3/PEM_write_bio_PKCS7_stream.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS12_create.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS12_newpass.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS12_parse.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS7_sign.3 | 4 +- .../lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS7_verify.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_DRBG_generate.3 | 4 +- .../lib/libcrypto/man/man3/RAND_DRBG_get0_master.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_DRBG_new.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_DRBG_reseed.3 | 4 +- .../libcrypto/man/man3/RAND_DRBG_set_callbacks.3 | 4 +- .../lib/libcrypto/man/man3/RAND_DRBG_set_ex_data.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_add.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_bytes.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_cleanup.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_egd.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_load_file.3 | 4 +- .../lib/libcrypto/man/man3/RAND_set_rand_method.3 | 4 +- secure/lib/libcrypto/man/man3/RC4_set_key.3 | 4 +- secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_blinding_on.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_check_key.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_generate_key.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_get0_key.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_new.3 | 4 +- .../man/man3/RSA_padding_add_PKCS1_type_1.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_print.3 | 4 +- .../lib/libcrypto/man/man3/RSA_private_encrypt.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_set_method.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_sign.3 | 4 +- .../man/man3/RSA_sign_ASN1_OCTET_STRING.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_size.3 | 4 +- secure/lib/libcrypto/man/man3/SCT_new.3 | 4 +- secure/lib/libcrypto/man/man3/SCT_print.3 | 4 +- secure/lib/libcrypto/man/man3/SCT_validate.3 | 4 +- secure/lib/libcrypto/man/man3/SHA256_Init.3 | 4 +- secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 | 4 +- secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 | 4 +- secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 | 4 +- secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 | 4 +- .../man/man3/SSL_COMP_add_compression_method.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 | 4 +- .../libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 | 4 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 | 4 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 | 8 +++- secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 | 4 +- .../man/man3/SSL_CTX_add_extra_chain_cert.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_add_session.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_config.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_flush_sessions.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_free.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_get_verify_mode.3 | 4 +- .../man/man3/SSL_CTX_has_client_custom_ext.3 | 4 +- .../man/man3/SSL_CTX_load_verify_locations.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_new.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_sess_number.3 | 4 +- .../man/man3/SSL_CTX_sess_set_cache_size.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 | 4 +- .../man/man3/SSL_CTX_set1_verify_cert_store.3 | 4 +- .../man/man3/SSL_CTX_set_alpn_select_cb.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_cert_store.3 | 4 +- .../man/man3/SSL_CTX_set_cert_verify_callback.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_cipher_list.3 | 4 +- .../man/man3/SSL_CTX_set_client_cert_cb.3 | 4 +- .../man/man3/SSL_CTX_set_client_hello_cb.3 | 4 +- .../man/man3/SSL_CTX_set_ct_validation_callback.3 | 4 +- .../man/man3/SSL_CTX_set_ctlog_list_file.3 | 4 +- .../man/man3/SSL_CTX_set_default_passwd_cb.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set_ex_data.3 | 4 +- .../man/man3/SSL_CTX_set_generate_session_id.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_info_callback.3 | 4 +- .../man/man3/SSL_CTX_set_keylog_callback.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 | 4 +- .../man/man3/SSL_CTX_set_min_proto_version.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 | 20 +--------- .../libcrypto/man/man3/SSL_CTX_set_msg_callback.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_num_tickets.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set_options.3 | 26 ++++++++++++- .../man/man3/SSL_CTX_set_psk_client_callback.3 | 4 +- .../man/man3/SSL_CTX_set_quiet_shutdown.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_read_ahead.3 | 4 +- .../man/man3/SSL_CTX_set_record_padding_callback.3 | 4 +- .../man/man3/SSL_CTX_set_security_level.3 | 4 +- .../man/man3/SSL_CTX_set_session_cache_mode.3 | 4 +- .../man/man3/SSL_CTX_set_session_id_context.3 | 4 +- .../man/man3/SSL_CTX_set_session_ticket_cb.3 | 4 +- .../man/man3/SSL_CTX_set_split_send_fragment.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_ssl_version.3 | 4 +- .../SSL_CTX_set_stateless_cookie_generate_cb.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 | 4 +- .../man3/SSL_CTX_set_tlsext_servername_callback.3 | 4 +- .../man/man3/SSL_CTX_set_tlsext_status_cb.3 | 4 +- .../man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 | 4 +- .../man/man3/SSL_CTX_set_tlsext_use_srtp.3 | 4 +- .../man/man3/SSL_CTX_set_tmp_dh_callback.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_use_certificate.3 | 4 +- .../man/man3/SSL_CTX_use_psk_identity_hint.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_use_serverinfo.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 | 4 +- .../libcrypto/man/man3/SSL_SESSION_get0_cipher.3 | 4 +- .../libcrypto/man/man3/SSL_SESSION_get0_hostname.3 | 4 +- .../man/man3/SSL_SESSION_get0_id_context.3 | 4 +- .../lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 | 4 +- .../man/man3/SSL_SESSION_get_compress_id.3 | 4 +- .../libcrypto/man/man3/SSL_SESSION_get_ex_data.3 | 4 +- .../man/man3/SSL_SESSION_get_protocol_version.3 | 4 +- .../lib/libcrypto/man/man3/SSL_SESSION_get_time.3 | 4 +- .../libcrypto/man/man3/SSL_SESSION_has_ticket.3 | 4 +- .../libcrypto/man/man3/SSL_SESSION_is_resumable.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 | 4 +- .../lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_accept.3 | 4 +- .../lib/libcrypto/man/man3/SSL_alert_type_string.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_check_chain.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_clear.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_connect.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_do_handshake.3 | 4 +- .../man/man3/SSL_export_keying_material.3 | 4 +- .../libcrypto/man/man3/SSL_extension_supported.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_free.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 | 4 +- .../lib/libcrypto/man/man3/SSL_get_all_async_fds.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 | 4 +- .../lib/libcrypto/man/man3/SSL_get_client_random.3 | 4 +- .../libcrypto/man/man3/SSL_get_current_cipher.3 | 4 +- .../libcrypto/man/man3/SSL_get_default_timeout.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_error.3 | 4 +- .../lib/libcrypto/man/man3/SSL_get_extms_support.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_fd.3 | 4 +- .../libcrypto/man/man3/SSL_get_peer_cert_chain.3 | 4 +- .../libcrypto/man/man3/SSL_get_peer_certificate.3 | 4 +- .../man/man3/SSL_get_peer_signature_nid.3 | 4 +- .../lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 | 4 +- .../lib/libcrypto/man/man3/SSL_get_psk_identity.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_rbio.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_session.3 | 4 +- .../libcrypto/man/man3/SSL_get_shared_sigalgs.3 | 4 +- .../lib/libcrypto/man/man3/SSL_get_verify_result.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_version.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_in_init.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_key_update.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_library_init.3 | 4 +- .../libcrypto/man/man3/SSL_load_client_CA_file.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_new.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_pending.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_read.3 | 4 +- .../lib/libcrypto/man/man3/SSL_read_early_data.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_rstate_string.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_session_reused.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_set1_host.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_set_bio.3 | 4 +- .../lib/libcrypto/man/man3/SSL_set_connect_state.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_set_fd.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_set_session.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 | 4 +- .../lib/libcrypto/man/man3/SSL_set_verify_result.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_shutdown.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_state_string.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_want.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_write.3 | 4 +- secure/lib/libcrypto/man/man3/UI_STRING.3 | 4 +- secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 | 4 +- secure/lib/libcrypto/man/man3/UI_create_method.3 | 4 +- secure/lib/libcrypto/man/man3/UI_new.3 | 4 +- secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 | 4 +- secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 | 4 +- .../libcrypto/man/man3/X509_CRL_get0_by_serial.3 | 4 +- .../libcrypto/man/man3/X509_EXTENSION_set_object.3 | 4 +- secure/lib/libcrypto/man/man3/X509_LOOKUP.3 | 4 +- .../lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 | 4 +- .../lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 | 4 +- .../man/man3/X509_NAME_ENTRY_get_object.3 | 4 +- .../man/man3/X509_NAME_add_entry_by_txt.3 | 4 +- secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 | 4 +- .../man/man3/X509_NAME_get_index_by_NID.3 | 4 +- secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 | 4 +- secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 | 4 +- secure/lib/libcrypto/man/man3/X509_SIG_get0.3 | 4 +- .../libcrypto/man/man3/X509_STORE_CTX_get_error.3 | 4 +- secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 | 4 +- .../man/man3/X509_STORE_CTX_set_verify_cb.3 | 4 +- .../lib/libcrypto/man/man3/X509_STORE_add_cert.3 | 4 +- .../lib/libcrypto/man/man3/X509_STORE_get0_param.3 | 4 +- secure/lib/libcrypto/man/man3/X509_STORE_new.3 | 4 +- .../man/man3/X509_STORE_set_verify_cb_func.3 | 4 +- .../man/man3/X509_VERIFY_PARAM_set_flags.3 | 4 +- secure/lib/libcrypto/man/man3/X509_check_ca.3 | 4 +- secure/lib/libcrypto/man/man3/X509_check_host.3 | 4 +- secure/lib/libcrypto/man/man3/X509_check_issued.3 | 4 +- .../libcrypto/man/man3/X509_check_private_key.3 | 4 +- secure/lib/libcrypto/man/man3/X509_check_purpose.3 | 4 +- secure/lib/libcrypto/man/man3/X509_cmp.3 | 4 +- secure/lib/libcrypto/man/man3/X509_cmp_time.3 | 4 +- secure/lib/libcrypto/man/man3/X509_digest.3 | 4 +- secure/lib/libcrypto/man/man3/X509_dup.3 | 4 +- .../lib/libcrypto/man/man3/X509_get0_notBefore.3 | 4 +- .../lib/libcrypto/man/man3/X509_get0_signature.3 | 4 +- secure/lib/libcrypto/man/man3/X509_get0_uids.3 | 4 +- .../libcrypto/man/man3/X509_get_extension_flags.3 | 4 +- secure/lib/libcrypto/man/man3/X509_get_pubkey.3 | 4 +- .../lib/libcrypto/man/man3/X509_get_serialNumber.3 | 4 +- .../lib/libcrypto/man/man3/X509_get_subject_name.3 | 4 +- secure/lib/libcrypto/man/man3/X509_get_version.3 | 4 +- secure/lib/libcrypto/man/man3/X509_new.3 | 4 +- secure/lib/libcrypto/man/man3/X509_sign.3 | 4 +- secure/lib/libcrypto/man/man3/X509_verify_cert.3 | 4 +- .../lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 | 4 +- secure/lib/libcrypto/man/man3/d2i_DHparams.3 | 4 +- .../libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 | 4 +- secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 | 10 +++-- secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 | 4 +- secure/lib/libcrypto/man/man3/d2i_X509.3 | 4 +- secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 | 4 +- .../lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 | 4 +- secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 | 4 +- secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 | 4 +- secure/lib/libcrypto/man/man5/x509v3_config.5 | 4 +- secure/lib/libcrypto/man/man7/Ed25519.7 | 4 +- secure/lib/libcrypto/man/man7/RAND.7 | 4 +- secure/lib/libcrypto/man/man7/RAND_DRBG.7 | 4 +- secure/lib/libcrypto/man/man7/RSA-PSS.7 | 4 +- secure/lib/libcrypto/man/man7/SM2.7 | 4 +- secure/lib/libcrypto/man/man7/X25519.7 | 4 +- secure/lib/libcrypto/man/man7/bio.7 | 4 +- secure/lib/libcrypto/man/man7/ct.7 | 4 +- secure/lib/libcrypto/man/man7/des_modes.7 | 4 +- secure/lib/libcrypto/man/man7/evp.7 | 4 +- secure/lib/libcrypto/man/man7/ossl_store-file.7 | 4 +- secure/lib/libcrypto/man/man7/ossl_store.7 | 4 +- .../lib/libcrypto/man/man7/passphrase-encoding.7 | 4 +- secure/lib/libcrypto/man/man7/proxy-certificates.7 | 4 +- secure/lib/libcrypto/man/man7/scrypt.7 | 4 +- secure/lib/libcrypto/man/man7/ssl.7 | 4 +- secure/lib/libcrypto/man/man7/x509.7 | 10 ++--- secure/usr.bin/openssl/man/CA.pl.1 | 4 +- secure/usr.bin/openssl/man/asn1parse.1 | 4 +- secure/usr.bin/openssl/man/ca.1 | 4 +- secure/usr.bin/openssl/man/ciphers.1 | 4 +- secure/usr.bin/openssl/man/cms.1 | 4 +- secure/usr.bin/openssl/man/crl.1 | 4 +- secure/usr.bin/openssl/man/crl2pkcs7.1 | 4 +- secure/usr.bin/openssl/man/dgst.1 | 4 +- secure/usr.bin/openssl/man/dhparam.1 | 4 +- secure/usr.bin/openssl/man/dsa.1 | 4 +- secure/usr.bin/openssl/man/dsaparam.1 | 4 +- secure/usr.bin/openssl/man/ec.1 | 4 +- secure/usr.bin/openssl/man/ecparam.1 | 4 +- secure/usr.bin/openssl/man/enc.1 | 8 ++-- secure/usr.bin/openssl/man/engine.1 | 4 +- secure/usr.bin/openssl/man/errstr.1 | 4 +- secure/usr.bin/openssl/man/gendsa.1 | 4 +- secure/usr.bin/openssl/man/genpkey.1 | 4 +- secure/usr.bin/openssl/man/genrsa.1 | 4 +- secure/usr.bin/openssl/man/list.1 | 4 +- secure/usr.bin/openssl/man/nseq.1 | 4 +- secure/usr.bin/openssl/man/ocsp.1 | 4 +- secure/usr.bin/openssl/man/openssl.1 | 4 +- secure/usr.bin/openssl/man/passwd.1 | 4 +- secure/usr.bin/openssl/man/pkcs12.1 | 4 +- secure/usr.bin/openssl/man/pkcs7.1 | 4 +- secure/usr.bin/openssl/man/pkcs8.1 | 4 +- secure/usr.bin/openssl/man/pkey.1 | 4 +- secure/usr.bin/openssl/man/pkeyparam.1 | 4 +- secure/usr.bin/openssl/man/pkeyutl.1 | 4 +- secure/usr.bin/openssl/man/prime.1 | 4 +- secure/usr.bin/openssl/man/rand.1 | 4 +- secure/usr.bin/openssl/man/req.1 | 4 +- secure/usr.bin/openssl/man/rsa.1 | 4 +- secure/usr.bin/openssl/man/rsautl.1 | 4 +- secure/usr.bin/openssl/man/s_client.1 | 6 +-- secure/usr.bin/openssl/man/s_server.1 | 6 +-- secure/usr.bin/openssl/man/s_time.1 | 4 +- secure/usr.bin/openssl/man/sess_id.1 | 4 +- secure/usr.bin/openssl/man/smime.1 | 4 +- secure/usr.bin/openssl/man/speed.1 | 4 +- secure/usr.bin/openssl/man/spkac.1 | 4 +- secure/usr.bin/openssl/man/srp.1 | 4 +- secure/usr.bin/openssl/man/storeutl.1 | 4 +- secure/usr.bin/openssl/man/ts.1 | 4 +- secure/usr.bin/openssl/man/tsget.1 | 4 +- secure/usr.bin/openssl/man/verify.1 | 4 +- secure/usr.bin/openssl/man/version.1 | 4 +- secure/usr.bin/openssl/man/x509.1 | 4 +- 536 files changed, 1135 insertions(+), 1121 deletions(-) diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 0edeb9098ecd..7e37eda14cd2 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.1.1k -OPENSSL_DATE= 2021-03-25 +OPENSSL_VER= 1.1.1l +OPENSSL_DATE= 2021-08-24 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc diff --git a/secure/lib/libcrypto/man/man3/ADMISSIONS.3 b/secure/lib/libcrypto/man/man3/ADMISSIONS.3 index ad086fb0e8e9..316c89a32e18 100644 --- a/secure/lib/libcrypto/man/man3/ADMISSIONS.3 +++ b/secure/lib/libcrypto/man/man3/ADMISSIONS.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ADMISSIONS 3" -.TH ADMISSIONS 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ADMISSIONS 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 index 3c70dcaa8c2d..d3074f60ea2e 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_INTEGER_GET_INT64 3" -.TH ASN1_INTEGER_GET_INT64 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_INTEGER_GET_INT64 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 index 04ba1089d333..0047d4b9a148 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_ITEM_LOOKUP 3" -.TH ASN1_ITEM_LOOKUP 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_ITEM_LOOKUP 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 index 54c7476b7c08..ab6b9a5c655d 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_NEW 3" -.TH ASN1_OBJECT_NEW 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_OBJECT_NEW 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 index ad1b19c78546..e88ad9da6005 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_TABLE_ADD 3" -.TH ASN1_STRING_TABLE_ADD 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_STRING_TABLE_ADD 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 index 75de680bb66a..3133228c6b26 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_LENGTH 3" -.TH ASN1_STRING_LENGTH 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_STRING_LENGTH 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 index 76d17e1c6b23..1cf8eeaf4a5a 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_NEW 3" -.TH ASN1_STRING_NEW 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_STRING_NEW 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 index d072930ec39d..dae4c1c9d0f4 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_PRINT_EX 3" -.TH ASN1_STRING_PRINT_EX 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_STRING_PRINT_EX 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 b/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 index 0a3564196833..100e39578c37 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TIME_SET 3" -.TH ASN1_TIME_SET 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_TIME_SET 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 b/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 index bf12e2b90dd2..c181d6295299 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TYPE_GET 3" -.TH ASN1_TYPE_GET 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_TYPE_GET 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 b/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 index 207255106b3c..30e469c8fbca 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_GENERATE_NCONF 3" -.TH ASN1_GENERATE_NCONF 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_GENERATE_NCONF 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 b/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 index d1e3abb572db..5e8cdaeb4a24 100644 --- a/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 +++ b/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASYNC_WAIT_CTX_NEW 3" -.TH ASYNC_WAIT_CTX_NEW 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASYNC_WAIT_CTX_NEW 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 b/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 index b5bb00413452..b13652ed1f6f 100644 --- a/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 +++ b/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASYNC_START_JOB 3" -.TH ASYNC_START_JOB 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASYNC_START_JOB 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BF_encrypt.3 b/secure/lib/libcrypto/man/man3/BF_encrypt.3 index 58cdcb4fc89e..acc321e5f03e 100644 --- a/secure/lib/libcrypto/man/man3/BF_encrypt.3 +++ b/secure/lib/libcrypto/man/man3/BF_encrypt.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BF_ENCRYPT 3" -.TH BF_ENCRYPT 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BF_ENCRYPT 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ADDR.3 b/secure/lib/libcrypto/man/man3/BIO_ADDR.3 index fd492eee9531..ea077b64dd9f 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ADDR.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ADDR.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ADDR 3" -.TH BIO_ADDR 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_ADDR 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 b/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 index 7d64b051241a..d3e6ccb84c7d 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ADDRINFO 3" -.TH BIO_ADDRINFO 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_ADDRINFO 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_connect.3 b/secure/lib/libcrypto/man/man3/BIO_connect.3 index 507289d24595..ec6ff1c33dfa 100644 --- a/secure/lib/libcrypto/man/man3/BIO_connect.3 +++ b/secure/lib/libcrypto/man/man3/BIO_connect.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_CONNECT 3" -.TH BIO_CONNECT 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_CONNECT 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ctrl.3 b/secure/lib/libcrypto/man/man3/BIO_ctrl.3 index c290cfceab59..a5f9bf6288f7 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ctrl.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ctrl.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_CTRL 3" -.TH BIO_CTRL 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_CTRL 3 "2021-09-01" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_base64.3 b/secure/lib/libcrypto/man/man3/BIO_f_base64.3 index 14db0fc366a1..1c5fb4fb10d8 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_base64.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_base64.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_BASE64 3" -.TH BIO_F_BASE64 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_F_BASE64 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 b/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 index 2cd165a9700d..564feedef793 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_BUFFER 3" -.TH BIO_F_BUFFER 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_F_BUFFER 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 b/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 index 68b32c47dac7..b5eea34baed7 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_CIPHER 3" -.TH BIO_F_CIPHER 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_F_CIPHER 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_md.3 b/secure/lib/libcrypto/man/man3/BIO_f_md.3 index 2a3dec321113..c759f04f5f67 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_md.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_md.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_MD 3" -.TH BIO_F_MD 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_F_MD 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_null.3 b/secure/lib/libcrypto/man/man3/BIO_f_null.3 index 6d868bd0a10b..cc32427d0008 100644 *** 9986 LINES SKIPPED *** From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 17:11:38 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23D27678D49; Fri, 3 Sep 2021 17:11:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1PTj5vwpz3lQG; Fri, 3 Sep 2021 17:11:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 754312FFBB; Fri, 3 Sep 2021 17:11:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183HBbd3099311; Fri, 3 Sep 2021 17:11:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183HBb4v099310; Fri, 3 Sep 2021 17:11:37 GMT (envelope-from git) Date: Fri, 3 Sep 2021 17:11:37 GMT Message-Id: <202109031711.183HBb4v099310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: f7fe1ce49e7a - stable/13 - OpenSSL: Reduce diff with the upstream MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f7fe1ce49e7ae131de831e5ed211e0fb36c66014 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 17:11:38 -0000 The branch stable/13 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=f7fe1ce49e7ae131de831e5ed211e0fb36c66014 commit f7fe1ce49e7ae131de831e5ed211e0fb36c66014 Author: Jung-uk Kim AuthorDate: 2021-09-01 04:10:59 +0000 Commit: Jung-uk Kim CommitDate: 2021-09-03 17:10:57 +0000 OpenSSL: Reduce diff with the upstream (cherry picked from commit 649ccdd753790069623e192185d133fd26a03bf9) --- secure/lib/libcrypto/opensslconf.h.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/secure/lib/libcrypto/opensslconf.h.in b/secure/lib/libcrypto/opensslconf.h.in index 4d96de2d51ec..b0936858a221 100644 --- a/secure/lib/libcrypto/opensslconf.h.in +++ b/secure/lib/libcrypto/opensslconf.h.in @@ -118,6 +118,11 @@ extern "C" { # undef DECLARE_DEPRECATED # define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); # endif +# elif defined(__SUNPRO_C) +# if (__SUNPRO_C >= 0x5130) +# undef DECLARE_DEPRECATED +# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); +# endif # endif #endif From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 17:24:25 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABC3E679419; Fri, 3 Sep 2021 17:24:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1PmT4DPYz3nws; Fri, 3 Sep 2021 17:24:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 791BD2C4; Fri, 3 Sep 2021 17:24:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183HOPIO015239; Fri, 3 Sep 2021 17:24:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183HOPW2015238; Fri, 3 Sep 2021 17:24:25 GMT (envelope-from git) Date: Fri, 3 Sep 2021 17:24:25 GMT Message-Id: <202109031724.183HOPW2015238@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: b31e93bc8d11 - stable/13 - tmpfs: Move partial page invalidation to a separate helper MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b31e93bc8d11b3356c1ad9813a5b382a300670b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 17:24:25 -0000 The branch stable/13 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=b31e93bc8d11b3356c1ad9813a5b382a300670b8 commit b31e93bc8d11b3356c1ad9813a5b382a300670b8 Author: Ka Ho Ng AuthorDate: 2021-08-25 21:30:53 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 17:21:10 +0000 tmpfs: Move partial page invalidation to a separate helper The partial page invalidation code is factored out to be a separate helper from tmpfs_reg_resize(). Sponsored by: The FreeBSD Foundation Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D31683 (cherry picked from commit 399be91098adb23aa27ca1228b81a3ad67e8bba2) --- sys/fs/tmpfs/tmpfs_subr.c | 96 +++++++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 40 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 387bc741e3cf..e746a7455860 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -361,6 +361,57 @@ tmpfs_pages_check_avail(struct tmpfs_mount *tmp, size_t req_pages) return (1); } +static int +tmpfs_partial_page_invalidate(vm_object_t object, vm_pindex_t idx, int base, + int end, boolean_t ignerr) +{ + vm_page_t m; + int rv, error; + + VM_OBJECT_ASSERT_WLOCKED(object); + KASSERT(base >= 0, ("%s: base %d", __func__, base)); + KASSERT(end - base <= PAGE_SIZE, ("%s: base %d end %d", __func__, base, + end)); + error = 0; + +retry: + m = vm_page_grab(object, idx, VM_ALLOC_NOCREAT); + if (m != NULL) { + MPASS(vm_page_all_valid(m)); + } else if (vm_pager_has_page(object, idx, NULL, NULL)) { + m = vm_page_alloc(object, idx, VM_ALLOC_NORMAL | + VM_ALLOC_WAITFAIL); + if (m == NULL) + goto retry; + vm_object_pip_add(object, 1); + VM_OBJECT_WUNLOCK(object); + rv = vm_pager_get_pages(object, &m, 1, NULL, NULL); + VM_OBJECT_WLOCK(object); + vm_object_pip_wakeup(object); + if (rv == VM_PAGER_OK) { + /* + * Since the page was not resident, and therefore not + * recently accessed, immediately enqueue it for + * asynchronous laundering. The current operation is + * not regarded as an access. + */ + vm_page_launder(m); + } else { + vm_page_free(m); + m = NULL; + if (!ignerr) + error = EIO; + } + } + if (m != NULL) { + pmap_zero_page_area(m, base, end - base); + vm_page_set_dirty(m); + vm_page_xunbusy(m); + } + + return (error); +} + void tmpfs_ref_node(struct tmpfs_node *node) { @@ -1662,10 +1713,9 @@ tmpfs_reg_resize(struct vnode *vp, off_t newsize, boolean_t ignerr) struct tmpfs_mount *tmp; struct tmpfs_node *node; vm_object_t uobj; - vm_page_t m; vm_pindex_t idx, newpages, oldpages; off_t oldsize; - int base, rv; + int base, error; MPASS(vp->v_type == VREG); MPASS(newsize >= 0); @@ -1702,45 +1752,11 @@ tmpfs_reg_resize(struct vnode *vp, off_t newsize, boolean_t ignerr) base = newsize & PAGE_MASK; if (base != 0) { idx = OFF_TO_IDX(newsize); -retry: - m = vm_page_grab(uobj, idx, VM_ALLOC_NOCREAT); - if (m != NULL) { - MPASS(vm_page_all_valid(m)); - } else if (vm_pager_has_page(uobj, idx, NULL, NULL)) { - m = vm_page_alloc(uobj, idx, VM_ALLOC_NORMAL | - VM_ALLOC_WAITFAIL); - if (m == NULL) - goto retry; - vm_object_pip_add(uobj, 1); + error = tmpfs_partial_page_invalidate(uobj, idx, base, + PAGE_SIZE, ignerr); + if (error != 0) { VM_OBJECT_WUNLOCK(uobj); - rv = vm_pager_get_pages(uobj, &m, 1, NULL, - NULL); - VM_OBJECT_WLOCK(uobj); - vm_object_pip_wakeup(uobj); - if (rv == VM_PAGER_OK) { - /* - * Since the page was not resident, - * and therefore not recently - * accessed, immediately enqueue it - * for asynchronous laundering. The - * current operation is not regarded - * as an access. - */ - vm_page_launder(m); - } else { - vm_page_free(m); - if (ignerr) - m = NULL; - else { - VM_OBJECT_WUNLOCK(uobj); - return (EIO); - } - } - } - if (m != NULL) { - pmap_zero_page_area(m, base, PAGE_SIZE - base); - vm_page_set_dirty(m); - vm_page_xunbusy(m); + return (error); } } From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 17:24:26 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8569679338; Fri, 3 Sep 2021 17:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1PmV55l9z3nwt; Fri, 3 Sep 2021 17:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9334A50A; Fri, 3 Sep 2021 17:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183HOQn9015263; Fri, 3 Sep 2021 17:24:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183HOQil015262; Fri, 3 Sep 2021 17:24:26 GMT (envelope-from git) Date: Fri, 3 Sep 2021 17:24:26 GMT Message-Id: <202109031724.183HOQil015262@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 24ef34a07856 - stable/13 - bhyve: Nuke double-semicolons MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 24ef34a07856ad21238647ca80235fafab3ae1dc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 17:24:26 -0000 The branch stable/13 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=24ef34a07856ad21238647ca80235fafab3ae1dc commit 24ef34a07856ad21238647ca80235fafab3ae1dc Author: Elliott Mitchell AuthorDate: 2021-08-30 07:26:45 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 17:21:10 +0000 bhyve: Nuke double-semicolons A distinct number of double-semicolons ended up in bhyve. Take a pass at getting rid of many of these harmless typos. (cherry picked from commit e76c0e4f4563029375dac90f1e1b3c6e82e157f9) --- usr.sbin/bhyve/pci_nvme.c | 2 +- usr.sbin/bhyve/pci_virtio_scsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index 9b3fece43fde..fdf4a46148c9 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -1827,7 +1827,7 @@ pci_nvme_release_ioreq(struct pci_nvme_softc *sc, struct pci_nvme_ioreq *req) static struct pci_nvme_ioreq * pci_nvme_get_ioreq(struct pci_nvme_softc *sc) { - struct pci_nvme_ioreq *req = NULL;; + struct pci_nvme_ioreq *req = NULL; sem_wait(&sc->iosemlock); pthread_mutex_lock(&sc->mtx); diff --git a/usr.sbin/bhyve/pci_virtio_scsi.c b/usr.sbin/bhyve/pci_virtio_scsi.c index 37eba90fa2bc..f4a701c0e25e 100644 --- a/usr.sbin/bhyve/pci_virtio_scsi.c +++ b/usr.sbin/bhyve/pci_virtio_scsi.c @@ -682,7 +682,7 @@ static int pci_vtscsi_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) { struct pci_vtscsi_softc *sc; - const char *devname, *value;; + const char *devname, *value; int i; sc = calloc(1, sizeof(struct pci_vtscsi_softc)); From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 17:24:28 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1669A679527; Fri, 3 Sep 2021 17:24:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1PmW6HNlz3ntf; Fri, 3 Sep 2021 17:24:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0830397; Fri, 3 Sep 2021 17:24:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183HORnP015287; Fri, 3 Sep 2021 17:24:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183HOR6c015286; Fri, 3 Sep 2021 17:24:27 GMT (envelope-from git) Date: Fri, 3 Sep 2021 17:24:27 GMT Message-Id: <202109031724.183HOR6c015286@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: dee751933363 - stable/13 - vmm: Fix wrong assert in ivhd_dev_add_entry MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dee751933363182642a7eb0a615196006495fc67 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 17:24:28 -0000 The branch stable/13 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=dee751933363182642a7eb0a615196006495fc67 commit dee751933363182642a7eb0a615196006495fc67 Author: Ka Ho Ng AuthorDate: 2021-08-12 07:54:40 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 17:21:10 +0000 vmm: Fix wrong assert in ivhd_dev_add_entry The correct condition is to check the number of ivhd entries fit into the array. Reported by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31514 (cherry picked from commit 179bc5729dd72e0f4252c0dce72454c76782f935) --- sys/amd64/vmm/amd/ivrs_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/vmm/amd/ivrs_drv.c b/sys/amd64/vmm/amd/ivrs_drv.c index 68c31788e29d..a0b332e297b1 100644 --- a/sys/amd64/vmm/amd/ivrs_drv.c +++ b/sys/amd64/vmm/amd/ivrs_drv.c @@ -184,7 +184,7 @@ ivhd_dev_add_entry(struct amdvi_softc *softc, uint32_t start_id, { struct ivhd_dev_cfg *dev_cfg; - KASSERT(softc->dev_cfg_cap <= softc->dev_cfg_cnt, + KASSERT(softc->dev_cfg_cap >= softc->dev_cfg_cnt, ("Impossible case: number of dev_cfg exceeding capacity")); if (softc->dev_cfg_cap == softc->dev_cfg_cnt) { if (softc->dev_cfg_cap == 0) From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 17:30:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A9B8679808; Fri, 3 Sep 2021 17:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1Ptz1bJfz3qYP; Fri, 3 Sep 2021 17:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1914CDB; Fri, 3 Sep 2021 17:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183HU2lX017871; Fri, 3 Sep 2021 17:30:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183HU2UP017868; Fri, 3 Sep 2021 17:30:02 GMT (envelope-from git) Date: Fri, 3 Sep 2021 17:30:02 GMT Message-Id: <202109031730.183HU2UP017868@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 8dc330532b9f - stable/13 - Correct "Fondation" typo (missing "u") MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8dc330532b9f3abfd44db5b71d40d87a3bc9ed8f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 17:30:03 -0000 The branch stable/13 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=8dc330532b9f3abfd44db5b71d40d87a3bc9ed8f commit 8dc330532b9f3abfd44db5b71d40d87a3bc9ed8f Author: Ed Maste AuthorDate: 2021-03-22 17:06:03 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 17:26:23 +0000 Correct "Fondation" typo (missing "u") (cherry picked from commit 54399caa2f8470d9f7c404ce419362bc62d5a094) --- sys/amd64/vmm/amd/amdiommu.c | 2 +- sys/amd64/vmm/amd/ivhd_if.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/vmm/amd/amdiommu.c b/sys/amd64/vmm/amd/amdiommu.c index 5eed6ce849cc..8dceb1aa241b 100644 --- a/sys/amd64/vmm/amd/amdiommu.c +++ b/sys/amd64/vmm/amd/amdiommu.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2021 The FreeBSD Fondation + * Copyright (c) 2021 The FreeBSD Foundation * * Portions of this software were developed by Ka Ho Ng * under sponsorship from the FreeBSD Foundation. diff --git a/sys/amd64/vmm/amd/ivhd_if.m b/sys/amd64/vmm/amd/ivhd_if.m index eaae01ae0131..f2994243c91e 100644 --- a/sys/amd64/vmm/amd/ivhd_if.m +++ b/sys/amd64/vmm/amd/ivhd_if.m @@ -1,5 +1,5 @@ #- -# Copyright (c) 2021 The FreeBSD Fondation +# Copyright (c) 2021 The FreeBSD Foundation # # Portions of this software were developed by Ka Ho Ng # under sponsorship from the FreeBSD Foundation. From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 18:13:23 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57470679F16; Fri, 3 Sep 2021 18:13:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1Qrz0mBJz4XRk; Fri, 3 Sep 2021 18:13:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED94B1010; Fri, 3 Sep 2021 18:13:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183IDMR5082787; Fri, 3 Sep 2021 18:13:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183IDMSI082786; Fri, 3 Sep 2021 18:13:22 GMT (envelope-from git) Date: Fri, 3 Sep 2021 18:13:22 GMT Message-Id: <202109031813.183IDMSI082786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: bbe1287a0ab6 - stable/12 - Import OpenSSL 1.1.1l MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: bbe1287a0ab6f007656e7c71702597b7526b8c0d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 18:13:23 -0000 The branch stable/12 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=bbe1287a0ab6f007656e7c71702597b7526b8c0d commit bbe1287a0ab6f007656e7c71702597b7526b8c0d Author: Jung-uk Kim AuthorDate: 2021-09-01 04:26:38 +0000 Commit: Jung-uk Kim CommitDate: 2021-09-03 17:49:40 +0000 Import OpenSSL 1.1.1l (cherry picked from commit 9a3ae0cdef9ac9a4b8c5cc66305d9a516ce8d4a0) --- crypto/openssl/CHANGES | 65 ++++++++ crypto/openssl/NEWS | 5 + crypto/openssl/README | 2 +- crypto/openssl/apps/crl2p7.c | 18 +- crypto/openssl/apps/enc.c | 4 +- crypto/openssl/apps/s_server.c | 13 +- crypto/openssl/apps/s_socket.c | 12 +- crypto/openssl/crypto/armcap.c | 15 ++ crypto/openssl/crypto/asn1/a_object.c | 15 +- crypto/openssl/crypto/asn1/a_strex.c | 4 +- crypto/openssl/crypto/asn1/asn1_lib.c | 2 +- crypto/openssl/crypto/asn1/bio_asn1.c | 7 +- crypto/openssl/crypto/asn1/bio_ndef.c | 3 + crypto/openssl/crypto/asn1/d2i_pr.c | 73 +++++--- crypto/openssl/crypto/asn1/t_spki.c | 2 +- crypto/openssl/crypto/bio/b_addr.c | 4 +- crypto/openssl/crypto/bio/b_sock2.c | 5 +- crypto/openssl/crypto/bn/bn_div.c | 9 +- crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl | 54 ++++-- crypto/openssl/crypto/dsa/dsa_prn.c | 14 +- crypto/openssl/crypto/ec/ec2_oct.c | 43 ++++- crypto/openssl/crypto/ec/ec_asn1.c | 2 +- crypto/openssl/crypto/engine/eng_devcrypto.c | 5 + crypto/openssl/crypto/err/openssl.txt | 5 + crypto/openssl/crypto/evp/e_aes.c | 192 +++++++++++----------- crypto/openssl/crypto/evp/e_camellia.c | 10 +- crypto/openssl/crypto/hmac/hm_ameth.c | 5 +- crypto/openssl/crypto/pkcs12/p12_key.c | 4 +- crypto/openssl/crypto/poly1305/poly1305_ameth.c | 4 +- crypto/openssl/crypto/ppccap.c | 6 + crypto/openssl/crypto/rand/rand_unix.c | 10 +- crypto/openssl/crypto/rsa/rsa_prn.c | 8 +- crypto/openssl/crypto/siphash/siphash_ameth.c | 4 +- crypto/openssl/crypto/sm2/sm2_crypt.c | 2 +- crypto/openssl/crypto/sm2/sm2_pmeth.c | 2 +- crypto/openssl/crypto/sparcv9cap.c | 3 +- crypto/openssl/crypto/srp/srp_vfy.c | 13 +- crypto/openssl/crypto/store/loader_file.c | 3 +- crypto/openssl/crypto/ts/ts_rsp_verify.c | 3 +- crypto/openssl/crypto/ts/ts_verify_ctx.c | 4 +- crypto/openssl/crypto/uid.c | 8 +- crypto/openssl/crypto/x509/t_x509.c | 6 +- crypto/openssl/crypto/x509/x509_vpm.c | 6 +- crypto/openssl/crypto/x509v3/v3_akey.c | 12 +- crypto/openssl/crypto/x509v3/v3_alt.c | 2 +- crypto/openssl/crypto/x509v3/v3_cpols.c | 2 +- crypto/openssl/crypto/x509v3/v3_ncons.c | 2 +- crypto/openssl/crypto/x509v3/v3_pci.c | 2 +- crypto/openssl/crypto/x509v3/v3_utl.c | 13 +- crypto/openssl/crypto/x509v3/v3err.c | 6 +- crypto/openssl/doc/man1/enc.pod | 4 +- crypto/openssl/doc/man1/s_client.pod | 2 +- crypto/openssl/doc/man1/s_server.pod | 2 +- crypto/openssl/doc/man3/BIO_f_ssl.pod | 7 +- crypto/openssl/doc/man3/BIO_push.pod | 6 +- crypto/openssl/doc/man3/BN_cmp.pod | 41 +++-- crypto/openssl/doc/man3/d2i_PrivateKey.pod | 6 +- crypto/openssl/doc/man7/x509.pod | 6 +- crypto/openssl/include/crypto/sm2.h | 2 +- crypto/openssl/include/crypto/x509.h | 2 +- crypto/openssl/include/openssl/e_os2.h | 5 +- crypto/openssl/include/openssl/opensslv.h | 4 +- crypto/openssl/include/openssl/sslerr.h | 5 +- crypto/openssl/include/openssl/x509v3err.h | 4 +- crypto/openssl/ssl/bio_ssl.c | 3 +- crypto/openssl/ssl/d1_lib.c | 3 +- crypto/openssl/ssl/record/rec_layer_s3.c | 8 +- crypto/openssl/ssl/record/ssl3_buffer.c | 3 +- crypto/openssl/ssl/record/ssl3_record.c | 36 ++-- crypto/openssl/ssl/s3_msg.c | 4 +- crypto/openssl/ssl/ssl_cert.c | 35 ++-- crypto/openssl/ssl/ssl_err.c | 7 +- crypto/openssl/ssl/ssl_lib.c | 59 ++++++- crypto/openssl/ssl/ssl_local.h | 2 +- crypto/openssl/ssl/statem/extensions.c | 31 +++- crypto/openssl/ssl/statem/extensions_srvr.c | 9 +- crypto/openssl/ssl/statem/statem_clnt.c | 5 +- crypto/openssl/ssl/statem/statem_local.h | 4 +- crypto/openssl/ssl/statem/statem_srvr.c | 9 +- crypto/openssl/ssl/t1_lib.c | 11 +- 80 files changed, 706 insertions(+), 332 deletions(-) diff --git a/crypto/openssl/CHANGES b/crypto/openssl/CHANGES index 7d0129e68765..824f421b8d33 100644 --- a/crypto/openssl/CHANGES +++ b/crypto/openssl/CHANGES @@ -7,6 +7,71 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1k and 1.1.1l [24 Aug 2021] + + *) Fixed an SM2 Decryption Buffer Overflow. + + In order to decrypt SM2 encrypted data an application is expected to call the + API function EVP_PKEY_decrypt(). Typically an application will call this + function twice. The first time, on entry, the "out" parameter can be NULL and, + on exit, the "outlen" parameter is populated with the buffer size required to + hold the decrypted plaintext. The application can then allocate a sufficiently + sized buffer and call EVP_PKEY_decrypt() again, but this time passing a non-NULL + value for the "out" parameter. + + A bug in the implementation of the SM2 decryption code means that the + calculation of the buffer size required to hold the plaintext returned by the + first call to EVP_PKEY_decrypt() can be smaller than the actual size required by + the second call. This can lead to a buffer overflow when EVP_PKEY_decrypt() is + called by the application a second time with a buffer that is too small. + + A malicious attacker who is able present SM2 content for decryption to an + application could cause attacker chosen data to overflow the buffer by up to a + maximum of 62 bytes altering the contents of other data held after the + buffer, possibly changing application behaviour or causing the application to + crash. The location of the buffer is application dependent but is typically + heap allocated. + (CVE-2021-3711) + [Matt Caswell] + + *) Fixed various read buffer overruns processing ASN.1 strings + + ASN.1 strings are represented internally within OpenSSL as an ASN1_STRING + structure which contains a buffer holding the string data and a field holding + the buffer length. This contrasts with normal C strings which are repesented as + a buffer for the string data which is terminated with a NUL (0) byte. + + Although not a strict requirement, ASN.1 strings that are parsed using OpenSSL's + own "d2i" functions (and other similar parsing functions) as well as any string + whose value has been set with the ASN1_STRING_set() function will additionally + NUL terminate the byte array in the ASN1_STRING structure. + + However, it is possible for applications to directly construct valid ASN1_STRING + structures which do not NUL terminate the byte array by directly setting the + "data" and "length" fields in the ASN1_STRING array. This can also happen by + using the ASN1_STRING_set0() function. + + Numerous OpenSSL functions that print ASN.1 data have been found to assume that + the ASN1_STRING byte array will be NUL terminated, even though this is not + guaranteed for strings that have been directly constructed. Where an application + requests an ASN.1 structure to be printed, and where that ASN.1 structure + contains ASN1_STRINGs that have been directly constructed by the application + without NUL terminating the "data" field, then a read buffer overrun can occur. + + The same thing can also occur during name constraints processing of certificates + (for example if a certificate has been directly constructed by the application + instead of loading it via the OpenSSL parsing functions, and the certificate + contains non NUL terminated ASN1_STRING structures). It can also occur in the + X509_get1_email(), X509_REQ_get1_email() and X509_get1_ocsp() functions. + + If a malicious actor can cause an application to directly construct an + ASN1_STRING and then process it through one of the affected OpenSSL functions + then this issue could be hit. This might result in a crash (causing a Denial of + Service attack). It could also result in the disclosure of private memory + contents (such as private keys, or sensitive plaintext). + (CVE-2021-3712) + [Matt Caswell] + Changes between 1.1.1j and 1.1.1k [25 Mar 2021] *) Fixed a problem with verifying a certificate chain when using the diff --git a/crypto/openssl/NEWS b/crypto/openssl/NEWS index 05991a0c214a..5a1207c66ed4 100644 --- a/crypto/openssl/NEWS +++ b/crypto/openssl/NEWS @@ -5,6 +5,11 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1k and OpenSSL 1.1.1l [24 Aug 2021] + + o Fixed an SM2 Decryption Buffer Overflow (CVE-2021-3711) + o Fixed various read buffer overruns processing ASN.1 strings (CVE-2021-3712) + Major changes between OpenSSL 1.1.1j and OpenSSL 1.1.1k [25 Mar 2021] o Fixed a problem with verifying a certificate chain when using the diff --git a/crypto/openssl/README b/crypto/openssl/README index b92a8bd3a4b5..7dc4e6790c34 100644 --- a/crypto/openssl/README +++ b/crypto/openssl/README @@ -1,5 +1,5 @@ - OpenSSL 1.1.1k 25 Mar 2021 + OpenSSL 1.1.1l 24 Aug 2021 Copyright (c) 1998-2021 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson diff --git a/crypto/openssl/apps/crl2p7.c b/crypto/openssl/apps/crl2p7.c index 88fabcb22c36..3f619bf5278e 100644 --- a/crypto/openssl/apps/crl2p7.c +++ b/crypto/openssl/apps/crl2p7.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -120,19 +120,20 @@ int crl2pkcs7_main(int argc, char **argv) if (!ASN1_INTEGER_set(p7s->version, 1)) goto end; - if ((crl_stack = sk_X509_CRL_new_null()) == NULL) - goto end; - p7s->crl = crl_stack; + if (crl != NULL) { + if ((crl_stack = sk_X509_CRL_new_null()) == NULL) + goto end; + p7s->crl = crl_stack; sk_X509_CRL_push(crl_stack, crl); crl = NULL; /* now part of p7 for OPENSSL_freeing */ } - if ((cert_stack = sk_X509_new_null()) == NULL) - goto end; - p7s->cert = cert_stack; + if (certflst != NULL) { + if ((cert_stack = sk_X509_new_null()) == NULL) + goto end; + p7s->cert = cert_stack; - if (certflst != NULL) for (i = 0; i < sk_OPENSSL_STRING_num(certflst); i++) { certfile = sk_OPENSSL_STRING_value(certflst, i); if (add_certs_from_file(cert_stack, certfile) < 0) { @@ -141,6 +142,7 @@ int crl2pkcs7_main(int argc, char **argv) goto end; } } + } out = bio_open_default(outfile, 'w', outformat); if (out == NULL) diff --git a/crypto/openssl/apps/enc.c b/crypto/openssl/apps/enc.c index ddf51e0dba15..65710771a089 100644 --- a/crypto/openssl/apps/enc.c +++ b/crypto/openssl/apps/enc.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -81,7 +81,7 @@ const OPTIONS enc_options[] = { {"", OPT_CIPHER, '-', "Any supported cipher"}, OPT_R_OPTIONS, #ifdef ZLIB - {"z", OPT_Z, '-', "Use zlib as the 'encryption'"}, + {"z", OPT_Z, '-', "Compress or decompress encrypted data using zlib"}, #endif #ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, diff --git a/crypto/openssl/apps/s_server.c b/crypto/openssl/apps/s_server.c index 0ba75999fd28..938e244222d8 100644 --- a/crypto/openssl/apps/s_server.c +++ b/crypto/openssl/apps/s_server.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * Copyright 2005 Nokia. All rights reserved. * @@ -133,6 +133,17 @@ static unsigned int psk_server_cb(SSL *ssl, const char *identity, if (s_debug) BIO_printf(bio_s_out, "psk_server_cb\n"); + + if (SSL_version(ssl) >= TLS1_3_VERSION) { + /* + * This callback is designed for use in TLSv1.2. It is possible to use + * a single callback for all protocol versions - but it is preferred to + * use a dedicated callback for TLSv1.3. For TLSv1.3 we have + * psk_find_session_cb. + */ + return 0; + } + if (identity == NULL) { BIO_printf(bio_err, "Error: client did not send PSK identity\n"); goto out_err; diff --git a/crypto/openssl/apps/s_socket.c b/crypto/openssl/apps/s_socket.c index 76f928900207..aee366d5f457 100644 --- a/crypto/openssl/apps/s_socket.c +++ b/crypto/openssl/apps/s_socket.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -214,6 +214,8 @@ int do_server(int *accept_sock, const char *host, const char *port, const BIO_ADDRINFO *next; int sock_family, sock_type, sock_protocol, sock_port; const BIO_ADDR *sock_address; + int sock_family_fallback = AF_UNSPEC; + const BIO_ADDR *sock_address_fallback = NULL; int sock_options = BIO_SOCK_REUSEADDR; int ret = 0; @@ -244,6 +246,10 @@ int do_server(int *accept_sock, const char *host, const char *port, && BIO_ADDRINFO_protocol(next) == sock_protocol) { if (sock_family == AF_INET && BIO_ADDRINFO_family(next) == AF_INET6) { + /* In case AF_INET6 is returned but not supported by the + * kernel, retry with the first detected address family */ + sock_family_fallback = sock_family; + sock_address_fallback = sock_address; sock_family = AF_INET6; sock_address = BIO_ADDRINFO_address(next); } else if (sock_family == AF_INET6 @@ -253,6 +259,10 @@ int do_server(int *accept_sock, const char *host, const char *port, } asock = BIO_socket(sock_family, sock_type, sock_protocol, 0); + if (asock == INVALID_SOCKET && sock_family_fallback != AF_UNSPEC) { + asock = BIO_socket(sock_family_fallback, sock_type, sock_protocol, 0); + sock_address = sock_address_fallback; + } if (asock == INVALID_SOCKET || !BIO_listen(asock, sock_address, sock_options)) { BIO_ADDRINFO_free(res); diff --git a/crypto/openssl/crypto/armcap.c b/crypto/openssl/crypto/armcap.c index 8bf96f10214f..c5685bde5891 100644 --- a/crypto/openssl/crypto/armcap.c +++ b/crypto/openssl/crypto/armcap.c @@ -68,6 +68,12 @@ void OPENSSL_cpuid_setup(void) __attribute__ ((constructor)); # include # define OSSL_IMPLEMENT_GETAUXVAL # endif +# elif defined(__ANDROID_API__) +/* see https://developer.android.google.cn/ndk/guides/cpu-features */ +# if __ANDROID_API__ >= 18 +# include +# define OSSL_IMPLEMENT_GETAUXVAL +# endif # endif # if defined(__FreeBSD__) # include @@ -87,6 +93,15 @@ static unsigned long getauxval(unsigned long key) # endif # endif +/* + * Android: according to https://developer.android.com/ndk/guides/cpu-features, + * getauxval is supported starting with API level 18 + */ +# if defined(__ANDROID__) && defined(__ANDROID_API__) && __ANDROID_API__ >= 18 +# include +# define OSSL_IMPLEMENT_GETAUXVAL +# endif + /* * ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas * AArch64 used AT_HWCAP. diff --git a/crypto/openssl/crypto/asn1/a_object.c b/crypto/openssl/crypto/asn1/a_object.c index d67a723c9611..8ade9e50a7cb 100644 --- a/crypto/openssl/crypto/asn1/a_object.c +++ b/crypto/openssl/crypto/asn1/a_object.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -286,16 +286,13 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, } } - /* - * only the ASN1_OBJECTs from the 'table' will have values for ->sn or - * ->ln - */ if ((a == NULL) || ((*a) == NULL) || !((*a)->flags & ASN1_OBJECT_FLAG_DYNAMIC)) { if ((ret = ASN1_OBJECT_new()) == NULL) return NULL; - } else + } else { ret = (*a); + } p = *pp; /* detach data from object */ @@ -313,6 +310,12 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, ret->flags |= ASN1_OBJECT_FLAG_DYNAMIC_DATA; } memcpy(data, p, length); + /* If there are dynamic strings, free them here, and clear the flag */ + if ((ret->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) != 0) { + OPENSSL_free((char *)ret->sn); + OPENSSL_free((char *)ret->ln); + ret->flags &= ~ASN1_OBJECT_FLAG_DYNAMIC_STRINGS; + } /* reattach data to object, after which it remains const */ ret->data = data; ret->length = length; diff --git a/crypto/openssl/crypto/asn1/a_strex.c b/crypto/openssl/crypto/asn1/a_strex.c index 4879b33785e9..284dde274c9f 100644 --- a/crypto/openssl/crypto/asn1/a_strex.c +++ b/crypto/openssl/crypto/asn1/a_strex.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -280,6 +280,8 @@ static int do_dump(unsigned long lflags, char_io *io_ch, void *arg, t.type = str->type; t.value.ptr = (char *)str; der_len = i2d_ASN1_TYPE(&t, NULL); + if (der_len <= 0) + return -1; if ((der_buf = OPENSSL_malloc(der_len)) == NULL) { ASN1err(ASN1_F_DO_DUMP, ERR_R_MALLOC_FAILURE); return -1; diff --git a/crypto/openssl/crypto/asn1/asn1_lib.c b/crypto/openssl/crypto/asn1/asn1_lib.c index 8e62f3307443..3d99d1383d42 100644 --- a/crypto/openssl/crypto/asn1/asn1_lib.c +++ b/crypto/openssl/crypto/asn1/asn1_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/asn1/bio_asn1.c b/crypto/openssl/crypto/asn1/bio_asn1.c index 86ee56632305..914d77c866c6 100644 --- a/crypto/openssl/crypto/asn1/bio_asn1.c +++ b/crypto/openssl/crypto/asn1/bio_asn1.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -138,6 +138,11 @@ static int asn1_bio_free(BIO *b) if (ctx == NULL) return 0; + if (ctx->prefix_free != NULL) + ctx->prefix_free(b, &ctx->ex_buf, &ctx->ex_len, &ctx->ex_arg); + if (ctx->suffix_free != NULL) + ctx->suffix_free(b, &ctx->ex_buf, &ctx->ex_len, &ctx->ex_arg); + OPENSSL_free(ctx->buf); OPENSSL_free(ctx); BIO_set_data(b, NULL); diff --git a/crypto/openssl/crypto/asn1/bio_ndef.c b/crypto/openssl/crypto/asn1/bio_ndef.c index d7d7d80eea91..760e4846a474 100644 --- a/crypto/openssl/crypto/asn1/bio_ndef.c +++ b/crypto/openssl/crypto/asn1/bio_ndef.c @@ -142,6 +142,9 @@ static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, ndef_aux = *(NDEF_SUPPORT **)parg; + if (ndef_aux == NULL) + return 0; + OPENSSL_free(ndef_aux->derbuf); ndef_aux->derbuf = NULL; diff --git a/crypto/openssl/crypto/asn1/d2i_pr.c b/crypto/openssl/crypto/asn1/d2i_pr.c index 7b127d2092fa..2094963036fe 100644 --- a/crypto/openssl/crypto/asn1/d2i_pr.c +++ b/crypto/openssl/crypto/asn1/d2i_pr.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -78,13 +78,53 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, * type */ +static EVP_PKEY *key_as_pkcs8(const unsigned char **pp, long length, int *carry_on) +{ + const unsigned char *p = *pp; + PKCS8_PRIV_KEY_INFO *p8 = d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, length); + EVP_PKEY *ret; + + if (p8 == NULL) + return NULL; + + ret = EVP_PKCS82PKEY(p8); + if (ret == NULL) + *carry_on = 0; + + PKCS8_PRIV_KEY_INFO_free(p8); + + if (ret != NULL) + *pp = p; + + return ret; +} + EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, long length) { STACK_OF(ASN1_TYPE) *inkey; const unsigned char *p; int keytype; + EVP_PKEY *ret = NULL; + int carry_on = 1; + + ERR_set_mark(); + ret = key_as_pkcs8(pp, length, &carry_on); + if (ret != NULL) { + ERR_clear_last_mark(); + if (a != NULL) + *a = ret; + return ret; + } + + if (carry_on == 0) { + ERR_clear_last_mark(); + ASN1err(ASN1_F_D2I_AUTOPRIVATEKEY, + ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE); + return NULL; + } p = *pp; + /* * Dirty trick: read in the ASN1 data into a STACK_OF(ASN1_TYPE): by * analyzing it we can determine the passed structure: this assumes the @@ -100,28 +140,15 @@ EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, keytype = EVP_PKEY_DSA; else if (sk_ASN1_TYPE_num(inkey) == 4) keytype = EVP_PKEY_EC; - else if (sk_ASN1_TYPE_num(inkey) == 3) { /* This seems to be PKCS8, not - * traditional format */ - PKCS8_PRIV_KEY_INFO *p8 = d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, length); - EVP_PKEY *ret; - - sk_ASN1_TYPE_pop_free(inkey, ASN1_TYPE_free); - if (!p8) { - ASN1err(ASN1_F_D2I_AUTOPRIVATEKEY, - ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE); - return NULL; - } - ret = EVP_PKCS82PKEY(p8); - PKCS8_PRIV_KEY_INFO_free(p8); - if (ret == NULL) - return NULL; - *pp = p; - if (a) { - *a = ret; - } - return ret; - } else + else keytype = EVP_PKEY_RSA; sk_ASN1_TYPE_pop_free(inkey, ASN1_TYPE_free); - return d2i_PrivateKey(keytype, a, pp, length); + + ret = d2i_PrivateKey(keytype, a, pp, length); + if (ret != NULL) + ERR_pop_to_mark(); + else + ERR_clear_last_mark(); + + return ret; } diff --git a/crypto/openssl/crypto/asn1/t_spki.c b/crypto/openssl/crypto/asn1/t_spki.c index 64ee77eeecba..3d4aea8ad9a4 100644 --- a/crypto/openssl/crypto/asn1/t_spki.c +++ b/crypto/openssl/crypto/asn1/t_spki.c @@ -1,5 +1,5 @@ /* - * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/bio/b_addr.c b/crypto/openssl/crypto/bio/b_addr.c index b023bbda406b..8ea32bce401b 100644 --- a/crypto/openssl/crypto/bio/b_addr.c +++ b/crypto/openssl/crypto/bio/b_addr.c @@ -1,5 +1,5 @@ /* - * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -689,7 +689,7 @@ int BIO_lookup_ex(const char *host, const char *service, int lookup_type, hints.ai_protocol = protocol; # ifdef AI_ADDRCONFIG # ifdef AF_UNSPEC - if (family == AF_UNSPEC) + if (host != NULL && family == AF_UNSPEC) # endif hints.ai_flags |= AI_ADDRCONFIG; # endif diff --git a/crypto/openssl/crypto/bio/b_sock2.c b/crypto/openssl/crypto/bio/b_sock2.c index 335dfabc6180..104ff31b0d2e 100644 --- a/crypto/openssl/crypto/bio/b_sock2.c +++ b/crypto/openssl/crypto/bio/b_sock2.c @@ -1,5 +1,5 @@ /* - * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -243,7 +243,8 @@ int BIO_listen(int sock, const BIO_ADDR *addr, int options) } } -# ifdef IPV6_V6ONLY + /* On OpenBSD it is always ipv6 only with ipv6 sockets thus read-only */ +# if defined(IPV6_V6ONLY) && !defined(__OpenBSD__) if (BIO_ADDR_family(addr) == AF_INET6) { /* * Note: Windows default of IPV6_V6ONLY is ON, and Linux is OFF. diff --git a/crypto/openssl/crypto/bn/bn_div.c b/crypto/openssl/crypto/bn/bn_div.c index 286d69c895fd..0da9f39b31a9 100644 --- a/crypto/openssl/crypto/bn/bn_div.c +++ b/crypto/openssl/crypto/bn/bn_div.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -268,7 +268,7 @@ int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, BIGNUM *tmp, *snum, *sdiv, *res; BN_ULONG *resp, *wnum, *wnumtop; BN_ULONG d0, d1; - int num_n, div_n; + int num_n, div_n, num_neg; assert(divisor->top > 0 && divisor->d[divisor->top - 1] != 0); @@ -326,7 +326,8 @@ int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, /* Setup quotient */ if (!bn_wexpand(res, loop)) goto err; - res->neg = (num->neg ^ divisor->neg); + num_neg = num->neg; + res->neg = (num_neg ^ divisor->neg); res->top = loop; res->flags |= BN_FLG_FIXED_TOP; resp = &(res->d[loop]); @@ -442,7 +443,7 @@ int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, *--resp = q; } /* snum holds remainder, it's as wide as divisor */ - snum->neg = num->neg; + snum->neg = num_neg; snum->top = div_n; snum->flags |= BN_FLG_FIXED_TOP; if (rm != NULL) diff --git a/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl b/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl index 227ee59ff2ba..c0e5d863dcb2 100755 --- a/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl +++ b/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -471,7 +471,7 @@ sub SSSE3ROUND { # critical path is 20 "SIMD ticks" per round &por ($b,$t); } -my $xframe = $win64 ? 32+8 : 8; +my $xframe = $win64 ? 160+8 : 8; $code.=<<___; .type ChaCha20_ssse3,\@function,5 @@ -2499,7 +2499,7 @@ sub AVX512ROUND { # critical path is 14 "SIMD ticks" per round &vprold ($b,$b,7); } -my $xframe = $win64 ? 32+8 : 8; +my $xframe = $win64 ? 160+8 : 8; $code.=<<___; .type ChaCha20_avx512,\@function,5 @@ -2515,8 +2515,16 @@ ChaCha20_avx512: sub \$64+$xframe,%rsp ___ $code.=<<___ if ($win64); - movaps %xmm6,-0x28(%r9) - movaps %xmm7,-0x18(%r9) + movaps %xmm6,-0xa8(%r9) + movaps %xmm7,-0x98(%r9) + movaps %xmm8,-0x88(%r9) + movaps %xmm9,-0x78(%r9) + movaps %xmm10,-0x68(%r9) + movaps %xmm11,-0x58(%r9) + movaps %xmm12,-0x48(%r9) + movaps %xmm13,-0x38(%r9) + movaps %xmm14,-0x28(%r9) + movaps %xmm15,-0x18(%r9) .Lavx512_body: ___ $code.=<<___; @@ -2683,8 +2691,16 @@ $code.=<<___; vzeroall ___ $code.=<<___ if ($win64); - movaps -0x28(%r9),%xmm6 - movaps -0x18(%r9),%xmm7 + movaps -0xa8(%r9),%xmm6 + movaps -0x98(%r9),%xmm7 + movaps -0x88(%r9),%xmm8 + movaps -0x78(%r9),%xmm9 + movaps -0x68(%r9),%xmm10 + movaps -0x58(%r9),%xmm11 + movaps -0x48(%r9),%xmm12 + movaps -0x38(%r9),%xmm13 + movaps -0x28(%r9),%xmm14 + movaps -0x18(%r9),%xmm15 ___ $code.=<<___; lea (%r9),%rsp @@ -2711,8 +2727,16 @@ ChaCha20_avx512vl: sub \$64+$xframe,%rsp ___ $code.=<<___ if ($win64); - movaps %xmm6,-0x28(%r9) - movaps %xmm7,-0x18(%r9) + movaps %xmm6,-0xa8(%r9) + movaps %xmm7,-0x98(%r9) + movaps %xmm8,-0x88(%r9) + movaps %xmm9,-0x78(%r9) + movaps %xmm10,-0x68(%r9) + movaps %xmm11,-0x58(%r9) + movaps %xmm12,-0x48(%r9) + movaps %xmm13,-0x38(%r9) + movaps %xmm14,-0x28(%r9) + movaps %xmm15,-0x18(%r9) .Lavx512vl_body: ___ $code.=<<___; @@ -2836,8 +2860,16 @@ $code.=<<___; vzeroall ___ $code.=<<___ if ($win64); - movaps -0x28(%r9),%xmm6 - movaps -0x18(%r9),%xmm7 + movaps -0xa8(%r9),%xmm6 + movaps -0x98(%r9),%xmm7 + movaps -0x88(%r9),%xmm8 + movaps -0x78(%r9),%xmm9 + movaps -0x68(%r9),%xmm10 + movaps -0x58(%r9),%xmm11 + movaps -0x48(%r9),%xmm12 + movaps -0x38(%r9),%xmm13 + movaps -0x28(%r9),%xmm14 + movaps -0x18(%r9),%xmm15 ___ $code.=<<___; lea (%r9),%rsp diff --git a/crypto/openssl/crypto/dsa/dsa_prn.c b/crypto/openssl/crypto/dsa/dsa_prn.c index a4a1fd5650e4..070b881e1fae 100644 --- a/crypto/openssl/crypto/dsa/dsa_prn.c +++ b/crypto/openssl/crypto/dsa/dsa_prn.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -49,9 +49,11 @@ int DSA_print(BIO *bp, const DSA *x, int off) EVP_PKEY *pk; int ret; pk = EVP_PKEY_new(); - if (pk == NULL || !EVP_PKEY_set1_DSA(pk, (DSA *)x)) + if (pk == NULL) return 0; - ret = EVP_PKEY_print_private(bp, pk, off, NULL); + ret = EVP_PKEY_set1_DSA(pk, (DSA *)x); + if (ret) + ret = EVP_PKEY_print_private(bp, pk, off, NULL); EVP_PKEY_free(pk); return ret; } @@ -61,9 +63,11 @@ int DSAparams_print(BIO *bp, const DSA *x) EVP_PKEY *pk; int ret; pk = EVP_PKEY_new(); - if (pk == NULL || !EVP_PKEY_set1_DSA(pk, (DSA *)x)) + if (pk == NULL) return 0; - ret = EVP_PKEY_print_params(bp, pk, 4, NULL); + ret = EVP_PKEY_set1_DSA(pk, (DSA *)x); + if (ret) + ret = EVP_PKEY_print_params(bp, pk, 4, NULL); EVP_PKEY_free(pk); return ret; } diff --git a/crypto/openssl/crypto/ec/ec2_oct.c b/crypto/openssl/crypto/ec/ec2_oct.c index 48543265eeab..788e6501fbcd 100644 --- a/crypto/openssl/crypto/ec/ec2_oct.c +++ b/crypto/openssl/crypto/ec/ec2_oct.c @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2011-2021 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (the "License"). You may not use @@ -247,9 +247,21 @@ int ec_GF2m_simple_oct2point(const EC_GROUP *group, EC_POINT *point, ECerr(EC_F_EC_GF2M_SIMPLE_OCT2POINT, EC_R_BUFFER_TOO_SMALL); return 0; } - form = buf[0]; - y_bit = form & 1; - form = form & ~1U; + + /* + * The first octet is the point converison octet PC, see X9.62, page 4 + * and section 4.4.2. It must be: + * 0x00 for the point at infinity + * 0x02 or 0x03 for compressed form + * 0x04 for uncompressed form + * 0x06 or 0x07 for hybrid form. + * For compressed or hybrid forms, we store the last bit of buf[0] as + * y_bit and clear it from buf[0] so as to obtain a POINT_CONVERSION_*. + * We error if buf[0] contains any but the above values. + */ + y_bit = buf[0] & 1; + form = buf[0] & ~1U; + if ((form != 0) && (form != POINT_CONVERSION_COMPRESSED) && (form != POINT_CONVERSION_UNCOMPRESSED) && (form != POINT_CONVERSION_HYBRID)) { @@ -261,6 +273,7 @@ int ec_GF2m_simple_oct2point(const EC_GROUP *group, EC_POINT *point, return 0; } + /* The point at infinity is represented by a single zero octet. */ if (form == 0) { if (len != 1) { ECerr(EC_F_EC_GF2M_SIMPLE_OCT2POINT, EC_R_INVALID_ENCODING); @@ -312,11 +325,23 @@ int ec_GF2m_simple_oct2point(const EC_GROUP *group, EC_POINT *point, goto err; } if (form == POINT_CONVERSION_HYBRID) { - if (!group->meth->field_div(group, yxi, y, x, ctx)) - goto err; - if (y_bit != BN_is_odd(yxi)) { - ECerr(EC_F_EC_GF2M_SIMPLE_OCT2POINT, EC_R_INVALID_ENCODING); - goto err; + /* + * Check that the form in the encoding was set correctly + * according to X9.62 4.4.2.a, 4(c), see also first paragraph + * of X9.62, 4.4.1.b. + */ + if (BN_is_zero(x)) { + if (y_bit != 0) { + ECerr(ERR_LIB_EC, EC_R_INVALID_ENCODING); + goto err; + } + } else { + if (!group->meth->field_div(group, yxi, y, x, ctx)) + goto err; + if (y_bit != BN_is_odd(yxi)) { + ECerr(ERR_LIB_EC, EC_R_INVALID_ENCODING); + goto err; + } } } diff --git a/crypto/openssl/crypto/ec/ec_asn1.c b/crypto/openssl/crypto/ec/ec_asn1.c index e497a259095d..c8ee1e6f1762 100644 --- a/crypto/openssl/crypto/ec/ec_asn1.c +++ b/crypto/openssl/crypto/ec/ec_asn1.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/engine/eng_devcrypto.c b/crypto/openssl/crypto/engine/eng_devcrypto.c index 50e88e9ecdfc..84a3b7dbec75 100644 --- a/crypto/openssl/crypto/engine/eng_devcrypto.c +++ b/crypto/openssl/crypto/engine/eng_devcrypto.c @@ -24,6 +24,8 @@ #include "crypto/engine.h" +/* #define ENGINE_DEVCRYPTO_DEBUG */ + #if CRYPTO_ALGORITHM_MIN < CRYPTO_ALGORITHM_MAX # define CHECK_BSD_STYLE_MACROS #endif @@ -759,6 +761,9 @@ void engine_load_devcrypto_int() int fd; if ((fd = open("/dev/crypto", O_RDWR, 0)) < 0) { +#ifndef ENGINE_DEVCRYPTO_DEBUG + if (errno != ENOENT) +#endif fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno)); return; } diff --git a/crypto/openssl/crypto/err/openssl.txt b/crypto/openssl/crypto/err/openssl.txt index 7e1776375df7..902e97b84355 100644 --- a/crypto/openssl/crypto/err/openssl.txt +++ b/crypto/openssl/crypto/err/openssl.txt @@ -1160,6 +1160,7 @@ SSL_F_FINAL_EC_PT_FORMATS:485:final_ec_pt_formats SSL_F_FINAL_EMS:486:final_ems SSL_F_FINAL_KEY_SHARE:503:final_key_share SSL_F_FINAL_MAXFRAGMENTLEN:557:final_maxfragmentlen +SSL_F_FINAL_PSK:639:final_psk SSL_F_FINAL_RENEGOTIATE:483:final_renegotiate SSL_F_FINAL_SERVER_NAME:558:final_server_name SSL_F_FINAL_SIG_ALGS:497:final_sig_algs @@ -1652,6 +1653,7 @@ X509V3_F_I2S_ASN1_ENUMERATED:121:i2s_ASN1_ENUMERATED X509V3_F_I2S_ASN1_IA5STRING:149:i2s_ASN1_IA5STRING X509V3_F_I2S_ASN1_INTEGER:120:i2s_ASN1_INTEGER X509V3_F_I2V_AUTHORITY_INFO_ACCESS:138:i2v_AUTHORITY_INFO_ACCESS +X509V3_F_I2V_AUTHORITY_KEYID:173:i2v_AUTHORITY_KEYID X509V3_F_LEVEL_ADD_NODE:168:level_add_node X509V3_F_NOTICE_SECTION:132:notice_section X509V3_F_NREF_NOS:133:nref_nos @@ -1692,6 +1694,7 @@ X509V3_F_V2I_SUBJECT_ALT:154:v2i_subject_alt X509V3_F_V2I_TLS_FEATURE:165:v2i_TLS_FEATURE X509V3_F_V3_GENERIC_EXTENSION:116:v3_generic_extension X509V3_F_X509V3_ADD1_I2D:140:X509V3_add1_i2d +X509V3_F_X509V3_ADD_LEN_VALUE:174:x509v3_add_len_value X509V3_F_X509V3_ADD_VALUE:105:X509V3_add_value X509V3_F_X509V3_EXT_ADD:104:X509V3_EXT_add X509V3_F_X509V3_EXT_ADD_ALIAS:106:X509V3_EXT_add_alias @@ -2741,6 +2744,7 @@ SSL_R_MISSING_DSA_SIGNING_CERT:165:missing dsa signing cert SSL_R_MISSING_ECDSA_SIGNING_CERT:381:missing ecdsa signing cert SSL_R_MISSING_FATAL:256:missing fatal SSL_R_MISSING_PARAMETERS:290:missing parameters +SSL_R_MISSING_PSK_KEX_MODES_EXTENSION:310:missing psk kex modes extension SSL_R_MISSING_RSA_CERTIFICATE:168:missing rsa certificate SSL_R_MISSING_RSA_ENCRYPTING_CERT:169:missing rsa encrypting cert SSL_R_MISSING_RSA_SIGNING_CERT:170:missing rsa signing cert @@ -2784,6 +2788,7 @@ SSL_R_NO_VALID_SCTS:216:no valid scts SSL_R_NO_VERIFY_COOKIE_CALLBACK:403:no verify cookie callback SSL_R_NULL_SSL_CTX:195:null ssl ctx SSL_R_NULL_SSL_METHOD_PASSED:196:null ssl method passed +SSL_R_OCSP_CALLBACK_FAILURE:294:ocsp callback failure SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED:197:old session cipher not returned SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED:344:\ old session compression algorithm not returned diff --git a/crypto/openssl/crypto/evp/e_aes.c b/crypto/openssl/crypto/evp/e_aes.c index 405ddbf9bf09..a1d3ab90fa61 100644 --- a/crypto/openssl/crypto/evp/e_aes.c +++ b/crypto/openssl/crypto/evp/e_aes.c @@ -1,5 +1,5 @@ /* - * Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -611,22 +611,22 @@ void aes_t4_decrypt(const unsigned char *in, unsigned char *out, */ void aes128_t4_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, const AES_KEY *key, - unsigned char *ivec); + unsigned char *ivec, int /*unused*/); *** 1993 LINES SKIPPED *** From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 18:13:24 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B367A6798ED; Fri, 3 Sep 2021 18:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1Qs04BpXz4XcY; Fri, 3 Sep 2021 18:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51DB4F92; Fri, 3 Sep 2021 18:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183IDOdF082811; Fri, 3 Sep 2021 18:13:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183IDObb082810; Fri, 3 Sep 2021 18:13:24 GMT (envelope-from git) Date: Fri, 3 Sep 2021 18:13:24 GMT Message-Id: <202109031813.183IDObb082810@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: 8440bc1742ff - stable/12 - OpenSSL: Regen manual pages for 1.1.1l MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8440bc1742ffe92c1aedd52bcaf4f2f863e24603 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 18:13:24 -0000 The branch stable/12 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=8440bc1742ffe92c1aedd52bcaf4f2f863e24603 commit 8440bc1742ffe92c1aedd52bcaf4f2f863e24603 Author: Jung-uk Kim AuthorDate: 2021-09-03 18:12:06 +0000 Commit: Jung-uk Kim CommitDate: 2021-09-03 18:12:06 +0000 OpenSSL: Regen manual pages for 1.1.1l --- secure/lib/libcrypto/Makefile.inc | 4 +- secure/lib/libcrypto/man/man3/ADMISSIONS.3 | 4 +- .../libcrypto/man/man3/ASN1_INTEGER_get_int64.3 | 4 +- secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 | 4 +- secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 | 4 +- .../lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 | 4 +- secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 | 4 +- secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 | 4 +- .../lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 | 4 +- secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 | 4 +- secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 | 4 +- .../lib/libcrypto/man/man3/ASN1_generate_nconf.3 | 4 +- secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 | 4 +- secure/lib/libcrypto/man/man3/ASYNC_start_job.3 | 4 +- secure/lib/libcrypto/man/man3/BF_encrypt.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_ADDR.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_connect.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_ctrl.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_f_base64.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_f_buffer.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_f_cipher.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_f_md.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_f_null.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_f_ssl.3 | 11 ++---- secure/lib/libcrypto/man/man3/BIO_find_type.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_get_data.3 | 4 +- .../lib/libcrypto/man/man3/BIO_get_ex_new_index.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_new.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_new_CMS.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_printf.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_push.3 | 10 ++--- secure/lib/libcrypto/man/man3/BIO_read.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_accept.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_bio.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_connect.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_fd.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_file.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_mem.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_null.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_s_socket.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_set_callback.3 | 4 +- secure/lib/libcrypto/man/man3/BIO_should_retry.3 | 4 +- secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 | 4 +- secure/lib/libcrypto/man/man3/BN_CTX_new.3 | 4 +- secure/lib/libcrypto/man/man3/BN_CTX_start.3 | 4 +- secure/lib/libcrypto/man/man3/BN_add.3 | 4 +- secure/lib/libcrypto/man/man3/BN_add_word.3 | 4 +- secure/lib/libcrypto/man/man3/BN_bn2bin.3 | 4 +- secure/lib/libcrypto/man/man3/BN_cmp.3 | 44 ++++++++++++---------- secure/lib/libcrypto/man/man3/BN_copy.3 | 4 +- secure/lib/libcrypto/man/man3/BN_generate_prime.3 | 4 +- secure/lib/libcrypto/man/man3/BN_mod_inverse.3 | 4 +- .../lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 | 4 +- .../lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 | 4 +- secure/lib/libcrypto/man/man3/BN_new.3 | 4 +- secure/lib/libcrypto/man/man3/BN_num_bytes.3 | 4 +- secure/lib/libcrypto/man/man3/BN_rand.3 | 4 +- secure/lib/libcrypto/man/man3/BN_security_bits.3 | 4 +- secure/lib/libcrypto/man/man3/BN_set_bit.3 | 4 +- secure/lib/libcrypto/man/man3/BN_swap.3 | 4 +- secure/lib/libcrypto/man/man3/BN_zero.3 | 4 +- secure/lib/libcrypto/man/man3/BUF_MEM_new.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_add0_cert.3 | 4 +- .../libcrypto/man/man3/CMS_add1_recipient_cert.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_add1_signer.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_compress.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_decrypt.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_encrypt.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_final.3 | 4 +- .../libcrypto/man/man3/CMS_get0_RecipientInfos.3 | 4 +- .../lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_get0_type.3 | 4 +- .../libcrypto/man/man3/CMS_get1_ReceiptRequest.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_sign.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_uncompress.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_verify.3 | 4 +- secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 | 4 +- secure/lib/libcrypto/man/man3/CONF_modules_free.3 | 4 +- .../libcrypto/man/man3/CONF_modules_load_file.3 | 4 +- .../libcrypto/man/man3/CRYPTO_THREAD_run_once.3 | 4 +- .../libcrypto/man/man3/CRYPTO_get_ex_new_index.3 | 4 +- secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 | 4 +- .../man/man3/CTLOG_STORE_get0_log_by_id.3 | 4 +- secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 | 4 +- secure/lib/libcrypto/man/man3/CTLOG_new.3 | 4 +- .../libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 | 4 +- secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 | 4 +- secure/lib/libcrypto/man/man3/DES_random_key.3 | 4 +- secure/lib/libcrypto/man/man3/DH_generate_key.3 | 4 +- .../libcrypto/man/man3/DH_generate_parameters.3 | 4 +- secure/lib/libcrypto/man/man3/DH_get0_pqg.3 | 4 +- secure/lib/libcrypto/man/man3/DH_get_1024_160.3 | 4 +- secure/lib/libcrypto/man/man3/DH_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/DH_new.3 | 4 +- secure/lib/libcrypto/man/man3/DH_new_by_nid.3 | 4 +- secure/lib/libcrypto/man/man3/DH_set_method.3 | 4 +- secure/lib/libcrypto/man/man3/DH_size.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_SIG_new.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_do_sign.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_dup_DH.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_generate_key.3 | 4 +- .../libcrypto/man/man3/DSA_generate_parameters.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_new.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_set_method.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_sign.3 | 4 +- secure/lib/libcrypto/man/man3/DSA_size.3 | 4 +- secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 | 4 +- secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 | 4 +- secure/lib/libcrypto/man/man3/DTLSv1_listen.3 | 4 +- secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 | 4 +- .../lib/libcrypto/man/man3/ECPKParameters_print.3 | 4 +- .../lib/libcrypto/man/man3/EC_GFp_simple_method.3 | 4 +- secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 | 4 +- secure/lib/libcrypto/man/man3/EC_GROUP_new.3 | 4 +- .../lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 | 4 +- secure/lib/libcrypto/man/man3/EC_KEY_new.3 | 4 +- secure/lib/libcrypto/man/man3/EC_POINT_add.3 | 4 +- secure/lib/libcrypto/man/man3/EC_POINT_new.3 | 4 +- secure/lib/libcrypto/man/man3/ENGINE_add.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_clear_error.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_error_string.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_get_error.3 | 4 +- .../libcrypto/man/man3/ERR_load_crypto_strings.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_load_strings.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_print_errors.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_put_error.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_remove_state.3 | 4 +- secure/lib/libcrypto/man/man3/ERR_set_mark.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 | 4 +- .../man/man3/EVP_CIPHER_CTX_get_cipher_data.3 | 4 +- .../lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_DigestInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 | 4 +- .../lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_OpenInit.3 | 4 +- .../lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 | 4 +- .../man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 | 4 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 | 4 +- .../man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 | 4 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 | 4 +- .../man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 | 4 +- .../libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_cmp.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 | 4 +- .../man/man3/EVP_PKEY_get_default_digest_nid.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 | 4 +- .../libcrypto/man/man3/EVP_PKEY_meth_get_count.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 | 4 +- .../libcrypto/man/man3/EVP_PKEY_print_private.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 | 4 +- .../libcrypto/man/man3/EVP_PKEY_verify_recover.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_SealInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_SignInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_aes.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_aria.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_blake2b512.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_camellia.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_chacha20.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_des.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_md2.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_md4.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_md5.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_mdc2.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_rc4.3 | 4 +- .../lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_ripemd160.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_sha1.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_sha224.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_sha3_224.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_sm3.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_whirlpool.3 | 4 +- secure/lib/libcrypto/man/man3/HMAC.3 | 4 +- secure/lib/libcrypto/man/man3/MD5.3 | 4 +- secure/lib/libcrypto/man/man3/MDC2_Init.3 | 4 +- secure/lib/libcrypto/man/man3/Makefile | 1 + secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 | 4 +- secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 | 4 +- secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 | 4 +- .../libcrypto/man/man3/OCSP_request_add1_nonce.3 | 4 +- .../lib/libcrypto/man/man3/OCSP_resp_find_status.3 | 4 +- .../lib/libcrypto/man/man3/OCSP_response_status.3 | 4 +- secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 | 4 +- secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 | 4 +- .../lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 | 4 +- secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 | 4 +- .../libcrypto/man/man3/OPENSSL_VERSION_NUMBER.3 | 4 +- secure/lib/libcrypto/man/man3/OPENSSL_config.3 | 4 +- .../lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 | 4 +- secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 | 4 +- .../lib/libcrypto/man/man3/OPENSSL_init_crypto.3 | 4 +- secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 | 4 +- .../libcrypto/man/man3/OPENSSL_instrument_bus.3 | 4 +- .../man/man3/OPENSSL_load_builtin_modules.3 | 4 +- secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 | 4 +- .../lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 | 4 +- secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 | 4 +- secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 | 4 +- secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 | 4 +- secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 | 4 +- secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 | 4 +- .../man/man3/OpenSSL_add_all_algorithms.3 | 4 +- secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 | 4 +- secure/lib/libcrypto/man/man3/PEM_read.3 | 4 +- secure/lib/libcrypto/man/man3/PEM_read_CMS.3 | 4 +- .../libcrypto/man/man3/PEM_read_bio_PrivateKey.3 | 4 +- secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 | 4 +- .../libcrypto/man/man3/PEM_write_bio_CMS_stream.3 | 4 +- .../man/man3/PEM_write_bio_PKCS7_stream.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS12_create.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS12_newpass.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS12_parse.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS7_sign.3 | 4 +- .../lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 | 4 +- secure/lib/libcrypto/man/man3/PKCS7_verify.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_DRBG_generate.3 | 4 +- .../lib/libcrypto/man/man3/RAND_DRBG_get0_master.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_DRBG_new.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_DRBG_reseed.3 | 4 +- .../libcrypto/man/man3/RAND_DRBG_set_callbacks.3 | 4 +- .../lib/libcrypto/man/man3/RAND_DRBG_set_ex_data.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_add.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_bytes.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_cleanup.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_egd.3 | 4 +- secure/lib/libcrypto/man/man3/RAND_load_file.3 | 4 +- .../lib/libcrypto/man/man3/RAND_set_rand_method.3 | 4 +- secure/lib/libcrypto/man/man3/RC4_set_key.3 | 4 +- secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_blinding_on.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_check_key.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_generate_key.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_get0_key.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_meth_new.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_new.3 | 4 +- .../man/man3/RSA_padding_add_PKCS1_type_1.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_print.3 | 4 +- .../lib/libcrypto/man/man3/RSA_private_encrypt.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_set_method.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_sign.3 | 4 +- .../man/man3/RSA_sign_ASN1_OCTET_STRING.3 | 4 +- secure/lib/libcrypto/man/man3/RSA_size.3 | 4 +- secure/lib/libcrypto/man/man3/SCT_new.3 | 4 +- secure/lib/libcrypto/man/man3/SCT_print.3 | 4 +- secure/lib/libcrypto/man/man3/SCT_validate.3 | 4 +- secure/lib/libcrypto/man/man3/SHA256_Init.3 | 4 +- secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 | 4 +- secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 | 4 +- secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 | 4 +- secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 | 4 +- .../man/man3/SSL_COMP_add_compression_method.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 | 4 +- .../libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 | 4 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 | 4 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 | 4 +- .../man/man3/SSL_CTX_add_extra_chain_cert.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_add_session.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_config.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_flush_sessions.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_free.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_get_verify_mode.3 | 4 +- .../man/man3/SSL_CTX_has_client_custom_ext.3 | 4 +- .../man/man3/SSL_CTX_load_verify_locations.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_new.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_sess_number.3 | 4 +- .../man/man3/SSL_CTX_sess_set_cache_size.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 | 4 +- .../man/man3/SSL_CTX_set1_verify_cert_store.3 | 4 +- .../man/man3/SSL_CTX_set_alpn_select_cb.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_cert_store.3 | 4 +- .../man/man3/SSL_CTX_set_cert_verify_callback.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_cipher_list.3 | 4 +- .../man/man3/SSL_CTX_set_client_cert_cb.3 | 4 +- .../man/man3/SSL_CTX_set_client_hello_cb.3 | 4 +- .../man/man3/SSL_CTX_set_ct_validation_callback.3 | 4 +- .../man/man3/SSL_CTX_set_ctlog_list_file.3 | 4 +- .../man/man3/SSL_CTX_set_default_passwd_cb.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set_ex_data.3 | 4 +- .../man/man3/SSL_CTX_set_generate_session_id.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_info_callback.3 | 4 +- .../man/man3/SSL_CTX_set_keylog_callback.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 | 4 +- .../man/man3/SSL_CTX_set_min_proto_version.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_msg_callback.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_num_tickets.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set_options.3 | 4 +- .../man/man3/SSL_CTX_set_psk_client_callback.3 | 4 +- .../man/man3/SSL_CTX_set_quiet_shutdown.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_read_ahead.3 | 4 +- .../man/man3/SSL_CTX_set_record_padding_callback.3 | 4 +- .../man/man3/SSL_CTX_set_security_level.3 | 4 +- .../man/man3/SSL_CTX_set_session_cache_mode.3 | 4 +- .../man/man3/SSL_CTX_set_session_id_context.3 | 4 +- .../man/man3/SSL_CTX_set_session_ticket_cb.3 | 4 +- .../man/man3/SSL_CTX_set_split_send_fragment.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_set_ssl_version.3 | 4 +- .../SSL_CTX_set_stateless_cookie_generate_cb.3 | 4 +- .../lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 | 4 +- .../man3/SSL_CTX_set_tlsext_servername_callback.3 | 4 +- .../man/man3/SSL_CTX_set_tlsext_status_cb.3 | 4 +- .../man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 | 4 +- .../man/man3/SSL_CTX_set_tlsext_use_srtp.3 | 4 +- .../man/man3/SSL_CTX_set_tmp_dh_callback.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_use_certificate.3 | 4 +- .../man/man3/SSL_CTX_use_psk_identity_hint.3 | 4 +- .../libcrypto/man/man3/SSL_CTX_use_serverinfo.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 | 4 +- .../libcrypto/man/man3/SSL_SESSION_get0_cipher.3 | 4 +- .../libcrypto/man/man3/SSL_SESSION_get0_hostname.3 | 4 +- .../man/man3/SSL_SESSION_get0_id_context.3 | 4 +- .../lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 | 4 +- .../man/man3/SSL_SESSION_get_compress_id.3 | 4 +- .../libcrypto/man/man3/SSL_SESSION_get_ex_data.3 | 4 +- .../man/man3/SSL_SESSION_get_protocol_version.3 | 4 +- .../lib/libcrypto/man/man3/SSL_SESSION_get_time.3 | 4 +- .../libcrypto/man/man3/SSL_SESSION_has_ticket.3 | 4 +- .../libcrypto/man/man3/SSL_SESSION_is_resumable.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 | 4 +- .../lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_accept.3 | 4 +- .../lib/libcrypto/man/man3/SSL_alert_type_string.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_check_chain.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_clear.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_connect.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_do_handshake.3 | 4 +- .../man/man3/SSL_export_keying_material.3 | 4 +- .../libcrypto/man/man3/SSL_extension_supported.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_free.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 | 4 +- .../lib/libcrypto/man/man3/SSL_get_all_async_fds.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 | 4 +- .../lib/libcrypto/man/man3/SSL_get_client_random.3 | 4 +- .../libcrypto/man/man3/SSL_get_current_cipher.3 | 4 +- .../libcrypto/man/man3/SSL_get_default_timeout.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_error.3 | 4 +- .../lib/libcrypto/man/man3/SSL_get_extms_support.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_fd.3 | 4 +- .../libcrypto/man/man3/SSL_get_peer_cert_chain.3 | 4 +- .../libcrypto/man/man3/SSL_get_peer_certificate.3 | 4 +- .../man/man3/SSL_get_peer_signature_nid.3 | 4 +- .../lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 | 4 +- .../lib/libcrypto/man/man3/SSL_get_psk_identity.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_rbio.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_session.3 | 4 +- .../libcrypto/man/man3/SSL_get_shared_sigalgs.3 | 4 +- .../lib/libcrypto/man/man3/SSL_get_verify_result.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_get_version.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_in_init.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_key_update.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_library_init.3 | 4 +- .../libcrypto/man/man3/SSL_load_client_CA_file.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_new.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_pending.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_read.3 | 4 +- .../lib/libcrypto/man/man3/SSL_read_early_data.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_rstate_string.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_session_reused.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_set1_host.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_set_bio.3 | 4 +- .../lib/libcrypto/man/man3/SSL_set_connect_state.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_set_fd.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_set_session.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 | 4 +- .../lib/libcrypto/man/man3/SSL_set_verify_result.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_shutdown.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_state_string.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_want.3 | 4 +- secure/lib/libcrypto/man/man3/SSL_write.3 | 4 +- secure/lib/libcrypto/man/man3/UI_STRING.3 | 4 +- secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 | 4 +- secure/lib/libcrypto/man/man3/UI_create_method.3 | 4 +- secure/lib/libcrypto/man/man3/UI_new.3 | 4 +- secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 | 4 +- secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 | 4 +- .../libcrypto/man/man3/X509_CRL_get0_by_serial.3 | 4 +- .../libcrypto/man/man3/X509_EXTENSION_set_object.3 | 4 +- secure/lib/libcrypto/man/man3/X509_LOOKUP.3 | 4 +- .../lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 | 4 +- .../lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 | 4 +- .../man/man3/X509_NAME_ENTRY_get_object.3 | 4 +- .../man/man3/X509_NAME_add_entry_by_txt.3 | 4 +- secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 | 4 +- .../man/man3/X509_NAME_get_index_by_NID.3 | 4 +- secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 | 4 +- secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 | 4 +- secure/lib/libcrypto/man/man3/X509_SIG_get0.3 | 4 +- .../libcrypto/man/man3/X509_STORE_CTX_get_error.3 | 4 +- secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 | 4 +- .../man/man3/X509_STORE_CTX_set_verify_cb.3 | 4 +- .../lib/libcrypto/man/man3/X509_STORE_add_cert.3 | 4 +- .../lib/libcrypto/man/man3/X509_STORE_get0_param.3 | 4 +- secure/lib/libcrypto/man/man3/X509_STORE_new.3 | 4 +- .../man/man3/X509_STORE_set_verify_cb_func.3 | 4 +- .../man/man3/X509_VERIFY_PARAM_set_flags.3 | 4 +- secure/lib/libcrypto/man/man3/X509_check_ca.3 | 4 +- secure/lib/libcrypto/man/man3/X509_check_host.3 | 4 +- secure/lib/libcrypto/man/man3/X509_check_issued.3 | 4 +- .../libcrypto/man/man3/X509_check_private_key.3 | 4 +- secure/lib/libcrypto/man/man3/X509_check_purpose.3 | 4 +- secure/lib/libcrypto/man/man3/X509_cmp.3 | 4 +- secure/lib/libcrypto/man/man3/X509_cmp_time.3 | 4 +- secure/lib/libcrypto/man/man3/X509_digest.3 | 4 +- secure/lib/libcrypto/man/man3/X509_dup.3 | 4 +- .../lib/libcrypto/man/man3/X509_get0_notBefore.3 | 4 +- .../lib/libcrypto/man/man3/X509_get0_signature.3 | 4 +- secure/lib/libcrypto/man/man3/X509_get0_uids.3 | 4 +- .../libcrypto/man/man3/X509_get_extension_flags.3 | 4 +- secure/lib/libcrypto/man/man3/X509_get_pubkey.3 | 4 +- .../lib/libcrypto/man/man3/X509_get_serialNumber.3 | 4 +- .../lib/libcrypto/man/man3/X509_get_subject_name.3 | 4 +- secure/lib/libcrypto/man/man3/X509_get_version.3 | 4 +- secure/lib/libcrypto/man/man3/X509_new.3 | 4 +- secure/lib/libcrypto/man/man3/X509_sign.3 | 4 +- secure/lib/libcrypto/man/man3/X509_verify_cert.3 | 4 +- .../lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 | 4 +- secure/lib/libcrypto/man/man3/d2i_DHparams.3 | 4 +- .../libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 | 4 +- secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 | 10 +++-- secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 | 4 +- secure/lib/libcrypto/man/man3/d2i_X509.3 | 4 +- secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 | 4 +- .../lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 | 4 +- secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 | 4 +- secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 | 4 +- secure/lib/libcrypto/man/man5/x509v3_config.5 | 4 +- secure/lib/libcrypto/man/man7/Ed25519.7 | 4 +- secure/lib/libcrypto/man/man7/RAND.7 | 4 +- secure/lib/libcrypto/man/man7/RAND_DRBG.7 | 4 +- secure/lib/libcrypto/man/man7/RSA-PSS.7 | 4 +- secure/lib/libcrypto/man/man7/SM2.7 | 4 +- secure/lib/libcrypto/man/man7/X25519.7 | 4 +- secure/lib/libcrypto/man/man7/bio.7 | 4 +- secure/lib/libcrypto/man/man7/ct.7 | 4 +- secure/lib/libcrypto/man/man7/des_modes.7 | 4 +- secure/lib/libcrypto/man/man7/evp.7 | 4 +- secure/lib/libcrypto/man/man7/ossl_store-file.7 | 4 +- secure/lib/libcrypto/man/man7/ossl_store.7 | 4 +- .../lib/libcrypto/man/man7/passphrase-encoding.7 | 4 +- secure/lib/libcrypto/man/man7/proxy-certificates.7 | 4 +- secure/lib/libcrypto/man/man7/scrypt.7 | 4 +- secure/lib/libcrypto/man/man7/ssl.7 | 4 +- secure/lib/libcrypto/man/man7/x509.7 | 10 ++--- secure/usr.bin/openssl/man/CA.pl.1 | 4 +- secure/usr.bin/openssl/man/asn1parse.1 | 4 +- secure/usr.bin/openssl/man/ca.1 | 4 +- secure/usr.bin/openssl/man/ciphers.1 | 4 +- secure/usr.bin/openssl/man/cms.1 | 4 +- secure/usr.bin/openssl/man/crl.1 | 4 +- secure/usr.bin/openssl/man/crl2pkcs7.1 | 4 +- secure/usr.bin/openssl/man/dgst.1 | 4 +- secure/usr.bin/openssl/man/dhparam.1 | 4 +- secure/usr.bin/openssl/man/dsa.1 | 4 +- secure/usr.bin/openssl/man/dsaparam.1 | 4 +- secure/usr.bin/openssl/man/ec.1 | 4 +- secure/usr.bin/openssl/man/ecparam.1 | 4 +- secure/usr.bin/openssl/man/enc.1 | 8 ++-- secure/usr.bin/openssl/man/engine.1 | 4 +- secure/usr.bin/openssl/man/errstr.1 | 4 +- secure/usr.bin/openssl/man/gendsa.1 | 4 +- secure/usr.bin/openssl/man/genpkey.1 | 4 +- secure/usr.bin/openssl/man/genrsa.1 | 4 +- secure/usr.bin/openssl/man/list.1 | 4 +- secure/usr.bin/openssl/man/nseq.1 | 4 +- secure/usr.bin/openssl/man/ocsp.1 | 4 +- secure/usr.bin/openssl/man/openssl.1 | 4 +- secure/usr.bin/openssl/man/passwd.1 | 4 +- secure/usr.bin/openssl/man/pkcs12.1 | 4 +- secure/usr.bin/openssl/man/pkcs7.1 | 4 +- secure/usr.bin/openssl/man/pkcs8.1 | 4 +- secure/usr.bin/openssl/man/pkey.1 | 4 +- secure/usr.bin/openssl/man/pkeyparam.1 | 4 +- secure/usr.bin/openssl/man/pkeyutl.1 | 4 +- secure/usr.bin/openssl/man/prime.1 | 4 +- secure/usr.bin/openssl/man/rand.1 | 4 +- secure/usr.bin/openssl/man/req.1 | 4 +- secure/usr.bin/openssl/man/rsa.1 | 4 +- secure/usr.bin/openssl/man/rsautl.1 | 4 +- secure/usr.bin/openssl/man/s_client.1 | 6 +-- secure/usr.bin/openssl/man/s_server.1 | 6 +-- secure/usr.bin/openssl/man/s_time.1 | 4 +- secure/usr.bin/openssl/man/sess_id.1 | 4 +- secure/usr.bin/openssl/man/smime.1 | 4 +- secure/usr.bin/openssl/man/speed.1 | 4 +- secure/usr.bin/openssl/man/spkac.1 | 4 +- secure/usr.bin/openssl/man/srp.1 | 4 +- secure/usr.bin/openssl/man/storeutl.1 | 4 +- secure/usr.bin/openssl/man/ts.1 | 4 +- secure/usr.bin/openssl/man/tsget.1 | 4 +- secure/usr.bin/openssl/man/verify.1 | 4 +- secure/usr.bin/openssl/man/version.1 | 4 +- secure/usr.bin/openssl/man/x509.1 | 4 +- 536 files changed, 1109 insertions(+), 1105 deletions(-) diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 71c091733764..e10c37ab3b4f 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.1.1k -OPENSSL_DATE= 2021-03-25 +OPENSSL_VER= 1.1.1l +OPENSSL_DATE= 2021-08-24 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc diff --git a/secure/lib/libcrypto/man/man3/ADMISSIONS.3 b/secure/lib/libcrypto/man/man3/ADMISSIONS.3 index ad086fb0e8e9..316c89a32e18 100644 --- a/secure/lib/libcrypto/man/man3/ADMISSIONS.3 +++ b/secure/lib/libcrypto/man/man3/ADMISSIONS.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ADMISSIONS 3" -.TH ADMISSIONS 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ADMISSIONS 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 index 3c70dcaa8c2d..d3074f60ea2e 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_INTEGER_GET_INT64 3" -.TH ASN1_INTEGER_GET_INT64 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_INTEGER_GET_INT64 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 index 04ba1089d333..0047d4b9a148 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_ITEM_LOOKUP 3" -.TH ASN1_ITEM_LOOKUP 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_ITEM_LOOKUP 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 index 54c7476b7c08..ab6b9a5c655d 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_NEW 3" -.TH ASN1_OBJECT_NEW 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_OBJECT_NEW 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 index ad1b19c78546..e88ad9da6005 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_TABLE_ADD 3" -.TH ASN1_STRING_TABLE_ADD 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_STRING_TABLE_ADD 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 index 75de680bb66a..3133228c6b26 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_LENGTH 3" -.TH ASN1_STRING_LENGTH 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_STRING_LENGTH 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 index 76d17e1c6b23..1cf8eeaf4a5a 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_NEW 3" -.TH ASN1_STRING_NEW 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_STRING_NEW 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 index d072930ec39d..dae4c1c9d0f4 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_PRINT_EX 3" -.TH ASN1_STRING_PRINT_EX 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_STRING_PRINT_EX 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 b/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 index 0a3564196833..100e39578c37 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TIME_SET 3" -.TH ASN1_TIME_SET 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_TIME_SET 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 b/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 index bf12e2b90dd2..c181d6295299 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TYPE_GET 3" -.TH ASN1_TYPE_GET 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_TYPE_GET 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 b/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 index 207255106b3c..30e469c8fbca 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_GENERATE_NCONF 3" -.TH ASN1_GENERATE_NCONF 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASN1_GENERATE_NCONF 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 b/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 index d1e3abb572db..5e8cdaeb4a24 100644 --- a/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 +++ b/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASYNC_WAIT_CTX_NEW 3" -.TH ASYNC_WAIT_CTX_NEW 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASYNC_WAIT_CTX_NEW 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 b/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 index b5bb00413452..b13652ed1f6f 100644 --- a/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 +++ b/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASYNC_START_JOB 3" -.TH ASYNC_START_JOB 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH ASYNC_START_JOB 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BF_encrypt.3 b/secure/lib/libcrypto/man/man3/BF_encrypt.3 index 58cdcb4fc89e..acc321e5f03e 100644 --- a/secure/lib/libcrypto/man/man3/BF_encrypt.3 +++ b/secure/lib/libcrypto/man/man3/BF_encrypt.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BF_ENCRYPT 3" -.TH BF_ENCRYPT 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BF_ENCRYPT 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ADDR.3 b/secure/lib/libcrypto/man/man3/BIO_ADDR.3 index fd492eee9531..ea077b64dd9f 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ADDR.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ADDR.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ADDR 3" -.TH BIO_ADDR 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_ADDR 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 b/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 index 7d64b051241a..d3e6ccb84c7d 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ADDRINFO 3" -.TH BIO_ADDRINFO 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_ADDRINFO 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_connect.3 b/secure/lib/libcrypto/man/man3/BIO_connect.3 index 507289d24595..ec6ff1c33dfa 100644 --- a/secure/lib/libcrypto/man/man3/BIO_connect.3 +++ b/secure/lib/libcrypto/man/man3/BIO_connect.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_CONNECT 3" -.TH BIO_CONNECT 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_CONNECT 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ctrl.3 b/secure/lib/libcrypto/man/man3/BIO_ctrl.3 index 960e50077eac..bdbc9bb2a29e 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ctrl.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ctrl.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_CTRL 3" -.TH BIO_CTRL 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_CTRL 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_base64.3 b/secure/lib/libcrypto/man/man3/BIO_f_base64.3 index 14db0fc366a1..1c5fb4fb10d8 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_base64.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_base64.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_BASE64 3" -.TH BIO_F_BASE64 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_F_BASE64 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 b/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 index 2cd165a9700d..564feedef793 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_BUFFER 3" -.TH BIO_F_BUFFER 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_F_BUFFER 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 b/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 index 68b32c47dac7..b5eea34baed7 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_CIPHER 3" -.TH BIO_F_CIPHER 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_F_CIPHER 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_md.3 b/secure/lib/libcrypto/man/man3/BIO_f_md.3 index 2a3dec321113..c759f04f5f67 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_md.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_md.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_MD 3" -.TH BIO_F_MD 3 "2021-03-25" "1.1.1k" "OpenSSL" +.TH BIO_F_MD 3 "2021-08-24" "1.1.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_null.3 b/secure/lib/libcrypto/man/man3/BIO_f_null.3 index 6d868bd0a10b..cc32427d0008 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_null.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_null.3 *** 9914 LINES SKIPPED *** From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 18:16:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 120C2679F35; Fri, 3 Sep 2021 18:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1Qwh00xvz4YBn; Fri, 3 Sep 2021 18:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D46DD962; Fri, 3 Sep 2021 18:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183IGZam083146; Fri, 3 Sep 2021 18:16:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183IGZY2083145; Fri, 3 Sep 2021 18:16:35 GMT (envelope-from git) Date: Fri, 3 Sep 2021 18:16:35 GMT Message-Id: <202109031816.183IGZY2083145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: 06eebd227864 - stable/12 - OpenSSL: Reduce diff with the upstream MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 06eebd2278649ec12fdf0f56f5afbb6c8c2cfbab Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 18:16:36 -0000 The branch stable/12 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=06eebd2278649ec12fdf0f56f5afbb6c8c2cfbab commit 06eebd2278649ec12fdf0f56f5afbb6c8c2cfbab Author: Jung-uk Kim AuthorDate: 2021-09-01 04:10:59 +0000 Commit: Jung-uk Kim CommitDate: 2021-09-03 18:14:57 +0000 OpenSSL: Reduce diff with the upstream (cherry picked from commit 649ccdd753790069623e192185d133fd26a03bf9) --- secure/lib/libcrypto/opensslconf.h.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/secure/lib/libcrypto/opensslconf.h.in b/secure/lib/libcrypto/opensslconf.h.in index bfd300376f79..f80d1efb5e74 100644 --- a/secure/lib/libcrypto/opensslconf.h.in +++ b/secure/lib/libcrypto/opensslconf.h.in @@ -112,6 +112,11 @@ extern "C" { # undef DECLARE_DEPRECATED # define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); # endif +# elif defined(__SUNPRO_C) +# if (__SUNPRO_C >= 0x5130) +# undef DECLARE_DEPRECATED +# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); +# endif # endif #endif From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 18:46:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67C8567AB43; Fri, 3 Sep 2021 18:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1Rbj2WMGz4hYb; Fri, 3 Sep 2021 18:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35EAE14F9; Fri, 3 Sep 2021 18:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183IkvO5023626; Fri, 3 Sep 2021 18:46:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183Ikvui023625; Fri, 3 Sep 2021 18:46:57 GMT (envelope-from git) Date: Fri, 3 Sep 2021 18:46:57 GMT Message-Id: <202109031846.183Ikvui023625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 4116adc45531 - stable/12 - pmap_extract.9: Fix pmap_extract_and_hold()'s function type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4116adc455311377b104441c234ad7db2b1539d7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 18:46:57 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=4116adc455311377b104441c234ad7db2b1539d7 commit 4116adc455311377b104441c234ad7db2b1539d7 Author: Ka Ho Ng AuthorDate: 2021-08-27 13:42:49 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:40 +0000 pmap_extract.9: Fix pmap_extract_and_hold()'s function type pmap_extract_and_hold() returns a vm_page_t instead of a physical page address. Sponsored by: The FreeBSD Foundation Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D31691 (cherry picked from commit 6e1df1d14c6dfcc209c1416ec0832e4d08191c72) --- share/man/man9/pmap_extract.9 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/man/man9/pmap_extract.9 b/share/man/man9/pmap_extract.9 index d2154ebe8a0b..77f3b47ec51e 100644 --- a/share/man/man9/pmap_extract.9 +++ b/share/man/man9/pmap_extract.9 @@ -38,7 +38,7 @@ .In vm/pmap.h .Ft vm_paddr_t .Fn pmap_extract "pmap_t pmap" "vm_offset_t va" -.Ft vm_paddr_t +.Ft vm_page_t .Fn pmap_extract_and_hold "pmap_t pmap" "vm_offset_t va" "vm_prot_t prot" .Sh DESCRIPTION The @@ -73,7 +73,9 @@ will be returned. .Pp The .Fn pmap_extract_and_hold -function will return the physical page address associated with the +function will return the +.Ft vm_page_t +associated with the virtual address .Fa va inside the physical map From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 18:46:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FC7367A8F2; Fri, 3 Sep 2021 18:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1Rbk3kn6z4hhG; Fri, 3 Sep 2021 18:46:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5BB6B146E; Fri, 3 Sep 2021 18:46:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183IkwhU023650; Fri, 3 Sep 2021 18:46:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183IkwKL023649; Fri, 3 Sep 2021 18:46:58 GMT (envelope-from git) Date: Fri, 3 Sep 2021 18:46:58 GMT Message-Id: <202109031846.183IkwKL023649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 83d2fee4193a - stable/12 - Document vnode_pager_setsize(9) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 83d2fee4193aaeb934d35e24d3f25f5ef77ab40e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 18:46:59 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=83d2fee4193aaeb934d35e24d3f25f5ef77ab40e commit 83d2fee4193aaeb934d35e24d3f25f5ef77ab40e Author: Ka Ho Ng AuthorDate: 2021-04-07 11:00:31 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:40 +0000 Document vnode_pager_setsize(9) Sponsored by: The FreeBSD Foundation Reviewed by: bcr Approved by: philip (mentor) Differential Revision: https://reviews.freebsd.org/D29408 (cherry picked from commit 86a52e262a6faf75ee34eaa801f6d8ddaad20733) --- share/man/man9/Makefile | 1 + share/man/man9/vnode_pager_setsize.9 | 74 ++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index ef9c1cc9c674..60ee6ea5aa1a 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -394,6 +394,7 @@ MAN= accept_filter.9 \ vn_isdisk.9 \ vnet.9 \ vnode.9 \ + vnode_pager_setsize.9 \ VOP_ACCESS.9 \ VOP_ACLCHECK.9 \ VOP_ADVISE.9 \ diff --git a/share/man/man9/vnode_pager_setsize.9 b/share/man/man9/vnode_pager_setsize.9 new file mode 100644 index 000000000000..c59a01796f20 --- /dev/null +++ b/share/man/man9/vnode_pager_setsize.9 @@ -0,0 +1,74 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2021 The FreeBSD Foundation +.\" +.\" Portions of this software were developed by Ka Ho Ng +.\" 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: +.\" 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. +.\" +.Dd April 6, 2021 +.Dt VNODE_PAGER_SETSIZE 9 +.Os +.Sh NAME +.Nm vnode_pager_setsize +.Nd "notify the VM system about updates in the file size" +.Sh SYNOPSIS +.In sys/param.h +.In vm/vm.h +.In vm/vm_extern.h +.Ft void +.Fn vnode_pager_setsize "struct vnode *vp" "vm_ooffset_t nsize" +.Sh DESCRIPTION +.Nm +lets the VM system know about a change in size for a file. +Content beyond the new EOF specified by the +.Fa nsize +argument will be purged from the cache. +This function is useful for use within file system code to implement +truncation in +.Xr VOP_SETATTR 9 . +.Sh IMPLEMENTATION NOTES +In case the new EOF specified by the +.Fa nsize +argument is not aligned to page boundaries, +partial-page area starting beyond the EOF will be zeroed. +In partial-page area, +for content occupying whole blocks within block +boundaries, +the dirty bits for the corresponding blocks will be cleared. +.Sh LOCKING +Writer lock of the VM object of +.Fa vp +will be held within the function. +.Sh SEE ALSO +.Xr vnode 9 +.Sh HISTORY +The +.Nm +manual page first appeared in +.Fx 14 . +.Sh AUTHORS +This +manual page was written by +.An Ka Ho Ng Aq Mt khng@FreeBSD.org . From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 18:47:01 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 42AB267AEA1; Fri, 3 Sep 2021 18:47:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1Rbn0B5Dz4hmp; Fri, 3 Sep 2021 18:47:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C8511334; Fri, 3 Sep 2021 18:47:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183Il0DE023705; Fri, 3 Sep 2021 18:47:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183Il0EP023704; Fri, 3 Sep 2021 18:47:00 GMT (envelope-from git) Date: Fri, 3 Sep 2021 18:47:00 GMT Message-Id: <202109031847.183Il0EP023704@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: d91b79b54c55 - stable/12 - __FreeBSD_version: update the references to the doc tree MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d91b79b54c55a69f1d14cab4660d5c624c8cf53c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 18:47:01 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=d91b79b54c55a69f1d14cab4660d5c624c8cf53c commit d91b79b54c55a69f1d14cab4660d5c624c8cf53c Author: Ka Ho Ng AuthorDate: 2021-04-22 09:36:22 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:40 +0000 __FreeBSD_version: update the references to the doc tree Update the reference of which file to update in the doc tree when bumping __FreeBSD_version. This change is to catch up with commit f8fed61b80 in the doc repository. Approved by: lwhsu (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29920 (cherry picked from commit 7c707c7c25ad361f911716c31d22f5722f4dffc9) --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index b9f61eef0d58..eea35ca6f893 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -52,7 +52,7 @@ * there. * Currently this lives here in the doc/ repository: * - * head/en_US.ISO8859-1/books/porters-handbook/versions/chapter.xml + * documentation/content/en/books/porters-handbook/versions/_index.adoc * * scheme is: Rxx * 'R' is in the range 0 to 4 if this is a release branch or From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 18:47:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 173DB67A8F4; Fri, 3 Sep 2021 18:47:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1Rbl6MJCz4hfQ; Fri, 3 Sep 2021 18:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8ACFB14FA; Fri, 3 Sep 2021 18:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183IkxYt023674; Fri, 3 Sep 2021 18:46:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183IkxHp023673; Fri, 3 Sep 2021 18:46:59 GMT (envelope-from git) Date: Fri, 3 Sep 2021 18:46:59 GMT Message-Id: <202109031846.183IkxHp023673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 75f7db7c11fe - stable/12 - vnode_pager_setsize.9: Some clarifications on the manpage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 75f7db7c11fe27ab4d5f41c28973aaf1bab912b7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 18:47:00 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=75f7db7c11fe27ab4d5f41c28973aaf1bab912b7 commit 75f7db7c11fe27ab4d5f41c28973aaf1bab912b7 Author: Ka Ho Ng AuthorDate: 2021-04-11 06:45:37 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:40 +0000 vnode_pager_setsize.9: Some clarifications on the manpage A number of changes: - Clarifies the locking rules when calling the routine. - Correct the description regarding the content range to be purged. - Document the effects on page fault handler. MFC with: 86a52e262a6f Sponsored by: The FreeBSD Foundation Reviewed by: bcr, kib Approved by: philip (mentor) Differential Revision: https://reviews.freebsd.org/D29637 (cherry picked from commit b77f5f5553e8ac7868b4b234a36bda3cf2db0907) --- share/man/man9/vnode_pager_setsize.9 | 41 ++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/share/man/man9/vnode_pager_setsize.9 b/share/man/man9/vnode_pager_setsize.9 index c59a01796f20..0dc3b2057930 100644 --- a/share/man/man9/vnode_pager_setsize.9 +++ b/share/man/man9/vnode_pager_setsize.9 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 6, 2021 +.Dd April 8, 2021 .Dt VNODE_PAGER_SETSIZE 9 .Os .Sh NAME @@ -41,26 +41,31 @@ .Fn vnode_pager_setsize "struct vnode *vp" "vm_ooffset_t nsize" .Sh DESCRIPTION .Nm -lets the VM system know about a change in size for a file. -Content beyond the new EOF specified by the -.Fa nsize -argument will be purged from the cache. -This function is useful for use within file system code to implement -truncation in -.Xr VOP_SETATTR 9 . -.Sh IMPLEMENTATION NOTES +lets the VM system know about a change in size for a file, +and updates the object size and vnode pager size of the vm object in +.Fa vp +with +.Fa nsize . +Page faults on the object mapping with offset beyond the new object +size results in +.Va SIGBUS . +.Pp +Pages between the old EOF and the new EOF are removed from the object queue +if the file size shrinks. In case the new EOF specified by the .Fa nsize -argument is not aligned to page boundaries, -partial-page area starting beyond the EOF will be zeroed. -In partial-page area, -for content occupying whole blocks within block -boundaries, -the dirty bits for the corresponding blocks will be cleared. -.Sh LOCKING -Writer lock of the VM object of +argument is not aligned to page boundary, +partial-page area starting beyond the EOF is zeroed and marked invalid. +if the page exists resident. +.Pp +In case the vnode .Fa vp -will be held within the function. +does not have a VM object allocated, the effect of calling this function is no-op. +.Pp +This function must be used within file system code to implement truncation +if the file system allocates vm objects for vnodes. +.Sh LOCKS +The vnode should be exclusively locked on entry and will still be locked on exit. .Sh SEE ALSO .Xr vnode 9 .Sh HISTORY From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 19:05:56 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86A3667B420; Fri, 3 Sep 2021 19:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1S1c3Jv7z4mPR; Fri, 3 Sep 2021 19:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E160196B; Fri, 3 Sep 2021 19:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183J5u6L050524; Fri, 3 Sep 2021 19:05:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183J5uCh050523; Fri, 3 Sep 2021 19:05:56 GMT (envelope-from git) Date: Fri, 3 Sep 2021 19:05:56 GMT Message-Id: <202109031905.183J5uCh050523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 17162a06159a - stable/12 - ivrs_drv: Fix IVHDs with duplicated BaseAddress MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 17162a06159a120a14ac0e0332eb4a23138837ee Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 19:05:56 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=17162a06159a120a14ac0e0332eb4a23138837ee commit 17162a06159a120a14ac0e0332eb4a23138837ee Author: Ka Ho Ng AuthorDate: 2021-03-22 09:33:43 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:40 +0000 ivrs_drv: Fix IVHDs with duplicated BaseAddress Reviewed by: jhb Approved by: philip (mentor) Differential Revision: https://reviews.freebsd.org/D28945 (cherry picked from commit ede14736fd6d74db0374f4a233491ad5dc0e9b1d) --- sys/amd64/vmm/amd/ivrs_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/amd64/vmm/amd/ivrs_drv.c b/sys/amd64/vmm/amd/ivrs_drv.c index b754058c07d5..a02a3ff0b8e9 100644 --- a/sys/amd64/vmm/amd/ivrs_drv.c +++ b/sys/amd64/vmm/amd/ivrs_drv.c @@ -367,10 +367,11 @@ ivhd_identify(driver_t *driver, device_t parent) for (i = ivhd_count - 1 ; i > 0 ; i--){ if (ivhd_is_newer(&ivhd_hdrs[i-1]->Header, &ivhd_hdrs[i]->Header)) { - ivhd_hdrs[i-1] = ivhd_hdrs[i]; + memmove(&ivhd_hdrs[i-1], &ivhd_hdrs[i], + sizeof(void *) * (ivhd_count - i)); ivhd_count--; } - } + } ivhd_devs = malloc(sizeof(device_t) * ivhd_count, M_DEVBUF, M_WAITOK | M_ZERO); From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 19:05:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A81BE67AEF4; Fri, 3 Sep 2021 19:05:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1S1d3hn8z4mpL; Fri, 3 Sep 2021 19:05:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FB50184D; Fri, 3 Sep 2021 19:05:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183J5vNC050548; Fri, 3 Sep 2021 19:05:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183J5vsa050547; Fri, 3 Sep 2021 19:05:57 GMT (envelope-from git) Date: Fri, 3 Sep 2021 19:05:57 GMT Message-Id: <202109031905.183J5vsa050547@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 5ba7dc4c2176 - stable/12 - AMD-vi: Fix IOMMU device interrupts being overridden MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5ba7dc4c21767288f44b5a31c49b65663ae7eb25 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 19:05:57 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=5ba7dc4c21767288f44b5a31c49b65663ae7eb25 commit 5ba7dc4c21767288f44b5a31c49b65663ae7eb25 Author: Ka Ho Ng AuthorDate: 2021-03-22 09:33:43 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:40 +0000 AMD-vi: Fix IOMMU device interrupts being overridden Currently, AMD-vi PCI-e passthrough will lead to the following lines in dmesg: "kernel: CPU0: local APIC error 0x40 ivhd0: Error: completion failed tail:0x720, head:0x0." After some tracing, the problem is due to the interaction with amdvi_alloc_intr_resources() and pci_driver_added(). In ivrs_drv, the identification of AMD-vi IVHD is done by walking over the ACPI IVRS table and ivhdX device_ts are added under the acpi bus, while there are no driver handling the corresponding IOMMU PCI function. In amdvi_alloc_intr_resources(), the MSI intr are allocated with the ivhdX device_t instead of the IOMMU PCI function device_t. bus_setup_intr() is called on ivhdX. the IOMMU pci function device_t is only used for pci_enable_msi(). Since bus_setup_intr() is not called on IOMMU pci function, the IOMMU PCI function device_t's dinfo->cfg.msi is never updated to reflect the supposed msi_data and msi_addr. So the msi_data and msi_addr stay in the value 0. When pci_driver_added() tried to loop over the children of a pci bus, and do pci_cfg_restore() on each of them, msi_addr and msi_data with value 0 will be written to the MSI capability of the IOMMU pci function, thus explaining the errors in dmesg. This change includes an amdiommu driver which currently does attaching, detaching and providing DEVMETHODs for setting up and tearing down interrupt. The purpose of the driver is to prevent pci_driver_added() from calling pci_cfg_restore() on the IOMMU PCI function device_t. The introduction of the amdiommu driver handles allocation of an IRQ resource within the IOMMU PCI function, so that the dinfo->cfg.msi is populated. This has been tested on EPYC Rome 7282 with Radeon 5700XT GPU. Sponsored by: The FreeBSD Foundation Reviewed by: jhb Approved by: philip (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28984 (cherry picked from commit 74ada297e8978b8efda3dffdd1bb24aee7c5faa4) --- sys/amd64/vmm/amd/amdiommu.c | 185 +++++++++++++++++++++++++++++++++++++++++ sys/amd64/vmm/amd/amdvi_hw.c | 89 +++----------------- sys/amd64/vmm/amd/amdvi_priv.h | 5 +- sys/amd64/vmm/amd/ivhd_if.m | 46 ++++++++++ sys/amd64/vmm/amd/ivrs_drv.c | 6 ++ sys/modules/vmm/Makefile | 3 + 6 files changed, 253 insertions(+), 81 deletions(-) diff --git a/sys/amd64/vmm/amd/amdiommu.c b/sys/amd64/vmm/amd/amdiommu.c new file mode 100644 index 000000000000..4ded23dff003 --- /dev/null +++ b/sys/amd64/vmm/amd/amdiommu.c @@ -0,0 +1,185 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 The FreeBSD Fondation + * + * Portions of this software were developed by Ka Ho Ng + * 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: + * 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 "amdvi_priv.h" +#include "ivhd_if.h" + +struct amdiommu_softc { + struct resource *event_res; /* Event interrupt resource. */ + void *event_tag; /* Event interrupt tag. */ + int event_rid; +}; + +static int amdiommu_probe(device_t); +static int amdiommu_attach(device_t); +static int amdiommu_detach(device_t); +static int ivhd_setup_intr(device_t, driver_intr_t, void *, + const char *); +static int ivhd_teardown_intr(device_t); + +static device_method_t amdiommu_methods[] = { + /* device interface */ + DEVMETHOD(device_probe, amdiommu_probe), + DEVMETHOD(device_attach, amdiommu_attach), + DEVMETHOD(device_detach, amdiommu_detach), + DEVMETHOD(ivhd_setup_intr, ivhd_setup_intr), + DEVMETHOD(ivhd_teardown_intr, ivhd_teardown_intr), + DEVMETHOD_END +}; +static driver_t amdiommu_driver = { + "amdiommu", + amdiommu_methods, + sizeof(struct amdiommu_softc), +}; + +static int +amdiommu_probe(device_t dev) +{ + int error; + int capoff; + + /* + * Check base class and sub-class + */ + if (pci_get_class(dev) != PCIC_BASEPERIPH || + pci_get_subclass(dev) != PCIS_BASEPERIPH_IOMMU) + return (ENXIO); + + /* + * A IOMMU capability block carries a 0Fh capid. + */ + error = pci_find_cap(dev, PCIY_SECDEV, &capoff); + if (error) + return (ENXIO); + + /* + * bit [18:16] == 011b indicates the capability block is IOMMU + * capability block. If the field is not set to 011b, bail out. + */ + if ((pci_read_config(dev, capoff + 2, 2) & 0x7) != 0x3) + return (ENXIO); + + return (BUS_PROBE_SPECIFIC); +} + +static int +amdiommu_attach(device_t dev) +{ + + device_set_desc(dev, "AMD-Vi/IOMMU PCI function"); + return (0); +} + +static int +amdiommu_detach(device_t dev) +{ + + return (0); +} + +static int +ivhd_setup_intr(device_t dev, driver_intr_t handler, void *arg, + const char *desc) +{ + struct amdiommu_softc *sc; + int error, msicnt; + + sc = device_get_softc(dev); + msicnt = 1; + if (sc->event_res != NULL) + panic("%s is called without intr teardown", __func__); + sc->event_rid = 1; + + error = pci_alloc_msi(dev, &msicnt); + if (error) { + device_printf(dev, "Couldn't find event MSI IRQ resource.\n"); + return (ENOENT); + } + + sc->event_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &sc->event_rid, RF_ACTIVE); + if (sc->event_res == NULL) { + device_printf(dev, "Unable to allocate event INTR resource.\n"); + error = ENOMEM; + goto fail; + } + + error = bus_setup_intr(dev, sc->event_res, INTR_TYPE_MISC | INTR_MPSAFE, + NULL, handler, arg, &sc->event_tag); + if (error) { + device_printf(dev, "Fail to setup event intr\n"); + goto fail; + } + + bus_describe_intr(dev, sc->event_res, sc->event_tag, "%s", desc); + return (0); + +fail: + ivhd_teardown_intr(dev); + return (error); +} + +static int +ivhd_teardown_intr(device_t dev) +{ + struct amdiommu_softc *sc; + + sc = device_get_softc(dev); + + if (sc->event_res != NULL) { + bus_teardown_intr(dev, sc->event_res, sc->event_tag); + sc->event_tag = NULL; + } + if (sc->event_res != NULL) { + bus_release_resource(dev, SYS_RES_IRQ, sc->event_rid, + sc->event_res); + sc->event_res = NULL; + } + pci_release_msi(dev); + return (0); +} + +static devclass_t amdiommu_devclass; + +/* This driver has to be loaded before ivhd */ +DRIVER_MODULE(amdiommu, pci, amdiommu_driver, amdiommu_devclass, 0, 0); +MODULE_DEPEND(amdiommu, pci, 1, 1, 1); diff --git a/sys/amd64/vmm/amd/amdvi_hw.c b/sys/amd64/vmm/amd/amdvi_hw.c index 0d3dee68059c..3a317ffbe29d 100644 --- a/sys/amd64/vmm/amd/amdvi_hw.c +++ b/sys/amd64/vmm/amd/amdvi_hw.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "ivhd_if.h" #include "pcib_if.h" #include "io/iommu.h" @@ -773,99 +774,33 @@ amdvi_free_evt_intr_res(device_t dev) { struct amdvi_softc *softc; + device_t mmio_dev; softc = device_get_softc(dev); - if (softc->event_tag != NULL) { - bus_teardown_intr(dev, softc->event_res, softc->event_tag); - } - if (softc->event_res != NULL) { - bus_release_resource(dev, SYS_RES_IRQ, softc->event_rid, - softc->event_res); - } - bus_delete_resource(dev, SYS_RES_IRQ, softc->event_rid); - PCIB_RELEASE_MSI(device_get_parent(device_get_parent(dev)), - dev, 1, &softc->event_irq); + mmio_dev = softc->pci_dev; + + IVHD_TEARDOWN_INTR(mmio_dev); } static bool amdvi_alloc_intr_resources(struct amdvi_softc *softc) { struct amdvi_ctrl *ctrl; - device_t dev, pcib; - device_t mmio_dev; - uint64_t msi_addr; - uint32_t msi_data; + device_t dev, mmio_dev; int err; dev = softc->dev; - pcib = device_get_parent(device_get_parent(dev)); - mmio_dev = pci_find_bsf(PCI_RID2BUS(softc->pci_rid), - PCI_RID2SLOT(softc->pci_rid), PCI_RID2FUNC(softc->pci_rid)); - if (device_is_attached(mmio_dev)) { - device_printf(dev, - "warning: IOMMU device is claimed by another driver %s\n", - device_get_driver(mmio_dev)->name); - } - - softc->event_irq = -1; - softc->event_rid = 0; - - /* - * Section 3.7.1 of IOMMU rev 2.0. With MSI, there is only one - * interrupt. XXX: Enable MSI/X support. - */ - err = PCIB_ALLOC_MSI(pcib, dev, 1, 1, &softc->event_irq); - if (err) { - device_printf(dev, - "Couldn't find event MSI IRQ resource.\n"); - return (ENOENT); - } - - err = bus_set_resource(dev, SYS_RES_IRQ, softc->event_rid, - softc->event_irq, 1); - if (err) { - device_printf(dev, "Couldn't set event MSI resource.\n"); - return (ENXIO); - } - - softc->event_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, - &softc->event_rid, RF_ACTIVE); - if (!softc->event_res) { - device_printf(dev, - "Unable to allocate event INTR resource.\n"); - return (ENOMEM); - } - - if (bus_setup_intr(dev, softc->event_res, - INTR_TYPE_MISC | INTR_MPSAFE, NULL, amdvi_event_intr, - softc, &softc->event_tag)) { - device_printf(dev, "Fail to setup event intr\n"); - bus_release_resource(softc->dev, SYS_RES_IRQ, - softc->event_rid, softc->event_res); - softc->event_res = NULL; - return (ENXIO); - } - - bus_describe_intr(dev, softc->event_res, softc->event_tag, - "fault"); - - err = PCIB_MAP_MSI(pcib, dev, softc->event_irq, &msi_addr, - &msi_data); - if (err) { - device_printf(dev, - "Event interrupt config failed, err=%d.\n", - err); - amdvi_free_evt_intr_res(softc->dev); - return (err); - } + mmio_dev = softc->pci_dev; /* Clear interrupt status bits. */ ctrl = softc->ctrl; ctrl->status &= AMDVI_STATUS_EV_OF | AMDVI_STATUS_EV_INTR; - /* Now enable MSI interrupt. */ - pci_enable_msi(mmio_dev, msi_addr, msi_data); - return (0); + err = IVHD_SETUP_INTR(mmio_dev, amdvi_event_intr, softc, "fault"); + if (err) + device_printf(dev, "Interrupt setup failed on %s\n", + device_get_nameunit(mmio_dev)); + return (err); } diff --git a/sys/amd64/vmm/amd/amdvi_priv.h b/sys/amd64/vmm/amd/amdvi_priv.h index 2db6914f08f4..0eae7ca6ca4c 100644 --- a/sys/amd64/vmm/amd/amdvi_priv.h +++ b/sys/amd64/vmm/amd/amdvi_priv.h @@ -375,17 +375,14 @@ enum IvrsType struct amdvi_softc { struct amdvi_ctrl *ctrl; /* Control area. */ device_t dev; /* IOMMU device. */ + device_t pci_dev; /* IOMMU PCI function device. */ enum IvrsType ivhd_type; /* IOMMU IVHD type. */ bool iotlb; /* IOTLB supported by IOMMU */ struct amdvi_cmd *cmd; /* Command descriptor area. */ int cmd_max; /* Max number of commands. */ uint64_t cmp_data; /* Command completion write back. */ struct amdvi_event *event; /* Event descriptor area. */ - struct resource *event_res; /* Event interrupt resource. */ - void *event_tag; /* Event interrupt tag. */ int event_max; /* Max number of events. */ - int event_irq; - int event_rid; /* ACPI various flags. */ uint32_t ivhd_flag; /* ACPI IVHD flag. */ uint32_t ivhd_feature; /* ACPI v1 Reserved or v2 attribute. */ diff --git a/sys/amd64/vmm/amd/ivhd_if.m b/sys/amd64/vmm/amd/ivhd_if.m new file mode 100644 index 000000000000..eaae01ae0131 --- /dev/null +++ b/sys/amd64/vmm/amd/ivhd_if.m @@ -0,0 +1,46 @@ +#- +# Copyright (c) 2021 The FreeBSD Fondation +# +# Portions of this software were developed by Ka Ho Ng +# 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: +# 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$ +# + +#include +#include +#include + +INTERFACE ivhd; + +METHOD int setup_intr { + device_t dev; + driver_intr_t handler; + void *arg; + const char *desc; +}; + +METHOD int teardown_intr { + device_t dev; +}; diff --git a/sys/amd64/vmm/amd/ivrs_drv.c b/sys/amd64/vmm/amd/ivrs_drv.c index a02a3ff0b8e9..90b4a874c345 100644 --- a/sys/amd64/vmm/amd/ivrs_drv.c +++ b/sys/amd64/vmm/amd/ivrs_drv.c @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2016, Anish Gupta (anish@freebsd.org) + * Copyright (c) 2021 The FreeBSD Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -44,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include "io/iommu.h" #include "amdvi_priv.h" @@ -629,6 +632,9 @@ ivhd_attach(device_t dev) softc->dev = dev; ivhd = ivhd_hdrs[unit]; KASSERT(ivhd, ("ivhd is NULL")); + softc->pci_dev = pci_find_bsf(PCI_RID2BUS(ivhd->Header.DeviceId), + PCI_RID2SLOT(ivhd->Header.DeviceId), + PCI_RID2FUNC(ivhd->Header.DeviceId)); softc->ivhd_type = ivhd->Header.Type; softc->pci_seg = ivhd->PciSegmentGroup; diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile index e4346447c840..848ec421e4f7 100644 --- a/sys/modules/vmm/Makefile +++ b/sys/modules/vmm/Makefile @@ -48,6 +48,9 @@ SRCS+= ept.c \ # amd-specific files .PATH: ${SRCTOP}/sys/amd64/vmm/amd SRCS+= vmcb.c \ + amdiommu.c \ + ivhd_if.c \ + ivhd_if.h \ svm.c \ svm_support.S \ npt.c \ From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 19:05:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF81067B248; Fri, 3 Sep 2021 19:05:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1S1f5LhJz4mm3; Fri, 3 Sep 2021 19:05:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 844D11A48; Fri, 3 Sep 2021 19:05:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183J5wMi050572; Fri, 3 Sep 2021 19:05:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183J5wh0050571; Fri, 3 Sep 2021 19:05:58 GMT (envelope-from git) Date: Fri, 3 Sep 2021 19:05:58 GMT Message-Id: <202109031905.183J5wh0050571@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 32593b9f873b - stable/12 - Correct "Fondation" typo (missing "u") MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 32593b9f873b986dc961cf530e2be9e7e27e6cfa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 19:05:59 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=32593b9f873b986dc961cf530e2be9e7e27e6cfa commit 32593b9f873b986dc961cf530e2be9e7e27e6cfa Author: Ed Maste AuthorDate: 2021-03-22 17:06:03 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:40 +0000 Correct "Fondation" typo (missing "u") (cherry picked from commit 54399caa2f8470d9f7c404ce419362bc62d5a094) --- sys/amd64/vmm/amd/amdiommu.c | 2 +- sys/amd64/vmm/amd/ivhd_if.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/vmm/amd/amdiommu.c b/sys/amd64/vmm/amd/amdiommu.c index 4ded23dff003..26c4b10d7807 100644 --- a/sys/amd64/vmm/amd/amdiommu.c +++ b/sys/amd64/vmm/amd/amdiommu.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2021 The FreeBSD Fondation + * Copyright (c) 2021 The FreeBSD Foundation * * Portions of this software were developed by Ka Ho Ng * under sponsorship from the FreeBSD Foundation. diff --git a/sys/amd64/vmm/amd/ivhd_if.m b/sys/amd64/vmm/amd/ivhd_if.m index eaae01ae0131..f2994243c91e 100644 --- a/sys/amd64/vmm/amd/ivhd_if.m +++ b/sys/amd64/vmm/amd/ivhd_if.m @@ -1,5 +1,5 @@ #- -# Copyright (c) 2021 The FreeBSD Fondation +# Copyright (c) 2021 The FreeBSD Foundation # # Portions of this software were developed by Ka Ho Ng # under sponsorship from the FreeBSD Foundation. From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 19:06:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1DC8067AEFD; Fri, 3 Sep 2021 19:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1S1g5dt7z4mPd; Fri, 3 Sep 2021 19:05:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9FA22127A; Fri, 3 Sep 2021 19:05:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183J5x6a050596; Fri, 3 Sep 2021 19:05:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183J5xWA050595; Fri, 3 Sep 2021 19:05:59 GMT (envelope-from git) Date: Fri, 3 Sep 2021 19:05:59 GMT Message-Id: <202109031905.183J5xWA050595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: e6a1e05baf5d - stable/12 - bhyve amd: Small cleanups in amdvi_dump_cmds MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e6a1e05baf5d4a8a406e8b615d05869dab9d02f1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 19:06:00 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=e6a1e05baf5d4a8a406e8b615d05869dab9d02f1 commit e6a1e05baf5d4a8a406e8b615d05869dab9d02f1 Author: Ka Ho Ng AuthorDate: 2021-03-23 08:11:56 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:40 +0000 bhyve amd: Small cleanups in amdvi_dump_cmds Bump offset with MOD_INC instead in amdvi_dump_cmds. Reviewed by: jhb Approved by: philip (mentor) Differential Revision: https://reviews.freebsd.org/D28862 (cherry picked from commit be97fc8dced052f824387a1ae6a0063f9dcfdc89) --- sys/amd64/vmm/amd/amdvi_hw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/amd64/vmm/amd/amdvi_hw.c b/sys/amd64/vmm/amd/amdvi_hw.c index 3a317ffbe29d..5102b714b0a0 100644 --- a/sys/amd64/vmm/amd/amdvi_hw.c +++ b/sys/amd64/vmm/amd/amdvi_hw.c @@ -515,8 +515,7 @@ amdvi_dump_cmds(struct amdvi_softc *softc, int count) printf(" [CMD%d, off:0x%x] opcode= 0x%x 0x%x" " 0x%x 0x%lx\n", i, off, cmd->opcode, cmd->word0, cmd->word1, cmd->addr); - off = (off + sizeof(struct amdvi_cmd)) % - (softc->cmd_max * sizeof(struct amdvi_cmd)); + off = MOD_INC(off, sizeof(struct amdvi_cmd), softc->cmd_max); } } From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 19:06:02 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A81767B367; Fri, 3 Sep 2021 19:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1S1k0rvZz4mmG; Fri, 3 Sep 2021 19:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5A36184E; Fri, 3 Sep 2021 19:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183J61ru050650; Fri, 3 Sep 2021 19:06:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183J616W050649; Fri, 3 Sep 2021 19:06:01 GMT (envelope-from git) Date: Fri, 3 Sep 2021 19:06:01 GMT Message-Id: <202109031906.183J616W050649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 172cf62e0899 - stable/12 - AMD-vi: Mixed format IVHD block should replace fixed format IVHD block MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 172cf62e089945e17d6c0c812039bb362c5d602f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 19:06:02 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=172cf62e089945e17d6c0c812039bb362c5d602f commit 172cf62e089945e17d6c0c812039bb362c5d602f Author: Ka Ho Ng AuthorDate: 2021-04-01 01:15:19 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:40 +0000 AMD-vi: Mixed format IVHD block should replace fixed format IVHD block This fixes double IVHD_SETUP_INTR calls on the same IOMMU device. Sponsored by: The FreeBSD Foundation MFC with: 74ada297e897 Reported by: Oleg Ginzburg Reviewed by: grehan Approved by: philip (mentor) Differential Revision: https://reviews.freebsd.org/D29521 (cherry picked from commit 03efa462b2ab3ae8166598363e9e83d4e5cf0398) --- sys/amd64/vmm/amd/ivrs_drv.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/sys/amd64/vmm/amd/ivrs_drv.c b/sys/amd64/vmm/amd/ivrs_drv.c index 90b4a874c345..f1ba3e92277b 100644 --- a/sys/amd64/vmm/amd/ivrs_drv.c +++ b/sys/amd64/vmm/amd/ivrs_drv.c @@ -313,14 +313,22 @@ ivhd_dev_parse(ACPI_IVRS_HARDWARE1 *ivhd, struct amdvi_softc *softc) static bool ivhd_is_newer(ACPI_IVRS_HEADER *old, ACPI_IVRS_HEADER *new) { - /* - * Newer IVRS header type take precedence. - */ - if ((old->DeviceId == new->DeviceId) && - (old->Type == IVRS_TYPE_HARDWARE_LEGACY) && - ((new->Type == IVRS_TYPE_HARDWARE_EFR) || - (new->Type == IVRS_TYPE_HARDWARE_MIXED))) { - return (true); + if (old->DeviceId == new->DeviceId) { + /* + * Newer IVRS header type take precedence. + */ + if (old->Type == IVRS_TYPE_HARDWARE_LEGACY && + ((new->Type == IVRS_TYPE_HARDWARE_EFR) || + (new->Type == IVRS_TYPE_HARDWARE_MIXED))) + return (true); + + /* + * Mixed format IVHD header type take precedence + * over fixed format IVHD header types. + */ + if (old->Type == IVRS_TYPE_HARDWARE_EFR && + new->Type == IVRS_TYPE_HARDWARE_MIXED) + return (true); } return (false); From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 19:06:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B83267B4A9; Fri, 3 Sep 2021 19:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1S1l1NVBz4mmN; Fri, 3 Sep 2021 19:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1000B184F; Fri, 3 Sep 2021 19:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183J62KA050675; Fri, 3 Sep 2021 19:06:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183J62CL050674; Fri, 3 Sep 2021 19:06:02 GMT (envelope-from git) Date: Fri, 3 Sep 2021 19:06:02 GMT Message-Id: <202109031906.183J62CL050674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: f8b5f7426f0f - stable/12 - AMD-vi: Fortify IVHD device_identify process MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f8b5f7426f0fbb3e9dfa08d6c9d3f14380245681 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 19:06:03 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=f8b5f7426f0fbb3e9dfa08d6c9d3f14380245681 commit f8b5f7426f0fbb3e9dfa08d6c9d3f14380245681 Author: Ka Ho Ng AuthorDate: 2021-04-19 08:07:03 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:40 +0000 AMD-vi: Fortify IVHD device_identify process - Use malloc(9) to allocate ivhd_hdrs list. The previous assumption that there are at most 10 IVHDs in a system is not true. A counter example would be a system with 4 IOMMUs, and each IOMMU is related to IVHDs type 10h, 11h and 40h in the ACPI IVRS table. - Always scan through the whole ivhd_hdrs list to find IVHDs that has the same DeviceId but less prioritized IVHD type. Sponsored by: The FreeBSD Foundation MFC with: 74ada297e897 Reviewed by: grehan Approved by: lwhsu (mentor) Differential Revision: https://reviews.freebsd.org/D29525 (cherry picked from commit 6fe60f1d5c39c94fc87534e9dd4e9630594e0bec) --- sys/amd64/vmm/amd/ivrs_drv.c | 47 ++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/sys/amd64/vmm/amd/ivrs_drv.c b/sys/amd64/vmm/amd/ivrs_drv.c index f1ba3e92277b..16f5e05e23e3 100644 --- a/sys/amd64/vmm/amd/ivrs_drv.c +++ b/sys/amd64/vmm/amd/ivrs_drv.c @@ -57,7 +57,7 @@ int ivhd_count; /* Number of IVHD header. */ * Cached IVHD header list. * Single entry for each IVHD, filtered the legacy one. */ -ACPI_IVRS_HARDWARE1 *ivhd_hdrs[10]; +ACPI_IVRS_HARDWARE1 **ivhd_hdrs; extern int amdvi_ptp_level; /* Page table levels. */ @@ -135,9 +135,11 @@ ivrs_is_ivhd(UINT8 type) static int ivhd_count_iter(ACPI_IVRS_HEADER * ivrs_he, void *arg) { + int *count; + count = (int *)arg; if (ivrs_is_ivhd(ivrs_he->Type)) - ivhd_count++; + (*count)++; return (1); } @@ -340,7 +342,7 @@ ivhd_identify(driver_t *driver, device_t parent) ACPI_TABLE_IVRS *ivrs; ACPI_IVRS_HARDWARE1 *ivhd; ACPI_STATUS status; - int i, count = 0; + int i, j, count = 0; uint32_t ivrs_ivinfo; if (acpi_disabled("ivhd")) @@ -361,32 +363,35 @@ ivhd_identify(driver_t *driver, device_t parent) REG_BITS(ivrs_ivinfo, 7, 5), REG_BITS(ivrs_ivinfo, 22, 22), "\020\001EFRSup"); - ivrs_hdr_iterate_tbl(ivhd_count_iter, NULL); - if (!ivhd_count) + ivrs_hdr_iterate_tbl(ivhd_count_iter, &count); + if (!count) return; - for (i = 0; i < ivhd_count; i++) { + ivhd_hdrs = malloc(sizeof(void *) * count, M_DEVBUF, + M_WAITOK | M_ZERO); + for (i = 0; i < count; i++) { ivhd = ivhd_find_by_index(i); KASSERT(ivhd, ("ivhd%d is NULL\n", i)); - ivhd_hdrs[i] = ivhd; - } - /* - * Scan for presence of legacy and non-legacy device type - * for same AMD-Vi device and override the old one. - */ - for (i = ivhd_count - 1 ; i > 0 ; i--){ - if (ivhd_is_newer(&ivhd_hdrs[i-1]->Header, - &ivhd_hdrs[i]->Header)) { - memmove(&ivhd_hdrs[i-1], &ivhd_hdrs[i], - sizeof(void *) * (ivhd_count - i)); - ivhd_count--; + /* + * Scan for presence of legacy and non-legacy device type + * for same IOMMU device and override the old one. + * + * If there is no existing IVHD to the same IOMMU device, + * the IVHD header pointer is appended. + */ + for (j = 0; j < ivhd_count; j++) { + if (ivhd_is_newer(&ivhd_hdrs[j]->Header, &ivhd->Header)) + break; } + ivhd_hdrs[j] = ivhd; + if (j == ivhd_count) + ivhd_count++; } ivhd_devs = malloc(sizeof(device_t) * ivhd_count, M_DEVBUF, M_WAITOK | M_ZERO); - for (i = 0; i < ivhd_count; i++) { + for (i = 0, j = 0; i < ivhd_count; i++) { ivhd = ivhd_hdrs[i]; KASSERT(ivhd, ("ivhd%d is NULL\n", i)); @@ -408,13 +413,13 @@ ivhd_identify(driver_t *driver, device_t parent) break; } } - count++; + j++; } /* * Update device count in case failed to attach. */ - ivhd_count = count; + ivhd_count = j; } static int From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 19:06:01 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7251D67B067; Fri, 3 Sep 2021 19:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1S1h6tkFz4mpc; Fri, 3 Sep 2021 19:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C09E71778; Fri, 3 Sep 2021 19:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183J60SF050620; Fri, 3 Sep 2021 19:06:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183J60xl050619; Fri, 3 Sep 2021 19:06:00 GMT (envelope-from git) Date: Fri, 3 Sep 2021 19:06:00 GMT Message-Id: <202109031906.183J60xl050619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 834f54457853 - stable/12 - AMD-vi: Fix mismatched NULL checking in amdiommu teardown path MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 834f544578533346b246b2e81f72bca7afadb111 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 19:06:01 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=834f544578533346b246b2e81f72bca7afadb111 commit 834f544578533346b246b2e81f72bca7afadb111 Author: Ka Ho Ng AuthorDate: 2021-03-31 19:30:21 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:40 +0000 AMD-vi: Fix mismatched NULL checking in amdiommu teardown path Sponsored by: The FreeBSD Foundation Approved by: lwhsu (mentor) MFC with: 74ada297e897 (cherry picked from commit cf76495e0a30043503ef126f0a485e314730a221) --- sys/amd64/vmm/amd/amdiommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/vmm/amd/amdiommu.c b/sys/amd64/vmm/amd/amdiommu.c index 26c4b10d7807..8dceb1aa241b 100644 --- a/sys/amd64/vmm/amd/amdiommu.c +++ b/sys/amd64/vmm/amd/amdiommu.c @@ -165,7 +165,7 @@ ivhd_teardown_intr(device_t dev) sc = device_get_softc(dev); - if (sc->event_res != NULL) { + if (sc->event_tag != NULL) { bus_teardown_intr(dev, sc->event_res, sc->event_tag); sc->event_tag = NULL; } From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 19:06:04 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9879E67B26D; Fri, 3 Sep 2021 19:06:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1S1m2nDVz4mmP; Fri, 3 Sep 2021 19:06:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3051C196C; Fri, 3 Sep 2021 19:06:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183J64Sb050699; Fri, 3 Sep 2021 19:06:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183J64C6050698; Fri, 3 Sep 2021 19:06:04 GMT (envelope-from git) Date: Fri, 3 Sep 2021 19:06:04 GMT Message-Id: <202109031906.183J64C6050698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: da4e35def95a - stable/12 - vmm: Fix ivrs_drv device_printf usage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: da4e35def95a5ca456e2f14efce83e1a76dece79 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 19:06:04 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=da4e35def95a5ca456e2f14efce83e1a76dece79 commit da4e35def95a5ca456e2f14efce83e1a76dece79 Author: Ka Ho Ng AuthorDate: 2021-06-19 06:05:13 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:40 +0000 vmm: Fix ivrs_drv device_printf usage The original %b description string is wrong. Sponsored by: The FreeBSD Foundation Reviewed by: imp, jhb Differential Revision: https://reviews.freebsd.org/D30805 (cherry picked from commit 210e6aec4f83ee0efef348ed9dd86be7592596a1) --- sys/amd64/vmm/amd/ivrs_drv.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/amd64/vmm/amd/ivrs_drv.c b/sys/amd64/vmm/amd/ivrs_drv.c index 16f5e05e23e3..10d14ec2f210 100644 --- a/sys/amd64/vmm/amd/ivrs_drv.c +++ b/sys/amd64/vmm/amd/ivrs_drv.c @@ -473,7 +473,7 @@ ivhd_print_flag(device_t dev, enum IvrsType ivhd_type, uint8_t flag) "\005IotlbSup" "\006Coherent" "\007PreFSup" - "\008PPRSup"); + "\010PPRSup"); break; case IVRS_TYPE_HARDWARE_EFR: @@ -563,9 +563,9 @@ ivhd_print_ext_feature(device_t dev, uint64_t ext_feature) "\005GTSup" "\006" "\007IASup" - "\008GASup" - "\009HESup" - "\010PCSup", + "\010GASup" + "\011HESup" + "\012PCSup", REG_BITS(ext_low, 11, 10), REG_BITS(ext_low, 13, 12), REG_BITS(ext_low, 15, 14), @@ -582,17 +582,17 @@ ivhd_print_ext_feature(device_t dev, uint64_t ext_feature) (int)(ext_high), "\020" "\006USSup" - "\009PprOvrflwEarlySup" - "\010PPRAutoRspSup" - "\013BlKStopMrkSup" - "\014PerfOptSup" - "\015MsiCapMmioSup" - "\017GIOSup" - "\018HASup" - "\019EPHSup" - "\020AttrFWSup" - "\021HDSup" - "\023InvIotlbSup", + "\011PprOvrflwEarlySup" + "\012PPRAutoRspSup" + "\015BlKStopMrkSup" + "\016PerfOptSup" + "\017MsiCapMmioSup" + "\021GIOSup" + "\022HASup" + "\023EPHSup" + "\024AttrFWSup" + "\025HDSup" + "\027InvIotlbSup", REG_BITS(ext_high, 5, 0), REG_BITS(ext_high, 8, 7), REG_BITS(ext_high, 11, 10)); From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 19:06:05 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A519C67B5A3; Fri, 3 Sep 2021 19:06:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1S1n3p6pz4mq1; Fri, 3 Sep 2021 19:06:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55DDC196D; Fri, 3 Sep 2021 19:06:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183J65ti050723; Fri, 3 Sep 2021 19:06:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183J65n6050722; Fri, 3 Sep 2021 19:06:05 GMT (envelope-from git) Date: Fri, 3 Sep 2021 19:06:05 GMT Message-Id: <202109031906.183J65n6050722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: db877a06ec41 - stable/12 - vmm: Fix AMD-vi using wrong rid range MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: db877a06ec414ce40ce5113c1913110e5e604e34 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 19:06:05 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=db877a06ec414ce40ce5113c1913110e5e604e34 commit db877a06ec414ce40ce5113c1913110e5e604e34 Author: Ka Ho Ng AuthorDate: 2021-07-13 17:53:10 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:41 +0000 vmm: Fix AMD-vi using wrong rid range The ACPI parsing code around rid range was wrong on assuming there is only one pair of start/end device id range. Besides, ivhd_dev_parse() never work as supposed. The start/end rid info was always zero. Restructure the code to build dynamic-sized tables for each IOMMU softc holding device entries. The device entries are enumerated to find a suitable IOMMU unit. Operations on devices not governed (e.g. the IOMMU unit itself) are no-op from now on. There are also a minor fix on wrong %b formatting string usage. Tested on my EPYC 7282. Sponsored by: The FreeBSD Foundation Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D30827 (cherry picked from commit b5c74dfd6434b7f4dcc59dbd61b508acc5ec3ecf) --- sys/amd64/vmm/amd/amdvi_hw.c | 52 ++++++++++++++------------------ sys/amd64/vmm/amd/amdvi_priv.h | 13 ++++---- sys/amd64/vmm/amd/ivrs_drv.c | 68 +++++++++++++++++++++++++----------------- 3 files changed, 70 insertions(+), 63 deletions(-) diff --git a/sys/amd64/vmm/amd/amdvi_hw.c b/sys/amd64/vmm/amd/amdvi_hw.c index 5102b714b0a0..054dfa650a3c 100644 --- a/sys/amd64/vmm/amd/amdvi_hw.c +++ b/sys/amd64/vmm/amd/amdvi_hw.c @@ -811,11 +811,11 @@ amdvi_print_dev_cap(struct amdvi_softc *softc) cfg = softc->dev_cfg; for (i = 0; i < softc->dev_cfg_cnt; i++) { - device_printf(softc->dev, "device [0x%x - 0x%x]" + device_printf(softc->dev, "device [0x%x - 0x%x] " "config:%b%s\n", cfg->start_id, cfg->end_id, cfg->data, "\020\001INIT\002ExtInt\003NMI" - "\007LINT0\008LINT1", + "\007LINT0\010LINT1", cfg->enable_ats ? "ATS enabled" : ""); cfg++; } @@ -876,10 +876,6 @@ amdvi_add_sysctl(struct amdvi_softc *softc) &softc->total_cmd, "Command submitted count"); SYSCTL_ADD_U16(ctx, child, OID_AUTO, "pci_rid", CTLFLAG_RD, &softc->pci_rid, 0, "IOMMU RID"); - SYSCTL_ADD_U16(ctx, child, OID_AUTO, "start_dev_rid", CTLFLAG_RD, - &softc->start_dev_rid, 0, "Start of device under this IOMMU"); - SYSCTL_ADD_U16(ctx, child, OID_AUTO, "end_dev_rid", CTLFLAG_RD, - &softc->end_dev_rid, 0, "End of device under this IOMMU"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "command_head", CTLTYPE_UINT | CTLFLAG_RD, softc, 0, amdvi_handle_sysctl, "IU", "Command head"); @@ -1207,22 +1203,17 @@ static struct amdvi_softc * amdvi_find_iommu(uint16_t devid) { struct amdvi_softc *softc; - int i; + int i, j; for (i = 0; i < ivhd_count; i++) { softc = device_get_softc(ivhd_devs[i]); - if ((devid >= softc->start_dev_rid) && - (devid <= softc->end_dev_rid)) - return (softc); + for (j = 0; j < softc->dev_cfg_cnt; j++) + if ((devid >= softc->dev_cfg[j].start_id) && + (devid <= softc->dev_cfg[j].end_id)) + return (softc); } - /* - * XXX: BIOS bug, device not in IVRS table, assume its from first IOMMU. - */ - printf("BIOS bug device(%d.%d.%d) doesn't have IVHD entry.\n", - RID2PCI_STR(devid)); - - return (device_get_softc(ivhd_devs[0])); + return (NULL); } /* @@ -1231,14 +1222,12 @@ amdvi_find_iommu(uint16_t devid) * be set concurrently, e.g. read and write bits. */ static void -amdvi_set_dte(struct amdvi_domain *domain, uint16_t devid, bool enable) +amdvi_set_dte(struct amdvi_domain *domain, struct amdvi_softc *softc, + uint16_t devid, bool enable) { - struct amdvi_softc *softc; struct amdvi_dte* temp; KASSERT(domain, ("domain is NULL for pci_rid:0x%x\n", devid)); - - softc = amdvi_find_iommu(devid); KASSERT(softc, ("softc is NULL for pci_rid:0x%x\n", devid)); temp = &amdvi_dte[devid]; @@ -1272,11 +1261,8 @@ amdvi_set_dte(struct amdvi_domain *domain, uint16_t devid, bool enable) } static void -amdvi_inv_device(uint16_t devid) +amdvi_inv_device(struct amdvi_softc *softc, uint16_t devid) { - struct amdvi_softc *softc; - - softc = amdvi_find_iommu(devid); KASSERT(softc, ("softc is NULL")); amdvi_cmd_inv_dte(softc, devid); @@ -1291,6 +1277,7 @@ static void amdvi_add_device(void *arg, uint16_t devid) { struct amdvi_domain *domain; + struct amdvi_softc *softc; domain = (struct amdvi_domain *)arg; KASSERT(domain != NULL, ("domain is NULL")); @@ -1298,22 +1285,29 @@ amdvi_add_device(void *arg, uint16_t devid) printf("Assigning device(%d.%d.%d) to domain:%d\n", RID2PCI_STR(devid), domain->id); #endif - amdvi_set_dte(domain, devid, true); - amdvi_inv_device(devid); + softc = amdvi_find_iommu(devid); + if (softc == NULL) + return; + amdvi_set_dte(domain, softc, devid, true); + amdvi_inv_device(softc, devid); } static void amdvi_remove_device(void *arg, uint16_t devid) { struct amdvi_domain *domain; + struct amdvi_softc *softc; domain = (struct amdvi_domain *)arg; #ifdef AMDVI_DEBUG_CMD printf("Remove device(0x%x) from domain:%d\n", devid, domain->id); #endif - amdvi_set_dte(domain, devid, false); - amdvi_inv_device(devid); + softc = amdvi_find_iommu(devid); + if (softc == NULL) + return; + amdvi_set_dte(domain, softc, devid, false); + amdvi_inv_device(softc, devid); } static void diff --git a/sys/amd64/vmm/amd/amdvi_priv.h b/sys/amd64/vmm/amd/amdvi_priv.h index 0eae7ca6ca4c..6960ef24d683 100644 --- a/sys/amd64/vmm/amd/amdvi_priv.h +++ b/sys/amd64/vmm/amd/amdvi_priv.h @@ -2,7 +2,10 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2016 Anish Gupta (anish@freebsd.org) - * All rights reserved. + * Copyright (c) 2021 The FreeBSD Foundation + * + * Portions of this software were developed by Ka Ho Ng + * 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 @@ -392,13 +395,11 @@ struct amdvi_softc { uint8_t pci_cap; /* PCI capability. */ uint16_t pci_seg; /* IOMMU PCI domain/segment. */ uint16_t pci_rid; /* PCI BDF of IOMMU */ - /* Device range under this IOMMU. */ - uint16_t start_dev_rid; /* First device under this IOMMU. */ - uint16_t end_dev_rid; /* Last device under this IOMMU. */ - /* BIOS provided device configuration for end points. */ - struct ivhd_dev_cfg dev_cfg[10]; + /* ACPI device configuration for end points. */ + struct ivhd_dev_cfg *dev_cfg; int dev_cfg_cnt; + int dev_cfg_cap; /* Software statistics. */ uint64_t event_intr_cnt; /* Total event INTR count. */ diff --git a/sys/amd64/vmm/amd/ivrs_drv.c b/sys/amd64/vmm/amd/ivrs_drv.c index 10d14ec2f210..1455e314b692 100644 --- a/sys/amd64/vmm/amd/ivrs_drv.c +++ b/sys/amd64/vmm/amd/ivrs_drv.c @@ -185,9 +185,17 @@ ivhd_dev_add_entry(struct amdvi_softc *softc, uint32_t start_id, { struct ivhd_dev_cfg *dev_cfg; - /* If device doesn't have special data, don't add it. */ - if (!cfg) - return; + KASSERT(softc->dev_cfg_cap <= softc->dev_cfg_cnt, + ("Impossible case: number of dev_cfg exceeding capacity")); + if (softc->dev_cfg_cap == softc->dev_cfg_cnt) { + if (softc->dev_cfg_cap == 0) + softc->dev_cfg_cap = 1; + else + softc->dev_cfg_cap <<= 2; + softc->dev_cfg = realloc(softc->dev_cfg, + sizeof(*softc->dev_cfg) * softc->dev_cfg_cap, M_DEVBUF, + M_WAITOK); + } dev_cfg = &softc->dev_cfg[softc->dev_cfg_cnt++]; dev_cfg->start_id = start_id; @@ -204,14 +212,11 @@ ivhd_dev_parse(ACPI_IVRS_HARDWARE1 *ivhd, struct amdvi_softc *softc) { ACPI_IVRS_DE_HEADER *de; uint8_t *p, *end; - int range_start_id = 0, range_end_id = 0; + int range_start_id = -1, range_end_id = -1, i; uint32_t *extended; uint8_t all_data = 0, range_data = 0; bool range_enable_ats = false, enable_ats; - softc->start_dev_rid = ~0; - softc->end_dev_rid = 0; - switch (ivhd->Header.Type) { case IVRS_TYPE_HARDWARE_LEGACY: p = (uint8_t *)ivhd + sizeof(ACPI_IVRS_HARDWARE1); @@ -232,11 +237,11 @@ ivhd_dev_parse(ACPI_IVRS_HARDWARE1 *ivhd, struct amdvi_softc *softc) while (p < end) { de = (ACPI_IVRS_DE_HEADER *)p; - softc->start_dev_rid = MIN(softc->start_dev_rid, de->Id); - softc->end_dev_rid = MAX(softc->end_dev_rid, de->Id); switch (de->Type) { case ACPI_IVRS_TYPE_ALL: all_data = de->DataSetting; + for (i = 0; i < softc->dev_cfg_cnt; i++) + softc->dev_cfg[i].data |= all_data; break; case ACPI_IVRS_TYPE_SELECT: @@ -256,6 +261,11 @@ ivhd_dev_parse(ACPI_IVRS_HARDWARE1 *ivhd, struct amdvi_softc *softc) case ACPI_IVRS_TYPE_START: case ACPI_IVRS_TYPE_ALIAS_START: case ACPI_IVRS_TYPE_EXT_START: + if (range_start_id != -1) { + device_printf(softc->dev, + "Unexpected start-of-range device entry\n"); + return (EINVAL); + } range_start_id = de->Id; range_data = de->DataSetting; if (de->Type == ACPI_IVRS_TYPE_EXT_START) { @@ -267,10 +277,20 @@ ivhd_dev_parse(ACPI_IVRS_HARDWARE1 *ivhd, struct amdvi_softc *softc) break; case ACPI_IVRS_TYPE_END: + if (range_start_id == -1) { + device_printf(softc->dev, + "Unexpected end-of-range device entry\n"); + return (EINVAL); + } range_end_id = de->Id; + if (range_end_id < range_start_id) { + device_printf(softc->dev, + "Device entry range going backward\n"); + return (EINVAL); + } ivhd_dev_add_entry(softc, range_start_id, range_end_id, - range_data | all_data, range_enable_ats); - range_start_id = range_end_id = 0; + range_data | all_data, range_enable_ats); + range_start_id = range_end_id = -1; range_data = 0; all_data = 0; break; @@ -288,12 +308,6 @@ ivhd_dev_parse(ACPI_IVRS_HARDWARE1 *ivhd, struct amdvi_softc *softc) "Unknown dev entry:0x%x\n", de->Type); } - if (softc->dev_cfg_cnt > - (sizeof(softc->dev_cfg) / sizeof(softc->dev_cfg[0]))) { - device_printf(softc->dev, - "WARN Too many device entries.\n"); - return (EINVAL); - } if (de->Type < 0x40) p += sizeof(ACPI_IVRS_DEVICE4); else if (de->Type < 0x80) @@ -305,10 +319,6 @@ ivhd_dev_parse(ACPI_IVRS_HARDWARE1 *ivhd, struct amdvi_softc *softc) } } - KASSERT((softc->end_dev_rid >= softc->start_dev_rid), - ("Device end[0x%x] < start[0x%x.\n", - softc->end_dev_rid, softc->start_dev_rid)); - return (0); } @@ -620,9 +630,6 @@ ivhd_print_cap(struct amdvi_softc *softc, ACPI_IVRS_HARDWARE1 * ivhd) max_ptp_level, amdvi_ptp_level); } - device_printf(softc->dev, "device range: 0x%x - 0x%x\n", - softc->start_dev_rid, softc->end_dev_rid); - return (0); } @@ -680,21 +687,25 @@ ivhd_attach(device_t dev) if (status != 0) { device_printf(dev, "endpoint device parsing error=%d\n", status); + goto fail; } status = ivhd_print_cap(softc, ivhd); - if (status != 0) { - return (status); - } + if (status != 0) + goto fail; status = amdvi_setup_hw(softc); if (status != 0) { device_printf(dev, "couldn't be initialised, error=%d\n", status); - return (status); + goto fail; } return (0); + +fail: + free(softc->dev_cfg, M_DEVBUF); + return (status); } static int @@ -705,6 +716,7 @@ ivhd_detach(device_t dev) softc = device_get_softc(dev); amdvi_teardown_hw(softc); + free(softc->dev_cfg, M_DEVBUF); /* * XXX: delete the device. From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 19:06:07 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C96567B609; Fri, 3 Sep 2021 19:06:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1S1p4g2Tz4mvH; Fri, 3 Sep 2021 19:06:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DAA5196E; Fri, 3 Sep 2021 19:06:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183J66Z0050747; Fri, 3 Sep 2021 19:06:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183J66pV050746; Fri, 3 Sep 2021 19:06:06 GMT (envelope-from git) Date: Fri, 3 Sep 2021 19:06:06 GMT Message-Id: <202109031906.183J66pV050746@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 0eb56e7496f6 - stable/12 - vmm: Fix wrong assert in ivhd_dev_add_entry MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0eb56e7496f6d8056990d07500be015fcb09dd54 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 19:06:07 -0000 The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=0eb56e7496f6d8056990d07500be015fcb09dd54 commit 0eb56e7496f6d8056990d07500be015fcb09dd54 Author: Ka Ho Ng AuthorDate: 2021-08-12 07:54:40 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-03 18:46:41 +0000 vmm: Fix wrong assert in ivhd_dev_add_entry The correct condition is to check the number of ivhd entries fit into the array. Reported by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31514 (cherry picked from commit 179bc5729dd72e0f4252c0dce72454c76782f935) --- sys/amd64/vmm/amd/ivrs_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/vmm/amd/ivrs_drv.c b/sys/amd64/vmm/amd/ivrs_drv.c index 1455e314b692..86a9f558e32a 100644 --- a/sys/amd64/vmm/amd/ivrs_drv.c +++ b/sys/amd64/vmm/amd/ivrs_drv.c @@ -185,7 +185,7 @@ ivhd_dev_add_entry(struct amdvi_softc *softc, uint32_t start_id, { struct ivhd_dev_cfg *dev_cfg; - KASSERT(softc->dev_cfg_cap <= softc->dev_cfg_cnt, + KASSERT(softc->dev_cfg_cap >= softc->dev_cfg_cnt, ("Impossible case: number of dev_cfg exceeding capacity")); if (softc->dev_cfg_cap == softc->dev_cfg_cnt) { if (softc->dev_cfg_cap == 0) From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 20:47:08 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4046A67D708; Fri, 3 Sep 2021 20:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1VGN1MSVz3lhJ; Fri, 3 Sep 2021 20:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0AC1D2A43; Fri, 3 Sep 2021 20:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 183Kl7Rb083550; Fri, 3 Sep 2021 20:47:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183Kl7d6083549; Fri, 3 Sep 2021 20:47:07 GMT (envelope-from git) Date: Fri, 3 Sep 2021 20:47:07 GMT Message-Id: <202109032047.183Kl7d6083549@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Toomas Soome Subject: git: 343da8f5e98f - stable/13 - libsecureboot: define SOPEN_MAX MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 343da8f5e98ffac6a7c02fc5f8dd74290e267be0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 20:47:08 -0000 The branch stable/13 has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=343da8f5e98ffac6a7c02fc5f8dd74290e267be0 commit 343da8f5e98ffac6a7c02fc5f8dd74290e267be0 Author: Toomas Soome AuthorDate: 2021-08-10 19:46:40 +0000 Commit: Toomas Soome CommitDate: 2021-09-03 20:45:16 +0000 libsecureboot: define SOPEN_MAX With commit 97cbd5e722389a575e820c4e03f38053308f08ea, the SOPEN_MAX was removed from stand.h. We would need better mechanism there. (cherry picked from commit ee6dc333e1a1af08afa3d14b83e963e4cf90b77b) PR: 258211 --- lib/libsecureboot/verify_file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libsecureboot/verify_file.c b/lib/libsecureboot/verify_file.c index 9773b02e5a1d..22f3f06b0eda 100644 --- a/lib/libsecureboot/verify_file.c +++ b/lib/libsecureboot/verify_file.c @@ -56,6 +56,9 @@ extern char *Skip; * We sometimes need to know if input is verified or not. * The extra slot is for tracking most recently opened. */ +#ifndef SOPEN_MAX +#define SOPEN_MAX 64 +#endif static int ve_status[SOPEN_MAX+1]; static int ve_status_state; struct verify_status; From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 03:25:30 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD1356AA9A6; Sat, 4 Sep 2021 03:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1g625TXMz3lY4; Sat, 4 Sep 2021 03:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93CF810B37; Sat, 4 Sep 2021 03:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1843PUnr015351; Sat, 4 Sep 2021 03:25:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1843PUhB015350; Sat, 4 Sep 2021 03:25:30 GMT (envelope-from git) Date: Sat, 4 Sep 2021 03:25:30 GMT Message-Id: <202109040325.1843PUhB015350@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: bf2cfa495f0d - stable/13 - cam(4): Fix quick unplug/replug for SCSI. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bf2cfa495f0d9a869da840851fa3f0feaf105e3d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 03:25:31 -0000 The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=bf2cfa495f0d9a869da840851fa3f0feaf105e3d commit bf2cfa495f0d9a869da840851fa3f0feaf105e3d Author: Alexander Motin AuthorDate: 2021-08-21 13:31:41 +0000 Commit: Alexander Motin CommitDate: 2021-09-04 03:25:24 +0000 cam(4): Fix quick unplug/replug for SCSI. If some device is plugged back in after unplug before the probe periph destroyed, it will just restart the probe process. But I've found that PROBE_INQUIRY_CKSUM flag not cleared between the iterations may cause AC_FOUND_DEVICE not reported on the second iteration, and because of AC_LOST_DEVICE reported during the first iteration, the device end up configured, but without any periphs attached. We've found that enabled serial console and 102-disk JBOD cause enough probe delays to easily trigger the issue for half of the disks. This change fixes it reliably on my tests. MFC after: 2 weeks Sponsored by: iXsystems, Inc. (cherry picked from commit 84d5b6bd68ce6496592adb8fdcd8cf0c246ed935) --- sys/cam/scsi/scsi_xpt.c | 61 ++++++++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index 24e8d420a88d..b43a5fa2d0b1 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -178,7 +178,6 @@ do { \ typedef enum { PROBE_INQUIRY_CKSUM = 0x01, - PROBE_SERIAL_CKSUM = 0x02, PROBE_NO_ANNOUNCE = 0x04, PROBE_EXTLUN = 0x08 } probe_flags; @@ -776,8 +775,6 @@ again: } case PROBE_INQUIRY: case PROBE_FULL_INQUIRY: - case PROBE_INQUIRY_BASIC_DV1: - case PROBE_INQUIRY_BASIC_DV2: { u_int inquiry_len; struct scsi_inquiry_data *inq_buf; @@ -792,19 +789,19 @@ again: * serial number check finish, we attempt to figure out * whether we still have the same device. */ - if (((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) - && ((softc->flags & PROBE_INQUIRY_CKSUM) == 0)) { + if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { + softc->flags &= ~PROBE_INQUIRY_CKSUM; + } else if ((softc->flags & PROBE_INQUIRY_CKSUM) == 0) { MD5Init(&softc->context); MD5Update(&softc->context, (unsigned char *)inq_buf, sizeof(struct scsi_inquiry_data)); - softc->flags |= PROBE_INQUIRY_CKSUM; if (periph->path->device->serial_num_len > 0) { MD5Update(&softc->context, periph->path->device->serial_num, periph->path->device->serial_num_len); - softc->flags |= PROBE_SERIAL_CKSUM; } MD5Final(softc->digest, &softc->context); + softc->flags |= PROBE_INQUIRY_CKSUM; } if (softc->action == PROBE_INQUIRY) @@ -820,22 +817,6 @@ again: */ inquiry_len = roundup2(inquiry_len, 2); - if (softc->action == PROBE_INQUIRY_BASIC_DV1 - || softc->action == PROBE_INQUIRY_BASIC_DV2) { - inq_buf = malloc(inquiry_len, M_CAMXPT, M_NOWAIT); - } - if (inq_buf == NULL) { - xpt_print(periph->path, "malloc failure- skipping Basic" - "Domain Validation\n"); - PROBE_SET_ACTION(softc, PROBE_DV_EXIT); - scsi_test_unit_ready(csio, - /*retries*/4, - probedone, - MSG_SIMPLE_Q_TAG, - SSD_FULL_SIZE, - /*timeout*/60000); - break; - } scsi_inquiry(csio, /*retries*/4, probedone, @@ -1020,6 +1001,40 @@ done: } goto done; } + case PROBE_INQUIRY_BASIC_DV1: + case PROBE_INQUIRY_BASIC_DV2: + { + u_int inquiry_len; + struct scsi_inquiry_data *inq_buf; + + inq_buf = &periph->path->device->inq_data; + inquiry_len = roundup2(SID_ADDITIONAL_LENGTH(inq_buf), 2); + inq_buf = malloc(inquiry_len, M_CAMXPT, M_NOWAIT); + if (inq_buf == NULL) { + xpt_print(periph->path, "malloc failure- skipping Basic" + "Domain Validation\n"); + PROBE_SET_ACTION(softc, PROBE_DV_EXIT); + scsi_test_unit_ready(csio, + /*retries*/4, + probedone, + MSG_SIMPLE_Q_TAG, + SSD_FULL_SIZE, + /*timeout*/60000); + break; + } + + scsi_inquiry(csio, + /*retries*/4, + probedone, + MSG_SIMPLE_Q_TAG, + (u_int8_t *)inq_buf, + inquiry_len, + /*evpd*/FALSE, + /*page_code*/0, + SSD_MIN_SIZE, + /*timeout*/60 * 1000); + break; + } default: panic("probestart: invalid action state 0x%x\n", softc->action); } From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 03:28:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C4136AACA5; Sat, 4 Sep 2021 03:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1gB32ZKnz3lrf; Sat, 4 Sep 2021 03:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37DA610B86; Sat, 4 Sep 2021 03:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1843Sxil015686; Sat, 4 Sep 2021 03:28:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1843SxAq015685; Sat, 4 Sep 2021 03:28:59 GMT (envelope-from git) Date: Sat, 4 Sep 2021 03:28:59 GMT Message-Id: <202109040328.1843SxAq015685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 70d16ac0e889 - stable/12 - cam(4): Fix quick unplug/replug for SCSI. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 70d16ac0e889b88693d75c3541c6156355314124 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 03:28:59 -0000 The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=70d16ac0e889b88693d75c3541c6156355314124 commit 70d16ac0e889b88693d75c3541c6156355314124 Author: Alexander Motin AuthorDate: 2021-08-21 13:31:41 +0000 Commit: Alexander Motin CommitDate: 2021-09-04 03:27:37 +0000 cam(4): Fix quick unplug/replug for SCSI. If some device is plugged back in after unplug before the probe periph destroyed, it will just restart the probe process. But I've found that PROBE_INQUIRY_CKSUM flag not cleared between the iterations may cause AC_FOUND_DEVICE not reported on the second iteration, and because of AC_LOST_DEVICE reported during the first iteration, the device end up configured, but without any periphs attached. We've found that enabled serial console and 102-disk JBOD cause enough probe delays to easily trigger the issue for half of the disks. This change fixes it reliably on my tests. MFC after: 2 weeks Sponsored by: iXsystems, Inc. (cherry picked from commit 84d5b6bd68ce6496592adb8fdcd8cf0c246ed935) --- sys/cam/scsi/scsi_xpt.c | 62 ++++++++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index 6f0c88d8fb30..9a71c6b251ce 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -180,7 +180,6 @@ do { \ typedef enum { PROBE_INQUIRY_CKSUM = 0x01, - PROBE_SERIAL_CKSUM = 0x02, PROBE_NO_ANNOUNCE = 0x04, PROBE_EXTLUN = 0x08 } probe_flags; @@ -778,8 +777,6 @@ again: } case PROBE_INQUIRY: case PROBE_FULL_INQUIRY: - case PROBE_INQUIRY_BASIC_DV1: - case PROBE_INQUIRY_BASIC_DV2: { u_int inquiry_len; struct scsi_inquiry_data *inq_buf; @@ -794,20 +791,19 @@ again: * serial number check finish, we attempt to figure out * whether we still have the same device. */ - if (((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) - && ((softc->flags & PROBE_INQUIRY_CKSUM) == 0)) { - + if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { + softc->flags &= ~PROBE_INQUIRY_CKSUM; + } else if ((softc->flags & PROBE_INQUIRY_CKSUM) == 0) { MD5Init(&softc->context); MD5Update(&softc->context, (unsigned char *)inq_buf, sizeof(struct scsi_inquiry_data)); - softc->flags |= PROBE_INQUIRY_CKSUM; if (periph->path->device->serial_num_len > 0) { MD5Update(&softc->context, periph->path->device->serial_num, periph->path->device->serial_num_len); - softc->flags |= PROBE_SERIAL_CKSUM; } MD5Final(softc->digest, &softc->context); + softc->flags |= PROBE_INQUIRY_CKSUM; } if (softc->action == PROBE_INQUIRY) @@ -823,22 +819,6 @@ again: */ inquiry_len = roundup2(inquiry_len, 2); - if (softc->action == PROBE_INQUIRY_BASIC_DV1 - || softc->action == PROBE_INQUIRY_BASIC_DV2) { - inq_buf = malloc(inquiry_len, M_CAMXPT, M_NOWAIT); - } - if (inq_buf == NULL) { - xpt_print(periph->path, "malloc failure- skipping Basic" - "Domain Validation\n"); - PROBE_SET_ACTION(softc, PROBE_DV_EXIT); - scsi_test_unit_ready(csio, - /*retries*/4, - probedone, - MSG_SIMPLE_Q_TAG, - SSD_FULL_SIZE, - /*timeout*/60000); - break; - } scsi_inquiry(csio, /*retries*/4, probedone, @@ -1023,6 +1003,40 @@ done: } goto done; } + case PROBE_INQUIRY_BASIC_DV1: + case PROBE_INQUIRY_BASIC_DV2: + { + u_int inquiry_len; + struct scsi_inquiry_data *inq_buf; + + inq_buf = &periph->path->device->inq_data; + inquiry_len = roundup2(SID_ADDITIONAL_LENGTH(inq_buf), 2); + inq_buf = malloc(inquiry_len, M_CAMXPT, M_NOWAIT); + if (inq_buf == NULL) { + xpt_print(periph->path, "malloc failure- skipping Basic" + "Domain Validation\n"); + PROBE_SET_ACTION(softc, PROBE_DV_EXIT); + scsi_test_unit_ready(csio, + /*retries*/4, + probedone, + MSG_SIMPLE_Q_TAG, + SSD_FULL_SIZE, + /*timeout*/60000); + break; + } + + scsi_inquiry(csio, + /*retries*/4, + probedone, + MSG_SIMPLE_Q_TAG, + (u_int8_t *)inq_buf, + inquiry_len, + /*evpd*/FALSE, + /*page_code*/0, + SSD_MIN_SIZE, + /*timeout*/60 * 1000); + break; + } default: panic("probestart: invalid action state 0x%x\n", softc->action); } From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 07:39:24 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 536456AD785; Sat, 4 Sep 2021 07:39:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1ml01kKpz3ryx; Sat, 4 Sep 2021 07:39:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B2ED13F9A; Sat, 4 Sep 2021 07:39:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1847dOSo049273; Sat, 4 Sep 2021 07:39:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1847dOOx049272; Sat, 4 Sep 2021 07:39:24 GMT (envelope-from git) Date: Sat, 4 Sep 2021 07:39:24 GMT Message-Id: <202109040739.1847dOOx049272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: c8c18ce8daca - stable/13 - caroot: update CA bundle processor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c8c18ce8dacaa5c250fd11740ea2bf7091c9937f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 07:39:24 -0000 The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c8c18ce8dacaa5c250fd11740ea2bf7091c9937f commit c8c18ce8dacaa5c250fd11740ea2bf7091c9937f Author: Kyle Evans AuthorDate: 2021-03-30 03:05:38 +0000 Commit: Kyle Evans CommitDate: 2021-09-04 07:38:53 +0000 caroot: update CA bundle processor Our current processor was identified as trusting cert not explicitly marked for SERVER_AUTH, as well as certs that were tagged with DISTRUST_AFTER. Update the script to handle both scenarios. This patch was originally authored by mandree@ for ports, and it was subsequently ported to base caroot. (cherry picked from commit c3510c941c0dddd09389915a9395e6f059088bab) --- secure/caroot/MAca-bundle.pl | 55 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/secure/caroot/MAca-bundle.pl b/secure/caroot/MAca-bundle.pl index bfac77c73941..8521b620337f 100755 --- a/secure/caroot/MAca-bundle.pl +++ b/secure/caroot/MAca-bundle.pl @@ -76,6 +76,8 @@ sub print_header($$) ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $VERSION ## @@ -91,6 +93,8 @@ EOFH ## Authorities (CA). These were automatically extracted from Mozilla's ## root CA list (the file `certdata.txt'). ## +## It contains certificates trusted for server authentication. +## ## Extracted from nss ## with $VERSION ## @@ -100,6 +104,13 @@ EOH } } +# returns a string like YYMMDDhhmmssZ of current time in GMT zone +sub timenow() +{ + my ($sec,$min,$hour,$mday,$mon,$year,undef,undef,undef) = gmtime(time); + return sprintf "%02d%02d%02d%02d%02d%02dZ", $year-100, $mon+1, $mday, $hour, $min, $sec; +} + sub printcert($$$) { my ($fh, $label, $certdata) = @_; @@ -110,6 +121,8 @@ sub printcert($$$) close(OUT) or die "openssl x509 failed with exit code $?"; } +# converts a datastream that is to be \177-style octal constants +# from <> to a (binary) string and returns it sub graboct($) { my $ifh = shift; @@ -125,13 +138,13 @@ sub graboct($) return $data; } - sub grabcert($) { my $ifh = shift; my $certdata; - my $cka_label; - my $serial; + my $cka_label = ''; + my $serial = 0; + my $distrust = 0; while (<$ifh>) { chomp; @@ -148,6 +161,19 @@ sub grabcert($) if (/^CKA_SERIAL_NUMBER MULTILINE_OCTAL/) { $serial = graboct($ifh); } + + if (/^CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL/) + { + my $distrust_after = graboct($ifh); + my $time_now = timenow(); + if ($time_now >= $distrust_after) { $distrust = 1; } + if ($debug) { + printf STDERR "line $.: $cka_label ser #%d: distrust after %s, now: %s -> distrust $distrust\n", $serial, $distrust_after, timenow(); + } + if ($distrust) { + return undef; + } + } } return ($serial, $cka_label, $certdata); } @@ -171,13 +197,13 @@ sub grabtrust($) { $serial = graboct($ifh); } - if (/^CKA_TRUST_(SERVER_AUTH|EMAIL_PROTECTION|CODE_SIGNING) CK_TRUST (\S+)$/) + if (/^CKA_TRUST_SERVER_AUTH CK_TRUST (\S+)$/) { - if ($2 eq 'CKT_NSS_NOT_TRUSTED') { + if ($1 eq 'CKT_NSS_NOT_TRUSTED') { $distrust = 1; - } elsif ($2 eq 'CKT_NSS_TRUSTED_DELEGATOR') { + } elsif ($1 eq 'CKT_NSS_TRUSTED_DELEGATOR') { $maytrust = 1; - } elsif ($2 ne 'CKT_NSS_MUST_VERIFY_TRUST') { + } elsif ($1 ne 'CKT_NSS_MUST_VERIFY_TRUST') { confess "Unknown trust setting on line $.:\n" . "$_\n" . "Script must be updated:"; @@ -197,16 +223,22 @@ if (!$outputdir) { print_header(*STDOUT, ""); } +my $untrusted = 0; + while (<$inputfh>) { if (/^CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE/) { my ($serial, $label, $certdata) = grabcert($inputfh); if (defined $certs{$label."\0".$serial}) { warn "Certificate $label duplicated!\n"; } - $certs{$label."\0".$serial} = $certdata; - # We store the label in a separate hash because truncating the key - # with \0 was causing garbage data after the end of the text. - $labels{$label."\0".$serial} = $label; + if (defined $certdata) { + $certs{$label."\0".$serial} = $certdata; + # We store the label in a separate hash because truncating the key + # with \0 was causing garbage data after the end of the text. + $labels{$label."\0".$serial} = $label; + } else { # $certdata undefined? distrust_after in effect + $untrusted ++; + } } elsif (/^CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST/) { my ($serial, $label, $trust) = grabtrust($inputfh); if (defined $trusts{$label."\0".$serial}) { @@ -226,7 +258,6 @@ sub label_to_filename(@) { } # weed out untrusted certificates -my $untrusted = 0; foreach my $it (keys %trusts) { if (!$trusts{$it}) { if (!exists($certs{$it})) { From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 07:39:25 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CA606AD676; Sat, 4 Sep 2021 07:39:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1ml12lGwz3rp7; Sat, 4 Sep 2021 07:39:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F8C113C71; Sat, 4 Sep 2021 07:39:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1847dPAw049297; Sat, 4 Sep 2021 07:39:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1847dPnY049296; Sat, 4 Sep 2021 07:39:25 GMT (envelope-from git) Date: Sat, 4 Sep 2021 07:39:25 GMT Message-Id: <202109040739.1847dPnY049296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 62aaa70143a6 - stable/13 - caroot: cumulative cert update MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 62aaa70143a6e2d5ffc0065fa901c598e6cab9b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 07:39:25 -0000 The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=62aaa70143a6e2d5ffc0065fa901c598e6cab9b8 commit 62aaa70143a6e2d5ffc0065fa901c598e6cab9b8 Author: Kyle Evans AuthorDate: 2021-03-30 02:56:40 +0000 Commit: Kyle Evans CommitDate: 2021-09-04 07:39:07 +0000 caroot: cumulative cert update This adds a note in all existing certs that they are explicitly trusted for server auth, and also: - Seven (7) added - Nineteen (19) removed (cherry picked from commit 446169e0b6f04b96960540784539c218f5a14c86) (cherry picked from commit 3016c5c2bf68d8c6ebf303939f20092478e7a4ca) (cherry picked from commit fac832b27105d926d9f8728d7147adb547b937d8) (cherry picked from commit 76461921dac18b300489e326ba3df61d2809f364) --- .../Camerfirma_Chambers_of_Commerce_Root.pem | 0 .../Camerfirma_Global_Chambersign_Root.pem | 0 .../{trusted => blacklisted}/Certum_Root_CA.pem | 0 .../Chambers_of_Commerce_Root_-_2008.pem | 0 .../D-TRUST_Root_CA_3_2013.pem | 0 secure/caroot/{trusted => blacklisted}/EC-ACC.pem | 0 ...oTrust_Primary_Certification_Authority_-_G2.pem | 0 .../Global_Chambersign_Root_-_2008.pem | 0 .../OISTE_WISeKey_Global_Root_GA_CA.pem | 0 .../{trusted => blacklisted}/QuoVadis_Root_CA.pem | 2 + .../Sonera_Class_2_Root_CA.pem | 2 + .../Staat_der_Nederlanden_Root_CA_-_G3.pem | 0 .../SwissSign_Platinum_CA_-_G2.pem | 0 ...Public_Primary_Certification_Authority_-_G6.pem | 0 ...Public_Primary_Certification_Authority_-_G6.pem | 0 .../Trustis_FPS_Root_CA.pem | 0 ...Sign_Universal_Root_Certification_Authority.pem | 0 ...Public_Primary_Certification_Authority_-_G3.pem | 0 ...Public_Primary_Certification_Authority_-_G3.pem | 0 secure/caroot/trusted/ACCVRAIZ1.pem | 2 + secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem | 2 + .../AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem | 69 ++++++++++ .../caroot/trusted/ANF_Secure_Server_Root_CA.pem | 139 +++++++++++++++++++++ .../trusted/Actalis_Authentication_Root_CA.pem | 2 + secure/caroot/trusted/AffirmTrust_Commercial.pem | 2 + secure/caroot/trusted/AffirmTrust_Networking.pem | 2 + secure/caroot/trusted/AffirmTrust_Premium.pem | 2 + secure/caroot/trusted/AffirmTrust_Premium_ECC.pem | 2 + secure/caroot/trusted/Amazon_Root_CA_1.pem | 2 + secure/caroot/trusted/Amazon_Root_CA_2.pem | 2 + secure/caroot/trusted/Amazon_Root_CA_3.pem | 2 + secure/caroot/trusted/Amazon_Root_CA_4.pem | 2 + secure/caroot/trusted/Atos_TrustedRoot_2011.pem | 2 + ...ertificacion_Firmaprofesional_CIF_A62634068.pem | 2 + .../caroot/trusted/Baltimore_CyberTrust_Root.pem | 2 + secure/caroot/trusted/Buypass_Class_2_Root_CA.pem | 2 + secure/caroot/trusted/Buypass_Class_3_Root_CA.pem | 2 + secure/caroot/trusted/CA_Disig_Root_R2.pem | 2 + secure/caroot/trusted/CFCA_EV_ROOT.pem | 2 + .../trusted/COMODO_Certification_Authority.pem | 2 + .../trusted/COMODO_ECC_Certification_Authority.pem | 2 + .../trusted/COMODO_RSA_Certification_Authority.pem | 2 + secure/caroot/trusted/Certigna.pem | 2 + secure/caroot/trusted/Certigna_Root_CA.pem | 2 + secure/caroot/trusted/Certum_EC-384_CA.pem | 68 ++++++++++ .../caroot/trusted/Certum_Trusted_Network_CA.pem | 2 + .../caroot/trusted/Certum_Trusted_Network_CA_2.pem | 2 + secure/caroot/trusted/Certum_Trusted_Root_CA.pem | 136 ++++++++++++++++++++ secure/caroot/trusted/Comodo_AAA_Services_root.pem | 2 + secure/caroot/trusted/Cybertrust_Global_Root.pem | 2 + .../trusted/D-TRUST_Root_Class_3_CA_2_2009.pem | 2 + .../trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem | 2 + secure/caroot/trusted/DST_Root_CA_X3.pem | 2 + .../caroot/trusted/DigiCert_Assured_ID_Root_CA.pem | 2 + .../caroot/trusted/DigiCert_Assured_ID_Root_G2.pem | 2 + .../caroot/trusted/DigiCert_Assured_ID_Root_G3.pem | 2 + secure/caroot/trusted/DigiCert_Global_Root_CA.pem | 2 + secure/caroot/trusted/DigiCert_Global_Root_G2.pem | 2 + secure/caroot/trusted/DigiCert_Global_Root_G3.pem | 2 + .../trusted/DigiCert_High_Assurance_EV_Root_CA.pem | 2 + secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem | 2 + .../trusted/E-Tugra_Certification_Authority.pem | 2 + .../Entrust_Root_Certification_Authority.pem | 2 + .../Entrust_Root_Certification_Authority_-_EC1.pem | 2 + .../Entrust_Root_Certification_Authority_-_G2.pem | 2 + .../Entrust_Root_Certification_Authority_-_G4.pem | 2 + .../Entrust_net_Premium_2048_Secure_Server_CA.pem | 2 + secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem | 2 + secure/caroot/trusted/GLOBALTRUST_2020.pem | 138 ++++++++++++++++++++ secure/caroot/trusted/GTS_Root_R1.pem | 2 + secure/caroot/trusted/GTS_Root_R2.pem | 2 + secure/caroot/trusted/GTS_Root_R3.pem | 2 + secure/caroot/trusted/GTS_Root_R4.pem | 2 + .../caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem | 2 + .../caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem | 2 + secure/caroot/trusted/GlobalSign_Root_CA.pem | 2 + secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem | 2 + secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem | 2 + secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem | 2 + secure/caroot/trusted/GlobalSign_Root_E46.pem | 66 ++++++++++ secure/caroot/trusted/GlobalSign_Root_R46.pem | 134 ++++++++++++++++++++ secure/caroot/trusted/Go_Daddy_Class_2_CA.pem | 2 + .../Go_Daddy_Root_Certificate_Authority_-_G2.pem | 2 + ...c_and_Research_Institutions_ECC_RootCA_2015.pem | 2 + ...demic_and_Research_Institutions_RootCA_2011.pem | 2 + ...demic_and_Research_Institutions_RootCA_2015.pem | 2 + secure/caroot/trusted/Hongkong_Post_Root_CA_1.pem | 2 + secure/caroot/trusted/Hongkong_Post_Root_CA_3.pem | 2 + secure/caroot/trusted/ISRG_Root_X1.pem | 2 + .../trusted/IdenTrust_Commercial_Root_CA_1.pem | 2 + .../trusted/IdenTrust_Public_Sector_Root_CA_1.pem | 2 + secure/caroot/trusted/Izenpe_com.pem | 2 + .../trusted/Microsec_e-Szigno_Root_CA_2009.pem | 2 + ...crosoft_ECC_Root_Certificate_Authority_2017.pem | 2 + ...crosoft_RSA_Root_Certificate_Authority_2017.pem | 2 + .../NAVER_Global_Root_Certification_Authority.pem | 2 + ...etLock_Arany__Class_Gold__F__tan__s__tv__ny.pem | 2 + .../Network_Solutions_Certificate_Authority.pem | 2 + .../trusted/OISTE_WISeKey_Global_Root_GB_CA.pem | 2 + .../trusted/OISTE_WISeKey_Global_Root_GC_CA.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_1_G3.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_2.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_2_G3.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_3.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_3_G3.pem | 2 + ...SSL_com_EV_Root_Certification_Authority_ECC.pem | 2 + ..._com_EV_Root_Certification_Authority_RSA_R2.pem | 2 + .../SSL_com_Root_Certification_Authority_ECC.pem | 2 + .../SSL_com_Root_Certification_Authority_RSA.pem | 2 + secure/caroot/trusted/SZAFIR_ROOT_CA2.pem | 2 + secure/caroot/trusted/SecureSign_RootCA11.pem | 2 + secure/caroot/trusted/SecureTrust_CA.pem | 2 + secure/caroot/trusted/Secure_Global_CA.pem | 2 + .../trusted/Security_Communication_RootCA2.pem | 2 + .../trusted/Security_Communication_Root_CA.pem | 2 + .../trusted/Staat_der_Nederlanden_EV_Root_CA.pem | 2 + secure/caroot/trusted/Starfield_Class_2_CA.pem | 2 + .../Starfield_Root_Certificate_Authority_-_G2.pem | 2 + ...ld_Services_Root_Certificate_Authority_-_G2.pem | 2 + secure/caroot/trusted/SwissSign_Gold_CA_-_G2.pem | 2 + secure/caroot/trusted/SwissSign_Silver_CA_-_G2.pem | 2 + .../trusted/T-TeleSec_GlobalRoot_Class_2.pem | 2 + .../trusted/T-TeleSec_GlobalRoot_Class_3.pem | 2 + ...BITAK_Kamu_SM_SSL_Kok_Sertifikasi_-_Surum_1.pem | 2 + secure/caroot/trusted/TWCA_Global_Root_CA.pem | 2 + .../trusted/TWCA_Root_Certification_Authority.pem | 2 + secure/caroot/trusted/TeliaSonera_Root_CA_v1.pem | 2 + secure/caroot/trusted/TrustCor_ECA-1.pem | 2 + secure/caroot/trusted/TrustCor_RootCert_CA-1.pem | 2 + secure/caroot/trusted/TrustCor_RootCert_CA-2.pem | 2 + .../Trustwave_Global_Certification_Authority.pem | 2 + ...ave_Global_ECC_P256_Certification_Authority.pem | 2 + ...ave_Global_ECC_P384_Certification_Authority.pem | 2 + .../trusted/UCA_Extended_Validation_Root.pem | 2 + secure/caroot/trusted/UCA_Global_G2_Root.pem | 2 + .../USERTrust_ECC_Certification_Authority.pem | 2 + .../USERTrust_RSA_Certification_Authority.pem | 2 + secure/caroot/trusted/XRamp_Global_CA_Root.pem | 2 + secure/caroot/trusted/certSIGN_ROOT_CA.pem | 2 + secure/caroot/trusted/certSIGN_Root_CA_G2.pem | 2 + secure/caroot/trusted/e-Szigno_Root_CA_2017.pem | 2 + .../trusted/ePKI_Root_Certification_Authority.pem | 2 + secure/caroot/trusted/emSign_ECC_Root_CA_-_C3.pem | 2 + secure/caroot/trusted/emSign_ECC_Root_CA_-_G3.pem | 2 + secure/caroot/trusted/emSign_Root_CA_-_C1.pem | 2 + secure/caroot/trusted/emSign_Root_CA_-_G1.pem | 2 + 146 files changed, 994 insertions(+) diff --git a/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem b/secure/caroot/blacklisted/Camerfirma_Chambers_of_Commerce_Root.pem similarity index 100% rename from secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem rename to secure/caroot/blacklisted/Camerfirma_Chambers_of_Commerce_Root.pem diff --git a/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem b/secure/caroot/blacklisted/Camerfirma_Global_Chambersign_Root.pem similarity index 100% rename from secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem rename to secure/caroot/blacklisted/Camerfirma_Global_Chambersign_Root.pem diff --git a/secure/caroot/trusted/Certum_Root_CA.pem b/secure/caroot/blacklisted/Certum_Root_CA.pem similarity index 100% rename from secure/caroot/trusted/Certum_Root_CA.pem rename to secure/caroot/blacklisted/Certum_Root_CA.pem diff --git a/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem b/secure/caroot/blacklisted/Chambers_of_Commerce_Root_-_2008.pem similarity index 100% rename from secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem rename to secure/caroot/blacklisted/Chambers_of_Commerce_Root_-_2008.pem diff --git a/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem b/secure/caroot/blacklisted/D-TRUST_Root_CA_3_2013.pem similarity index 100% rename from secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem rename to secure/caroot/blacklisted/D-TRUST_Root_CA_3_2013.pem diff --git a/secure/caroot/trusted/EC-ACC.pem b/secure/caroot/blacklisted/EC-ACC.pem similarity index 100% rename from secure/caroot/trusted/EC-ACC.pem rename to secure/caroot/blacklisted/EC-ACC.pem diff --git a/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem b/secure/caroot/blacklisted/GeoTrust_Primary_Certification_Authority_-_G2.pem similarity index 100% rename from secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem rename to secure/caroot/blacklisted/GeoTrust_Primary_Certification_Authority_-_G2.pem diff --git a/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem b/secure/caroot/blacklisted/Global_Chambersign_Root_-_2008.pem similarity index 100% rename from secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem rename to secure/caroot/blacklisted/Global_Chambersign_Root_-_2008.pem diff --git a/secure/caroot/trusted/OISTE_WISeKey_Global_Root_GA_CA.pem b/secure/caroot/blacklisted/OISTE_WISeKey_Global_Root_GA_CA.pem similarity index 100% rename from secure/caroot/trusted/OISTE_WISeKey_Global_Root_GA_CA.pem rename to secure/caroot/blacklisted/OISTE_WISeKey_Global_Root_GA_CA.pem diff --git a/secure/caroot/trusted/QuoVadis_Root_CA.pem b/secure/caroot/blacklisted/QuoVadis_Root_CA.pem similarity index 98% rename from secure/caroot/trusted/QuoVadis_Root_CA.pem rename to secure/caroot/blacklisted/QuoVadis_Root_CA.pem index 3619cd0cbd03..25e6300f5231 100644 --- a/secure/caroot/trusted/QuoVadis_Root_CA.pem +++ b/secure/caroot/blacklisted/QuoVadis_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Sonera_Class_2_Root_CA.pem b/secure/caroot/blacklisted/Sonera_Class_2_Root_CA.pem similarity index 98% rename from secure/caroot/trusted/Sonera_Class_2_Root_CA.pem rename to secure/caroot/blacklisted/Sonera_Class_2_Root_CA.pem index 7b38ef463d6a..b23c237e319f 100644 --- a/secure/caroot/trusted/Sonera_Class_2_Root_CA.pem +++ b/secure/caroot/blacklisted/Sonera_Class_2_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Staat_der_Nederlanden_Root_CA_-_G3.pem b/secure/caroot/blacklisted/Staat_der_Nederlanden_Root_CA_-_G3.pem similarity index 100% rename from secure/caroot/trusted/Staat_der_Nederlanden_Root_CA_-_G3.pem rename to secure/caroot/blacklisted/Staat_der_Nederlanden_Root_CA_-_G3.pem diff --git a/secure/caroot/trusted/SwissSign_Platinum_CA_-_G2.pem b/secure/caroot/blacklisted/SwissSign_Platinum_CA_-_G2.pem similarity index 100% rename from secure/caroot/trusted/SwissSign_Platinum_CA_-_G2.pem rename to secure/caroot/blacklisted/SwissSign_Platinum_CA_-_G2.pem diff --git a/secure/caroot/trusted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem b/secure/caroot/blacklisted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem similarity index 100% rename from secure/caroot/trusted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem rename to secure/caroot/blacklisted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem diff --git a/secure/caroot/trusted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem b/secure/caroot/blacklisted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem similarity index 100% rename from secure/caroot/trusted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem rename to secure/caroot/blacklisted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem diff --git a/secure/caroot/trusted/Trustis_FPS_Root_CA.pem b/secure/caroot/blacklisted/Trustis_FPS_Root_CA.pem similarity index 100% rename from secure/caroot/trusted/Trustis_FPS_Root_CA.pem rename to secure/caroot/blacklisted/Trustis_FPS_Root_CA.pem diff --git a/secure/caroot/trusted/VeriSign_Universal_Root_Certification_Authority.pem b/secure/caroot/blacklisted/VeriSign_Universal_Root_Certification_Authority.pem similarity index 100% rename from secure/caroot/trusted/VeriSign_Universal_Root_Certification_Authority.pem rename to secure/caroot/blacklisted/VeriSign_Universal_Root_Certification_Authority.pem diff --git a/secure/caroot/trusted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem b/secure/caroot/blacklisted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem similarity index 100% rename from secure/caroot/trusted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem rename to secure/caroot/blacklisted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem diff --git a/secure/caroot/trusted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem b/secure/caroot/blacklisted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem similarity index 100% rename from secure/caroot/trusted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem rename to secure/caroot/blacklisted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem diff --git a/secure/caroot/trusted/ACCVRAIZ1.pem b/secure/caroot/trusted/ACCVRAIZ1.pem index 0c7c7c41b57d..1c96e53b8f17 100644 --- a/secure/caroot/trusted/ACCVRAIZ1.pem +++ b/secure/caroot/trusted/ACCVRAIZ1.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem index 579f50d8d730..6a64be5ce138 100644 --- a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem +++ b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem new file mode 100644 index 000000000000..71ee49574e84 --- /dev/null +++ b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem @@ -0,0 +1,69 @@ +## +## AC RAIZ FNMT-RCM SERVIDORES SEGUROS +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 62:f6:32:6c:e5:c4:e3:68:5c:1b:62:dd:9c:2e:9d:95 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = ES, O = FNMT-RCM, OU = Ceres, organizationIdentifier = VATES-Q2826004J, CN = AC RAIZ FNMT-RCM SERVIDORES SEGUROS + Validity + Not Before: Dec 20 09:37:33 2018 GMT + Not After : Dec 20 09:37:33 2043 GMT + Subject: C = ES, O = FNMT-RCM, OU = Ceres, organizationIdentifier = VATES-Q2826004J, CN = AC RAIZ FNMT-RCM SERVIDORES SEGUROS + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:f6:ba:57:53:c8:ca:ab:df:36:4a:52:21:e4:97: + d2:83:67:9e:f0:65:51:d0:5e:87:c7:47:b1:59:f2: + 57:47:9b:00:02:93:44:17:69:db:42:c7:b1:b2:3a: + 18:0e:b4:5d:8c:b3:66:5d:a1:34:f9:36:2c:49:db: + f3:46:fc:b3:44:69:44:13:66:fd:d7:c5:fd:af:36: + 4d:ce:03:4d:07:71:cf:af:6a:05:d2:a2:43:5a:0a: + 52:6f:01:03:4e:8e:8b + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 01:B9:2F:EF:BF:11:86:60:F2:4F:D0:41:6E:AB:73:1F:E7:D2:6E:49 + Signature Algorithm: ecdsa-with-SHA384 + 30:66:02:31:00:ae:4a:e3:2b:40:c3:74:11:f2:95:ad:16:23: + de:4e:0c:1a:e6:5d:a5:24:5e:6b:44:7b:fc:38:e2:4f:cb:9c: + 45:17:11:4c:14:27:26:55:39:75:4a:03:cc:13:90:9f:92:02: + 31:00:fa:4a:6c:60:88:73:f3:ee:b8:98:62:a9:ce:2b:c2:d9: + 8a:a6:70:31:1d:af:b0:94:4c:eb:4f:c6:e3:d1:f3:62:a7:3c: + ff:93:2e:07:5c:49:01:67:69:12:02:72:bf:e7 +SHA1 Fingerprint=62:FF:D9:9E:C0:65:0D:03:CE:75:93:D2:ED:3F:2D:32:C9:E3:E5:4A +-----BEGIN CERTIFICATE----- +MIICbjCCAfOgAwIBAgIQYvYybOXE42hcG2LdnC6dlTAKBggqhkjOPQQDAzB4MQsw +CQYDVQQGEwJFUzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRgw +FgYDVQRhDA9WQVRFUy1RMjgyNjAwNEoxLDAqBgNVBAMMI0FDIFJBSVogRk5NVC1S +Q00gU0VSVklET1JFUyBTRUdVUk9TMB4XDTE4MTIyMDA5MzczM1oXDTQzMTIyMDA5 +MzczM1oweDELMAkGA1UEBhMCRVMxETAPBgNVBAoMCEZOTVQtUkNNMQ4wDAYDVQQL +DAVDZXJlczEYMBYGA1UEYQwPVkFURVMtUTI4MjYwMDRKMSwwKgYDVQQDDCNBQyBS +QUlaIEZOTVQtUkNNIFNFUlZJRE9SRVMgU0VHVVJPUzB2MBAGByqGSM49AgEGBSuB +BAAiA2IABPa6V1PIyqvfNkpSIeSX0oNnnvBlUdBeh8dHsVnyV0ebAAKTRBdp20LH +sbI6GA60XYyzZl2hNPk2LEnb80b8s0RpRBNm/dfF/a82Tc4DTQdxz69qBdKiQ1oK +Um8BA06Oi6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD +VR0OBBYEFAG5L++/EYZg8k/QQW6rcx/n0m5JMAoGCCqGSM49BAMDA2kAMGYCMQCu +SuMrQMN0EfKVrRYj3k4MGuZdpSRea0R7/DjiT8ucRRcRTBQnJlU5dUoDzBOQn5IC +MQD6SmxgiHPz7riYYqnOK8LZiqZwMR2vsJRM60/G49HzYqc8/5MuB1xJAWdpEgJy +v+c= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/ANF_Secure_Server_Root_CA.pem b/secure/caroot/trusted/ANF_Secure_Server_Root_CA.pem new file mode 100644 index 000000000000..6114a5ccdb2d --- /dev/null +++ b/secure/caroot/trusted/ANF_Secure_Server_Root_CA.pem @@ -0,0 +1,139 @@ +## +## ANF Secure Server Root CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 996390341000653745 (0xdd3e3bc6cf96bb1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: serialNumber = G63287510, C = ES, O = ANF Autoridad de Certificacion, OU = ANF CA Raiz, CN = ANF Secure Server Root CA + Validity + Not Before: Sep 4 10:00:38 2019 GMT + Not After : Aug 30 10:00:38 2039 GMT + Subject: serialNumber = G63287510, C = ES, O = ANF Autoridad de Certificacion, OU = ANF CA Raiz, CN = ANF Secure Server Root CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:db:eb:6b:2b:e6:64:54:95:82:90:a3:72:a4:19: + 01:9d:9c:0b:81:5f:73:49:ba:a7:ac:f3:04:4e:7b: + 96:0b:ec:11:e0:5b:a6:1c:ce:1b:d2:0d:83:1c:2b: + b8:9e:1d:7e:45:32:60:0f:07:e9:77:58:7e:9f:6a: + c8:61:4e:b6:26:c1:4c:8d:ff:4c:ef:34:b2:1f:65: + d8:b9:78:f5:ad:a9:71:b9:ef:4f:58:1d:a5:de:74: + 20:97:a1:ed:68:4c:de:92:17:4b:bc:ab:ff:65:9a: + 9e:fb:47:d9:57:72:f3:09:a1:ae:76:44:13:6e:9c: + 2d:44:39:bc:f9:c7:3b:a4:58:3d:41:bd:b4:c2:49: + a3:c8:0d:d2:97:2f:07:65:52:00:a7:6e:c8:af:68: + ec:f4:14:96:b6:57:1f:56:c3:39:9f:2b:6d:e4:f3: + 3e:f6:35:64:da:0c:1c:a1:84:4b:2f:4b:4b:e2:2c: + 24:9d:6d:93:40:eb:b5:23:8e:32:ca:6f:45:d3:a8: + 89:7b:1e:cf:1e:fa:5b:43:8b:cd:cd:a8:0f:6a:ca: + 0c:5e:b9:9e:47:8f:f0:d9:b6:0a:0b:58:65:17:33: + b9:23:e4:77:19:7d:cb:4a:2e:92:7b:4f:2f:10:77: + b1:8d:2f:68:9c:62:cc:e0:50:f8:ec:91:a7:54:4c: + 57:09:d5:76:63:c5:e8:65:1e:ee:6d:6a:cf:09:9d: + fa:7c:4f:ad:60:08:fd:56:99:0f:15:2c:7b:a9:80: + ab:8c:61:8f:4a:07:76:42:de:3d:f4:dd:b2:24:33: + 5b:b8:b5:a3:44:c9:ac:7f:77:3c:1d:23:ec:82:a9: + a6:e2:c8:06:4c:02:fe:ac:5c:99:99:0b:2f:10:8a: + a6:f4:7f:d5:87:74:0d:59:49:45:f6:f0:71:5c:39: + 29:d6:bf:4a:23:8b:f5:5f:01:63:d2:87:73:28:b5: + 4b:0a:f5:f8:ab:82:2c:7e:73:25:32:1d:0b:63:0a: + 17:81:00:ff:b6:76:5e:e7:b4:b1:40:ca:21:bb:d5: + 80:51:e5:48:52:67:2c:d2:61:89:07:0d:0f:ce:42: + 77:c0:44:73:9c:44:50:a0:db:10:0a:2d:95:1c:81: + af:e4:1c:e5:14:1e:f1:36:41:01:02:2f:7d:73:a7: + de:42:cc:4c:e9:89:0d:56:f7:9f:91:d4:03:c6:6c: + c9:8f:db:d8:1c:e0:40:98:5d:66:99:98:80:6e:2d: + ff:01:c5:ce:cb:46:1f:ac:02:c6:43:e6:ae:a2:84: + 3c:c5:4e:1e:3d:6d:c9:14:4c:e3:2e:41:bb:ca:39: + bf:36:3c:2a:19:aa:41:87:4e:a5:ce:4b:32:79:dd: + 90:49:7f + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + keyid:9C:5F:D0:6C:63:A3:5F:93:CA:93:98:08:AD:8C:87:A5:2C:5C:C1:37 + + X509v3 Subject Key Identifier: + 9C:5F:D0:6C:63:A3:5F:93:CA:93:98:08:AD:8C:87:A5:2C:5C:C1:37 + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 4e:1e:b9:8a:c6:a0:98:3f:6e:c3:69:c0:6a:5c:49:52:ac:cb: + 2b:5d:78:38:c1:d5:54:84:9f:93:f0:87:19:3d:2c:66:89:eb: + 0d:42:fc:cc:f0:75:85:3f:8b:f4:80:5d:79:e5:17:67:bd:35: + 82:e2:f2:3c:8e:7d:5b:36:cb:5a:80:00:29:f2:ce:2b:2c:f1: + 8f:aa:6d:05:93:6c:72:c7:56:eb:df:50:23:28:e5:45:10:3d: + e8:67:a3:af:0e:55:0f:90:09:62:ef:4b:59:a2:f6:53:f1:c0: + 35:e4:2f:c1:24:bd:79:2f:4e:20:22:3b:fd:1a:20:b0:a4:0e: + 2c:70:ed:74:3f:b8:13:95:06:51:c8:e8:87:26:ca:a4:5b:6a: + 16:21:92:dd:73:60:9e:10:18:de:3c:81:ea:e8:18:c3:7c:89: + f2:8b:50:3e:bd:11:e2:15:03:a8:36:7d:33:01:6c:48:15:d7: + 88:90:99:04:c5:cc:e6:07:f4:bc:f4:90:ed:13:e2:ea:8b:c3: + 8f:a3:33:0f:c1:29:4c:13:4e:da:15:56:71:73:72:82:50:f6: + 9a:33:7c:a2:b1:a8:1a:34:74:65:5c:ce:d1:eb:ab:53:e0:1a: + 80:d8:ea:3a:49:e4:26:30:9b:e5:1c:8a:a8:a9:15:32:86:99: + 92:0a:10:23:56:12:e0:f6:ce:4c:e2:bb:be:db:8d:92:73:01: + 66:2f:62:3e:b2:72:27:45:36:ed:4d:56:e3:97:99:ff:3a:35: + 3e:a5:54:4a:52:59:4b:60:db:ee:fe:78:11:7f:4a:dc:14:79: + 60:b6:6b:64:03:db:15:83:e1:a2:be:f6:23:97:50:f0:09:33: + 36:a7:71:96:25:f3:b9:42:7d:db:38:3f:2c:58:ac:e8:42:e1: + 0e:d8:d3:3b:4c:2e:82:e9:83:2e:6b:31:d9:dd:47:86:4f:6d: + 97:91:2e:4f:e2:28:71:35:16:d1:f2:73:fe:25:2b:07:47:24: + 63:27:c8:f8:f6:d9:6b:fc:12:31:56:08:c0:53:42:af:9c:d0: + 33:7e:fc:06:f0:31:44:03:14:f1:58:ea:f2:6a:0d:a9:11:b2: + 83:be:c5:1a:bf:07:ea:59:dc:a3:88:35:ef:9c:76:32:3c:4d: + 06:22:ce:15:e5:dd:9e:d8:8f:da:de:d2:c4:39:e5:17:81:cf: + 38:47:eb:7f:88:6d:59:1b:df:9f:42:14:ae:7e:cf:a8:b0:66: + 65:da:37:af:9f:aa:3d:ea:28:b6:de:d5:31:58:16:82:5b:ea: + bb:19:75:02:73:1a:ca:48:1a:21:93:90:0a:8e:93:84:a7:7d: + 3b:23:18:92:89:a0:8d:ac +SHA1 Fingerprint=5B:6E:68:D0:CC:15:B6:A0:5F:1E:C1:5F:AE:02:FC:6B:2F:5D:6F:74 +-----BEGIN CERTIFICATE----- +MIIF7zCCA9egAwIBAgIIDdPjvGz5a7EwDQYJKoZIhvcNAQELBQAwgYQxEjAQBgNV +BAUTCUc2MzI4NzUxMDELMAkGA1UEBhMCRVMxJzAlBgNVBAoTHkFORiBBdXRvcmlk +YWQgZGUgQ2VydGlmaWNhY2lvbjEUMBIGA1UECxMLQU5GIENBIFJhaXoxIjAgBgNV +BAMTGUFORiBTZWN1cmUgU2VydmVyIFJvb3QgQ0EwHhcNMTkwOTA0MTAwMDM4WhcN +MzkwODMwMTAwMDM4WjCBhDESMBAGA1UEBRMJRzYzMjg3NTEwMQswCQYDVQQGEwJF +UzEnMCUGA1UEChMeQU5GIEF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uMRQwEgYD +VQQLEwtBTkYgQ0EgUmFpejEiMCAGA1UEAxMZQU5GIFNlY3VyZSBTZXJ2ZXIgUm9v +dCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANvrayvmZFSVgpCj +cqQZAZ2cC4Ffc0m6p6zzBE57lgvsEeBbphzOG9INgxwruJ4dfkUyYA8H6XdYfp9q +yGFOtibBTI3/TO80sh9l2Ll49a2pcbnvT1gdpd50IJeh7WhM3pIXS7yr/2WanvtH +2Vdy8wmhrnZEE26cLUQ5vPnHO6RYPUG9tMJJo8gN0pcvB2VSAKduyK9o7PQUlrZX +H1bDOZ8rbeTzPvY1ZNoMHKGESy9LS+IsJJ1tk0DrtSOOMspvRdOoiXsezx76W0OL +zc2oD2rKDF65nkeP8Nm2CgtYZRczuSPkdxl9y0oukntPLxB3sY0vaJxizOBQ+OyR +p1RMVwnVdmPF6GUe7m1qzwmd+nxPrWAI/VaZDxUse6mAq4xhj0oHdkLePfTdsiQz +W7i1o0TJrH93PB0j7IKppuLIBkwC/qxcmZkLLxCKpvR/1Yd0DVlJRfbwcVw5Kda/ +SiOL9V8BY9KHcyi1Swr1+KuCLH5zJTIdC2MKF4EA/7Z2Xue0sUDKIbvVgFHlSFJn +LNJhiQcND85Cd8BEc5xEUKDbEAotlRyBr+Qc5RQe8TZBAQIvfXOn3kLMTOmJDVb3 +n5HUA8ZsyY/b2BzgQJhdZpmYgG4t/wHFzstGH6wCxkPmrqKEPMVOHj1tyRRM4y5B +u8o5vzY8KhmqQYdOpc5LMnndkEl/AgMBAAGjYzBhMB8GA1UdIwQYMBaAFJxf0Gxj +o1+TypOYCK2Mh6UsXME3MB0GA1UdDgQWBBScX9BsY6Nfk8qTmAitjIelLFzBNzAO +BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC +AgEATh65isagmD9uw2nAalxJUqzLK114OMHVVISfk/CHGT0sZonrDUL8zPB1hT+L +9IBdeeUXZ701guLyPI59WzbLWoAAKfLOKyzxj6ptBZNscsdW699QIyjlRRA96Gej +rw5VD5AJYu9LWaL2U/HANeQvwSS9eS9OICI7/RogsKQOLHDtdD+4E5UGUcjohybK +pFtqFiGS3XNgnhAY3jyB6ugYw3yJ8otQPr0R4hUDqDZ9MwFsSBXXiJCZBMXM5gf0 +vPSQ7RPi6ovDj6MzD8EpTBNO2hVWcXNyglD2mjN8orGoGjR0ZVzO0eurU+AagNjq +OknkJjCb5RyKqKkVMoaZkgoQI1YS4PbOTOK7vtuNknMBZi9iPrJyJ0U27U1W45eZ +/zo1PqVUSlJZS2Db7v54EX9K3BR5YLZrZAPbFYPhor72I5dQ8AkzNqdxliXzuUJ9 +2zg/LFis6ELhDtjTO0wugumDLmsx2d1Hhk9tl5EuT+IocTUW0fJz/iUrB0ckYyfI ++PbZa/wSMVYIwFNCr5zQM378BvAxRAMU8Vjq8moNqRGyg77FGr8H6lnco4g175x2 +MjxNBiLOFeXdntiP2t7SxDnlF4HPOEfrf4htWRvfn0IUrn7PqLBmZdo3r5+qPeoo +tt7VMVgWglvquxl1AnMaykgaIZOQCo6ThKd9OyMYkomgjaw= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem b/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem index 7248545350e2..7c971e1229a2 100644 --- a/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem +++ b/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/AffirmTrust_Commercial.pem b/secure/caroot/trusted/AffirmTrust_Commercial.pem index 1d85c32853c8..282d1a5dcf6f 100644 --- a/secure/caroot/trusted/AffirmTrust_Commercial.pem +++ b/secure/caroot/trusted/AffirmTrust_Commercial.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/AffirmTrust_Networking.pem b/secure/caroot/trusted/AffirmTrust_Networking.pem index 222bde26c934..830cf3f0c3c2 100644 --- a/secure/caroot/trusted/AffirmTrust_Networking.pem +++ b/secure/caroot/trusted/AffirmTrust_Networking.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/AffirmTrust_Premium.pem b/secure/caroot/trusted/AffirmTrust_Premium.pem index dc1447429465..725747aafdaf 100644 --- a/secure/caroot/trusted/AffirmTrust_Premium.pem +++ b/secure/caroot/trusted/AffirmTrust_Premium.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem b/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem index a6f01409a2ef..6fe75939863e 100644 --- a/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem +++ b/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_1.pem b/secure/caroot/trusted/Amazon_Root_CA_1.pem index 6bf1acafd4c7..2aca2eee3e9b 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_1.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_1.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_2.pem b/secure/caroot/trusted/Amazon_Root_CA_2.pem index 80a1eb66bee2..95ca81db30bb 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_2.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_2.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_3.pem b/secure/caroot/trusted/Amazon_Root_CA_3.pem index 6b61b3e18fa0..294f7dc8f0b6 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_3.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_3.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_4.pem b/secure/caroot/trusted/Amazon_Root_CA_4.pem index df7aa6f1c165..649917b9638a 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_4.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_4.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Atos_TrustedRoot_2011.pem b/secure/caroot/trusted/Atos_TrustedRoot_2011.pem index 21b229561733..7058d3fb6edf 100644 --- a/secure/caroot/trusted/Atos_TrustedRoot_2011.pem +++ b/secure/caroot/trusted/Atos_TrustedRoot_2011.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem b/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem index 4d2eaa61962f..db4f44195dbd 100644 --- a/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem +++ b/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem b/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem index 3dc1de849346..0f356d59962f 100644 --- a/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem +++ b/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem b/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem index dc2c86edbed1..0168f641fd42 100644 --- a/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem +++ b/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem b/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem index fda39f8731d1..7ae24799e638 100644 --- a/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem +++ b/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/CA_Disig_Root_R2.pem b/secure/caroot/trusted/CA_Disig_Root_R2.pem index 0ecc9d1ee08d..0dda6d97e2aa 100644 --- a/secure/caroot/trusted/CA_Disig_Root_R2.pem +++ b/secure/caroot/trusted/CA_Disig_Root_R2.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/CFCA_EV_ROOT.pem b/secure/caroot/trusted/CFCA_EV_ROOT.pem index 7eb37baa3bed..722499b9ed42 100644 --- a/secure/caroot/trusted/CFCA_EV_ROOT.pem +++ b/secure/caroot/trusted/CFCA_EV_ROOT.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/COMODO_Certification_Authority.pem b/secure/caroot/trusted/COMODO_Certification_Authority.pem index 7aa1237bb8e1..fc3e4b554cc3 100644 --- a/secure/caroot/trusted/COMODO_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_Certification_Authority.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem b/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem index 215581b14fdf..5f839a858d00 100644 --- a/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem b/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem index 38e275f1365e..7faefe98b8bf 100644 --- a/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Certigna.pem b/secure/caroot/trusted/Certigna.pem index bbcd413be511..e9104ef6c3da 100644 --- a/secure/caroot/trusted/Certigna.pem +++ b/secure/caroot/trusted/Certigna.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Certigna_Root_CA.pem b/secure/caroot/trusted/Certigna_Root_CA.pem index c1a0286ab2a0..a0a7248b51ea 100644 --- a/secure/caroot/trusted/Certigna_Root_CA.pem +++ b/secure/caroot/trusted/Certigna_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Certum_EC-384_CA.pem b/secure/caroot/trusted/Certum_EC-384_CA.pem new file mode 100644 index 000000000000..67b5d644f809 --- /dev/null +++ b/secure/caroot/trusted/Certum_EC-384_CA.pem @@ -0,0 +1,68 @@ +## +## Certum EC-384 CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 78:8f:27:5c:81:12:52:20:a5:04:d0:2d:dd:ba:73:f4 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = PL, O = Asseco Data Systems S.A., OU = Certum Certification Authority, CN = Certum EC-384 CA + Validity + Not Before: Mar 26 07:24:54 2018 GMT + Not After : Mar 26 07:24:54 2043 GMT + Subject: C = PL, O = Asseco Data Systems S.A., OU = Certum Certification Authority, CN = Certum EC-384 CA + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:c4:28:8e:ab:18:5b:6a:be:6e:64:37:63:e4:cd: + ec:ab:3a:f7:cc:a1:b8:0e:82:49:d7:86:29:9f:a1: + 94:f2:e3:60:78:98:81:78:06:4d:f2:ec:9a:0e:57: + 60:83:9f:b4:e6:17:2f:1a:b3:5d:02:5b:89:23:3c: + c2:11:05:2a:a7:88:13:18:f3:50:84:d7:bd:34:2c: + 27:89:55:ff:ce:4c:e7:df:a6:1f:28:c4:f0:54:c3: + b9:7c:b7:53:ad:eb:c2 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 8D:06:66:74:24:76:3A:F3:89:F7:BC:D6:BD:47:7D:2F:BC:10:5F:4B + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: ecdsa-with-SHA384 + 30:65:02:30:03:55:2d:a6:e6:18:c4:7c:ef:c9:50:6e:c1:27: + 0f:9c:87:af:6e:d5:1b:08:18:bd:92:29:c1:ef:94:91:78:d2: + 3a:1c:55:89:62:e5:1b:09:1e:ba:64:6b:f1:76:b4:d4:02:31: + 00:b4:42:84:99:ff:ab:e7:9e:fb:91:97:27:5d:dc:b0:5b:30: + 71:ce:5e:38:1a:6a:d9:25:e7:ea:f7:61:92:56:f8:ea:da:36: + c2:87:65:96:2e:72:25:2f:7f:df:c3:13:c9 +SHA1 Fingerprint=F3:3E:78:3C:AC:DF:F4:A2:CC:AC:67:55:69:56:D7:E5:16:3C:E1:ED +-----BEGIN CERTIFICATE----- +MIICZTCCAeugAwIBAgIQeI8nXIESUiClBNAt3bpz9DAKBggqhkjOPQQDAzB0MQsw +CQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScw +JQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxGTAXBgNVBAMT +EENlcnR1bSBFQy0zODQgQ0EwHhcNMTgwMzI2MDcyNDU0WhcNNDMwMzI2MDcyNDU0 +WjB0MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBT +LkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxGTAX +BgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATE +KI6rGFtqvm5kN2PkzeyrOvfMobgOgknXhimfoZTy42B4mIF4Bk3y7JoOV2CDn7Tm +Fy8as10CW4kjPMIRBSqniBMY81CE1700LCeJVf/OTOffph8oxPBUw7l8t1Ot68Kj +QjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI0GZnQkdjrzife81r1HfS+8 +EF9LMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNoADBlAjADVS2m5hjEfO/J +UG7BJw+ch69u1RsIGL2SKcHvlJF40jocVYli5RsJHrpka/F2tNQCMQC0QoSZ/6vn +nvuRlydd3LBbMHHOXjgaatkl5+r3YZJW+OraNsKHZZYuciUvf9/DE8k= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/Certum_Trusted_Network_CA.pem b/secure/caroot/trusted/Certum_Trusted_Network_CA.pem index a321445a502c..5f92008a47ab 100644 --- a/secure/caroot/trusted/Certum_Trusted_Network_CA.pem +++ b/secure/caroot/trusted/Certum_Trusted_Network_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem b/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem index 62cee7fc2058..8dcc08c17b07 100644 --- a/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem +++ b/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Certum_Trusted_Root_CA.pem b/secure/caroot/trusted/Certum_Trusted_Root_CA.pem new file mode 100644 index 000000000000..d6034eb6e081 --- /dev/null +++ b/secure/caroot/trusted/Certum_Trusted_Root_CA.pem @@ -0,0 +1,136 @@ +## +## Certum Trusted Root CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 1e:bf:59:50:b8:c9:80:37:4c:06:f7:eb:55:4f:b5:ed + Signature Algorithm: sha512WithRSAEncryption + Issuer: C = PL, O = Asseco Data Systems S.A., OU = Certum Certification Authority, CN = Certum Trusted Root CA + Validity + Not Before: Mar 16 12:10:13 2018 GMT + Not After : Mar 16 12:10:13 2043 GMT + Subject: C = PL, O = Asseco Data Systems S.A., OU = Certum Certification Authority, CN = Certum Trusted Root CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:d1:2d:8e:bb:b7:36:ea:6d:37:91:9f:4e:93:a7: + 05:e4:29:03:25:ce:1c:82:f7:7c:99:9f:41:06:cd: + ed:a3:ba:c0:db:09:2c:c1:7c:df:29:7e:4b:65:2f: + 93:a7:d4:01:6b:03:28:18:a3:d8:9d:05:c1:2a:d8: + 45:f1:91:de:df:3b:d0:80:02:8c:cf:38:0f:ea:a7: + 5c:78:11:a4:c1:c8:85:5c:25:d3:d3:b2:e7:25:cf: + 11:54:97:ab:35:c0:1e:76:1c:ef:00:53:9f:39:dc: + 14:a5:2c:22:25:b3:72:72:fc:8d:b3:e5:3e:08:1e: + 14:2a:37:0b:88:3c:ca:b0:f4:c8:c2:a1:ae:bc:c1: + be:29:67:55:e2:fc:ad:59:5c:fe:bd:57:2c:b0:90: + 8d:c2:ed:37:b6:7c:99:88:b5:d5:03:9a:3d:15:0d: + 3d:3a:a8:a8:45:f0:95:4e:25:59:1d:cd:98:69:bb: + d3:cc:32:c9:8d:ef:81:fe:ad:7d:89:bb:ba:60:13: + ca:65:95:67:a0:f3:19:f6:03:56:d4:6a:d3:27:e2: + a1:ad:83:f0:4a:12:22:77:1c:05:73:e2:19:71:42: + c0:ec:75:46:9a:90:58:e0:6a:8e:2b:a5:46:30:04: + 8e:19:b2:17:e3:be:a9:ba:7f:56:f1:24:03:d7:b2: + 21:28:76:0e:36:30:4c:79:d5:41:9a:9a:a8:b8:35: + ba:0c:3a:f2:44:1b:20:88:f7:c5:25:d7:3d:c6:e3: + 3e:43:dd:87:fe:c4:ea:f5:53:3e:4c:65:ff:3b:4a: + cb:78:5a:6b:17:5f:0d:c7:c3:4f:4e:9a:2a:a2:ed: + 57:4d:22:e2:46:9a:3f:0f:91:34:24:7d:55:e3:8c: + 95:37:d3:1a:f0:09:2b:2c:d2:c9:8d:b4:0d:00:ab: + 67:29:28:d8:01:f5:19:04:b6:1d:be:76:fe:72:5c: + c4:85:ca:d2:80:41:df:05:a8:a3:d5:84:90:4f:0b: + f3:e0:3f:9b:19:d2:37:89:3f:f2:7b:52:1c:8c:f6: + e1:f7:3c:07:97:8c:0e:a2:59:81:0c:b2:90:3d:d3: + e3:59:46:ed:0f:a9:a7:de:80:6b:5a:aa:07:b6:19: + cb:bc:57:f3:97:21:7a:0c:b1:2b:74:3e:eb:da:a7: + 67:2d:4c:c4:98:9e:36:09:76:66:66:fc:1a:3f:ea: + 48:54:1c:be:30:bd:80:50:bf:7c:b5:ce:00:f6:0c: + 61:d9:e7:24:03:e0:e3:01:81:0e:bd:d8:85:34:88: + bd:b2:36:a8:7b:5c:08:e5:44:80:8c:6f:f8:2f:d5: + 21:ca:1d:1c:d0:fb:c4:b5:87:d1:3a:4e:c7:76:b5: + 35:48:b5 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 8C:FB:1C:75:BC:02:D3:9F:4E:2E:48:D9:F9:60:54:AA:C4:B3:4F:FA + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: sha512WithRSAEncryption + 48:a2:d5:00:0b:2e:d0:3f:bc:1c:d5:b5:54:49:1e:5a:6b:f4: + e4:f2:e0:40:37:e0:cc:14:7b:b9:c9:fa:35:b5:75:17:93:6a: + 05:69:85:9c:cd:4f:19:78:5b:19:81:f3:63:3e:c3:ce:5b:8f: + f5:2f:5e:01:76:13:3f:2c:00:b9:cd:96:52:39:49:6d:04:4e: + c5:e9:0f:86:0d:e1:fa:b3:5f:82:12:f1:3a:ce:66:06:24:34: + 2b:e8:cc:ca:e7:69:dc:87:9d:c2:34:d7:79:d1:d3:77:b8:aa: + 59:58:fe:9d:26:fa:38:86:3e:9d:8a:87:64:57:e5:17:3a:e2: + f9:8d:b9:e3:33:78:c1:90:d8:b8:dd:b7:83:51:e4:c4:cc:23: + d5:06:7c:e6:51:d3:cd:34:31:c0:f6:46:bb:0b:ad:fc:3d:10: + 05:2a:3b:4a:91:25:ee:8c:d4:84:87:80:2a:bc:09:8c:aa:3a: + 13:5f:e8:34:79:50:c1:10:19:f9:d3:28:1e:d4:d1:51:30:29: + b3:ae:90:67:d6:1f:0a:63:b1:c5:a9:c6:42:31:63:17:94:ef: + 69:cb:2f:fa:8c:14:7d:c4:43:18:89:d9:f0:32:40:e6:80:e2: + 46:5f:e5:e3:c1:00:59:a8:f9:e8:20:bc:89:2c:0e:47:34:0b: + ea:57:c2:53:36:fc:a7:d4:af:31:cd:fe:02:e5:75:fa:b9:27: + 09:f9:f3:f5:3b:ca:7d:9f:a9:22:cb:88:c9:aa:d1:47:3d:36: + 77:a8:59:64:6b:27:cf:ef:27:c1:e3:24:b5:86:f7:ae:7e:32: + 4d:b0:79:68:d1:39:e8:90:58:c3:83:bc:0f:2c:d6:97:eb:ce: *** 1636 LINES SKIPPED *** From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 07:39:32 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16BE56AD4A1; Sat, 4 Sep 2021 07:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1ml806clz3s6n; Sat, 4 Sep 2021 07:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9EA713DF9; Sat, 4 Sep 2021 07:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1847dVr1049427; Sat, 4 Sep 2021 07:39:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1847dVxE049426; Sat, 4 Sep 2021 07:39:31 GMT (envelope-from git) Date: Sat, 4 Sep 2021 07:39:31 GMT Message-Id: <202109040739.1847dVxE049426@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 0ef0442fcf63 - stable/12 - caroot: update CA bundle processor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0ef0442fcf63392502e4d2a645807a723562de0f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 07:39:32 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0ef0442fcf63392502e4d2a645807a723562de0f commit 0ef0442fcf63392502e4d2a645807a723562de0f Author: Kyle Evans AuthorDate: 2021-03-30 03:05:38 +0000 Commit: Kyle Evans CommitDate: 2021-09-04 07:39:00 +0000 caroot: update CA bundle processor Our current processor was identified as trusting cert not explicitly marked for SERVER_AUTH, as well as certs that were tagged with DISTRUST_AFTER. Update the script to handle both scenarios. This patch was originally authored by mandree@ for ports, and it was subsequently ported to base caroot. (cherry picked from commit c3510c941c0dddd09389915a9395e6f059088bab) --- secure/caroot/MAca-bundle.pl | 55 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/secure/caroot/MAca-bundle.pl b/secure/caroot/MAca-bundle.pl index bfac77c73941..8521b620337f 100755 --- a/secure/caroot/MAca-bundle.pl +++ b/secure/caroot/MAca-bundle.pl @@ -76,6 +76,8 @@ sub print_header($$) ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $VERSION ## @@ -91,6 +93,8 @@ EOFH ## Authorities (CA). These were automatically extracted from Mozilla's ## root CA list (the file `certdata.txt'). ## +## It contains certificates trusted for server authentication. +## ## Extracted from nss ## with $VERSION ## @@ -100,6 +104,13 @@ EOH } } +# returns a string like YYMMDDhhmmssZ of current time in GMT zone +sub timenow() +{ + my ($sec,$min,$hour,$mday,$mon,$year,undef,undef,undef) = gmtime(time); + return sprintf "%02d%02d%02d%02d%02d%02dZ", $year-100, $mon+1, $mday, $hour, $min, $sec; +} + sub printcert($$$) { my ($fh, $label, $certdata) = @_; @@ -110,6 +121,8 @@ sub printcert($$$) close(OUT) or die "openssl x509 failed with exit code $?"; } +# converts a datastream that is to be \177-style octal constants +# from <> to a (binary) string and returns it sub graboct($) { my $ifh = shift; @@ -125,13 +138,13 @@ sub graboct($) return $data; } - sub grabcert($) { my $ifh = shift; my $certdata; - my $cka_label; - my $serial; + my $cka_label = ''; + my $serial = 0; + my $distrust = 0; while (<$ifh>) { chomp; @@ -148,6 +161,19 @@ sub grabcert($) if (/^CKA_SERIAL_NUMBER MULTILINE_OCTAL/) { $serial = graboct($ifh); } + + if (/^CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL/) + { + my $distrust_after = graboct($ifh); + my $time_now = timenow(); + if ($time_now >= $distrust_after) { $distrust = 1; } + if ($debug) { + printf STDERR "line $.: $cka_label ser #%d: distrust after %s, now: %s -> distrust $distrust\n", $serial, $distrust_after, timenow(); + } + if ($distrust) { + return undef; + } + } } return ($serial, $cka_label, $certdata); } @@ -171,13 +197,13 @@ sub grabtrust($) { $serial = graboct($ifh); } - if (/^CKA_TRUST_(SERVER_AUTH|EMAIL_PROTECTION|CODE_SIGNING) CK_TRUST (\S+)$/) + if (/^CKA_TRUST_SERVER_AUTH CK_TRUST (\S+)$/) { - if ($2 eq 'CKT_NSS_NOT_TRUSTED') { + if ($1 eq 'CKT_NSS_NOT_TRUSTED') { $distrust = 1; - } elsif ($2 eq 'CKT_NSS_TRUSTED_DELEGATOR') { + } elsif ($1 eq 'CKT_NSS_TRUSTED_DELEGATOR') { $maytrust = 1; - } elsif ($2 ne 'CKT_NSS_MUST_VERIFY_TRUST') { + } elsif ($1 ne 'CKT_NSS_MUST_VERIFY_TRUST') { confess "Unknown trust setting on line $.:\n" . "$_\n" . "Script must be updated:"; @@ -197,16 +223,22 @@ if (!$outputdir) { print_header(*STDOUT, ""); } +my $untrusted = 0; + while (<$inputfh>) { if (/^CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE/) { my ($serial, $label, $certdata) = grabcert($inputfh); if (defined $certs{$label."\0".$serial}) { warn "Certificate $label duplicated!\n"; } - $certs{$label."\0".$serial} = $certdata; - # We store the label in a separate hash because truncating the key - # with \0 was causing garbage data after the end of the text. - $labels{$label."\0".$serial} = $label; + if (defined $certdata) { + $certs{$label."\0".$serial} = $certdata; + # We store the label in a separate hash because truncating the key + # with \0 was causing garbage data after the end of the text. + $labels{$label."\0".$serial} = $label; + } else { # $certdata undefined? distrust_after in effect + $untrusted ++; + } } elsif (/^CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST/) { my ($serial, $label, $trust) = grabtrust($inputfh); if (defined $trusts{$label."\0".$serial}) { @@ -226,7 +258,6 @@ sub label_to_filename(@) { } # weed out untrusted certificates -my $untrusted = 0; foreach my $it (keys %trusts) { if (!$trusts{$it}) { if (!exists($certs{$it})) { From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 07:39:33 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2B576AD712; Sat, 4 Sep 2021 07:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1ml92NJkz3rlk; Sat, 4 Sep 2021 07:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E24713F11; Sat, 4 Sep 2021 07:39:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1847dWgU049451; Sat, 4 Sep 2021 07:39:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1847dWSJ049450; Sat, 4 Sep 2021 07:39:32 GMT (envelope-from git) Date: Sat, 4 Sep 2021 07:39:32 GMT Message-Id: <202109040739.1847dWSJ049450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 534d1019aa53 - stable/12 - caroot: cumulative cert update MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 534d1019aa53e2ee3ce673d58cabe4a8ca85ee35 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 07:39:33 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=534d1019aa53e2ee3ce673d58cabe4a8ca85ee35 commit 534d1019aa53e2ee3ce673d58cabe4a8ca85ee35 Author: Kyle Evans AuthorDate: 2021-03-30 02:56:40 +0000 Commit: Kyle Evans CommitDate: 2021-09-04 07:39:03 +0000 caroot: cumulative cert update This adds a note in all existing certs that they are explicitly trusted for server auth, and also: - Seven (7) added - Nineteen (19) removed (cherry picked from commit 446169e0b6f04b96960540784539c218f5a14c86) (cherry picked from commit 3016c5c2bf68d8c6ebf303939f20092478e7a4ca) (cherry picked from commit fac832b27105d926d9f8728d7147adb547b937d8) (cherry picked from commit 76461921dac18b300489e326ba3df61d2809f364) --- .../Camerfirma_Chambers_of_Commerce_Root.pem | 0 .../Camerfirma_Global_Chambersign_Root.pem | 0 .../{trusted => blacklisted}/Certum_Root_CA.pem | 0 .../Chambers_of_Commerce_Root_-_2008.pem | 0 .../D-TRUST_Root_CA_3_2013.pem | 0 secure/caroot/{trusted => blacklisted}/EC-ACC.pem | 0 ...oTrust_Primary_Certification_Authority_-_G2.pem | 0 .../Global_Chambersign_Root_-_2008.pem | 0 .../OISTE_WISeKey_Global_Root_GA_CA.pem | 0 .../{trusted => blacklisted}/QuoVadis_Root_CA.pem | 2 + .../Sonera_Class_2_Root_CA.pem | 2 + .../Staat_der_Nederlanden_Root_CA_-_G3.pem | 0 .../SwissSign_Platinum_CA_-_G2.pem | 0 ...Public_Primary_Certification_Authority_-_G6.pem | 0 ...Public_Primary_Certification_Authority_-_G6.pem | 0 .../Trustis_FPS_Root_CA.pem | 0 ...Sign_Universal_Root_Certification_Authority.pem | 0 ...Public_Primary_Certification_Authority_-_G3.pem | 0 ...Public_Primary_Certification_Authority_-_G3.pem | 0 secure/caroot/trusted/ACCVRAIZ1.pem | 2 + secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem | 2 + .../AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem | 69 ++++++++++ .../caroot/trusted/ANF_Secure_Server_Root_CA.pem | 139 +++++++++++++++++++++ .../trusted/Actalis_Authentication_Root_CA.pem | 2 + secure/caroot/trusted/AffirmTrust_Commercial.pem | 2 + secure/caroot/trusted/AffirmTrust_Networking.pem | 2 + secure/caroot/trusted/AffirmTrust_Premium.pem | 2 + secure/caroot/trusted/AffirmTrust_Premium_ECC.pem | 2 + secure/caroot/trusted/Amazon_Root_CA_1.pem | 2 + secure/caroot/trusted/Amazon_Root_CA_2.pem | 2 + secure/caroot/trusted/Amazon_Root_CA_3.pem | 2 + secure/caroot/trusted/Amazon_Root_CA_4.pem | 2 + secure/caroot/trusted/Atos_TrustedRoot_2011.pem | 2 + ...ertificacion_Firmaprofesional_CIF_A62634068.pem | 2 + .../caroot/trusted/Baltimore_CyberTrust_Root.pem | 2 + secure/caroot/trusted/Buypass_Class_2_Root_CA.pem | 2 + secure/caroot/trusted/Buypass_Class_3_Root_CA.pem | 2 + secure/caroot/trusted/CA_Disig_Root_R2.pem | 2 + secure/caroot/trusted/CFCA_EV_ROOT.pem | 2 + .../trusted/COMODO_Certification_Authority.pem | 2 + .../trusted/COMODO_ECC_Certification_Authority.pem | 2 + .../trusted/COMODO_RSA_Certification_Authority.pem | 2 + secure/caroot/trusted/Certigna.pem | 2 + secure/caroot/trusted/Certigna_Root_CA.pem | 2 + secure/caroot/trusted/Certum_EC-384_CA.pem | 68 ++++++++++ .../caroot/trusted/Certum_Trusted_Network_CA.pem | 2 + .../caroot/trusted/Certum_Trusted_Network_CA_2.pem | 2 + secure/caroot/trusted/Certum_Trusted_Root_CA.pem | 136 ++++++++++++++++++++ secure/caroot/trusted/Comodo_AAA_Services_root.pem | 2 + secure/caroot/trusted/Cybertrust_Global_Root.pem | 2 + .../trusted/D-TRUST_Root_Class_3_CA_2_2009.pem | 2 + .../trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem | 2 + secure/caroot/trusted/DST_Root_CA_X3.pem | 2 + .../caroot/trusted/DigiCert_Assured_ID_Root_CA.pem | 2 + .../caroot/trusted/DigiCert_Assured_ID_Root_G2.pem | 2 + .../caroot/trusted/DigiCert_Assured_ID_Root_G3.pem | 2 + secure/caroot/trusted/DigiCert_Global_Root_CA.pem | 2 + secure/caroot/trusted/DigiCert_Global_Root_G2.pem | 2 + secure/caroot/trusted/DigiCert_Global_Root_G3.pem | 2 + .../trusted/DigiCert_High_Assurance_EV_Root_CA.pem | 2 + secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem | 2 + .../trusted/E-Tugra_Certification_Authority.pem | 2 + .../Entrust_Root_Certification_Authority.pem | 2 + .../Entrust_Root_Certification_Authority_-_EC1.pem | 2 + .../Entrust_Root_Certification_Authority_-_G2.pem | 2 + .../Entrust_Root_Certification_Authority_-_G4.pem | 2 + .../Entrust_net_Premium_2048_Secure_Server_CA.pem | 2 + secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem | 2 + secure/caroot/trusted/GLOBALTRUST_2020.pem | 138 ++++++++++++++++++++ secure/caroot/trusted/GTS_Root_R1.pem | 2 + secure/caroot/trusted/GTS_Root_R2.pem | 2 + secure/caroot/trusted/GTS_Root_R3.pem | 2 + secure/caroot/trusted/GTS_Root_R4.pem | 2 + .../caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem | 2 + .../caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem | 2 + secure/caroot/trusted/GlobalSign_Root_CA.pem | 2 + secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem | 2 + secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem | 2 + secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem | 2 + secure/caroot/trusted/GlobalSign_Root_E46.pem | 66 ++++++++++ secure/caroot/trusted/GlobalSign_Root_R46.pem | 134 ++++++++++++++++++++ secure/caroot/trusted/Go_Daddy_Class_2_CA.pem | 2 + .../Go_Daddy_Root_Certificate_Authority_-_G2.pem | 2 + ...c_and_Research_Institutions_ECC_RootCA_2015.pem | 2 + ...demic_and_Research_Institutions_RootCA_2011.pem | 2 + ...demic_and_Research_Institutions_RootCA_2015.pem | 2 + secure/caroot/trusted/Hongkong_Post_Root_CA_1.pem | 2 + secure/caroot/trusted/Hongkong_Post_Root_CA_3.pem | 2 + secure/caroot/trusted/ISRG_Root_X1.pem | 2 + .../trusted/IdenTrust_Commercial_Root_CA_1.pem | 2 + .../trusted/IdenTrust_Public_Sector_Root_CA_1.pem | 2 + secure/caroot/trusted/Izenpe_com.pem | 2 + .../trusted/Microsec_e-Szigno_Root_CA_2009.pem | 2 + ...crosoft_ECC_Root_Certificate_Authority_2017.pem | 2 + ...crosoft_RSA_Root_Certificate_Authority_2017.pem | 2 + .../NAVER_Global_Root_Certification_Authority.pem | 2 + ...etLock_Arany__Class_Gold__F__tan__s__tv__ny.pem | 2 + .../Network_Solutions_Certificate_Authority.pem | 2 + .../trusted/OISTE_WISeKey_Global_Root_GB_CA.pem | 2 + .../trusted/OISTE_WISeKey_Global_Root_GC_CA.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_1_G3.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_2.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_2_G3.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_3.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_3_G3.pem | 2 + ...SSL_com_EV_Root_Certification_Authority_ECC.pem | 2 + ..._com_EV_Root_Certification_Authority_RSA_R2.pem | 2 + .../SSL_com_Root_Certification_Authority_ECC.pem | 2 + .../SSL_com_Root_Certification_Authority_RSA.pem | 2 + secure/caroot/trusted/SZAFIR_ROOT_CA2.pem | 2 + secure/caroot/trusted/SecureSign_RootCA11.pem | 2 + secure/caroot/trusted/SecureTrust_CA.pem | 2 + secure/caroot/trusted/Secure_Global_CA.pem | 2 + .../trusted/Security_Communication_RootCA2.pem | 2 + .../trusted/Security_Communication_Root_CA.pem | 2 + .../trusted/Staat_der_Nederlanden_EV_Root_CA.pem | 2 + secure/caroot/trusted/Starfield_Class_2_CA.pem | 2 + .../Starfield_Root_Certificate_Authority_-_G2.pem | 2 + ...ld_Services_Root_Certificate_Authority_-_G2.pem | 2 + secure/caroot/trusted/SwissSign_Gold_CA_-_G2.pem | 2 + secure/caroot/trusted/SwissSign_Silver_CA_-_G2.pem | 2 + .../trusted/T-TeleSec_GlobalRoot_Class_2.pem | 2 + .../trusted/T-TeleSec_GlobalRoot_Class_3.pem | 2 + ...BITAK_Kamu_SM_SSL_Kok_Sertifikasi_-_Surum_1.pem | 2 + secure/caroot/trusted/TWCA_Global_Root_CA.pem | 2 + .../trusted/TWCA_Root_Certification_Authority.pem | 2 + secure/caroot/trusted/TeliaSonera_Root_CA_v1.pem | 2 + secure/caroot/trusted/TrustCor_ECA-1.pem | 2 + secure/caroot/trusted/TrustCor_RootCert_CA-1.pem | 2 + secure/caroot/trusted/TrustCor_RootCert_CA-2.pem | 2 + .../Trustwave_Global_Certification_Authority.pem | 2 + ...ave_Global_ECC_P256_Certification_Authority.pem | 2 + ...ave_Global_ECC_P384_Certification_Authority.pem | 2 + .../trusted/UCA_Extended_Validation_Root.pem | 2 + secure/caroot/trusted/UCA_Global_G2_Root.pem | 2 + .../USERTrust_ECC_Certification_Authority.pem | 2 + .../USERTrust_RSA_Certification_Authority.pem | 2 + secure/caroot/trusted/XRamp_Global_CA_Root.pem | 2 + secure/caroot/trusted/certSIGN_ROOT_CA.pem | 2 + secure/caroot/trusted/certSIGN_Root_CA_G2.pem | 2 + secure/caroot/trusted/e-Szigno_Root_CA_2017.pem | 2 + .../trusted/ePKI_Root_Certification_Authority.pem | 2 + secure/caroot/trusted/emSign_ECC_Root_CA_-_C3.pem | 2 + secure/caroot/trusted/emSign_ECC_Root_CA_-_G3.pem | 2 + secure/caroot/trusted/emSign_Root_CA_-_C1.pem | 2 + secure/caroot/trusted/emSign_Root_CA_-_G1.pem | 2 + 146 files changed, 994 insertions(+) diff --git a/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem b/secure/caroot/blacklisted/Camerfirma_Chambers_of_Commerce_Root.pem similarity index 100% rename from secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem rename to secure/caroot/blacklisted/Camerfirma_Chambers_of_Commerce_Root.pem diff --git a/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem b/secure/caroot/blacklisted/Camerfirma_Global_Chambersign_Root.pem similarity index 100% rename from secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem rename to secure/caroot/blacklisted/Camerfirma_Global_Chambersign_Root.pem diff --git a/secure/caroot/trusted/Certum_Root_CA.pem b/secure/caroot/blacklisted/Certum_Root_CA.pem similarity index 100% rename from secure/caroot/trusted/Certum_Root_CA.pem rename to secure/caroot/blacklisted/Certum_Root_CA.pem diff --git a/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem b/secure/caroot/blacklisted/Chambers_of_Commerce_Root_-_2008.pem similarity index 100% rename from secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem rename to secure/caroot/blacklisted/Chambers_of_Commerce_Root_-_2008.pem diff --git a/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem b/secure/caroot/blacklisted/D-TRUST_Root_CA_3_2013.pem similarity index 100% rename from secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem rename to secure/caroot/blacklisted/D-TRUST_Root_CA_3_2013.pem diff --git a/secure/caroot/trusted/EC-ACC.pem b/secure/caroot/blacklisted/EC-ACC.pem similarity index 100% rename from secure/caroot/trusted/EC-ACC.pem rename to secure/caroot/blacklisted/EC-ACC.pem diff --git a/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem b/secure/caroot/blacklisted/GeoTrust_Primary_Certification_Authority_-_G2.pem similarity index 100% rename from secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem rename to secure/caroot/blacklisted/GeoTrust_Primary_Certification_Authority_-_G2.pem diff --git a/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem b/secure/caroot/blacklisted/Global_Chambersign_Root_-_2008.pem similarity index 100% rename from secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem rename to secure/caroot/blacklisted/Global_Chambersign_Root_-_2008.pem diff --git a/secure/caroot/trusted/OISTE_WISeKey_Global_Root_GA_CA.pem b/secure/caroot/blacklisted/OISTE_WISeKey_Global_Root_GA_CA.pem similarity index 100% rename from secure/caroot/trusted/OISTE_WISeKey_Global_Root_GA_CA.pem rename to secure/caroot/blacklisted/OISTE_WISeKey_Global_Root_GA_CA.pem diff --git a/secure/caroot/trusted/QuoVadis_Root_CA.pem b/secure/caroot/blacklisted/QuoVadis_Root_CA.pem similarity index 98% rename from secure/caroot/trusted/QuoVadis_Root_CA.pem rename to secure/caroot/blacklisted/QuoVadis_Root_CA.pem index 3619cd0cbd03..25e6300f5231 100644 --- a/secure/caroot/trusted/QuoVadis_Root_CA.pem +++ b/secure/caroot/blacklisted/QuoVadis_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Sonera_Class_2_Root_CA.pem b/secure/caroot/blacklisted/Sonera_Class_2_Root_CA.pem similarity index 98% rename from secure/caroot/trusted/Sonera_Class_2_Root_CA.pem rename to secure/caroot/blacklisted/Sonera_Class_2_Root_CA.pem index 7b38ef463d6a..b23c237e319f 100644 --- a/secure/caroot/trusted/Sonera_Class_2_Root_CA.pem +++ b/secure/caroot/blacklisted/Sonera_Class_2_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Staat_der_Nederlanden_Root_CA_-_G3.pem b/secure/caroot/blacklisted/Staat_der_Nederlanden_Root_CA_-_G3.pem similarity index 100% rename from secure/caroot/trusted/Staat_der_Nederlanden_Root_CA_-_G3.pem rename to secure/caroot/blacklisted/Staat_der_Nederlanden_Root_CA_-_G3.pem diff --git a/secure/caroot/trusted/SwissSign_Platinum_CA_-_G2.pem b/secure/caroot/blacklisted/SwissSign_Platinum_CA_-_G2.pem similarity index 100% rename from secure/caroot/trusted/SwissSign_Platinum_CA_-_G2.pem rename to secure/caroot/blacklisted/SwissSign_Platinum_CA_-_G2.pem diff --git a/secure/caroot/trusted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem b/secure/caroot/blacklisted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem similarity index 100% rename from secure/caroot/trusted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem rename to secure/caroot/blacklisted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem diff --git a/secure/caroot/trusted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem b/secure/caroot/blacklisted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem similarity index 100% rename from secure/caroot/trusted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem rename to secure/caroot/blacklisted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem diff --git a/secure/caroot/trusted/Trustis_FPS_Root_CA.pem b/secure/caroot/blacklisted/Trustis_FPS_Root_CA.pem similarity index 100% rename from secure/caroot/trusted/Trustis_FPS_Root_CA.pem rename to secure/caroot/blacklisted/Trustis_FPS_Root_CA.pem diff --git a/secure/caroot/trusted/VeriSign_Universal_Root_Certification_Authority.pem b/secure/caroot/blacklisted/VeriSign_Universal_Root_Certification_Authority.pem similarity index 100% rename from secure/caroot/trusted/VeriSign_Universal_Root_Certification_Authority.pem rename to secure/caroot/blacklisted/VeriSign_Universal_Root_Certification_Authority.pem diff --git a/secure/caroot/trusted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem b/secure/caroot/blacklisted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem similarity index 100% rename from secure/caroot/trusted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem rename to secure/caroot/blacklisted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem diff --git a/secure/caroot/trusted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem b/secure/caroot/blacklisted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem similarity index 100% rename from secure/caroot/trusted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem rename to secure/caroot/blacklisted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem diff --git a/secure/caroot/trusted/ACCVRAIZ1.pem b/secure/caroot/trusted/ACCVRAIZ1.pem index 0c7c7c41b57d..1c96e53b8f17 100644 --- a/secure/caroot/trusted/ACCVRAIZ1.pem +++ b/secure/caroot/trusted/ACCVRAIZ1.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem index 579f50d8d730..6a64be5ce138 100644 --- a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem +++ b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem new file mode 100644 index 000000000000..71ee49574e84 --- /dev/null +++ b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem @@ -0,0 +1,69 @@ +## +## AC RAIZ FNMT-RCM SERVIDORES SEGUROS +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 62:f6:32:6c:e5:c4:e3:68:5c:1b:62:dd:9c:2e:9d:95 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = ES, O = FNMT-RCM, OU = Ceres, organizationIdentifier = VATES-Q2826004J, CN = AC RAIZ FNMT-RCM SERVIDORES SEGUROS + Validity + Not Before: Dec 20 09:37:33 2018 GMT + Not After : Dec 20 09:37:33 2043 GMT + Subject: C = ES, O = FNMT-RCM, OU = Ceres, organizationIdentifier = VATES-Q2826004J, CN = AC RAIZ FNMT-RCM SERVIDORES SEGUROS + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:f6:ba:57:53:c8:ca:ab:df:36:4a:52:21:e4:97: + d2:83:67:9e:f0:65:51:d0:5e:87:c7:47:b1:59:f2: + 57:47:9b:00:02:93:44:17:69:db:42:c7:b1:b2:3a: + 18:0e:b4:5d:8c:b3:66:5d:a1:34:f9:36:2c:49:db: + f3:46:fc:b3:44:69:44:13:66:fd:d7:c5:fd:af:36: + 4d:ce:03:4d:07:71:cf:af:6a:05:d2:a2:43:5a:0a: + 52:6f:01:03:4e:8e:8b + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 01:B9:2F:EF:BF:11:86:60:F2:4F:D0:41:6E:AB:73:1F:E7:D2:6E:49 + Signature Algorithm: ecdsa-with-SHA384 + 30:66:02:31:00:ae:4a:e3:2b:40:c3:74:11:f2:95:ad:16:23: + de:4e:0c:1a:e6:5d:a5:24:5e:6b:44:7b:fc:38:e2:4f:cb:9c: + 45:17:11:4c:14:27:26:55:39:75:4a:03:cc:13:90:9f:92:02: + 31:00:fa:4a:6c:60:88:73:f3:ee:b8:98:62:a9:ce:2b:c2:d9: + 8a:a6:70:31:1d:af:b0:94:4c:eb:4f:c6:e3:d1:f3:62:a7:3c: + ff:93:2e:07:5c:49:01:67:69:12:02:72:bf:e7 +SHA1 Fingerprint=62:FF:D9:9E:C0:65:0D:03:CE:75:93:D2:ED:3F:2D:32:C9:E3:E5:4A +-----BEGIN CERTIFICATE----- +MIICbjCCAfOgAwIBAgIQYvYybOXE42hcG2LdnC6dlTAKBggqhkjOPQQDAzB4MQsw +CQYDVQQGEwJFUzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRgw +FgYDVQRhDA9WQVRFUy1RMjgyNjAwNEoxLDAqBgNVBAMMI0FDIFJBSVogRk5NVC1S +Q00gU0VSVklET1JFUyBTRUdVUk9TMB4XDTE4MTIyMDA5MzczM1oXDTQzMTIyMDA5 +MzczM1oweDELMAkGA1UEBhMCRVMxETAPBgNVBAoMCEZOTVQtUkNNMQ4wDAYDVQQL +DAVDZXJlczEYMBYGA1UEYQwPVkFURVMtUTI4MjYwMDRKMSwwKgYDVQQDDCNBQyBS +QUlaIEZOTVQtUkNNIFNFUlZJRE9SRVMgU0VHVVJPUzB2MBAGByqGSM49AgEGBSuB +BAAiA2IABPa6V1PIyqvfNkpSIeSX0oNnnvBlUdBeh8dHsVnyV0ebAAKTRBdp20LH +sbI6GA60XYyzZl2hNPk2LEnb80b8s0RpRBNm/dfF/a82Tc4DTQdxz69qBdKiQ1oK +Um8BA06Oi6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD +VR0OBBYEFAG5L++/EYZg8k/QQW6rcx/n0m5JMAoGCCqGSM49BAMDA2kAMGYCMQCu +SuMrQMN0EfKVrRYj3k4MGuZdpSRea0R7/DjiT8ucRRcRTBQnJlU5dUoDzBOQn5IC +MQD6SmxgiHPz7riYYqnOK8LZiqZwMR2vsJRM60/G49HzYqc8/5MuB1xJAWdpEgJy +v+c= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/ANF_Secure_Server_Root_CA.pem b/secure/caroot/trusted/ANF_Secure_Server_Root_CA.pem new file mode 100644 index 000000000000..6114a5ccdb2d --- /dev/null +++ b/secure/caroot/trusted/ANF_Secure_Server_Root_CA.pem @@ -0,0 +1,139 @@ +## +## ANF Secure Server Root CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 996390341000653745 (0xdd3e3bc6cf96bb1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: serialNumber = G63287510, C = ES, O = ANF Autoridad de Certificacion, OU = ANF CA Raiz, CN = ANF Secure Server Root CA + Validity + Not Before: Sep 4 10:00:38 2019 GMT + Not After : Aug 30 10:00:38 2039 GMT + Subject: serialNumber = G63287510, C = ES, O = ANF Autoridad de Certificacion, OU = ANF CA Raiz, CN = ANF Secure Server Root CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:db:eb:6b:2b:e6:64:54:95:82:90:a3:72:a4:19: + 01:9d:9c:0b:81:5f:73:49:ba:a7:ac:f3:04:4e:7b: + 96:0b:ec:11:e0:5b:a6:1c:ce:1b:d2:0d:83:1c:2b: + b8:9e:1d:7e:45:32:60:0f:07:e9:77:58:7e:9f:6a: + c8:61:4e:b6:26:c1:4c:8d:ff:4c:ef:34:b2:1f:65: + d8:b9:78:f5:ad:a9:71:b9:ef:4f:58:1d:a5:de:74: + 20:97:a1:ed:68:4c:de:92:17:4b:bc:ab:ff:65:9a: + 9e:fb:47:d9:57:72:f3:09:a1:ae:76:44:13:6e:9c: + 2d:44:39:bc:f9:c7:3b:a4:58:3d:41:bd:b4:c2:49: + a3:c8:0d:d2:97:2f:07:65:52:00:a7:6e:c8:af:68: + ec:f4:14:96:b6:57:1f:56:c3:39:9f:2b:6d:e4:f3: + 3e:f6:35:64:da:0c:1c:a1:84:4b:2f:4b:4b:e2:2c: + 24:9d:6d:93:40:eb:b5:23:8e:32:ca:6f:45:d3:a8: + 89:7b:1e:cf:1e:fa:5b:43:8b:cd:cd:a8:0f:6a:ca: + 0c:5e:b9:9e:47:8f:f0:d9:b6:0a:0b:58:65:17:33: + b9:23:e4:77:19:7d:cb:4a:2e:92:7b:4f:2f:10:77: + b1:8d:2f:68:9c:62:cc:e0:50:f8:ec:91:a7:54:4c: + 57:09:d5:76:63:c5:e8:65:1e:ee:6d:6a:cf:09:9d: + fa:7c:4f:ad:60:08:fd:56:99:0f:15:2c:7b:a9:80: + ab:8c:61:8f:4a:07:76:42:de:3d:f4:dd:b2:24:33: + 5b:b8:b5:a3:44:c9:ac:7f:77:3c:1d:23:ec:82:a9: + a6:e2:c8:06:4c:02:fe:ac:5c:99:99:0b:2f:10:8a: + a6:f4:7f:d5:87:74:0d:59:49:45:f6:f0:71:5c:39: + 29:d6:bf:4a:23:8b:f5:5f:01:63:d2:87:73:28:b5: + 4b:0a:f5:f8:ab:82:2c:7e:73:25:32:1d:0b:63:0a: + 17:81:00:ff:b6:76:5e:e7:b4:b1:40:ca:21:bb:d5: + 80:51:e5:48:52:67:2c:d2:61:89:07:0d:0f:ce:42: + 77:c0:44:73:9c:44:50:a0:db:10:0a:2d:95:1c:81: + af:e4:1c:e5:14:1e:f1:36:41:01:02:2f:7d:73:a7: + de:42:cc:4c:e9:89:0d:56:f7:9f:91:d4:03:c6:6c: + c9:8f:db:d8:1c:e0:40:98:5d:66:99:98:80:6e:2d: + ff:01:c5:ce:cb:46:1f:ac:02:c6:43:e6:ae:a2:84: + 3c:c5:4e:1e:3d:6d:c9:14:4c:e3:2e:41:bb:ca:39: + bf:36:3c:2a:19:aa:41:87:4e:a5:ce:4b:32:79:dd: + 90:49:7f + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + keyid:9C:5F:D0:6C:63:A3:5F:93:CA:93:98:08:AD:8C:87:A5:2C:5C:C1:37 + + X509v3 Subject Key Identifier: + 9C:5F:D0:6C:63:A3:5F:93:CA:93:98:08:AD:8C:87:A5:2C:5C:C1:37 + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 4e:1e:b9:8a:c6:a0:98:3f:6e:c3:69:c0:6a:5c:49:52:ac:cb: + 2b:5d:78:38:c1:d5:54:84:9f:93:f0:87:19:3d:2c:66:89:eb: + 0d:42:fc:cc:f0:75:85:3f:8b:f4:80:5d:79:e5:17:67:bd:35: + 82:e2:f2:3c:8e:7d:5b:36:cb:5a:80:00:29:f2:ce:2b:2c:f1: + 8f:aa:6d:05:93:6c:72:c7:56:eb:df:50:23:28:e5:45:10:3d: + e8:67:a3:af:0e:55:0f:90:09:62:ef:4b:59:a2:f6:53:f1:c0: + 35:e4:2f:c1:24:bd:79:2f:4e:20:22:3b:fd:1a:20:b0:a4:0e: + 2c:70:ed:74:3f:b8:13:95:06:51:c8:e8:87:26:ca:a4:5b:6a: + 16:21:92:dd:73:60:9e:10:18:de:3c:81:ea:e8:18:c3:7c:89: + f2:8b:50:3e:bd:11:e2:15:03:a8:36:7d:33:01:6c:48:15:d7: + 88:90:99:04:c5:cc:e6:07:f4:bc:f4:90:ed:13:e2:ea:8b:c3: + 8f:a3:33:0f:c1:29:4c:13:4e:da:15:56:71:73:72:82:50:f6: + 9a:33:7c:a2:b1:a8:1a:34:74:65:5c:ce:d1:eb:ab:53:e0:1a: + 80:d8:ea:3a:49:e4:26:30:9b:e5:1c:8a:a8:a9:15:32:86:99: + 92:0a:10:23:56:12:e0:f6:ce:4c:e2:bb:be:db:8d:92:73:01: + 66:2f:62:3e:b2:72:27:45:36:ed:4d:56:e3:97:99:ff:3a:35: + 3e:a5:54:4a:52:59:4b:60:db:ee:fe:78:11:7f:4a:dc:14:79: + 60:b6:6b:64:03:db:15:83:e1:a2:be:f6:23:97:50:f0:09:33: + 36:a7:71:96:25:f3:b9:42:7d:db:38:3f:2c:58:ac:e8:42:e1: + 0e:d8:d3:3b:4c:2e:82:e9:83:2e:6b:31:d9:dd:47:86:4f:6d: + 97:91:2e:4f:e2:28:71:35:16:d1:f2:73:fe:25:2b:07:47:24: + 63:27:c8:f8:f6:d9:6b:fc:12:31:56:08:c0:53:42:af:9c:d0: + 33:7e:fc:06:f0:31:44:03:14:f1:58:ea:f2:6a:0d:a9:11:b2: + 83:be:c5:1a:bf:07:ea:59:dc:a3:88:35:ef:9c:76:32:3c:4d: + 06:22:ce:15:e5:dd:9e:d8:8f:da:de:d2:c4:39:e5:17:81:cf: + 38:47:eb:7f:88:6d:59:1b:df:9f:42:14:ae:7e:cf:a8:b0:66: + 65:da:37:af:9f:aa:3d:ea:28:b6:de:d5:31:58:16:82:5b:ea: + bb:19:75:02:73:1a:ca:48:1a:21:93:90:0a:8e:93:84:a7:7d: + 3b:23:18:92:89:a0:8d:ac +SHA1 Fingerprint=5B:6E:68:D0:CC:15:B6:A0:5F:1E:C1:5F:AE:02:FC:6B:2F:5D:6F:74 +-----BEGIN CERTIFICATE----- +MIIF7zCCA9egAwIBAgIIDdPjvGz5a7EwDQYJKoZIhvcNAQELBQAwgYQxEjAQBgNV +BAUTCUc2MzI4NzUxMDELMAkGA1UEBhMCRVMxJzAlBgNVBAoTHkFORiBBdXRvcmlk +YWQgZGUgQ2VydGlmaWNhY2lvbjEUMBIGA1UECxMLQU5GIENBIFJhaXoxIjAgBgNV +BAMTGUFORiBTZWN1cmUgU2VydmVyIFJvb3QgQ0EwHhcNMTkwOTA0MTAwMDM4WhcN +MzkwODMwMTAwMDM4WjCBhDESMBAGA1UEBRMJRzYzMjg3NTEwMQswCQYDVQQGEwJF +UzEnMCUGA1UEChMeQU5GIEF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uMRQwEgYD +VQQLEwtBTkYgQ0EgUmFpejEiMCAGA1UEAxMZQU5GIFNlY3VyZSBTZXJ2ZXIgUm9v +dCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANvrayvmZFSVgpCj +cqQZAZ2cC4Ffc0m6p6zzBE57lgvsEeBbphzOG9INgxwruJ4dfkUyYA8H6XdYfp9q +yGFOtibBTI3/TO80sh9l2Ll49a2pcbnvT1gdpd50IJeh7WhM3pIXS7yr/2WanvtH +2Vdy8wmhrnZEE26cLUQ5vPnHO6RYPUG9tMJJo8gN0pcvB2VSAKduyK9o7PQUlrZX +H1bDOZ8rbeTzPvY1ZNoMHKGESy9LS+IsJJ1tk0DrtSOOMspvRdOoiXsezx76W0OL +zc2oD2rKDF65nkeP8Nm2CgtYZRczuSPkdxl9y0oukntPLxB3sY0vaJxizOBQ+OyR +p1RMVwnVdmPF6GUe7m1qzwmd+nxPrWAI/VaZDxUse6mAq4xhj0oHdkLePfTdsiQz +W7i1o0TJrH93PB0j7IKppuLIBkwC/qxcmZkLLxCKpvR/1Yd0DVlJRfbwcVw5Kda/ +SiOL9V8BY9KHcyi1Swr1+KuCLH5zJTIdC2MKF4EA/7Z2Xue0sUDKIbvVgFHlSFJn +LNJhiQcND85Cd8BEc5xEUKDbEAotlRyBr+Qc5RQe8TZBAQIvfXOn3kLMTOmJDVb3 +n5HUA8ZsyY/b2BzgQJhdZpmYgG4t/wHFzstGH6wCxkPmrqKEPMVOHj1tyRRM4y5B +u8o5vzY8KhmqQYdOpc5LMnndkEl/AgMBAAGjYzBhMB8GA1UdIwQYMBaAFJxf0Gxj +o1+TypOYCK2Mh6UsXME3MB0GA1UdDgQWBBScX9BsY6Nfk8qTmAitjIelLFzBNzAO +BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC +AgEATh65isagmD9uw2nAalxJUqzLK114OMHVVISfk/CHGT0sZonrDUL8zPB1hT+L +9IBdeeUXZ701guLyPI59WzbLWoAAKfLOKyzxj6ptBZNscsdW699QIyjlRRA96Gej +rw5VD5AJYu9LWaL2U/HANeQvwSS9eS9OICI7/RogsKQOLHDtdD+4E5UGUcjohybK +pFtqFiGS3XNgnhAY3jyB6ugYw3yJ8otQPr0R4hUDqDZ9MwFsSBXXiJCZBMXM5gf0 +vPSQ7RPi6ovDj6MzD8EpTBNO2hVWcXNyglD2mjN8orGoGjR0ZVzO0eurU+AagNjq +OknkJjCb5RyKqKkVMoaZkgoQI1YS4PbOTOK7vtuNknMBZi9iPrJyJ0U27U1W45eZ +/zo1PqVUSlJZS2Db7v54EX9K3BR5YLZrZAPbFYPhor72I5dQ8AkzNqdxliXzuUJ9 +2zg/LFis6ELhDtjTO0wugumDLmsx2d1Hhk9tl5EuT+IocTUW0fJz/iUrB0ckYyfI ++PbZa/wSMVYIwFNCr5zQM378BvAxRAMU8Vjq8moNqRGyg77FGr8H6lnco4g175x2 +MjxNBiLOFeXdntiP2t7SxDnlF4HPOEfrf4htWRvfn0IUrn7PqLBmZdo3r5+qPeoo +tt7VMVgWglvquxl1AnMaykgaIZOQCo6ThKd9OyMYkomgjaw= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem b/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem index 7248545350e2..7c971e1229a2 100644 --- a/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem +++ b/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/AffirmTrust_Commercial.pem b/secure/caroot/trusted/AffirmTrust_Commercial.pem index 1d85c32853c8..282d1a5dcf6f 100644 --- a/secure/caroot/trusted/AffirmTrust_Commercial.pem +++ b/secure/caroot/trusted/AffirmTrust_Commercial.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/AffirmTrust_Networking.pem b/secure/caroot/trusted/AffirmTrust_Networking.pem index 222bde26c934..830cf3f0c3c2 100644 --- a/secure/caroot/trusted/AffirmTrust_Networking.pem +++ b/secure/caroot/trusted/AffirmTrust_Networking.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/AffirmTrust_Premium.pem b/secure/caroot/trusted/AffirmTrust_Premium.pem index dc1447429465..725747aafdaf 100644 --- a/secure/caroot/trusted/AffirmTrust_Premium.pem +++ b/secure/caroot/trusted/AffirmTrust_Premium.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem b/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem index a6f01409a2ef..6fe75939863e 100644 --- a/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem +++ b/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_1.pem b/secure/caroot/trusted/Amazon_Root_CA_1.pem index 6bf1acafd4c7..2aca2eee3e9b 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_1.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_1.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_2.pem b/secure/caroot/trusted/Amazon_Root_CA_2.pem index 80a1eb66bee2..95ca81db30bb 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_2.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_2.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_3.pem b/secure/caroot/trusted/Amazon_Root_CA_3.pem index 6b61b3e18fa0..294f7dc8f0b6 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_3.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_3.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_4.pem b/secure/caroot/trusted/Amazon_Root_CA_4.pem index df7aa6f1c165..649917b9638a 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_4.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_4.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Atos_TrustedRoot_2011.pem b/secure/caroot/trusted/Atos_TrustedRoot_2011.pem index 21b229561733..7058d3fb6edf 100644 --- a/secure/caroot/trusted/Atos_TrustedRoot_2011.pem +++ b/secure/caroot/trusted/Atos_TrustedRoot_2011.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem b/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem index 4d2eaa61962f..db4f44195dbd 100644 --- a/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem +++ b/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem b/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem index 3dc1de849346..0f356d59962f 100644 --- a/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem +++ b/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem b/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem index dc2c86edbed1..0168f641fd42 100644 --- a/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem +++ b/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem b/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem index fda39f8731d1..7ae24799e638 100644 --- a/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem +++ b/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/CA_Disig_Root_R2.pem b/secure/caroot/trusted/CA_Disig_Root_R2.pem index 0ecc9d1ee08d..0dda6d97e2aa 100644 --- a/secure/caroot/trusted/CA_Disig_Root_R2.pem +++ b/secure/caroot/trusted/CA_Disig_Root_R2.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/CFCA_EV_ROOT.pem b/secure/caroot/trusted/CFCA_EV_ROOT.pem index 7eb37baa3bed..722499b9ed42 100644 --- a/secure/caroot/trusted/CFCA_EV_ROOT.pem +++ b/secure/caroot/trusted/CFCA_EV_ROOT.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/COMODO_Certification_Authority.pem b/secure/caroot/trusted/COMODO_Certification_Authority.pem index 7aa1237bb8e1..fc3e4b554cc3 100644 --- a/secure/caroot/trusted/COMODO_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_Certification_Authority.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem b/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem index 215581b14fdf..5f839a858d00 100644 --- a/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem b/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem index 38e275f1365e..7faefe98b8bf 100644 --- a/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Certigna.pem b/secure/caroot/trusted/Certigna.pem index bbcd413be511..e9104ef6c3da 100644 --- a/secure/caroot/trusted/Certigna.pem +++ b/secure/caroot/trusted/Certigna.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Certigna_Root_CA.pem b/secure/caroot/trusted/Certigna_Root_CA.pem index c1a0286ab2a0..a0a7248b51ea 100644 --- a/secure/caroot/trusted/Certigna_Root_CA.pem +++ b/secure/caroot/trusted/Certigna_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Certum_EC-384_CA.pem b/secure/caroot/trusted/Certum_EC-384_CA.pem new file mode 100644 index 000000000000..67b5d644f809 --- /dev/null +++ b/secure/caroot/trusted/Certum_EC-384_CA.pem @@ -0,0 +1,68 @@ +## +## Certum EC-384 CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 78:8f:27:5c:81:12:52:20:a5:04:d0:2d:dd:ba:73:f4 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = PL, O = Asseco Data Systems S.A., OU = Certum Certification Authority, CN = Certum EC-384 CA + Validity + Not Before: Mar 26 07:24:54 2018 GMT + Not After : Mar 26 07:24:54 2043 GMT + Subject: C = PL, O = Asseco Data Systems S.A., OU = Certum Certification Authority, CN = Certum EC-384 CA + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:c4:28:8e:ab:18:5b:6a:be:6e:64:37:63:e4:cd: + ec:ab:3a:f7:cc:a1:b8:0e:82:49:d7:86:29:9f:a1: + 94:f2:e3:60:78:98:81:78:06:4d:f2:ec:9a:0e:57: + 60:83:9f:b4:e6:17:2f:1a:b3:5d:02:5b:89:23:3c: + c2:11:05:2a:a7:88:13:18:f3:50:84:d7:bd:34:2c: + 27:89:55:ff:ce:4c:e7:df:a6:1f:28:c4:f0:54:c3: + b9:7c:b7:53:ad:eb:c2 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 8D:06:66:74:24:76:3A:F3:89:F7:BC:D6:BD:47:7D:2F:BC:10:5F:4B + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: ecdsa-with-SHA384 + 30:65:02:30:03:55:2d:a6:e6:18:c4:7c:ef:c9:50:6e:c1:27: + 0f:9c:87:af:6e:d5:1b:08:18:bd:92:29:c1:ef:94:91:78:d2: + 3a:1c:55:89:62:e5:1b:09:1e:ba:64:6b:f1:76:b4:d4:02:31: + 00:b4:42:84:99:ff:ab:e7:9e:fb:91:97:27:5d:dc:b0:5b:30: + 71:ce:5e:38:1a:6a:d9:25:e7:ea:f7:61:92:56:f8:ea:da:36: + c2:87:65:96:2e:72:25:2f:7f:df:c3:13:c9 +SHA1 Fingerprint=F3:3E:78:3C:AC:DF:F4:A2:CC:AC:67:55:69:56:D7:E5:16:3C:E1:ED +-----BEGIN CERTIFICATE----- +MIICZTCCAeugAwIBAgIQeI8nXIESUiClBNAt3bpz9DAKBggqhkjOPQQDAzB0MQsw +CQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScw +JQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxGTAXBgNVBAMT +EENlcnR1bSBFQy0zODQgQ0EwHhcNMTgwMzI2MDcyNDU0WhcNNDMwMzI2MDcyNDU0 +WjB0MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBT +LkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxGTAX +BgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATE +KI6rGFtqvm5kN2PkzeyrOvfMobgOgknXhimfoZTy42B4mIF4Bk3y7JoOV2CDn7Tm +Fy8as10CW4kjPMIRBSqniBMY81CE1700LCeJVf/OTOffph8oxPBUw7l8t1Ot68Kj +QjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI0GZnQkdjrzife81r1HfS+8 +EF9LMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNoADBlAjADVS2m5hjEfO/J +UG7BJw+ch69u1RsIGL2SKcHvlJF40jocVYli5RsJHrpka/F2tNQCMQC0QoSZ/6vn +nvuRlydd3LBbMHHOXjgaatkl5+r3YZJW+OraNsKHZZYuciUvf9/DE8k= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/Certum_Trusted_Network_CA.pem b/secure/caroot/trusted/Certum_Trusted_Network_CA.pem index a321445a502c..5f92008a47ab 100644 --- a/secure/caroot/trusted/Certum_Trusted_Network_CA.pem +++ b/secure/caroot/trusted/Certum_Trusted_Network_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem b/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem index 62cee7fc2058..8dcc08c17b07 100644 --- a/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem +++ b/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD$ ## diff --git a/secure/caroot/trusted/Certum_Trusted_Root_CA.pem b/secure/caroot/trusted/Certum_Trusted_Root_CA.pem new file mode 100644 index 000000000000..d6034eb6e081 --- /dev/null +++ b/secure/caroot/trusted/Certum_Trusted_Root_CA.pem @@ -0,0 +1,136 @@ +## +## Certum Trusted Root CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 1e:bf:59:50:b8:c9:80:37:4c:06:f7:eb:55:4f:b5:ed + Signature Algorithm: sha512WithRSAEncryption + Issuer: C = PL, O = Asseco Data Systems S.A., OU = Certum Certification Authority, CN = Certum Trusted Root CA + Validity + Not Before: Mar 16 12:10:13 2018 GMT + Not After : Mar 16 12:10:13 2043 GMT + Subject: C = PL, O = Asseco Data Systems S.A., OU = Certum Certification Authority, CN = Certum Trusted Root CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:d1:2d:8e:bb:b7:36:ea:6d:37:91:9f:4e:93:a7: + 05:e4:29:03:25:ce:1c:82:f7:7c:99:9f:41:06:cd: + ed:a3:ba:c0:db:09:2c:c1:7c:df:29:7e:4b:65:2f: + 93:a7:d4:01:6b:03:28:18:a3:d8:9d:05:c1:2a:d8: + 45:f1:91:de:df:3b:d0:80:02:8c:cf:38:0f:ea:a7: + 5c:78:11:a4:c1:c8:85:5c:25:d3:d3:b2:e7:25:cf: + 11:54:97:ab:35:c0:1e:76:1c:ef:00:53:9f:39:dc: + 14:a5:2c:22:25:b3:72:72:fc:8d:b3:e5:3e:08:1e: + 14:2a:37:0b:88:3c:ca:b0:f4:c8:c2:a1:ae:bc:c1: + be:29:67:55:e2:fc:ad:59:5c:fe:bd:57:2c:b0:90: + 8d:c2:ed:37:b6:7c:99:88:b5:d5:03:9a:3d:15:0d: + 3d:3a:a8:a8:45:f0:95:4e:25:59:1d:cd:98:69:bb: + d3:cc:32:c9:8d:ef:81:fe:ad:7d:89:bb:ba:60:13: + ca:65:95:67:a0:f3:19:f6:03:56:d4:6a:d3:27:e2: + a1:ad:83:f0:4a:12:22:77:1c:05:73:e2:19:71:42: + c0:ec:75:46:9a:90:58:e0:6a:8e:2b:a5:46:30:04: + 8e:19:b2:17:e3:be:a9:ba:7f:56:f1:24:03:d7:b2: + 21:28:76:0e:36:30:4c:79:d5:41:9a:9a:a8:b8:35: + ba:0c:3a:f2:44:1b:20:88:f7:c5:25:d7:3d:c6:e3: + 3e:43:dd:87:fe:c4:ea:f5:53:3e:4c:65:ff:3b:4a: + cb:78:5a:6b:17:5f:0d:c7:c3:4f:4e:9a:2a:a2:ed: + 57:4d:22:e2:46:9a:3f:0f:91:34:24:7d:55:e3:8c: + 95:37:d3:1a:f0:09:2b:2c:d2:c9:8d:b4:0d:00:ab: + 67:29:28:d8:01:f5:19:04:b6:1d:be:76:fe:72:5c: + c4:85:ca:d2:80:41:df:05:a8:a3:d5:84:90:4f:0b: + f3:e0:3f:9b:19:d2:37:89:3f:f2:7b:52:1c:8c:f6: + e1:f7:3c:07:97:8c:0e:a2:59:81:0c:b2:90:3d:d3: + e3:59:46:ed:0f:a9:a7:de:80:6b:5a:aa:07:b6:19: + cb:bc:57:f3:97:21:7a:0c:b1:2b:74:3e:eb:da:a7: + 67:2d:4c:c4:98:9e:36:09:76:66:66:fc:1a:3f:ea: + 48:54:1c:be:30:bd:80:50:bf:7c:b5:ce:00:f6:0c: + 61:d9:e7:24:03:e0:e3:01:81:0e:bd:d8:85:34:88: + bd:b2:36:a8:7b:5c:08:e5:44:80:8c:6f:f8:2f:d5: + 21:ca:1d:1c:d0:fb:c4:b5:87:d1:3a:4e:c7:76:b5: + 35:48:b5 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 8C:FB:1C:75:BC:02:D3:9F:4E:2E:48:D9:F9:60:54:AA:C4:B3:4F:FA + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: sha512WithRSAEncryption + 48:a2:d5:00:0b:2e:d0:3f:bc:1c:d5:b5:54:49:1e:5a:6b:f4: + e4:f2:e0:40:37:e0:cc:14:7b:b9:c9:fa:35:b5:75:17:93:6a: + 05:69:85:9c:cd:4f:19:78:5b:19:81:f3:63:3e:c3:ce:5b:8f: + f5:2f:5e:01:76:13:3f:2c:00:b9:cd:96:52:39:49:6d:04:4e: + c5:e9:0f:86:0d:e1:fa:b3:5f:82:12:f1:3a:ce:66:06:24:34: + 2b:e8:cc:ca:e7:69:dc:87:9d:c2:34:d7:79:d1:d3:77:b8:aa: + 59:58:fe:9d:26:fa:38:86:3e:9d:8a:87:64:57:e5:17:3a:e2: + f9:8d:b9:e3:33:78:c1:90:d8:b8:dd:b7:83:51:e4:c4:cc:23: + d5:06:7c:e6:51:d3:cd:34:31:c0:f6:46:bb:0b:ad:fc:3d:10: + 05:2a:3b:4a:91:25:ee:8c:d4:84:87:80:2a:bc:09:8c:aa:3a: + 13:5f:e8:34:79:50:c1:10:19:f9:d3:28:1e:d4:d1:51:30:29: + b3:ae:90:67:d6:1f:0a:63:b1:c5:a9:c6:42:31:63:17:94:ef: + 69:cb:2f:fa:8c:14:7d:c4:43:18:89:d9:f0:32:40:e6:80:e2: + 46:5f:e5:e3:c1:00:59:a8:f9:e8:20:bc:89:2c:0e:47:34:0b: + ea:57:c2:53:36:fc:a7:d4:af:31:cd:fe:02:e5:75:fa:b9:27: + 09:f9:f3:f5:3b:ca:7d:9f:a9:22:cb:88:c9:aa:d1:47:3d:36: + 77:a8:59:64:6b:27:cf:ef:27:c1:e3:24:b5:86:f7:ae:7e:32: + 4d:b0:79:68:d1:39:e8:90:58:c3:83:bc:0f:2c:d6:97:eb:ce: *** 1636 LINES SKIPPED *** From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 07:43:32 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51CC66ADA71; Sat, 4 Sep 2021 07:43:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1mqm1p6Pz3tBL; Sat, 4 Sep 2021 07:43:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DFC4141AD; Sat, 4 Sep 2021 07:43:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1847hWV0062113; Sat, 4 Sep 2021 07:43:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1847hWSg062112; Sat, 4 Sep 2021 07:43:32 GMT (envelope-from git) Date: Sat, 4 Sep 2021 07:43:32 GMT Message-Id: <202109040743.1847hWSg062112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: a12641eaecc3 - stable/11 - caroot: update CA bundle processor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: a12641eaecc3dab730b27149b7d48fb0a86d38c7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 07:43:32 -0000 The branch stable/11 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a12641eaecc3dab730b27149b7d48fb0a86d38c7 commit a12641eaecc3dab730b27149b7d48fb0a86d38c7 Author: Kyle Evans AuthorDate: 2021-03-30 03:05:38 +0000 Commit: Kyle Evans CommitDate: 2021-09-04 07:42:23 +0000 caroot: update CA bundle processor Our current processor was identified as trusting cert not explicitly marked for SERVER_AUTH, as well as certs that were tagged with DISTRUST_AFTER. Update the script to handle both scenarios. This patch was originally authored by mandree@ for ports, and it was subsequently ported to base caroot. (cherry picked from commit c3510c941c0dddd09389915a9395e6f059088bab) --- secure/caroot/MAca-bundle.pl | 55 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/secure/caroot/MAca-bundle.pl b/secure/caroot/MAca-bundle.pl index bfac77c73941..8521b620337f 100755 --- a/secure/caroot/MAca-bundle.pl +++ b/secure/caroot/MAca-bundle.pl @@ -76,6 +76,8 @@ sub print_header($$) ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $VERSION ## @@ -91,6 +93,8 @@ EOFH ## Authorities (CA). These were automatically extracted from Mozilla's ## root CA list (the file `certdata.txt'). ## +## It contains certificates trusted for server authentication. +## ## Extracted from nss ## with $VERSION ## @@ -100,6 +104,13 @@ EOH } } +# returns a string like YYMMDDhhmmssZ of current time in GMT zone +sub timenow() +{ + my ($sec,$min,$hour,$mday,$mon,$year,undef,undef,undef) = gmtime(time); + return sprintf "%02d%02d%02d%02d%02d%02dZ", $year-100, $mon+1, $mday, $hour, $min, $sec; +} + sub printcert($$$) { my ($fh, $label, $certdata) = @_; @@ -110,6 +121,8 @@ sub printcert($$$) close(OUT) or die "openssl x509 failed with exit code $?"; } +# converts a datastream that is to be \177-style octal constants +# from <> to a (binary) string and returns it sub graboct($) { my $ifh = shift; @@ -125,13 +138,13 @@ sub graboct($) return $data; } - sub grabcert($) { my $ifh = shift; my $certdata; - my $cka_label; - my $serial; + my $cka_label = ''; + my $serial = 0; + my $distrust = 0; while (<$ifh>) { chomp; @@ -148,6 +161,19 @@ sub grabcert($) if (/^CKA_SERIAL_NUMBER MULTILINE_OCTAL/) { $serial = graboct($ifh); } + + if (/^CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL/) + { + my $distrust_after = graboct($ifh); + my $time_now = timenow(); + if ($time_now >= $distrust_after) { $distrust = 1; } + if ($debug) { + printf STDERR "line $.: $cka_label ser #%d: distrust after %s, now: %s -> distrust $distrust\n", $serial, $distrust_after, timenow(); + } + if ($distrust) { + return undef; + } + } } return ($serial, $cka_label, $certdata); } @@ -171,13 +197,13 @@ sub grabtrust($) { $serial = graboct($ifh); } - if (/^CKA_TRUST_(SERVER_AUTH|EMAIL_PROTECTION|CODE_SIGNING) CK_TRUST (\S+)$/) + if (/^CKA_TRUST_SERVER_AUTH CK_TRUST (\S+)$/) { - if ($2 eq 'CKT_NSS_NOT_TRUSTED') { + if ($1 eq 'CKT_NSS_NOT_TRUSTED') { $distrust = 1; - } elsif ($2 eq 'CKT_NSS_TRUSTED_DELEGATOR') { + } elsif ($1 eq 'CKT_NSS_TRUSTED_DELEGATOR') { $maytrust = 1; - } elsif ($2 ne 'CKT_NSS_MUST_VERIFY_TRUST') { + } elsif ($1 ne 'CKT_NSS_MUST_VERIFY_TRUST') { confess "Unknown trust setting on line $.:\n" . "$_\n" . "Script must be updated:"; @@ -197,16 +223,22 @@ if (!$outputdir) { print_header(*STDOUT, ""); } +my $untrusted = 0; + while (<$inputfh>) { if (/^CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE/) { my ($serial, $label, $certdata) = grabcert($inputfh); if (defined $certs{$label."\0".$serial}) { warn "Certificate $label duplicated!\n"; } - $certs{$label."\0".$serial} = $certdata; - # We store the label in a separate hash because truncating the key - # with \0 was causing garbage data after the end of the text. - $labels{$label."\0".$serial} = $label; + if (defined $certdata) { + $certs{$label."\0".$serial} = $certdata; + # We store the label in a separate hash because truncating the key + # with \0 was causing garbage data after the end of the text. + $labels{$label."\0".$serial} = $label; + } else { # $certdata undefined? distrust_after in effect + $untrusted ++; + } } elsif (/^CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST/) { my ($serial, $label, $trust) = grabtrust($inputfh); if (defined $trusts{$label."\0".$serial}) { @@ -226,7 +258,6 @@ sub label_to_filename(@) { } # weed out untrusted certificates -my $untrusted = 0; foreach my $it (keys %trusts) { if (!$trusts{$it}) { if (!exists($certs{$it})) { From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 07:43:33 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 817B36AD7EC; Sat, 4 Sep 2021 07:43:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1mqn2vdGz3tHg; Sat, 4 Sep 2021 07:43:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 441C214219; Sat, 4 Sep 2021 07:43:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1847hXII062137; Sat, 4 Sep 2021 07:43:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1847hXH8062136; Sat, 4 Sep 2021 07:43:33 GMT (envelope-from git) Date: Sat, 4 Sep 2021 07:43:33 GMT Message-Id: <202109040743.1847hXH8062136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: de140815c9a5 - stable/11 - caroot: cumulative cert update MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: de140815c9a583e8eb702b39cd8f57ca81a05e3f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 07:43:33 -0000 The branch stable/11 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=de140815c9a583e8eb702b39cd8f57ca81a05e3f commit de140815c9a583e8eb702b39cd8f57ca81a05e3f Author: Kyle Evans AuthorDate: 2021-03-30 02:56:40 +0000 Commit: Kyle Evans CommitDate: 2021-09-04 07:42:27 +0000 caroot: cumulative cert update This adds a note in all existing certs that they are explicitly trusted for server auth, and also: - Seven (7) added - Nineteen (19) removed (cherry picked from commit 446169e0b6f04b96960540784539c218f5a14c86) (cherry picked from commit 3016c5c2bf68d8c6ebf303939f20092478e7a4ca) (cherry picked from commit fac832b27105d926d9f8728d7147adb547b937d8) (cherry picked from commit 76461921dac18b300489e326ba3df61d2809f364) --- .../Camerfirma_Chambers_of_Commerce_Root.pem | 0 .../Camerfirma_Global_Chambersign_Root.pem | 0 .../{trusted => blacklisted}/Certum_Root_CA.pem | 0 .../Chambers_of_Commerce_Root_-_2008.pem | 0 .../D-TRUST_Root_CA_3_2013.pem | 0 secure/caroot/{trusted => blacklisted}/EC-ACC.pem | 0 ...oTrust_Primary_Certification_Authority_-_G2.pem | 0 .../Global_Chambersign_Root_-_2008.pem | 0 .../OISTE_WISeKey_Global_Root_GA_CA.pem | 0 .../{trusted => blacklisted}/QuoVadis_Root_CA.pem | 2 + .../Sonera_Class_2_Root_CA.pem | 2 + .../Staat_der_Nederlanden_Root_CA_-_G3.pem | 0 .../SwissSign_Platinum_CA_-_G2.pem | 0 ...Public_Primary_Certification_Authority_-_G6.pem | 0 ...Public_Primary_Certification_Authority_-_G6.pem | 0 .../Trustis_FPS_Root_CA.pem | 0 ...Sign_Universal_Root_Certification_Authority.pem | 0 ...Public_Primary_Certification_Authority_-_G3.pem | 0 ...Public_Primary_Certification_Authority_-_G3.pem | 0 secure/caroot/trusted/ACCVRAIZ1.pem | 2 + secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem | 2 + .../AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem | 69 ++++++++++ .../caroot/trusted/ANF_Secure_Server_Root_CA.pem | 139 +++++++++++++++++++++ .../trusted/Actalis_Authentication_Root_CA.pem | 2 + secure/caroot/trusted/AffirmTrust_Commercial.pem | 2 + secure/caroot/trusted/AffirmTrust_Networking.pem | 2 + secure/caroot/trusted/AffirmTrust_Premium.pem | 2 + secure/caroot/trusted/AffirmTrust_Premium_ECC.pem | 2 + secure/caroot/trusted/Amazon_Root_CA_1.pem | 2 + secure/caroot/trusted/Amazon_Root_CA_2.pem | 2 + secure/caroot/trusted/Amazon_Root_CA_3.pem | 2 + secure/caroot/trusted/Amazon_Root_CA_4.pem | 2 + secure/caroot/trusted/Atos_TrustedRoot_2011.pem | 2 + ...ertificacion_Firmaprofesional_CIF_A62634068.pem | 2 + .../caroot/trusted/Baltimore_CyberTrust_Root.pem | 2 + secure/caroot/trusted/Buypass_Class_2_Root_CA.pem | 2 + secure/caroot/trusted/Buypass_Class_3_Root_CA.pem | 2 + secure/caroot/trusted/CA_Disig_Root_R2.pem | 2 + secure/caroot/trusted/CFCA_EV_ROOT.pem | 2 + .../trusted/COMODO_Certification_Authority.pem | 2 + .../trusted/COMODO_ECC_Certification_Authority.pem | 2 + .../trusted/COMODO_RSA_Certification_Authority.pem | 2 + secure/caroot/trusted/Certigna.pem | 2 + secure/caroot/trusted/Certigna_Root_CA.pem | 2 + secure/caroot/trusted/Certum_EC-384_CA.pem | 68 ++++++++++ .../caroot/trusted/Certum_Trusted_Network_CA.pem | 2 + .../caroot/trusted/Certum_Trusted_Network_CA_2.pem | 2 + secure/caroot/trusted/Certum_Trusted_Root_CA.pem | 136 ++++++++++++++++++++ secure/caroot/trusted/Comodo_AAA_Services_root.pem | 2 + secure/caroot/trusted/Cybertrust_Global_Root.pem | 2 + .../trusted/D-TRUST_Root_Class_3_CA_2_2009.pem | 2 + .../trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem | 2 + secure/caroot/trusted/DST_Root_CA_X3.pem | 2 + .../caroot/trusted/DigiCert_Assured_ID_Root_CA.pem | 2 + .../caroot/trusted/DigiCert_Assured_ID_Root_G2.pem | 2 + .../caroot/trusted/DigiCert_Assured_ID_Root_G3.pem | 2 + secure/caroot/trusted/DigiCert_Global_Root_CA.pem | 2 + secure/caroot/trusted/DigiCert_Global_Root_G2.pem | 2 + secure/caroot/trusted/DigiCert_Global_Root_G3.pem | 2 + .../trusted/DigiCert_High_Assurance_EV_Root_CA.pem | 2 + secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem | 2 + .../trusted/E-Tugra_Certification_Authority.pem | 2 + .../Entrust_Root_Certification_Authority.pem | 2 + .../Entrust_Root_Certification_Authority_-_EC1.pem | 2 + .../Entrust_Root_Certification_Authority_-_G2.pem | 2 + .../Entrust_Root_Certification_Authority_-_G4.pem | 2 + .../Entrust_net_Premium_2048_Secure_Server_CA.pem | 2 + secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem | 2 + secure/caroot/trusted/GLOBALTRUST_2020.pem | 138 ++++++++++++++++++++ secure/caroot/trusted/GTS_Root_R1.pem | 2 + secure/caroot/trusted/GTS_Root_R2.pem | 2 + secure/caroot/trusted/GTS_Root_R3.pem | 2 + secure/caroot/trusted/GTS_Root_R4.pem | 2 + .../caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem | 2 + .../caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem | 2 + secure/caroot/trusted/GlobalSign_Root_CA.pem | 2 + secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem | 2 + secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem | 2 + secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem | 2 + secure/caroot/trusted/GlobalSign_Root_E46.pem | 66 ++++++++++ secure/caroot/trusted/GlobalSign_Root_R46.pem | 134 ++++++++++++++++++++ secure/caroot/trusted/Go_Daddy_Class_2_CA.pem | 2 + .../Go_Daddy_Root_Certificate_Authority_-_G2.pem | 2 + ...c_and_Research_Institutions_ECC_RootCA_2015.pem | 2 + ...demic_and_Research_Institutions_RootCA_2011.pem | 2 + ...demic_and_Research_Institutions_RootCA_2015.pem | 2 + secure/caroot/trusted/Hongkong_Post_Root_CA_1.pem | 2 + secure/caroot/trusted/Hongkong_Post_Root_CA_3.pem | 2 + secure/caroot/trusted/ISRG_Root_X1.pem | 2 + .../trusted/IdenTrust_Commercial_Root_CA_1.pem | 2 + .../trusted/IdenTrust_Public_Sector_Root_CA_1.pem | 2 + secure/caroot/trusted/Izenpe_com.pem | 2 + .../trusted/Microsec_e-Szigno_Root_CA_2009.pem | 2 + ...crosoft_ECC_Root_Certificate_Authority_2017.pem | 2 + ...crosoft_RSA_Root_Certificate_Authority_2017.pem | 2 + .../NAVER_Global_Root_Certification_Authority.pem | 2 + ...etLock_Arany__Class_Gold__F__tan__s__tv__ny.pem | 2 + .../Network_Solutions_Certificate_Authority.pem | 2 + .../trusted/OISTE_WISeKey_Global_Root_GB_CA.pem | 2 + .../trusted/OISTE_WISeKey_Global_Root_GC_CA.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_1_G3.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_2.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_2_G3.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_3.pem | 2 + secure/caroot/trusted/QuoVadis_Root_CA_3_G3.pem | 2 + ...SSL_com_EV_Root_Certification_Authority_ECC.pem | 2 + ..._com_EV_Root_Certification_Authority_RSA_R2.pem | 2 + .../SSL_com_Root_Certification_Authority_ECC.pem | 2 + .../SSL_com_Root_Certification_Authority_RSA.pem | 2 + secure/caroot/trusted/SZAFIR_ROOT_CA2.pem | 2 + secure/caroot/trusted/SecureSign_RootCA11.pem | 2 + secure/caroot/trusted/SecureTrust_CA.pem | 2 + secure/caroot/trusted/Secure_Global_CA.pem | 2 + .../trusted/Security_Communication_RootCA2.pem | 2 + .../trusted/Security_Communication_Root_CA.pem | 2 + .../trusted/Staat_der_Nederlanden_EV_Root_CA.pem | 2 + secure/caroot/trusted/Starfield_Class_2_CA.pem | 2 + .../Starfield_Root_Certificate_Authority_-_G2.pem | 2 + ...ld_Services_Root_Certificate_Authority_-_G2.pem | 2 + secure/caroot/trusted/SwissSign_Gold_CA_-_G2.pem | 2 + secure/caroot/trusted/SwissSign_Silver_CA_-_G2.pem | 2 + .../trusted/T-TeleSec_GlobalRoot_Class_2.pem | 2 + .../trusted/T-TeleSec_GlobalRoot_Class_3.pem | 2 + ...BITAK_Kamu_SM_SSL_Kok_Sertifikasi_-_Surum_1.pem | 2 + secure/caroot/trusted/TWCA_Global_Root_CA.pem | 2 + .../trusted/TWCA_Root_Certification_Authority.pem | 2 + secure/caroot/trusted/TeliaSonera_Root_CA_v1.pem | 2 + secure/caroot/trusted/TrustCor_ECA-1.pem | 2 + secure/caroot/trusted/TrustCor_RootCert_CA-1.pem | 2 + secure/caroot/trusted/TrustCor_RootCert_CA-2.pem | 2 + .../Trustwave_Global_Certification_Authority.pem | 2 + ...ave_Global_ECC_P256_Certification_Authority.pem | 2 + ...ave_Global_ECC_P384_Certification_Authority.pem | 2 + .../trusted/UCA_Extended_Validation_Root.pem | 2 + secure/caroot/trusted/UCA_Global_G2_Root.pem | 2 + .../USERTrust_ECC_Certification_Authority.pem | 2 + .../USERTrust_RSA_Certification_Authority.pem | 2 + secure/caroot/trusted/XRamp_Global_CA_Root.pem | 2 + secure/caroot/trusted/certSIGN_ROOT_CA.pem | 2 + secure/caroot/trusted/certSIGN_Root_CA_G2.pem | 2 + secure/caroot/trusted/e-Szigno_Root_CA_2017.pem | 2 + .../trusted/ePKI_Root_Certification_Authority.pem | 2 + secure/caroot/trusted/emSign_ECC_Root_CA_-_C3.pem | 2 + secure/caroot/trusted/emSign_ECC_Root_CA_-_G3.pem | 2 + secure/caroot/trusted/emSign_Root_CA_-_C1.pem | 2 + secure/caroot/trusted/emSign_Root_CA_-_G1.pem | 2 + 146 files changed, 994 insertions(+) diff --git a/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem b/secure/caroot/blacklisted/Camerfirma_Chambers_of_Commerce_Root.pem similarity index 100% rename from secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem rename to secure/caroot/blacklisted/Camerfirma_Chambers_of_Commerce_Root.pem diff --git a/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem b/secure/caroot/blacklisted/Camerfirma_Global_Chambersign_Root.pem similarity index 100% rename from secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem rename to secure/caroot/blacklisted/Camerfirma_Global_Chambersign_Root.pem diff --git a/secure/caroot/trusted/Certum_Root_CA.pem b/secure/caroot/blacklisted/Certum_Root_CA.pem similarity index 100% rename from secure/caroot/trusted/Certum_Root_CA.pem rename to secure/caroot/blacklisted/Certum_Root_CA.pem diff --git a/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem b/secure/caroot/blacklisted/Chambers_of_Commerce_Root_-_2008.pem similarity index 100% rename from secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem rename to secure/caroot/blacklisted/Chambers_of_Commerce_Root_-_2008.pem diff --git a/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem b/secure/caroot/blacklisted/D-TRUST_Root_CA_3_2013.pem similarity index 100% rename from secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem rename to secure/caroot/blacklisted/D-TRUST_Root_CA_3_2013.pem diff --git a/secure/caroot/trusted/EC-ACC.pem b/secure/caroot/blacklisted/EC-ACC.pem similarity index 100% rename from secure/caroot/trusted/EC-ACC.pem rename to secure/caroot/blacklisted/EC-ACC.pem diff --git a/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem b/secure/caroot/blacklisted/GeoTrust_Primary_Certification_Authority_-_G2.pem similarity index 100% rename from secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem rename to secure/caroot/blacklisted/GeoTrust_Primary_Certification_Authority_-_G2.pem diff --git a/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem b/secure/caroot/blacklisted/Global_Chambersign_Root_-_2008.pem similarity index 100% rename from secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem rename to secure/caroot/blacklisted/Global_Chambersign_Root_-_2008.pem diff --git a/secure/caroot/trusted/OISTE_WISeKey_Global_Root_GA_CA.pem b/secure/caroot/blacklisted/OISTE_WISeKey_Global_Root_GA_CA.pem similarity index 100% rename from secure/caroot/trusted/OISTE_WISeKey_Global_Root_GA_CA.pem rename to secure/caroot/blacklisted/OISTE_WISeKey_Global_Root_GA_CA.pem diff --git a/secure/caroot/trusted/QuoVadis_Root_CA.pem b/secure/caroot/blacklisted/QuoVadis_Root_CA.pem similarity index 98% rename from secure/caroot/trusted/QuoVadis_Root_CA.pem rename to secure/caroot/blacklisted/QuoVadis_Root_CA.pem index f4e14f9874e5..67e8d989886a 100644 --- a/secure/caroot/trusted/QuoVadis_Root_CA.pem +++ b/secure/caroot/blacklisted/QuoVadis_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Sonera_Class_2_Root_CA.pem b/secure/caroot/blacklisted/Sonera_Class_2_Root_CA.pem similarity index 98% rename from secure/caroot/trusted/Sonera_Class_2_Root_CA.pem rename to secure/caroot/blacklisted/Sonera_Class_2_Root_CA.pem index 77e8b4210f9a..96548d56f2a7 100644 --- a/secure/caroot/trusted/Sonera_Class_2_Root_CA.pem +++ b/secure/caroot/blacklisted/Sonera_Class_2_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Staat_der_Nederlanden_Root_CA_-_G3.pem b/secure/caroot/blacklisted/Staat_der_Nederlanden_Root_CA_-_G3.pem similarity index 100% rename from secure/caroot/trusted/Staat_der_Nederlanden_Root_CA_-_G3.pem rename to secure/caroot/blacklisted/Staat_der_Nederlanden_Root_CA_-_G3.pem diff --git a/secure/caroot/trusted/SwissSign_Platinum_CA_-_G2.pem b/secure/caroot/blacklisted/SwissSign_Platinum_CA_-_G2.pem similarity index 100% rename from secure/caroot/trusted/SwissSign_Platinum_CA_-_G2.pem rename to secure/caroot/blacklisted/SwissSign_Platinum_CA_-_G2.pem diff --git a/secure/caroot/trusted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem b/secure/caroot/blacklisted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem similarity index 100% rename from secure/caroot/trusted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem rename to secure/caroot/blacklisted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem diff --git a/secure/caroot/trusted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem b/secure/caroot/blacklisted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem similarity index 100% rename from secure/caroot/trusted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem rename to secure/caroot/blacklisted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem diff --git a/secure/caroot/trusted/Trustis_FPS_Root_CA.pem b/secure/caroot/blacklisted/Trustis_FPS_Root_CA.pem similarity index 100% rename from secure/caroot/trusted/Trustis_FPS_Root_CA.pem rename to secure/caroot/blacklisted/Trustis_FPS_Root_CA.pem diff --git a/secure/caroot/trusted/VeriSign_Universal_Root_Certification_Authority.pem b/secure/caroot/blacklisted/VeriSign_Universal_Root_Certification_Authority.pem similarity index 100% rename from secure/caroot/trusted/VeriSign_Universal_Root_Certification_Authority.pem rename to secure/caroot/blacklisted/VeriSign_Universal_Root_Certification_Authority.pem diff --git a/secure/caroot/trusted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem b/secure/caroot/blacklisted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem similarity index 100% rename from secure/caroot/trusted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem rename to secure/caroot/blacklisted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem diff --git a/secure/caroot/trusted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem b/secure/caroot/blacklisted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem similarity index 100% rename from secure/caroot/trusted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem rename to secure/caroot/blacklisted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem diff --git a/secure/caroot/trusted/ACCVRAIZ1.pem b/secure/caroot/trusted/ACCVRAIZ1.pem index 136f7bddb6f3..f0cde8293b56 100644 --- a/secure/caroot/trusted/ACCVRAIZ1.pem +++ b/secure/caroot/trusted/ACCVRAIZ1.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem index d327b3ecf2cb..cc823ab65991 100644 --- a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem +++ b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem new file mode 100644 index 000000000000..71ee49574e84 --- /dev/null +++ b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem @@ -0,0 +1,69 @@ +## +## AC RAIZ FNMT-RCM SERVIDORES SEGUROS +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 62:f6:32:6c:e5:c4:e3:68:5c:1b:62:dd:9c:2e:9d:95 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = ES, O = FNMT-RCM, OU = Ceres, organizationIdentifier = VATES-Q2826004J, CN = AC RAIZ FNMT-RCM SERVIDORES SEGUROS + Validity + Not Before: Dec 20 09:37:33 2018 GMT + Not After : Dec 20 09:37:33 2043 GMT + Subject: C = ES, O = FNMT-RCM, OU = Ceres, organizationIdentifier = VATES-Q2826004J, CN = AC RAIZ FNMT-RCM SERVIDORES SEGUROS + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:f6:ba:57:53:c8:ca:ab:df:36:4a:52:21:e4:97: + d2:83:67:9e:f0:65:51:d0:5e:87:c7:47:b1:59:f2: + 57:47:9b:00:02:93:44:17:69:db:42:c7:b1:b2:3a: + 18:0e:b4:5d:8c:b3:66:5d:a1:34:f9:36:2c:49:db: + f3:46:fc:b3:44:69:44:13:66:fd:d7:c5:fd:af:36: + 4d:ce:03:4d:07:71:cf:af:6a:05:d2:a2:43:5a:0a: + 52:6f:01:03:4e:8e:8b + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 01:B9:2F:EF:BF:11:86:60:F2:4F:D0:41:6E:AB:73:1F:E7:D2:6E:49 + Signature Algorithm: ecdsa-with-SHA384 + 30:66:02:31:00:ae:4a:e3:2b:40:c3:74:11:f2:95:ad:16:23: + de:4e:0c:1a:e6:5d:a5:24:5e:6b:44:7b:fc:38:e2:4f:cb:9c: + 45:17:11:4c:14:27:26:55:39:75:4a:03:cc:13:90:9f:92:02: + 31:00:fa:4a:6c:60:88:73:f3:ee:b8:98:62:a9:ce:2b:c2:d9: + 8a:a6:70:31:1d:af:b0:94:4c:eb:4f:c6:e3:d1:f3:62:a7:3c: + ff:93:2e:07:5c:49:01:67:69:12:02:72:bf:e7 +SHA1 Fingerprint=62:FF:D9:9E:C0:65:0D:03:CE:75:93:D2:ED:3F:2D:32:C9:E3:E5:4A +-----BEGIN CERTIFICATE----- +MIICbjCCAfOgAwIBAgIQYvYybOXE42hcG2LdnC6dlTAKBggqhkjOPQQDAzB4MQsw +CQYDVQQGEwJFUzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRgw +FgYDVQRhDA9WQVRFUy1RMjgyNjAwNEoxLDAqBgNVBAMMI0FDIFJBSVogRk5NVC1S +Q00gU0VSVklET1JFUyBTRUdVUk9TMB4XDTE4MTIyMDA5MzczM1oXDTQzMTIyMDA5 +MzczM1oweDELMAkGA1UEBhMCRVMxETAPBgNVBAoMCEZOTVQtUkNNMQ4wDAYDVQQL +DAVDZXJlczEYMBYGA1UEYQwPVkFURVMtUTI4MjYwMDRKMSwwKgYDVQQDDCNBQyBS +QUlaIEZOTVQtUkNNIFNFUlZJRE9SRVMgU0VHVVJPUzB2MBAGByqGSM49AgEGBSuB +BAAiA2IABPa6V1PIyqvfNkpSIeSX0oNnnvBlUdBeh8dHsVnyV0ebAAKTRBdp20LH +sbI6GA60XYyzZl2hNPk2LEnb80b8s0RpRBNm/dfF/a82Tc4DTQdxz69qBdKiQ1oK +Um8BA06Oi6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD +VR0OBBYEFAG5L++/EYZg8k/QQW6rcx/n0m5JMAoGCCqGSM49BAMDA2kAMGYCMQCu +SuMrQMN0EfKVrRYj3k4MGuZdpSRea0R7/DjiT8ucRRcRTBQnJlU5dUoDzBOQn5IC +MQD6SmxgiHPz7riYYqnOK8LZiqZwMR2vsJRM60/G49HzYqc8/5MuB1xJAWdpEgJy +v+c= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/ANF_Secure_Server_Root_CA.pem b/secure/caroot/trusted/ANF_Secure_Server_Root_CA.pem new file mode 100644 index 000000000000..6114a5ccdb2d --- /dev/null +++ b/secure/caroot/trusted/ANF_Secure_Server_Root_CA.pem @@ -0,0 +1,139 @@ +## +## ANF Secure Server Root CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 996390341000653745 (0xdd3e3bc6cf96bb1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: serialNumber = G63287510, C = ES, O = ANF Autoridad de Certificacion, OU = ANF CA Raiz, CN = ANF Secure Server Root CA + Validity + Not Before: Sep 4 10:00:38 2019 GMT + Not After : Aug 30 10:00:38 2039 GMT + Subject: serialNumber = G63287510, C = ES, O = ANF Autoridad de Certificacion, OU = ANF CA Raiz, CN = ANF Secure Server Root CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:db:eb:6b:2b:e6:64:54:95:82:90:a3:72:a4:19: + 01:9d:9c:0b:81:5f:73:49:ba:a7:ac:f3:04:4e:7b: + 96:0b:ec:11:e0:5b:a6:1c:ce:1b:d2:0d:83:1c:2b: + b8:9e:1d:7e:45:32:60:0f:07:e9:77:58:7e:9f:6a: + c8:61:4e:b6:26:c1:4c:8d:ff:4c:ef:34:b2:1f:65: + d8:b9:78:f5:ad:a9:71:b9:ef:4f:58:1d:a5:de:74: + 20:97:a1:ed:68:4c:de:92:17:4b:bc:ab:ff:65:9a: + 9e:fb:47:d9:57:72:f3:09:a1:ae:76:44:13:6e:9c: + 2d:44:39:bc:f9:c7:3b:a4:58:3d:41:bd:b4:c2:49: + a3:c8:0d:d2:97:2f:07:65:52:00:a7:6e:c8:af:68: + ec:f4:14:96:b6:57:1f:56:c3:39:9f:2b:6d:e4:f3: + 3e:f6:35:64:da:0c:1c:a1:84:4b:2f:4b:4b:e2:2c: + 24:9d:6d:93:40:eb:b5:23:8e:32:ca:6f:45:d3:a8: + 89:7b:1e:cf:1e:fa:5b:43:8b:cd:cd:a8:0f:6a:ca: + 0c:5e:b9:9e:47:8f:f0:d9:b6:0a:0b:58:65:17:33: + b9:23:e4:77:19:7d:cb:4a:2e:92:7b:4f:2f:10:77: + b1:8d:2f:68:9c:62:cc:e0:50:f8:ec:91:a7:54:4c: + 57:09:d5:76:63:c5:e8:65:1e:ee:6d:6a:cf:09:9d: + fa:7c:4f:ad:60:08:fd:56:99:0f:15:2c:7b:a9:80: + ab:8c:61:8f:4a:07:76:42:de:3d:f4:dd:b2:24:33: + 5b:b8:b5:a3:44:c9:ac:7f:77:3c:1d:23:ec:82:a9: + a6:e2:c8:06:4c:02:fe:ac:5c:99:99:0b:2f:10:8a: + a6:f4:7f:d5:87:74:0d:59:49:45:f6:f0:71:5c:39: + 29:d6:bf:4a:23:8b:f5:5f:01:63:d2:87:73:28:b5: + 4b:0a:f5:f8:ab:82:2c:7e:73:25:32:1d:0b:63:0a: + 17:81:00:ff:b6:76:5e:e7:b4:b1:40:ca:21:bb:d5: + 80:51:e5:48:52:67:2c:d2:61:89:07:0d:0f:ce:42: + 77:c0:44:73:9c:44:50:a0:db:10:0a:2d:95:1c:81: + af:e4:1c:e5:14:1e:f1:36:41:01:02:2f:7d:73:a7: + de:42:cc:4c:e9:89:0d:56:f7:9f:91:d4:03:c6:6c: + c9:8f:db:d8:1c:e0:40:98:5d:66:99:98:80:6e:2d: + ff:01:c5:ce:cb:46:1f:ac:02:c6:43:e6:ae:a2:84: + 3c:c5:4e:1e:3d:6d:c9:14:4c:e3:2e:41:bb:ca:39: + bf:36:3c:2a:19:aa:41:87:4e:a5:ce:4b:32:79:dd: + 90:49:7f + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + keyid:9C:5F:D0:6C:63:A3:5F:93:CA:93:98:08:AD:8C:87:A5:2C:5C:C1:37 + + X509v3 Subject Key Identifier: + 9C:5F:D0:6C:63:A3:5F:93:CA:93:98:08:AD:8C:87:A5:2C:5C:C1:37 + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 4e:1e:b9:8a:c6:a0:98:3f:6e:c3:69:c0:6a:5c:49:52:ac:cb: + 2b:5d:78:38:c1:d5:54:84:9f:93:f0:87:19:3d:2c:66:89:eb: + 0d:42:fc:cc:f0:75:85:3f:8b:f4:80:5d:79:e5:17:67:bd:35: + 82:e2:f2:3c:8e:7d:5b:36:cb:5a:80:00:29:f2:ce:2b:2c:f1: + 8f:aa:6d:05:93:6c:72:c7:56:eb:df:50:23:28:e5:45:10:3d: + e8:67:a3:af:0e:55:0f:90:09:62:ef:4b:59:a2:f6:53:f1:c0: + 35:e4:2f:c1:24:bd:79:2f:4e:20:22:3b:fd:1a:20:b0:a4:0e: + 2c:70:ed:74:3f:b8:13:95:06:51:c8:e8:87:26:ca:a4:5b:6a: + 16:21:92:dd:73:60:9e:10:18:de:3c:81:ea:e8:18:c3:7c:89: + f2:8b:50:3e:bd:11:e2:15:03:a8:36:7d:33:01:6c:48:15:d7: + 88:90:99:04:c5:cc:e6:07:f4:bc:f4:90:ed:13:e2:ea:8b:c3: + 8f:a3:33:0f:c1:29:4c:13:4e:da:15:56:71:73:72:82:50:f6: + 9a:33:7c:a2:b1:a8:1a:34:74:65:5c:ce:d1:eb:ab:53:e0:1a: + 80:d8:ea:3a:49:e4:26:30:9b:e5:1c:8a:a8:a9:15:32:86:99: + 92:0a:10:23:56:12:e0:f6:ce:4c:e2:bb:be:db:8d:92:73:01: + 66:2f:62:3e:b2:72:27:45:36:ed:4d:56:e3:97:99:ff:3a:35: + 3e:a5:54:4a:52:59:4b:60:db:ee:fe:78:11:7f:4a:dc:14:79: + 60:b6:6b:64:03:db:15:83:e1:a2:be:f6:23:97:50:f0:09:33: + 36:a7:71:96:25:f3:b9:42:7d:db:38:3f:2c:58:ac:e8:42:e1: + 0e:d8:d3:3b:4c:2e:82:e9:83:2e:6b:31:d9:dd:47:86:4f:6d: + 97:91:2e:4f:e2:28:71:35:16:d1:f2:73:fe:25:2b:07:47:24: + 63:27:c8:f8:f6:d9:6b:fc:12:31:56:08:c0:53:42:af:9c:d0: + 33:7e:fc:06:f0:31:44:03:14:f1:58:ea:f2:6a:0d:a9:11:b2: + 83:be:c5:1a:bf:07:ea:59:dc:a3:88:35:ef:9c:76:32:3c:4d: + 06:22:ce:15:e5:dd:9e:d8:8f:da:de:d2:c4:39:e5:17:81:cf: + 38:47:eb:7f:88:6d:59:1b:df:9f:42:14:ae:7e:cf:a8:b0:66: + 65:da:37:af:9f:aa:3d:ea:28:b6:de:d5:31:58:16:82:5b:ea: + bb:19:75:02:73:1a:ca:48:1a:21:93:90:0a:8e:93:84:a7:7d: + 3b:23:18:92:89:a0:8d:ac +SHA1 Fingerprint=5B:6E:68:D0:CC:15:B6:A0:5F:1E:C1:5F:AE:02:FC:6B:2F:5D:6F:74 +-----BEGIN CERTIFICATE----- +MIIF7zCCA9egAwIBAgIIDdPjvGz5a7EwDQYJKoZIhvcNAQELBQAwgYQxEjAQBgNV +BAUTCUc2MzI4NzUxMDELMAkGA1UEBhMCRVMxJzAlBgNVBAoTHkFORiBBdXRvcmlk +YWQgZGUgQ2VydGlmaWNhY2lvbjEUMBIGA1UECxMLQU5GIENBIFJhaXoxIjAgBgNV +BAMTGUFORiBTZWN1cmUgU2VydmVyIFJvb3QgQ0EwHhcNMTkwOTA0MTAwMDM4WhcN +MzkwODMwMTAwMDM4WjCBhDESMBAGA1UEBRMJRzYzMjg3NTEwMQswCQYDVQQGEwJF +UzEnMCUGA1UEChMeQU5GIEF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uMRQwEgYD +VQQLEwtBTkYgQ0EgUmFpejEiMCAGA1UEAxMZQU5GIFNlY3VyZSBTZXJ2ZXIgUm9v +dCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANvrayvmZFSVgpCj +cqQZAZ2cC4Ffc0m6p6zzBE57lgvsEeBbphzOG9INgxwruJ4dfkUyYA8H6XdYfp9q +yGFOtibBTI3/TO80sh9l2Ll49a2pcbnvT1gdpd50IJeh7WhM3pIXS7yr/2WanvtH +2Vdy8wmhrnZEE26cLUQ5vPnHO6RYPUG9tMJJo8gN0pcvB2VSAKduyK9o7PQUlrZX +H1bDOZ8rbeTzPvY1ZNoMHKGESy9LS+IsJJ1tk0DrtSOOMspvRdOoiXsezx76W0OL +zc2oD2rKDF65nkeP8Nm2CgtYZRczuSPkdxl9y0oukntPLxB3sY0vaJxizOBQ+OyR +p1RMVwnVdmPF6GUe7m1qzwmd+nxPrWAI/VaZDxUse6mAq4xhj0oHdkLePfTdsiQz +W7i1o0TJrH93PB0j7IKppuLIBkwC/qxcmZkLLxCKpvR/1Yd0DVlJRfbwcVw5Kda/ +SiOL9V8BY9KHcyi1Swr1+KuCLH5zJTIdC2MKF4EA/7Z2Xue0sUDKIbvVgFHlSFJn +LNJhiQcND85Cd8BEc5xEUKDbEAotlRyBr+Qc5RQe8TZBAQIvfXOn3kLMTOmJDVb3 +n5HUA8ZsyY/b2BzgQJhdZpmYgG4t/wHFzstGH6wCxkPmrqKEPMVOHj1tyRRM4y5B +u8o5vzY8KhmqQYdOpc5LMnndkEl/AgMBAAGjYzBhMB8GA1UdIwQYMBaAFJxf0Gxj +o1+TypOYCK2Mh6UsXME3MB0GA1UdDgQWBBScX9BsY6Nfk8qTmAitjIelLFzBNzAO +BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC +AgEATh65isagmD9uw2nAalxJUqzLK114OMHVVISfk/CHGT0sZonrDUL8zPB1hT+L +9IBdeeUXZ701guLyPI59WzbLWoAAKfLOKyzxj6ptBZNscsdW699QIyjlRRA96Gej +rw5VD5AJYu9LWaL2U/HANeQvwSS9eS9OICI7/RogsKQOLHDtdD+4E5UGUcjohybK +pFtqFiGS3XNgnhAY3jyB6ugYw3yJ8otQPr0R4hUDqDZ9MwFsSBXXiJCZBMXM5gf0 +vPSQ7RPi6ovDj6MzD8EpTBNO2hVWcXNyglD2mjN8orGoGjR0ZVzO0eurU+AagNjq +OknkJjCb5RyKqKkVMoaZkgoQI1YS4PbOTOK7vtuNknMBZi9iPrJyJ0U27U1W45eZ +/zo1PqVUSlJZS2Db7v54EX9K3BR5YLZrZAPbFYPhor72I5dQ8AkzNqdxliXzuUJ9 +2zg/LFis6ELhDtjTO0wugumDLmsx2d1Hhk9tl5EuT+IocTUW0fJz/iUrB0ckYyfI ++PbZa/wSMVYIwFNCr5zQM378BvAxRAMU8Vjq8moNqRGyg77FGr8H6lnco4g175x2 +MjxNBiLOFeXdntiP2t7SxDnlF4HPOEfrf4htWRvfn0IUrn7PqLBmZdo3r5+qPeoo +tt7VMVgWglvquxl1AnMaykgaIZOQCo6ThKd9OyMYkomgjaw= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem b/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem index 6e7823d4b81f..bc91baa8f85d 100644 --- a/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem +++ b/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/AffirmTrust_Commercial.pem b/secure/caroot/trusted/AffirmTrust_Commercial.pem index e0a8ebdf12e1..b41dbfe80242 100644 --- a/secure/caroot/trusted/AffirmTrust_Commercial.pem +++ b/secure/caroot/trusted/AffirmTrust_Commercial.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/AffirmTrust_Networking.pem b/secure/caroot/trusted/AffirmTrust_Networking.pem index a96b036f4153..1aea4ec57c4c 100644 --- a/secure/caroot/trusted/AffirmTrust_Networking.pem +++ b/secure/caroot/trusted/AffirmTrust_Networking.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/AffirmTrust_Premium.pem b/secure/caroot/trusted/AffirmTrust_Premium.pem index ee259e197476..d287b233fc6c 100644 --- a/secure/caroot/trusted/AffirmTrust_Premium.pem +++ b/secure/caroot/trusted/AffirmTrust_Premium.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem b/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem index 5f600162a941..869d00d83e1f 100644 --- a/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem +++ b/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_1.pem b/secure/caroot/trusted/Amazon_Root_CA_1.pem index 9221de0cea44..8c7324b7307e 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_1.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_1.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_2.pem b/secure/caroot/trusted/Amazon_Root_CA_2.pem index 418ffc0b8de0..cf0b26cf1c1b 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_2.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_2.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_3.pem b/secure/caroot/trusted/Amazon_Root_CA_3.pem index 36ff13dc4708..a3f3a65da27f 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_3.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_3.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_4.pem b/secure/caroot/trusted/Amazon_Root_CA_4.pem index c1f88d6bc8a3..34d90ddb0aea 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_4.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_4.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Atos_TrustedRoot_2011.pem b/secure/caroot/trusted/Atos_TrustedRoot_2011.pem index 3f038d3c239c..81dfdf60f767 100644 --- a/secure/caroot/trusted/Atos_TrustedRoot_2011.pem +++ b/secure/caroot/trusted/Atos_TrustedRoot_2011.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem b/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem index da12de780be6..cb973c02d84b 100644 --- a/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem +++ b/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem b/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem index cc5d711bc08d..a7b7e4b52e7b 100644 --- a/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem +++ b/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem b/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem index 5ebb2edfcf84..e9fd436fb22e 100644 --- a/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem +++ b/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem b/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem index 1aab9dec0adc..38b7fe7f72d6 100644 --- a/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem +++ b/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/CA_Disig_Root_R2.pem b/secure/caroot/trusted/CA_Disig_Root_R2.pem index a6db02606c5d..d491fbf86607 100644 --- a/secure/caroot/trusted/CA_Disig_Root_R2.pem +++ b/secure/caroot/trusted/CA_Disig_Root_R2.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/CFCA_EV_ROOT.pem b/secure/caroot/trusted/CFCA_EV_ROOT.pem index 460785cc21e6..a90c1e270ed3 100644 --- a/secure/caroot/trusted/CFCA_EV_ROOT.pem +++ b/secure/caroot/trusted/CFCA_EV_ROOT.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/COMODO_Certification_Authority.pem b/secure/caroot/trusted/COMODO_Certification_Authority.pem index f6c1cb232ac6..5df5ed3dea70 100644 --- a/secure/caroot/trusted/COMODO_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_Certification_Authority.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem b/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem index 322154206039..69057eb4c100 100644 --- a/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem b/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem index 53c540ff2146..91480ca2aaf6 100644 --- a/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Certigna.pem b/secure/caroot/trusted/Certigna.pem index 3a25f25160ea..9e4c22f8a958 100644 --- a/secure/caroot/trusted/Certigna.pem +++ b/secure/caroot/trusted/Certigna.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Certigna_Root_CA.pem b/secure/caroot/trusted/Certigna_Root_CA.pem index 564d3fe8f50d..9e1fe3c45721 100644 --- a/secure/caroot/trusted/Certigna_Root_CA.pem +++ b/secure/caroot/trusted/Certigna_Root_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Certum_EC-384_CA.pem b/secure/caroot/trusted/Certum_EC-384_CA.pem new file mode 100644 index 000000000000..67b5d644f809 --- /dev/null +++ b/secure/caroot/trusted/Certum_EC-384_CA.pem @@ -0,0 +1,68 @@ +## +## Certum EC-384 CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 78:8f:27:5c:81:12:52:20:a5:04:d0:2d:dd:ba:73:f4 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = PL, O = Asseco Data Systems S.A., OU = Certum Certification Authority, CN = Certum EC-384 CA + Validity + Not Before: Mar 26 07:24:54 2018 GMT + Not After : Mar 26 07:24:54 2043 GMT + Subject: C = PL, O = Asseco Data Systems S.A., OU = Certum Certification Authority, CN = Certum EC-384 CA + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:c4:28:8e:ab:18:5b:6a:be:6e:64:37:63:e4:cd: + ec:ab:3a:f7:cc:a1:b8:0e:82:49:d7:86:29:9f:a1: + 94:f2:e3:60:78:98:81:78:06:4d:f2:ec:9a:0e:57: + 60:83:9f:b4:e6:17:2f:1a:b3:5d:02:5b:89:23:3c: + c2:11:05:2a:a7:88:13:18:f3:50:84:d7:bd:34:2c: + 27:89:55:ff:ce:4c:e7:df:a6:1f:28:c4:f0:54:c3: + b9:7c:b7:53:ad:eb:c2 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 8D:06:66:74:24:76:3A:F3:89:F7:BC:D6:BD:47:7D:2F:BC:10:5F:4B + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: ecdsa-with-SHA384 + 30:65:02:30:03:55:2d:a6:e6:18:c4:7c:ef:c9:50:6e:c1:27: + 0f:9c:87:af:6e:d5:1b:08:18:bd:92:29:c1:ef:94:91:78:d2: + 3a:1c:55:89:62:e5:1b:09:1e:ba:64:6b:f1:76:b4:d4:02:31: + 00:b4:42:84:99:ff:ab:e7:9e:fb:91:97:27:5d:dc:b0:5b:30: + 71:ce:5e:38:1a:6a:d9:25:e7:ea:f7:61:92:56:f8:ea:da:36: + c2:87:65:96:2e:72:25:2f:7f:df:c3:13:c9 +SHA1 Fingerprint=F3:3E:78:3C:AC:DF:F4:A2:CC:AC:67:55:69:56:D7:E5:16:3C:E1:ED +-----BEGIN CERTIFICATE----- +MIICZTCCAeugAwIBAgIQeI8nXIESUiClBNAt3bpz9DAKBggqhkjOPQQDAzB0MQsw +CQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScw +JQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxGTAXBgNVBAMT +EENlcnR1bSBFQy0zODQgQ0EwHhcNMTgwMzI2MDcyNDU0WhcNNDMwMzI2MDcyNDU0 +WjB0MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBT +LkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxGTAX +BgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATE +KI6rGFtqvm5kN2PkzeyrOvfMobgOgknXhimfoZTy42B4mIF4Bk3y7JoOV2CDn7Tm +Fy8as10CW4kjPMIRBSqniBMY81CE1700LCeJVf/OTOffph8oxPBUw7l8t1Ot68Kj +QjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI0GZnQkdjrzife81r1HfS+8 +EF9LMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNoADBlAjADVS2m5hjEfO/J +UG7BJw+ch69u1RsIGL2SKcHvlJF40jocVYli5RsJHrpka/F2tNQCMQC0QoSZ/6vn +nvuRlydd3LBbMHHOXjgaatkl5+r3YZJW+OraNsKHZZYuciUvf9/DE8k= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/Certum_Trusted_Network_CA.pem b/secure/caroot/trusted/Certum_Trusted_Network_CA.pem index 5ced43da18d8..ca985e1e254e 100644 --- a/secure/caroot/trusted/Certum_Trusted_Network_CA.pem +++ b/secure/caroot/trusted/Certum_Trusted_Network_CA.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem b/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem index 0493c488801c..18c7e5c86fef 100644 --- a/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem +++ b/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem @@ -5,6 +5,8 @@ ## Authority (CA). It was automatically extracted from Mozilla's ## root CA list (the file `certdata.txt' in security/nss). ## +## It contains a certificate trusted for server authentication. +## ## Extracted from nss ## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ ## diff --git a/secure/caroot/trusted/Certum_Trusted_Root_CA.pem b/secure/caroot/trusted/Certum_Trusted_Root_CA.pem new file mode 100644 index 000000000000..d6034eb6e081 --- /dev/null +++ b/secure/caroot/trusted/Certum_Trusted_Root_CA.pem @@ -0,0 +1,136 @@ +## +## Certum Trusted Root CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 1e:bf:59:50:b8:c9:80:37:4c:06:f7:eb:55:4f:b5:ed + Signature Algorithm: sha512WithRSAEncryption + Issuer: C = PL, O = Asseco Data Systems S.A., OU = Certum Certification Authority, CN = Certum Trusted Root CA + Validity + Not Before: Mar 16 12:10:13 2018 GMT + Not After : Mar 16 12:10:13 2043 GMT + Subject: C = PL, O = Asseco Data Systems S.A., OU = Certum Certification Authority, CN = Certum Trusted Root CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:d1:2d:8e:bb:b7:36:ea:6d:37:91:9f:4e:93:a7: + 05:e4:29:03:25:ce:1c:82:f7:7c:99:9f:41:06:cd: + ed:a3:ba:c0:db:09:2c:c1:7c:df:29:7e:4b:65:2f: + 93:a7:d4:01:6b:03:28:18:a3:d8:9d:05:c1:2a:d8: + 45:f1:91:de:df:3b:d0:80:02:8c:cf:38:0f:ea:a7: + 5c:78:11:a4:c1:c8:85:5c:25:d3:d3:b2:e7:25:cf: + 11:54:97:ab:35:c0:1e:76:1c:ef:00:53:9f:39:dc: + 14:a5:2c:22:25:b3:72:72:fc:8d:b3:e5:3e:08:1e: + 14:2a:37:0b:88:3c:ca:b0:f4:c8:c2:a1:ae:bc:c1: + be:29:67:55:e2:fc:ad:59:5c:fe:bd:57:2c:b0:90: + 8d:c2:ed:37:b6:7c:99:88:b5:d5:03:9a:3d:15:0d: + 3d:3a:a8:a8:45:f0:95:4e:25:59:1d:cd:98:69:bb: + d3:cc:32:c9:8d:ef:81:fe:ad:7d:89:bb:ba:60:13: + ca:65:95:67:a0:f3:19:f6:03:56:d4:6a:d3:27:e2: + a1:ad:83:f0:4a:12:22:77:1c:05:73:e2:19:71:42: + c0:ec:75:46:9a:90:58:e0:6a:8e:2b:a5:46:30:04: + 8e:19:b2:17:e3:be:a9:ba:7f:56:f1:24:03:d7:b2: + 21:28:76:0e:36:30:4c:79:d5:41:9a:9a:a8:b8:35: + ba:0c:3a:f2:44:1b:20:88:f7:c5:25:d7:3d:c6:e3: + 3e:43:dd:87:fe:c4:ea:f5:53:3e:4c:65:ff:3b:4a: + cb:78:5a:6b:17:5f:0d:c7:c3:4f:4e:9a:2a:a2:ed: + 57:4d:22:e2:46:9a:3f:0f:91:34:24:7d:55:e3:8c: + 95:37:d3:1a:f0:09:2b:2c:d2:c9:8d:b4:0d:00:ab: + 67:29:28:d8:01:f5:19:04:b6:1d:be:76:fe:72:5c: + c4:85:ca:d2:80:41:df:05:a8:a3:d5:84:90:4f:0b: + f3:e0:3f:9b:19:d2:37:89:3f:f2:7b:52:1c:8c:f6: + e1:f7:3c:07:97:8c:0e:a2:59:81:0c:b2:90:3d:d3: + e3:59:46:ed:0f:a9:a7:de:80:6b:5a:aa:07:b6:19: + cb:bc:57:f3:97:21:7a:0c:b1:2b:74:3e:eb:da:a7: + 67:2d:4c:c4:98:9e:36:09:76:66:66:fc:1a:3f:ea: + 48:54:1c:be:30:bd:80:50:bf:7c:b5:ce:00:f6:0c: + 61:d9:e7:24:03:e0:e3:01:81:0e:bd:d8:85:34:88: + bd:b2:36:a8:7b:5c:08:e5:44:80:8c:6f:f8:2f:d5: + 21:ca:1d:1c:d0:fb:c4:b5:87:d1:3a:4e:c7:76:b5: + 35:48:b5 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 8C:FB:1C:75:BC:02:D3:9F:4E:2E:48:D9:F9:60:54:AA:C4:B3:4F:FA + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: sha512WithRSAEncryption + 48:a2:d5:00:0b:2e:d0:3f:bc:1c:d5:b5:54:49:1e:5a:6b:f4: + e4:f2:e0:40:37:e0:cc:14:7b:b9:c9:fa:35:b5:75:17:93:6a: + 05:69:85:9c:cd:4f:19:78:5b:19:81:f3:63:3e:c3:ce:5b:8f: + f5:2f:5e:01:76:13:3f:2c:00:b9:cd:96:52:39:49:6d:04:4e: + c5:e9:0f:86:0d:e1:fa:b3:5f:82:12:f1:3a:ce:66:06:24:34: + 2b:e8:cc:ca:e7:69:dc:87:9d:c2:34:d7:79:d1:d3:77:b8:aa: + 59:58:fe:9d:26:fa:38:86:3e:9d:8a:87:64:57:e5:17:3a:e2: + f9:8d:b9:e3:33:78:c1:90:d8:b8:dd:b7:83:51:e4:c4:cc:23: + d5:06:7c:e6:51:d3:cd:34:31:c0:f6:46:bb:0b:ad:fc:3d:10: + 05:2a:3b:4a:91:25:ee:8c:d4:84:87:80:2a:bc:09:8c:aa:3a: + 13:5f:e8:34:79:50:c1:10:19:f9:d3:28:1e:d4:d1:51:30:29: + b3:ae:90:67:d6:1f:0a:63:b1:c5:a9:c6:42:31:63:17:94:ef: + 69:cb:2f:fa:8c:14:7d:c4:43:18:89:d9:f0:32:40:e6:80:e2: + 46:5f:e5:e3:c1:00:59:a8:f9:e8:20:bc:89:2c:0e:47:34:0b: + ea:57:c2:53:36:fc:a7:d4:af:31:cd:fe:02:e5:75:fa:b9:27: + 09:f9:f3:f5:3b:ca:7d:9f:a9:22:cb:88:c9:aa:d1:47:3d:36: + 77:a8:59:64:6b:27:cf:ef:27:c1:e3:24:b5:86:f7:ae:7e:32: + 4d:b0:79:68:d1:39:e8:90:58:c3:83:bc:0f:2c:d6:97:eb:ce: *** 1636 LINES SKIPPED *** From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 07:44:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D28B56ADB96; Sat, 4 Sep 2021 07:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1msR53ZCz3tZM; Sat, 4 Sep 2021 07:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DDEB142C3; Sat, 4 Sep 2021 07:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1847ix7F062370; Sat, 4 Sep 2021 07:44:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1847ix8M062369; Sat, 4 Sep 2021 07:44:59 GMT (envelope-from git) Date: Sat, 4 Sep 2021 07:44:59 GMT Message-Id: <202109040744.1847ix8M062369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 96df822abbab - stable/13 - pxeboot: improve and simplify rx handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 96df822abbaba51cfa5b1039051722f17b3dd3fb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 07:44:59 -0000 The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=96df822abbaba51cfa5b1039051722f17b3dd3fb commit 96df822abbaba51cfa5b1039051722f17b3dd3fb Author: Kyle Evans AuthorDate: 2021-08-12 02:49:17 +0000 Commit: Kyle Evans CommitDate: 2021-09-04 07:44:33 +0000 pxeboot: improve and simplify rx handling This pushes the bulk of the rx servicing into a single loop that's only slightly convoluted, and it addresses a problem with rx handling in the process. If we hit a tx interrupt while we're processing, we'd previously drop the frame on the floor completely and ultimately timeout, increasing boot time on particularly busy hosts as we keep having to backoff and resend. After this patch, we don't seem to hit timeouts at all on zoo anymore though loading a 27M kernel is still relatively slow (~1m20s). Sponsored By: National Bureau of Economic Research Sponsored by: Klara, Inc. (cherry picked from commit 3daa8e165c661c1b45e759f4997f447384c15446) --- stand/i386/libi386/pxe.c | 154 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 106 insertions(+), 48 deletions(-) diff --git a/stand/i386/libi386/pxe.c b/stand/i386/libi386/pxe.c index 217692b515f0..e80a1961e191 100644 --- a/stand/i386/libi386/pxe.c +++ b/stand/i386/libi386/pxe.c @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -432,91 +434,144 @@ pxe_netif_init(struct iodesc *desc, void *machdep_hint) } static int -pxe_netif_receive(void **pkt) +pxe_netif_receive_isr(t_PXENV_UNDI_ISR *isr, void **pkt, ssize_t *retsize) { - t_PXENV_UNDI_ISR *isr; + static bool data_pending; char *buf, *ptr, *frame; size_t size, rsize; - isr = bio_alloc(sizeof(*isr)); - if (isr == NULL) - return (-1); + buf = NULL; + size = rsize = 0; + + /* + * We can save ourselves the next two pxe calls because we already know + * we weren't done grabbing everything. + */ + if (data_pending) { + data_pending = false; + goto nextbuf; + } + /* + * We explicitly don't check for OURS/NOT_OURS as a result of START; + * it's been reported that some cards are known to mishandle these. + */ bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_START; pxe_call(PXENV_UNDI_ISR, isr); + /* We could translate Status... */ if (isr->Status != 0) { - bio_free(isr, sizeof(*isr)); - return (-1); + return (ENXIO); } bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_PROCESS; pxe_call(PXENV_UNDI_ISR, isr); if (isr->Status != 0) { - bio_free(isr, sizeof(*isr)); - return (-1); + return (ENXIO); } - - while (isr->FuncFlag == PXENV_UNDI_ISR_OUT_TRANSMIT) { + if (isr->FuncFlag == PXENV_UNDI_ISR_OUT_BUSY) { /* - * Wait till transmit is done. + * Let the caller decide if we need to be restarted. It will + * currently blindly restart us, but it could check timeout in + * the future. */ - bzero(isr, sizeof(*isr)); - isr->FuncFlag = PXENV_UNDI_ISR_IN_GET_NEXT; - pxe_call(PXENV_UNDI_ISR, isr); - if (isr->Status != 0 || - isr->FuncFlag == PXENV_UNDI_ISR_OUT_DONE) { - bio_free(isr, sizeof(*isr)); - return (-1); - } + return (ERESTART); } - while (isr->FuncFlag != PXENV_UNDI_ISR_OUT_RECEIVE) { - if (isr->Status != 0 || - isr->FuncFlag == PXENV_UNDI_ISR_OUT_DONE) { - bio_free(isr, sizeof(*isr)); - return (-1); + /* + * By design, we'll hardly ever hit this terminal condition unless we + * pick up nothing but tx interrupts here. More frequently, we will + * process rx buffers until we hit the terminal condition in the middle. + */ + while (isr->FuncFlag != PXENV_UNDI_ISR_OUT_DONE) { + /* + * This might have given us PXENV_UNDI_ISR_OUT_TRANSMIT, in + * which case we can just disregard and move on to the next + * buffer/frame. + */ + if (isr->FuncFlag != PXENV_UNDI_ISR_OUT_RECEIVE) + goto nextbuf; + + if (buf == NULL) { + /* + * Grab size from the first Frame that we picked up, + * allocate an rx buf to hold. Careful here, as we may + * see a fragmented frame that's spread out across + * multiple GET_NEXT calls. + */ + size = isr->FrameLength; + buf = malloc(size + ETHER_ALIGN); + if (buf == NULL) + return (ENOMEM); + + ptr = buf + ETHER_ALIGN; } - bzero(isr, sizeof(*isr)); - isr->FuncFlag = PXENV_UNDI_ISR_IN_GET_NEXT; - pxe_call(PXENV_UNDI_ISR, isr); - } - - size = isr->FrameLength; - buf = malloc(size + ETHER_ALIGN); - if (buf == NULL) { - bio_free(isr, sizeof(*isr)); - return (-1); - } - ptr = buf + ETHER_ALIGN; - rsize = 0; - while (rsize < size) { frame = (char *)((uintptr_t)isr->Frame.segment << 4); frame += isr->Frame.offset; bcopy(PTOV(frame), ptr, isr->BufferLength); ptr += isr->BufferLength; rsize += isr->BufferLength; + /* + * Stop here before we risk catching the start of another frame. + * It would be nice to continue reading until we actually get a + * PXENV_UNDI_ISR_OUT_DONE, but our network stack in libsa isn't + * suitable for reading more than one packet at a time. + */ + if (rsize >= size) { + data_pending = true; + break; + } + +nextbuf: bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_GET_NEXT; pxe_call(PXENV_UNDI_ISR, isr); if (isr->Status != 0) { - bio_free(isr, sizeof(*isr)); free(buf); - return (-1); + return (ENXIO); } + } - /* Did we got another update? */ - if (isr->FuncFlag == PXENV_UNDI_ISR_OUT_RECEIVE) - continue; - break; + /* + * We may have never picked up a frame at all (all tx), in which case + * the caller should restart us. + */ + if (rsize == 0) { + return (ERESTART); } *pkt = buf; + *retsize = rsize; + return (0); +} + +static int +pxe_netif_receive(void **pkt, ssize_t *size) +{ + t_PXENV_UNDI_ISR *isr; + int ret; + + isr = bio_alloc(sizeof(*isr)); + if (isr == NULL) + return (ENOMEM); + + /* + * This completely ignores the timeout specified in pxe_netif_get(), but + * we shouldn't be running long enough here for that to make a + * difference. + */ + for (;;) { + /* We'll only really re-enter for PXENV_UNDI_ISR_OUT_BUSY. */ + ret = pxe_netif_receive_isr(isr, pkt, size); + if (ret != ERESTART) + break; + } + bio_free(isr, sizeof(*isr)); - return (rsize); + return (ret); } static ssize_t @@ -525,16 +580,19 @@ pxe_netif_get(struct iodesc *desc, void **pkt, time_t timeout) time_t t; void *ptr; int ret = -1; + ssize_t size; t = getsecs(); + size = 0; while ((getsecs() - t) < timeout) { - ret = pxe_netif_receive(&ptr); + ret = pxe_netif_receive(&ptr, &size); if (ret != -1) { *pkt = ptr; break; } } - return (ret); + + return (ret == 0 ? size : -1); } static ssize_t From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 07:45:13 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 206456ADD0B; Sat, 4 Sep 2021 07:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1msj0L65z3ttJ; Sat, 4 Sep 2021 07:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E09541439F; Sat, 4 Sep 2021 07:45:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1847jCoN062503; Sat, 4 Sep 2021 07:45:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1847jC69062502; Sat, 4 Sep 2021 07:45:12 GMT (envelope-from git) Date: Sat, 4 Sep 2021 07:45:12 GMT Message-Id: <202109040745.1847jC69062502@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: f5da4b012fea - stable/12 - pxeboot: improve and simplify rx handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f5da4b012fea3eedd90d6e2b2e5f51e58a1b636d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 07:45:13 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f5da4b012fea3eedd90d6e2b2e5f51e58a1b636d commit f5da4b012fea3eedd90d6e2b2e5f51e58a1b636d Author: Kyle Evans AuthorDate: 2021-08-12 02:49:17 +0000 Commit: Kyle Evans CommitDate: 2021-09-04 07:44:44 +0000 pxeboot: improve and simplify rx handling This pushes the bulk of the rx servicing into a single loop that's only slightly convoluted, and it addresses a problem with rx handling in the process. If we hit a tx interrupt while we're processing, we'd previously drop the frame on the floor completely and ultimately timeout, increasing boot time on particularly busy hosts as we keep having to backoff and resend. After this patch, we don't seem to hit timeouts at all on zoo anymore though loading a 27M kernel is still relatively slow (~1m20s). Sponsored By: National Bureau of Economic Research Sponsored by: Klara, Inc. (cherry picked from commit 3daa8e165c661c1b45e759f4997f447384c15446) --- stand/i386/libi386/pxe.c | 154 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 106 insertions(+), 48 deletions(-) diff --git a/stand/i386/libi386/pxe.c b/stand/i386/libi386/pxe.c index 217692b515f0..e80a1961e191 100644 --- a/stand/i386/libi386/pxe.c +++ b/stand/i386/libi386/pxe.c @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -432,91 +434,144 @@ pxe_netif_init(struct iodesc *desc, void *machdep_hint) } static int -pxe_netif_receive(void **pkt) +pxe_netif_receive_isr(t_PXENV_UNDI_ISR *isr, void **pkt, ssize_t *retsize) { - t_PXENV_UNDI_ISR *isr; + static bool data_pending; char *buf, *ptr, *frame; size_t size, rsize; - isr = bio_alloc(sizeof(*isr)); - if (isr == NULL) - return (-1); + buf = NULL; + size = rsize = 0; + + /* + * We can save ourselves the next two pxe calls because we already know + * we weren't done grabbing everything. + */ + if (data_pending) { + data_pending = false; + goto nextbuf; + } + /* + * We explicitly don't check for OURS/NOT_OURS as a result of START; + * it's been reported that some cards are known to mishandle these. + */ bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_START; pxe_call(PXENV_UNDI_ISR, isr); + /* We could translate Status... */ if (isr->Status != 0) { - bio_free(isr, sizeof(*isr)); - return (-1); + return (ENXIO); } bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_PROCESS; pxe_call(PXENV_UNDI_ISR, isr); if (isr->Status != 0) { - bio_free(isr, sizeof(*isr)); - return (-1); + return (ENXIO); } - - while (isr->FuncFlag == PXENV_UNDI_ISR_OUT_TRANSMIT) { + if (isr->FuncFlag == PXENV_UNDI_ISR_OUT_BUSY) { /* - * Wait till transmit is done. + * Let the caller decide if we need to be restarted. It will + * currently blindly restart us, but it could check timeout in + * the future. */ - bzero(isr, sizeof(*isr)); - isr->FuncFlag = PXENV_UNDI_ISR_IN_GET_NEXT; - pxe_call(PXENV_UNDI_ISR, isr); - if (isr->Status != 0 || - isr->FuncFlag == PXENV_UNDI_ISR_OUT_DONE) { - bio_free(isr, sizeof(*isr)); - return (-1); - } + return (ERESTART); } - while (isr->FuncFlag != PXENV_UNDI_ISR_OUT_RECEIVE) { - if (isr->Status != 0 || - isr->FuncFlag == PXENV_UNDI_ISR_OUT_DONE) { - bio_free(isr, sizeof(*isr)); - return (-1); + /* + * By design, we'll hardly ever hit this terminal condition unless we + * pick up nothing but tx interrupts here. More frequently, we will + * process rx buffers until we hit the terminal condition in the middle. + */ + while (isr->FuncFlag != PXENV_UNDI_ISR_OUT_DONE) { + /* + * This might have given us PXENV_UNDI_ISR_OUT_TRANSMIT, in + * which case we can just disregard and move on to the next + * buffer/frame. + */ + if (isr->FuncFlag != PXENV_UNDI_ISR_OUT_RECEIVE) + goto nextbuf; + + if (buf == NULL) { + /* + * Grab size from the first Frame that we picked up, + * allocate an rx buf to hold. Careful here, as we may + * see a fragmented frame that's spread out across + * multiple GET_NEXT calls. + */ + size = isr->FrameLength; + buf = malloc(size + ETHER_ALIGN); + if (buf == NULL) + return (ENOMEM); + + ptr = buf + ETHER_ALIGN; } - bzero(isr, sizeof(*isr)); - isr->FuncFlag = PXENV_UNDI_ISR_IN_GET_NEXT; - pxe_call(PXENV_UNDI_ISR, isr); - } - - size = isr->FrameLength; - buf = malloc(size + ETHER_ALIGN); - if (buf == NULL) { - bio_free(isr, sizeof(*isr)); - return (-1); - } - ptr = buf + ETHER_ALIGN; - rsize = 0; - while (rsize < size) { frame = (char *)((uintptr_t)isr->Frame.segment << 4); frame += isr->Frame.offset; bcopy(PTOV(frame), ptr, isr->BufferLength); ptr += isr->BufferLength; rsize += isr->BufferLength; + /* + * Stop here before we risk catching the start of another frame. + * It would be nice to continue reading until we actually get a + * PXENV_UNDI_ISR_OUT_DONE, but our network stack in libsa isn't + * suitable for reading more than one packet at a time. + */ + if (rsize >= size) { + data_pending = true; + break; + } + +nextbuf: bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_GET_NEXT; pxe_call(PXENV_UNDI_ISR, isr); if (isr->Status != 0) { - bio_free(isr, sizeof(*isr)); free(buf); - return (-1); + return (ENXIO); } + } - /* Did we got another update? */ - if (isr->FuncFlag == PXENV_UNDI_ISR_OUT_RECEIVE) - continue; - break; + /* + * We may have never picked up a frame at all (all tx), in which case + * the caller should restart us. + */ + if (rsize == 0) { + return (ERESTART); } *pkt = buf; + *retsize = rsize; + return (0); +} + +static int +pxe_netif_receive(void **pkt, ssize_t *size) +{ + t_PXENV_UNDI_ISR *isr; + int ret; + + isr = bio_alloc(sizeof(*isr)); + if (isr == NULL) + return (ENOMEM); + + /* + * This completely ignores the timeout specified in pxe_netif_get(), but + * we shouldn't be running long enough here for that to make a + * difference. + */ + for (;;) { + /* We'll only really re-enter for PXENV_UNDI_ISR_OUT_BUSY. */ + ret = pxe_netif_receive_isr(isr, pkt, size); + if (ret != ERESTART) + break; + } + bio_free(isr, sizeof(*isr)); - return (rsize); + return (ret); } static ssize_t @@ -525,16 +580,19 @@ pxe_netif_get(struct iodesc *desc, void **pkt, time_t timeout) time_t t; void *ptr; int ret = -1; + ssize_t size; t = getsecs(); + size = 0; while ((getsecs() - t) < timeout) { - ret = pxe_netif_receive(&ptr); + ret = pxe_netif_receive(&ptr, &size); if (ret != -1) { *pkt = ptr; break; } } - return (ret); + + return (ret == 0 ? size : -1); } static ssize_t From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 07:45:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46BBB6ADB63; Sat, 4 Sep 2021 07:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1mtX3jzBz3tcs; Sat, 4 Sep 2021 07:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 594EB141AF; Sat, 4 Sep 2021 07:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1847ju7N062667; Sat, 4 Sep 2021 07:45:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1847juhe062666; Sat, 4 Sep 2021 07:45:56 GMT (envelope-from git) Date: Sat, 4 Sep 2021 07:45:56 GMT Message-Id: <202109040745.1847juhe062666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: c0674b71720b - stable/11 - pxeboot: improve and simplify rx handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: c0674b71720bb333cbc2da823e2f67412dc00e78 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 07:45:57 -0000 The branch stable/11 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c0674b71720bb333cbc2da823e2f67412dc00e78 commit c0674b71720bb333cbc2da823e2f67412dc00e78 Author: Kyle Evans AuthorDate: 2021-08-12 02:49:17 +0000 Commit: Kyle Evans CommitDate: 2021-09-04 07:45:19 +0000 pxeboot: improve and simplify rx handling This pushes the bulk of the rx servicing into a single loop that's only slightly convoluted, and it addresses a problem with rx handling in the process. If we hit a tx interrupt while we're processing, we'd previously drop the frame on the floor completely and ultimately timeout, increasing boot time on particularly busy hosts as we keep having to backoff and resend. After this patch, we don't seem to hit timeouts at all on zoo anymore though loading a 27M kernel is still relatively slow (~1m20s). Sponsored By: National Bureau of Economic Research Sponsored by: Klara, Inc. (cherry picked from commit 3daa8e165c661c1b45e759f4997f447384c15446) --- stand/i386/libi386/pxe.c | 154 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 106 insertions(+), 48 deletions(-) diff --git a/stand/i386/libi386/pxe.c b/stand/i386/libi386/pxe.c index 217692b515f0..e80a1961e191 100644 --- a/stand/i386/libi386/pxe.c +++ b/stand/i386/libi386/pxe.c @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -432,91 +434,144 @@ pxe_netif_init(struct iodesc *desc, void *machdep_hint) } static int -pxe_netif_receive(void **pkt) +pxe_netif_receive_isr(t_PXENV_UNDI_ISR *isr, void **pkt, ssize_t *retsize) { - t_PXENV_UNDI_ISR *isr; + static bool data_pending; char *buf, *ptr, *frame; size_t size, rsize; - isr = bio_alloc(sizeof(*isr)); - if (isr == NULL) - return (-1); + buf = NULL; + size = rsize = 0; + + /* + * We can save ourselves the next two pxe calls because we already know + * we weren't done grabbing everything. + */ + if (data_pending) { + data_pending = false; + goto nextbuf; + } + /* + * We explicitly don't check for OURS/NOT_OURS as a result of START; + * it's been reported that some cards are known to mishandle these. + */ bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_START; pxe_call(PXENV_UNDI_ISR, isr); + /* We could translate Status... */ if (isr->Status != 0) { - bio_free(isr, sizeof(*isr)); - return (-1); + return (ENXIO); } bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_PROCESS; pxe_call(PXENV_UNDI_ISR, isr); if (isr->Status != 0) { - bio_free(isr, sizeof(*isr)); - return (-1); + return (ENXIO); } - - while (isr->FuncFlag == PXENV_UNDI_ISR_OUT_TRANSMIT) { + if (isr->FuncFlag == PXENV_UNDI_ISR_OUT_BUSY) { /* - * Wait till transmit is done. + * Let the caller decide if we need to be restarted. It will + * currently blindly restart us, but it could check timeout in + * the future. */ - bzero(isr, sizeof(*isr)); - isr->FuncFlag = PXENV_UNDI_ISR_IN_GET_NEXT; - pxe_call(PXENV_UNDI_ISR, isr); - if (isr->Status != 0 || - isr->FuncFlag == PXENV_UNDI_ISR_OUT_DONE) { - bio_free(isr, sizeof(*isr)); - return (-1); - } + return (ERESTART); } - while (isr->FuncFlag != PXENV_UNDI_ISR_OUT_RECEIVE) { - if (isr->Status != 0 || - isr->FuncFlag == PXENV_UNDI_ISR_OUT_DONE) { - bio_free(isr, sizeof(*isr)); - return (-1); + /* + * By design, we'll hardly ever hit this terminal condition unless we + * pick up nothing but tx interrupts here. More frequently, we will + * process rx buffers until we hit the terminal condition in the middle. + */ + while (isr->FuncFlag != PXENV_UNDI_ISR_OUT_DONE) { + /* + * This might have given us PXENV_UNDI_ISR_OUT_TRANSMIT, in + * which case we can just disregard and move on to the next + * buffer/frame. + */ + if (isr->FuncFlag != PXENV_UNDI_ISR_OUT_RECEIVE) + goto nextbuf; + + if (buf == NULL) { + /* + * Grab size from the first Frame that we picked up, + * allocate an rx buf to hold. Careful here, as we may + * see a fragmented frame that's spread out across + * multiple GET_NEXT calls. + */ + size = isr->FrameLength; + buf = malloc(size + ETHER_ALIGN); + if (buf == NULL) + return (ENOMEM); + + ptr = buf + ETHER_ALIGN; } - bzero(isr, sizeof(*isr)); - isr->FuncFlag = PXENV_UNDI_ISR_IN_GET_NEXT; - pxe_call(PXENV_UNDI_ISR, isr); - } - - size = isr->FrameLength; - buf = malloc(size + ETHER_ALIGN); - if (buf == NULL) { - bio_free(isr, sizeof(*isr)); - return (-1); - } - ptr = buf + ETHER_ALIGN; - rsize = 0; - while (rsize < size) { frame = (char *)((uintptr_t)isr->Frame.segment << 4); frame += isr->Frame.offset; bcopy(PTOV(frame), ptr, isr->BufferLength); ptr += isr->BufferLength; rsize += isr->BufferLength; + /* + * Stop here before we risk catching the start of another frame. + * It would be nice to continue reading until we actually get a + * PXENV_UNDI_ISR_OUT_DONE, but our network stack in libsa isn't + * suitable for reading more than one packet at a time. + */ + if (rsize >= size) { + data_pending = true; + break; + } + +nextbuf: bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_GET_NEXT; pxe_call(PXENV_UNDI_ISR, isr); if (isr->Status != 0) { - bio_free(isr, sizeof(*isr)); free(buf); - return (-1); + return (ENXIO); } + } - /* Did we got another update? */ - if (isr->FuncFlag == PXENV_UNDI_ISR_OUT_RECEIVE) - continue; - break; + /* + * We may have never picked up a frame at all (all tx), in which case + * the caller should restart us. + */ + if (rsize == 0) { + return (ERESTART); } *pkt = buf; + *retsize = rsize; + return (0); +} + +static int +pxe_netif_receive(void **pkt, ssize_t *size) +{ + t_PXENV_UNDI_ISR *isr; + int ret; + + isr = bio_alloc(sizeof(*isr)); + if (isr == NULL) + return (ENOMEM); + + /* + * This completely ignores the timeout specified in pxe_netif_get(), but + * we shouldn't be running long enough here for that to make a + * difference. + */ + for (;;) { + /* We'll only really re-enter for PXENV_UNDI_ISR_OUT_BUSY. */ + ret = pxe_netif_receive_isr(isr, pkt, size); + if (ret != ERESTART) + break; + } + bio_free(isr, sizeof(*isr)); - return (rsize); + return (ret); } static ssize_t @@ -525,16 +580,19 @@ pxe_netif_get(struct iodesc *desc, void **pkt, time_t timeout) time_t t; void *ptr; int ret = -1; + ssize_t size; t = getsecs(); + size = 0; while ((getsecs() - t) < timeout) { - ret = pxe_netif_receive(&ptr); + ret = pxe_netif_receive(&ptr, &size); if (ret != -1) { *pkt = ptr; break; } } - return (ret); + + return (ret == 0 ? size : -1); } static ssize_t From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 12:26:17 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16BFB6619D0; Sat, 4 Sep 2021 12:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1v61058Nz3w8x; Sat, 4 Sep 2021 12:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3EF617C6D; Sat, 4 Sep 2021 12:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 184CQGCP039443; Sat, 4 Sep 2021 12:26:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184CQGja039440; Sat, 4 Sep 2021 12:26:16 GMT (envelope-from git) Date: Sat, 4 Sep 2021 12:26:16 GMT Message-Id: <202109041226.184CQGja039440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 119806a6b766 - stable/13 - pf tests: altq:codel_bridge requires if_bridge MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 119806a6b766a681a62462ddc3af3789484bde90 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 12:26:17 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=119806a6b766a681a62462ddc3af3789484bde90 commit 119806a6b766a681a62462ddc3af3789484bde90 Author: Kristof Provost AuthorDate: 2021-09-01 14:09:14 +0000 Commit: Kristof Provost CommitDate: 2021-09-04 12:25:49 +0000 pf tests: altq:codel_bridge requires if_bridge Check that the bridge module is loaded before running this test. It likely will be (as a result of running the bridge tests), but if it's not we'll get spurious failures. MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit d491b42535db50693eac5946557f7527f9903b4b) --- tests/sys/netpfil/pf/altq.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 2b5b1828595f..0ced82a3a942 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -156,6 +156,9 @@ codel_bridge_body() { altq_init is_altq_supported codel + if ! kldstat -q -m if_bridge; then + atf_skip "This test requires if_bridge" + fi epair=$(vnet_mkepair) ifconfig ${epair}a 192.0.2.1/24 up From owner-dev-commits-src-branches@freebsd.org Sat Sep 4 12:28:17 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 73D86661F5F; Sat, 4 Sep 2021 12:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1v8K2dKpz3wTv; Sat, 4 Sep 2021 12:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2509B17E02; Sat, 4 Sep 2021 12:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 184CSHn0039753; Sat, 4 Sep 2021 12:28:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184CSHOB039752; Sat, 4 Sep 2021 12:28:17 GMT (envelope-from git) Date: Sat, 4 Sep 2021 12:28:17 GMT Message-Id: <202109041228.184CSHOB039752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 910a898f1722 - stable/12 - pf tests: altq:codel_bridge requires if_bridge MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 910a898f172284a9a646919f63efca2e45ae5146 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 12:28:17 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=910a898f172284a9a646919f63efca2e45ae5146 commit 910a898f172284a9a646919f63efca2e45ae5146 Author: Kristof Provost AuthorDate: 2021-09-01 14:09:14 +0000 Commit: Kristof Provost CommitDate: 2021-09-04 12:26:15 +0000 pf tests: altq:codel_bridge requires if_bridge Check that the bridge module is loaded before running this test. It likely will be (as a result of running the bridge tests), but if it's not we'll get spurious failures. MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit d491b42535db50693eac5946557f7527f9903b4b) --- tests/sys/netpfil/pf/altq.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 2b5b1828595f..0ced82a3a942 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -156,6 +156,9 @@ codel_bridge_body() { altq_init is_altq_supported codel + if ! kldstat -q -m if_bridge; then + atf_skip "This test requires if_bridge" + fi epair=$(vnet_mkepair) ifconfig ${epair}a 192.0.2.1/24 up From owner-dev-commits-src-branches@freebsd.org Sun Sep 5 15:24:20 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 72CE667CAE9; Sun, 5 Sep 2021 15:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H2b102XFhz3Gfc; Sun, 5 Sep 2021 15:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37A835A70; Sun, 5 Sep 2021 15:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 185FOKOh000949; Sun, 5 Sep 2021 15:24:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 185FOKnX000948; Sun, 5 Sep 2021 15:24:20 GMT (envelope-from git) Date: Sun, 5 Sep 2021 15:24:20 GMT Message-Id: <202109051524.185FOKnX000948@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 4631803334b3 - stable/13 - wpa: Correctly build the hostapd BSD driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4631803334b3721338291194acb478832d9ee323 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2021 15:24:20 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=4631803334b3721338291194acb478832d9ee323 commit 4631803334b3721338291194acb478832d9ee323 Author: Cy Schubert AuthorDate: 2021-08-26 22:59:03 +0000 Commit: Cy Schubert CommitDate: 2021-09-04 14:22:39 +0000 wpa: Correctly build the hostapd BSD driver driver.bsd.c initializes itself differently when built for hostapd than it does when built for wpa_supplicant. (cherry picked from commit a0f2aa9318a21f401a0aef2cde666edc56a92b46) --- usr.sbin/wpa/hostapd/Makefile | 4 +++- usr.sbin/wpa/src/drivers/Makefile | 1 - usr.sbin/wpa/wpa_supplicant/Makefile | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/wpa/hostapd/Makefile b/usr.sbin/wpa/hostapd/Makefile index c7775c960ddd..1ae4481a863e 100644 --- a/usr.sbin/wpa/hostapd/Makefile +++ b/usr.sbin/wpa/hostapd/Makefile @@ -5,12 +5,14 @@ .include "../Makefile.crypto" -.PATH.c:${HOSTAPD_DISTDIR} +.PATH.c:${HOSTAPD_DISTDIR} \ + ${WPA_DISTDIR}/src/drivers PACKAGE= hostapd PROG= hostapd SRCS= config_file.c \ ctrl_iface.c \ + driver_bsd.c \ eap_register.c \ main.c diff --git a/usr.sbin/wpa/src/drivers/Makefile b/usr.sbin/wpa/src/drivers/Makefile index 0f901bdcf2fd..a984a9c1807a 100644 --- a/usr.sbin/wpa/src/drivers/Makefile +++ b/usr.sbin/wpa/src/drivers/Makefile @@ -10,7 +10,6 @@ INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/drivers SRCS= drivers.c \ - driver_bsd.c \ driver_common.c \ driver_wired.c \ driver_wired_common.c diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index 9b31bea2a63c..27bf83d29f7e 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -18,6 +18,7 @@ SRCS= blacklist.c \ config_file.c \ ctrl_iface.c \ ctrl_iface_unix.c \ + driver_bsd.c \ eap_register.c \ events.c \ gas_query.c \ From owner-dev-commits-src-branches@freebsd.org Sun Sep 5 15:24:21 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD9D667D184; Sun, 5 Sep 2021 15:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H2b1135PTz3GZP; Sun, 5 Sep 2021 15:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 459CE5D8B; Sun, 5 Sep 2021 15:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 185FOLXY000973; Sun, 5 Sep 2021 15:24:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 185FOLcm000972; Sun, 5 Sep 2021 15:24:21 GMT (envelope-from git) Date: Sun, 5 Sep 2021 15:24:21 GMT Message-Id: <202109051524.185FOLcm000972@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 4ca38a4c3659 - stable/13 - wpa: Include all wpa include file search directories MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4ca38a4c3659c65ba491423a94cb79eae5f60bf8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2021 15:24:22 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=4ca38a4c3659c65ba491423a94cb79eae5f60bf8 commit 4ca38a4c3659c65ba491423a94cb79eae5f60bf8 Author: Cy Schubert AuthorDate: 2021-08-26 23:17:11 +0000 Commit: Cy Schubert CommitDate: 2021-09-04 14:23:02 +0000 wpa: Include all wpa include file search directories Though not all include file search directories are presently needed, add them to the search list. This is required for the next update to wpa. No functional change intended. (cherry picked from commit 81b521d2c0edaab4581546af18298310e6318b5d) --- usr.sbin/wpa/Makefile.inc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index 87a1d6c23bbc..ef94c7b312a9 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -15,10 +15,19 @@ HOSTAPD_DISTDIR?= ${WPA_DISTDIR}/hostapd CFLAGS+=-I${.CURDIR} CFLAGS+=-I${HOSTAPD_DISTDIR} CFLAGS+=-I${WPA_DISTDIR}/src +CFLAGS+=-I${WPA_DISTDIR}/src/ap CFLAGS+=-I${WPA_DISTDIR}/src/common CFLAGS+=-I${WPA_DISTDIR}/src/crypto CFLAGS+=-I${WPA_DISTDIR}/src/drivers +CFLAGS+=-I${WPA_DISTDIR}/src/eap_common +CFLAGS+=-I${WPA_DISTDIR}/src/eap_peer +CFLAGS+=-I${WPA_DISTDIR}/src/eap_server +CFLAGS+=-I${WPA_DISTDIR}/src/eapol_auth +CFLAGS+=-I${WPA_DISTDIR}/src/eapol_supp CFLAGS+=-I${WPA_DISTDIR}/src/l2_packet +CFLAGS+=-I${WPA_DISTDIR}/src/radius +CFLAGS+=-I${WPA_DISTDIR}/src/rsn_supp +CFLAGS+=-I${WPA_DISTDIR}/src/tls CFLAGS+=-I${WPA_DISTDIR}/src/utils CFLAGS+=-I${WPA_DISTDIR}/src/wps @@ -95,5 +104,3 @@ NEED_FIPS186_2_PRF=y CFLAGS+=-DEAP_GPSK_SHA256 NEED_AES_OMAC1=y .endif - -.include From owner-dev-commits-src-branches@freebsd.org Sun Sep 5 15:24:22 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BADA767CEB2; Sun, 5 Sep 2021 15:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H2b124G4Tz3GTg; Sun, 5 Sep 2021 15:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F80A56CF; Sun, 5 Sep 2021 15:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 185FOMIU000997; Sun, 5 Sep 2021 15:24:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 185FOMe5000996; Sun, 5 Sep 2021 15:24:22 GMT (envelope-from git) Date: Sun, 5 Sep 2021 15:24:22 GMT Message-Id: <202109051524.185FOMe5000996@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: e3928ece86ca - stable/13 - wpa: Enclose FreeBSD specific defines MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e3928ece86ca9cae6734278d4e40673b21fed417 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2021 15:24:22 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=e3928ece86ca9cae6734278d4e40673b21fed417 commit e3928ece86ca9cae6734278d4e40673b21fed417 Author: Cy Schubert AuthorDate: 2021-08-26 23:28:40 +0000 Commit: Cy Schubert CommitDate: 2021-09-04 14:24:31 +0000 wpa: Enclose FreeBSD specific defines FreeBSD only defines are specific only to FreeBSD. Document them as such. It is our intention to push this change to w1.fi. (cherry picked from commit 213ceba977def36470df3abfe1fac47f689130c1) --- contrib/wpa/src/common/dhcp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/wpa/src/common/dhcp.h b/contrib/wpa/src/common/dhcp.h index d28445e7cbd7..ff52483b12eb 100644 --- a/contrib/wpa/src/common/dhcp.h +++ b/contrib/wpa/src/common/dhcp.h @@ -9,6 +9,7 @@ #ifndef DHCP_H #define DHCP_H +#if defined(__FreeBSD__) /* * Translate Linux to FreeBSD */ @@ -24,6 +25,7 @@ #define check ip_sum #define saddr ip_src #define daddr ip_dst +#endif #include #if __FAVOR_BSD From owner-dev-commits-src-branches@freebsd.org Sun Sep 5 17:26:22 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3964E67EB25; Sun, 5 Sep 2021 17:26:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H2djn69Q7z4lQ5; Sun, 5 Sep 2021 17:26:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99DF5771E; Sun, 5 Sep 2021 17:26:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 185HQLnt059858; Sun, 5 Sep 2021 17:26:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 185HQL4Y059857; Sun, 5 Sep 2021 17:26:21 GMT (envelope-from git) Date: Sun, 5 Sep 2021 17:26:21 GMT Message-Id: <202109051726.185HQL4Y059857@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 31a804c26232 - stable/13 - connect: Use soconnectat() unconditionally in kern_connect() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 31a804c262329c19af822992c186147c99061e1f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2021 17:26:22 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=31a804c262329c19af822992c186147c99061e1f commit 31a804c262329c19af822992c186147c99061e1f Author: Mark Johnston AuthorDate: 2021-08-27 12:32:07 +0000 Commit: Mark Johnston CommitDate: 2021-09-05 17:26:08 +0000 connect: Use soconnectat() unconditionally in kern_connect() soconnect(...) is equivalent to soconnectat(AT_FDCWD, ...), so rely on this to save a branch. No functional change intended. Sponsored by: The FreeBSD Foundation (cherry picked from commit 091869def9eeb9796c3627ea95bf6cc46cf952a0) --- sys/kern/uipc_syscalls.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 18505b54d603..3208dc0491dd 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -511,10 +511,7 @@ kern_connectat(struct thread *td, int dirfd, int fd, struct sockaddr *sa) if (error != 0) goto bad; #endif - if (dirfd == AT_FDCWD) - error = soconnect(so, sa, td); - else - error = soconnectat(dirfd, so, sa, td); + error = soconnectat(dirfd, so, sa, td); if (error != 0) goto bad; if ((so->so_state & SS_NBIO) && (so->so_state & SS_ISCONNECTING)) { From owner-dev-commits-src-branches@freebsd.org Sun Sep 5 22:33:29 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0414D662E37; Sun, 5 Sep 2021 22:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H2mX86VT1z3rfM; Sun, 5 Sep 2021 22:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C098213630; Sun, 5 Sep 2021 22:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 185MXSJ2072471; Sun, 5 Sep 2021 22:33:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 185MXSSI072470; Sun, 5 Sep 2021 22:33:28 GMT (envelope-from git) Date: Sun, 5 Sep 2021 22:33:28 GMT Message-Id: <202109052233.185MXSSI072470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "George V. Neville-Neil" Subject: git: c850ca3a1716 - stable/13 - Retore the vnet before returning an error. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c850ca3a1716424a757e6064180fcae4703de37f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2021 22:33:29 -0000 The branch stable/13 has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=c850ca3a1716424a757e6064180fcae4703de37f commit c850ca3a1716424a757e6064180fcae4703de37f Author: George V. Neville-Neil AuthorDate: 2021-06-21 14:46:20 +0000 Commit: George V. Neville-Neil CommitDate: 2021-09-05 22:25:44 +0000 Retore the vnet before returning an error. Obtained from: Kanndula, Dheeraj (cherry picked from commit c6b2d024d7eedbf32f52a17bc029c92f5a4d1a54) --- sys/net/if_vlan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 3114a3f8b76c..10a254d22440 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -613,6 +613,7 @@ vlan_setmulti(struct ifnet *ifp) mc = malloc(sizeof(struct vlan_mc_entry), M_VLAN, M_NOWAIT); if (mc == NULL) { IF_ADDR_WUNLOCK(ifp); + CURVNET_RESTORE(); return (ENOMEM); } bcopy(ifma->ifma_addr, &mc->mc_addr, ifma->ifma_addr->sa_len); @@ -623,8 +624,10 @@ vlan_setmulti(struct ifnet *ifp) CK_SLIST_FOREACH (mc, &sc->vlan_mc_listhead, mc_entries) { error = if_addmulti(ifp_p, (struct sockaddr *)&mc->mc_addr, NULL); - if (error) + if (error) { + CURVNET_RESTORE(); return (error); + } } CURVNET_RESTORE();