From owner-dev-commits-src-all@freebsd.org Mon Aug 30 05:45:28 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 05:46:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 07:32:05 2021 Return-Path: Delivered-To: dev-commits-src-all@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 46EC9672144; Mon, 30 Aug 2021 07:32: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 4Gyhps1RRPz4cpq; Mon, 30 Aug 2021 07:32: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 1A7D61A05C; Mon, 30 Aug 2021 07:32: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 17U7W5TP019618; Mon, 30 Aug 2021 07:32:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17U7W5ow019617; Mon, 30 Aug 2021 07:32:05 GMT (envelope-from git) Date: Mon, 30 Aug 2021 07:32:05 GMT Message-Id: <202108300732.17U7W5ow019617@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: e76c0e4f4563 - main - 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/main X-Git-Reftype: branch X-Git-Commit: e76c0e4f4563029375dac90f1e1b3c6e82e157f9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 07:32:05 -0000 The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=e76c0e4f4563029375dac90f1e1b3c6e82e157f9 commit e76c0e4f4563029375dac90f1e1b3c6e82e157f9 Author: Elliott Mitchell AuthorDate: 2021-08-30 07:26:45 +0000 Commit: Ka Ho Ng CommitDate: 2021-08-30 07:31:04 +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. MFC after: 3 days --- 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 fa316fa285db..034c9409cea3 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -1825,7 +1825,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-all@freebsd.org Mon Aug 30 09:18:15 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 09:18:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 12:15:12 2021 Return-Path: Delivered-To: dev-commits-src-all@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 278486752E9; Mon, 30 Aug 2021 12:15: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 4Gyq5X0V8pz3Q9C; Mon, 30 Aug 2021 12:15: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 E7D651DB38; Mon, 30 Aug 2021 12:15: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 17UCFBq4095409; Mon, 30 Aug 2021 12:15:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UCFBfD095408; Mon, 30 Aug 2021 12:15:11 GMT (envelope-from git) Date: Mon, 30 Aug 2021 12:15:11 GMT Message-Id: <202108301215.17UCFBfD095408@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: a9472032211d - main - Revert "Disable the accelerated arm64 sha25 in static libraries" 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/main X-Git-Reftype: branch X-Git-Commit: a9472032211ddb06cd7d73b941c335b16550b558 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 12:15:12 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a9472032211ddb06cd7d73b941c335b16550b558 commit a9472032211ddb06cd7d73b941c335b16550b558 Author: Andrew Turner AuthorDate: 2021-08-30 09:34:30 +0000 Commit: Andrew Turner CommitDate: 2021-08-30 09:36:43 +0000 Revert "Disable the accelerated arm64 sha25 in static libraries" This is now unneeded as arm64 can now resolve ifuncs in static binaries This reverts commit c81ea895b563c4d1e39468a8525284b7474fe850. Sponsored by: The FreeBSD Foundation --- lib/libmd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libmd/Makefile b/lib/libmd/Makefile index ee92b7cb71ab..480796ae5029 100644 --- a/lib/libmd/Makefile +++ b/lib/libmd/Makefile @@ -131,7 +131,7 @@ ACFLAGS+= -DELF -Wa,--noexecstack .endif .if ${MACHINE_CPUARCH} == "aarch64" SRCS+= sha256c_arm64.c -SHARED_CFLAGS+= -DARM64_SHA2 +CFLAGS+= -DARM64_SHA2 CFLAGS.sha256c_arm64.c+= -march=armv8-a+crypto .endif .endif # ${USE_ASM_SOURCES} != 0 From owner-dev-commits-src-all@freebsd.org Mon Aug 30 12:15:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 5647F675471; Mon, 30 Aug 2021 12:15: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 4Gyq5Y1WWFz3QRl; Mon, 30 Aug 2021 12:15: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 19B4D1DB39; Mon, 30 Aug 2021 12:15: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 17UCFDAi095433; Mon, 30 Aug 2021 12:15:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UCFDC7095432; Mon, 30 Aug 2021 12:15:13 GMT (envelope-from git) Date: Mon, 30 Aug 2021 12:15:13 GMT Message-Id: <202108301215.17UCFDC7095432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: b792434150d6 - main - Create sys/reg.h for the common code previously in machine/reg.h 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/main X-Git-Reftype: branch X-Git-Commit: b792434150d66b9b2356fb9a7548f4c7f0a0f16c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 12:15:13 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b792434150d66b9b2356fb9a7548f4c7f0a0f16c commit b792434150d66b9b2356fb9a7548f4c7f0a0f16c Author: Andrew Turner AuthorDate: 2021-08-27 09:38:40 +0000 Commit: Andrew Turner CommitDate: 2021-08-30 11:50:53 +0000 Create sys/reg.h for the common code previously in machine/reg.h Move the common kernel function signatures from machine/reg.h to a new sys/reg.h. This is in preperation for adding PT_GETREGSET to ptrace(2). Reviewed by: imp, markj Sponsored by: DARPA, AFRL (original work) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19830 --- sys/amd64/amd64/db_trace.c | 2 +- sys/amd64/amd64/gdb_machdep.c | 2 +- sys/amd64/amd64/machdep.c | 2 +- sys/amd64/ia32/ia32_reg.c | 1 + sys/amd64/include/db_machdep.h | 1 - sys/amd64/linux/linux_ptrace.c | 1 - sys/amd64/linux32/linux32_machdep.c | 2 +- sys/amd64/vmm/amd/svm.c | 2 +- sys/amd64/vmm/intel/vmx.c | 2 +- sys/arm/arm/debug_monitor.c | 2 +- sys/arm/arm/machdep_kdb.c | 2 +- sys/arm/include/reg.h | 9 --- sys/arm64/arm64/machdep.c | 2 +- sys/arm64/include/reg.h | 20 ------- sys/arm64/linux/linux_machdep.c | 3 +- .../opensolaris/uts/intel/dtrace/fasttrap_isa.c | 2 +- sys/cddl/dev/dtrace/aarch64/dtrace_isa.c | 1 - sys/cddl/dev/dtrace/amd64/dtrace_isa.c | 1 - sys/cddl/dev/dtrace/arm/dtrace_isa.c | 1 - sys/cddl/dev/dtrace/mips/dtrace_isa.c | 1 - sys/cddl/dev/dtrace/powerpc/dtrace_isa.c | 1 - sys/cddl/dev/dtrace/riscv/dtrace_isa.c | 1 - sys/compat/linux/linux_elf.c | 1 + sys/ddb/db_run.c | 1 + sys/fs/procfs/procfs_dbregs.c | 2 - sys/fs/procfs/procfs_fpregs.c | 2 - sys/fs/procfs/procfs_regs.c | 2 - sys/i386/i386/db_trace.c | 2 +- sys/i386/i386/gdb_machdep.c | 2 +- sys/i386/i386/machdep.c | 2 +- sys/i386/include/db_machdep.h | 1 - sys/i386/linux/linux_ptrace.c | 1 - sys/kern/imgact_elf.c | 1 + sys/kern/kern_exec.c | 3 +- sys/kern/sys_process.c | 3 +- sys/mips/include/md_var.h | 2 +- sys/mips/include/reg.h | 16 ----- sys/mips/mips/freebsd32_machdep.c | 2 +- sys/mips/mips/gdb_machdep.c | 1 - sys/mips/mips/machdep.c | 1 + sys/mips/mips/pm_machdep.c | 2 +- sys/mips/nlm/cms.c | 1 - sys/mips/nlm/dev/net/xlpge.c | 1 - sys/powerpc/aim/aim_machdep.c | 1 - sys/powerpc/booke/booke_machdep.c | 1 - sys/powerpc/fpu/fpu_add.c | 1 - sys/powerpc/fpu/fpu_compare.c | 1 - sys/powerpc/fpu/fpu_div.c | 1 - sys/powerpc/fpu/fpu_emu.c | 1 - sys/powerpc/fpu/fpu_implode.c | 1 - sys/powerpc/fpu/fpu_mul.c | 1 - sys/powerpc/fpu/fpu_sqrt.c | 1 - sys/powerpc/fpu/fpu_subr.c | 1 - sys/powerpc/powerpc/elf32_machdep.c | 2 +- sys/powerpc/powerpc/exec_machdep.c | 2 +- sys/powerpc/powerpc/gdb_machdep.c | 1 - sys/powerpc/powerpc/machdep.c | 2 +- sys/riscv/include/reg.h | 12 ---- sys/riscv/riscv/machdep.c | 2 +- sys/sys/reg.h | 68 ++++++++++++++++++++++ sys/x86/include/reg.h | 16 ----- sys/x86/x86/dbreg.c | 1 + 62 files changed, 97 insertions(+), 129 deletions(-) diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c index d2682afec8b0..90fcce5732d1 100644 --- a/sys/amd64/amd64/db_trace.c +++ b/sys/amd64/amd64/db_trace.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -38,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include diff --git a/sys/amd64/amd64/gdb_machdep.c b/sys/amd64/amd64/gdb_machdep.c index 176c770a3731..b5acce216fe6 100644 --- a/sys/amd64/amd64/gdb_machdep.c +++ b/sys/amd64/amd64/gdb_machdep.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -42,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index e49dcaa576e8..eaf592c9b947 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -129,7 +130,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/amd64/ia32/ia32_reg.c b/sys/amd64/ia32/ia32_reg.c index 0725936cf84d..ae041a325cba 100644 --- a/sys/amd64/ia32/ia32_reg.c +++ b/sys/amd64/ia32/ia32_reg.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/amd64/include/db_machdep.h b/sys/amd64/include/db_machdep.h index c88c281ff9a6..102475f660a4 100644 --- a/sys/amd64/include/db_machdep.h +++ b/sys/amd64/include/db_machdep.h @@ -30,7 +30,6 @@ #define _MACHINE_DB_MACHDEP_H_ #include -#include #include typedef vm_offset_t db_addr_t; /* address - unsigned */ diff --git a/sys/amd64/linux/linux_ptrace.c b/sys/amd64/linux/linux_ptrace.c index 9386ba1e6ae3..3afaded3a203 100644 --- a/sys/amd64/linux/linux_ptrace.c +++ b/sys/amd64/linux/linux_ptrace.c @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index 3a32d1eadb37..5801fac7f126 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -61,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c index 0348c3335409..fbf11ec84084 100644 --- a/sys/amd64/vmm/amd/svm.c +++ b/sys/amd64/vmm/amd/svm.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -47,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index 7017e4b9077c..e7ced1b2c3fa 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -50,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/arm/arm/debug_monitor.c b/sys/arm/arm/debug_monitor.c index 55b5f70b2397..b73249bedcf1 100644 --- a/sys/arm/arm/debug_monitor.c +++ b/sys/arm/arm/debug_monitor.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -44,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include diff --git a/sys/arm/arm/machdep_kdb.c b/sys/arm/arm/machdep_kdb.c index 4dedb72edb22..b1f04c0832a1 100644 --- a/sys/arm/arm/machdep_kdb.c +++ b/sys/arm/arm/machdep_kdb.c @@ -35,10 +35,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include -#include #ifdef DDB #include diff --git a/sys/arm/include/reg.h b/sys/arm/include/reg.h index ab70ae128d39..8aee07c9b480 100644 --- a/sys/arm/include/reg.h +++ b/sys/arm/include/reg.h @@ -30,13 +30,4 @@ struct dbreg { unsigned int dbg_wvr[ARM_WR_MAX]; /* Watchpoint Value Registers */ }; -#ifdef _KERNEL -int fill_regs(struct thread *, struct reg *); -int set_regs(struct thread *, struct reg *); -int fill_fpregs(struct thread *, struct fpreg *); -int set_fpregs(struct thread *, struct fpreg *); -int fill_dbregs(struct thread *, struct dbreg *); -int set_dbregs(struct thread *, struct dbreg *); -#endif - #endif /* !MACHINE_REG_H */ diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index bce3baf8e1ec..ee6f5157f5f3 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -82,7 +83,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include diff --git a/sys/arm64/include/reg.h b/sys/arm64/include/reg.h index 9cfc5ea1d437..d7c3354bfd2f 100644 --- a/sys/arm64/include/reg.h +++ b/sys/arm64/include/reg.h @@ -83,24 +83,4 @@ struct dbreg32 { #define __HAVE_REG32 -#ifdef _KERNEL -/* - * XXX these interfaces are MI, so they should be declared in a MI place. - */ -int fill_regs(struct thread *, struct reg *); -int set_regs(struct thread *, struct reg *); -int fill_fpregs(struct thread *, struct fpreg *); -int set_fpregs(struct thread *, struct fpreg *); -int fill_dbregs(struct thread *, struct dbreg *); -int set_dbregs(struct thread *, struct dbreg *); -#ifdef COMPAT_FREEBSD32 -int fill_regs32(struct thread *, struct reg32 *); -int set_regs32(struct thread *, struct reg32 *); -int fill_fpregs32(struct thread *, struct fpreg32 *); -int set_fpregs32(struct thread *, struct fpreg32 *); -int fill_dbregs32(struct thread *, struct dbreg32 *); -int set_dbregs32(struct thread *, struct dbreg32 *); -#endif -#endif - #endif /* !_MACHINE_REG_H_ */ diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c index 9ccda3c3d299..fae5bd11653b 100644 --- a/sys/arm64/linux/linux_machdep.c +++ b/sys/arm64/linux/linux_machdep.c @@ -36,12 +36,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include -#include - #include #include #include diff --git a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c index 502273b73157..f92070d8088d 100644 --- a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c +++ b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c @@ -36,11 +36,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include diff --git a/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c b/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c index 033258e34062..b26b15a58070 100644 --- a/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c @@ -35,7 +35,6 @@ #include #include -#include #include #include diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c index 07a4103bd716..71b448a99c1c 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c @@ -35,7 +35,6 @@ #include #include -#include #include #include diff --git a/sys/cddl/dev/dtrace/arm/dtrace_isa.c b/sys/cddl/dev/dtrace/arm/dtrace_isa.c index 9bac37669a84..ede352e6b873 100644 --- a/sys/cddl/dev/dtrace/arm/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/arm/dtrace_isa.c @@ -35,7 +35,6 @@ #include #include -#include #include #include diff --git a/sys/cddl/dev/dtrace/mips/dtrace_isa.c b/sys/cddl/dev/dtrace/mips/dtrace_isa.c index c09225c734b9..8d65012dadf0 100644 --- a/sys/cddl/dev/dtrace/mips/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/mips/dtrace_isa.c @@ -35,7 +35,6 @@ #include #include -#include #include #include diff --git a/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c b/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c index a188eafa777d..cce1c907b5d8 100644 --- a/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c index f8663b5bfeab..d42299abcd35 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c @@ -37,7 +37,6 @@ #include #include -#include #include #include diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c index 077e0c93c884..9192388b347a 100644 --- a/sys/compat/linux/linux_elf.c +++ b/sys/compat/linux/linux_elf.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c index af99eb757609..c9ea87fca79c 100644 --- a/sys/ddb/db_run.c +++ b/sys/ddb/db_run.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c index 8d2206d2995c..acc0f7f8c5ac 100644 --- a/sys/fs/procfs/procfs_dbregs.c +++ b/sys/fs/procfs/procfs_dbregs.c @@ -54,8 +54,6 @@ #include #include -#include - #include #include diff --git a/sys/fs/procfs/procfs_fpregs.c b/sys/fs/procfs/procfs_fpregs.c index 9675030df3c0..1118eb68dcbc 100644 --- a/sys/fs/procfs/procfs_fpregs.c +++ b/sys/fs/procfs/procfs_fpregs.c @@ -48,8 +48,6 @@ #include #include -#include - #include #include diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c index 032141a9e32e..703dad64a182 100644 --- a/sys/fs/procfs/procfs_regs.c +++ b/sys/fs/procfs/procfs_regs.c @@ -48,8 +48,6 @@ #include #include -#include - #include #include diff --git a/sys/i386/i386/db_trace.c b/sys/i386/i386/db_trace.c index 80ef0fe715d8..529b94b76cc4 100644 --- a/sys/i386/i386/db_trace.c +++ b/sys/i386/i386/db_trace.c @@ -31,13 +31,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/sys/i386/i386/gdb_machdep.c b/sys/i386/i386/gdb_machdep.c index 549c6de7ba1b..766f38f181f8 100644 --- a/sys/i386/i386/gdb_machdep.c +++ b/sys/i386/i386/gdb_machdep.c @@ -34,13 +34,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 869ee9958d25..1366939cda6e 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -129,7 +130,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/i386/include/db_machdep.h b/sys/i386/include/db_machdep.h index 42f0f19d29a9..83daab106b82 100644 --- a/sys/i386/include/db_machdep.h +++ b/sys/i386/include/db_machdep.h @@ -30,7 +30,6 @@ #define _MACHINE_DB_MACHDEP_H_ #include -#include #include typedef vm_offset_t db_addr_t; /* address - unsigned */ diff --git a/sys/i386/linux/linux_ptrace.c b/sys/i386/linux/linux_ptrace.c index 0c93d0266b87..d9e0ed50c750 100644 --- a/sys/i386/linux/linux_ptrace.c +++ b/sys/i386/linux/linux_ptrace.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index ac0427a74818..5b888766daea 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index e6564ae48ced..b6959dc18f50 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -91,8 +92,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#include - #include #include diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index b56c33203906..1b97424c58ca 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -54,8 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include diff --git a/sys/mips/include/md_var.h b/sys/mips/include/md_var.h index 8462b1beb22e..b322c4d6323a 100644 --- a/sys/mips/include/md_var.h +++ b/sys/mips/include/md_var.h @@ -36,7 +36,7 @@ #ifndef _MACHINE_MD_VAR_H_ #define _MACHINE_MD_VAR_H_ -#include +#include /* * Miscellaneous machine-dependent declarations. diff --git a/sys/mips/include/reg.h b/sys/mips/include/reg.h index a1f5aa4da23c..440b791bffc7 100644 --- a/sys/mips/include/reg.h +++ b/sys/mips/include/reg.h @@ -85,23 +85,7 @@ struct dbreg32 { #define __HAVE_REG32 #endif -#ifdef _KERNEL -int fill_fpregs(struct thread *, struct fpreg *); -int fill_regs(struct thread *, struct reg *); -int set_fpregs(struct thread *, struct fpreg *); -int set_regs(struct thread *, struct reg *); -int fill_dbregs(struct thread *, struct dbreg *); -int set_dbregs(struct thread *, struct dbreg *); -#endif - #ifdef COMPAT_FREEBSD32 -struct image_params; - -int fill_regs32(struct thread *, struct reg32 *); -int set_regs32(struct thread *, struct reg32 *); -int fill_fpregs32(struct thread *, struct fpreg32 *); -int set_fpregs32(struct thread *, struct fpreg32 *); - #define fill_dbregs32(td, reg) 0 #define set_dbregs32(td, reg) 0 #endif diff --git a/sys/mips/mips/freebsd32_machdep.c b/sys/mips/mips/freebsd32_machdep.c index e30753e7a59c..eb5f82c572ce 100644 --- a/sys/mips/mips/freebsd32_machdep.c +++ b/sys/mips/mips/freebsd32_machdep.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -60,7 +61,6 @@ #include #include -#include #include #include #include diff --git a/sys/mips/mips/gdb_machdep.c b/sys/mips/mips/gdb_machdep.c index 130a78f9eb87..4b999613d7f6 100644 --- a/sys/mips/mips/gdb_machdep.c +++ b/sys/mips/mips/gdb_machdep.c @@ -101,7 +101,6 @@ #include #include -#include #include #include diff --git a/sys/mips/mips/machdep.c b/sys/mips/mips/machdep.c index fd0f83e5df98..ec0f3f31c254 100644 --- a/sys/mips/mips/machdep.c +++ b/sys/mips/mips/machdep.c @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/mips/mips/pm_machdep.c b/sys/mips/mips/pm_machdep.c index 8d8cf4e1023d..7a9db29b6ff6 100644 --- a/sys/mips/mips/pm_machdep.c +++ b/sys/mips/mips/pm_machdep.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -62,7 +63,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/mips/nlm/cms.c b/sys/mips/nlm/cms.c index 32ee6e1c9546..4b6ad7c95db4 100644 --- a/sys/mips/nlm/cms.c +++ b/sys/mips/nlm/cms.c @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/mips/nlm/dev/net/xlpge.c b/sys/mips/nlm/dev/net/xlpge.c index e9dadf83c7eb..20fe16048212 100644 --- a/sys/mips/nlm/dev/net/xlpge.c +++ b/sys/mips/nlm/dev/net/xlpge.c @@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/powerpc/aim/aim_machdep.c b/sys/powerpc/aim/aim_machdep.c index 784207e9a70d..d582489d9f7e 100644 --- a/sys/powerpc/aim/aim_machdep.c +++ b/sys/powerpc/aim/aim_machdep.c @@ -118,7 +118,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/powerpc/booke/booke_machdep.c b/sys/powerpc/booke/booke_machdep.c index 09396d854045..5db1a17fc243 100644 --- a/sys/powerpc/booke/booke_machdep.c +++ b/sys/powerpc/booke/booke_machdep.c @@ -122,7 +122,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/powerpc/fpu/fpu_add.c b/sys/powerpc/fpu/fpu_add.c index 6dd594ca0ec9..fdab0d8872ab 100644 --- a/sys/powerpc/fpu/fpu_add.c +++ b/sys/powerpc/fpu/fpu_add.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/powerpc/fpu/fpu_compare.c b/sys/powerpc/fpu/fpu_compare.c index 48d7c488ce8a..633d32dcc717 100644 --- a/sys/powerpc/fpu/fpu_compare.c +++ b/sys/powerpc/fpu/fpu_compare.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/powerpc/fpu/fpu_div.c b/sys/powerpc/fpu/fpu_div.c index 5b625f640f13..7536d4aaa69e 100644 --- a/sys/powerpc/fpu/fpu_div.c +++ b/sys/powerpc/fpu/fpu_div.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/powerpc/fpu/fpu_emu.c b/sys/powerpc/fpu/fpu_emu.c index 6c1b91fb9725..c8c1f0b4b7ee 100644 --- a/sys/powerpc/fpu/fpu_emu.c +++ b/sys/powerpc/fpu/fpu_emu.c @@ -93,7 +93,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/powerpc/fpu/fpu_implode.c b/sys/powerpc/fpu/fpu_implode.c index 69a58bf79315..8ccf4b2f8243 100644 --- a/sys/powerpc/fpu/fpu_implode.c +++ b/sys/powerpc/fpu/fpu_implode.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include diff --git a/sys/powerpc/fpu/fpu_mul.c b/sys/powerpc/fpu/fpu_mul.c index 609b261492a4..336ddaee9607 100644 --- a/sys/powerpc/fpu/fpu_mul.c +++ b/sys/powerpc/fpu/fpu_mul.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/powerpc/fpu/fpu_sqrt.c b/sys/powerpc/fpu/fpu_sqrt.c index e1f5bec9006f..5a95d7eae115 100644 --- a/sys/powerpc/fpu/fpu_sqrt.c +++ b/sys/powerpc/fpu/fpu_sqrt.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/powerpc/fpu/fpu_subr.c b/sys/powerpc/fpu/fpu_subr.c index fc817a7ee587..fbe1bc70aa5a 100644 --- a/sys/powerpc/fpu/fpu_subr.c +++ b/sys/powerpc/fpu/fpu_subr.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/powerpc/powerpc/elf32_machdep.c b/sys/powerpc/powerpc/elf32_machdep.c index 341352fdd589..a99aeb0a7444 100644 --- a/sys/powerpc/powerpc/elf32_machdep.c +++ b/sys/powerpc/powerpc/elf32_machdep.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -56,7 +57,6 @@ #include #include #include -#include #include #include diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 869fad96e2bd..d90071f13650 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -89,7 +90,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/powerpc/powerpc/gdb_machdep.c b/sys/powerpc/powerpc/gdb_machdep.c index a7f1de512e31..e334bd46375c 100644 --- a/sys/powerpc/powerpc/gdb_machdep.c +++ b/sys/powerpc/powerpc/gdb_machdep.c @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index f35469f4051c..622af17b3305 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -119,7 +120,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/riscv/include/reg.h b/sys/riscv/include/reg.h index 9e94b4a5768d..003e696e30e3 100644 --- a/sys/riscv/include/reg.h +++ b/sys/riscv/include/reg.h @@ -58,16 +58,4 @@ struct dbreg { int dummy; }; -#ifdef _KERNEL -/* - * XXX these interfaces are MI, so they should be declared in a MI place. - */ -int fill_regs(struct thread *, struct reg *); -int set_regs(struct thread *, struct reg *); -int fill_fpregs(struct thread *, struct fpreg *); -int set_fpregs(struct thread *, struct fpreg *); -int fill_dbregs(struct thread *, struct dbreg *); *** 141 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Mon Aug 30 12:43:09 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 12:43:11 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 12:43:11 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 12:43:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 12:43:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 12:43:14 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 12:43:20 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 12:43:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 12:43:19 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 12:43:18 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 13:14:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 13:14:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 13:17:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 080A6676E98 for ; Mon, 30 Aug 2021 13:17:22 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GyrTF037Cz4S83 for ; Mon, 30 Aug 2021 13:17:21 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f42.google.com with SMTP id d26so22504622wrc.0 for ; Mon, 30 Aug 2021 06:17:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=p0mEPbVo75PJj+JY0heePqLiyWiSveofaRxGWtMYI1o=; b=LVMuP7LgznM+Re98co3etNfCzskQwsZqTS6BS5eMkI5foWa5k0QCv+KiVcD/Up0nz6 5PLA99JbWNUrUg0JafDj9vW7qwCyWmMZYv8sAQOLoyDHOC3/DWBpxpzpqDKh4l97jMS4 BQ5CKvj3xvQJYhH/hGXzEOD6Hx0Ae7j7WAK+5cjmtTCCh12cXhsfJKb/e0t25rmm6CT7 SjWA7imxMtp7e1U7mQiMo6ILOwhWrJsmiH/Hmo37xK6SQuYXqJ/BgKypPbq0S9s3aW5M W/aUrUy9p4aw2nPobtSf9Pnm+K6QYikPAKS+y4W/vicC+9nC2mdeQeZJxoEKpv2DWKR6 kYEA== X-Gm-Message-State: AOAM532SZ0d+vMgm9hZnnR7OmwsyGFndo1p2Dm2adjJ+HKwouUZRpYrL 6LrlThpZgkgCVkLDLFCTcRoc+A== X-Google-Smtp-Source: ABdhPJzDCqgIQ8LNWEvgbS3oa+6NMFJAisRAHjbmBZtqtkvetqJ8+zhL7ZvVDOakFOBptqeWbw4HIg== X-Received: by 2002:a05:6000:1623:: with SMTP id v3mr4510127wrb.288.1630329434056; Mon, 30 Aug 2021 06:17:14 -0700 (PDT) Received: from smtpclient.apple (global-5-141.nat-2.net.cam.ac.uk. [131.111.5.141]) by smtp.gmail.com with ESMTPSA id y6sm18310662wrm.54.2021.08.30.06.17.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Aug 2021 06:17:13 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: git: 57dbb3c25936 - main - pci_dw: fix outbound I/O window configuration From: Jessica Clarke In-Reply-To: <202104061234.136CYpwh048402@gitrepo.freebsd.org> Date: Mon, 30 Aug 2021 14:17:12 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202104061234.136CYpwh048402@gitrepo.freebsd.org> To: Marcin Wojtas X-Mailer: Apple Mail (2.3654.100.0.2.22) X-Rspamd-Queue-Id: 4GyrTF037Cz4S83 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.42 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-2.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.42:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.42:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 13:17:22 -0000 On 6 Apr 2021, at 13:34, Marcin Wojtas wrote: >=20 > The branch main has been updated by mw: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D57dbb3c25936f0d61fef152eb224ca86= a73af0e9 >=20 > commit 57dbb3c25936f0d61fef152eb224ca86a73af0e9 > Author: Marcin Wojtas > AuthorDate: 2021-04-06 12:31:39 +0000 > Commit: Marcin Wojtas > CommitDate: 2021-04-06 12:31:39 +0000 >=20 > pci_dw: fix outbound I/O window configuration >=20 > Use viewport "2" instead of "0" and change window type from MEM to = IO. > Without these changes the MEM ATU window can be overwritten with = the IO one. >=20 > Submitted by: Kornel Duleba > Obtained from: Semihalf > Sponsored by: Marvell > Differential revision: https://reviews.freebsd.org/D29516 Hi Marcin, Do you mind if I MFC this, please? I came to MFC my own commit = (f8c1701f23) and realised it depends on this one. This would be just for stable/13. Jess From owner-dev-commits-src-all@freebsd.org Mon Aug 30 14:00:27 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A214D677607; Mon, 30 Aug 2021 14:00: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 4GysQz3zByz4dXq; Mon, 30 Aug 2021 14:00: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 701881F02E; Mon, 30 Aug 2021 14:00: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 17UE0RhB038945; Mon, 30 Aug 2021 14:00:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UE0Rkg038944; Mon, 30 Aug 2021 14:00:27 GMT (envelope-from git) Date: Mon, 30 Aug 2021 14:00:27 GMT Message-Id: <202108301400.17UE0Rkg038944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: a0f2aa9318a2 - main - 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/main X-Git-Reftype: branch X-Git-Commit: a0f2aa9318a21f401a0aef2cde666edc56a92b46 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 14:00:27 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=a0f2aa9318a21f401a0aef2cde666edc56a92b46 commit a0f2aa9318a21f401a0aef2cde666edc56a92b46 Author: Cy Schubert AuthorDate: 2021-08-26 22:59:03 +0000 Commit: Cy Schubert CommitDate: 2021-08-30 13:59:17 +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. MFC after: 1 week --- 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-all@freebsd.org Mon Aug 30 14:00:28 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AB1D0676DCE; Mon, 30 Aug 2021 14:00: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 4GysR04V1qz4dSZ; Mon, 30 Aug 2021 14:00: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 830091F0AB; Mon, 30 Aug 2021 14:00: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 17UE0SGL038970; Mon, 30 Aug 2021 14:00:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UE0S1D038969; Mon, 30 Aug 2021 14:00:28 GMT (envelope-from git) Date: Mon, 30 Aug 2021 14:00:28 GMT Message-Id: <202108301400.17UE0S1D038969@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 81b521d2c0ed - main - 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/main X-Git-Reftype: branch X-Git-Commit: 81b521d2c0edaab4581546af18298310e6318b5d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 14:00:28 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=81b521d2c0edaab4581546af18298310e6318b5d commit 81b521d2c0edaab4581546af18298310e6318b5d Author: Cy Schubert AuthorDate: 2021-08-26 23:17:11 +0000 Commit: Cy Schubert CommitDate: 2021-08-30 13:59:17 +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. MFC after: 1 week --- 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-all@freebsd.org Mon Aug 30 14:00:30 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6A5E86774AD; Mon, 30 Aug 2021 14:00: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 4GysR15w56z4db8; Mon, 30 Aug 2021 14:00: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 AC3D01F287; Mon, 30 Aug 2021 14:00: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 17UE0TwU038994; Mon, 30 Aug 2021 14:00:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UE0T9j038993; Mon, 30 Aug 2021 14:00:29 GMT (envelope-from git) Date: Mon, 30 Aug 2021 14:00:29 GMT Message-Id: <202108301400.17UE0T9j038993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 213ceba977de - main - 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/main X-Git-Reftype: branch X-Git-Commit: 213ceba977def36470df3abfe1fac47f689130c1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 14:00:30 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=213ceba977def36470df3abfe1fac47f689130c1 commit 213ceba977def36470df3abfe1fac47f689130c1 Author: Cy Schubert AuthorDate: 2021-08-26 23:28:40 +0000 Commit: Cy Schubert CommitDate: 2021-08-30 13:59:18 +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. MFC after: 1 week --- 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-all@freebsd.org Mon Aug 30 14:57:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 01ADF677F11; Mon, 30 Aug 2021 14:57: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 4GythS6bFnz4v4h; Mon, 30 Aug 2021 14:57: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 C6B461FE8D; Mon, 30 Aug 2021 14:57: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 17UEvCOW008781; Mon, 30 Aug 2021 14:57:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UEvCRv008780; Mon, 30 Aug 2021 14:57:12 GMT (envelope-from git) Date: Mon, 30 Aug 2021 14:57:12 GMT Message-Id: <202108301457.17UEvCRv008780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 4d0dc60f1401 - main - xinstall: fix invocation of llvm-strip 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/main X-Git-Reftype: branch X-Git-Commit: 4d0dc60f14019eab08f6d9dc656c9f9f1ebdde02 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 14:57:13 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4d0dc60f14019eab08f6d9dc656c9f9f1ebdde02 commit 4d0dc60f14019eab08f6d9dc656c9f9f1ebdde02 Author: Mitchell Horne AuthorDate: 2021-06-02 15:00:56 +0000 Commit: Mitchell Horne CommitDate: 2021-08-30 14:56:10 +0000 xinstall: fix invocation of llvm-strip When executing strip(1), '--' is passed as an argument to explicitly terminate the getopt(3) loop. The option parsing in llvm-strip doesn't support this however, so setting XSTRIPBIN=llvm-strip results in an unsupported argument error. llvm-strip(1) is otherwise commandline-compatible with FreeBSD's strip(1), so just use the documented argument format that is common to both. Special care needs to be taken for filenames beginning with a '-'. Reviewed by: arichardson, eugen (earlier version, both) Discussed with: jilles Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D30614 --- usr.bin/xinstall/xinstall.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 114614abd16f..05b1444506db 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -1306,7 +1306,7 @@ copy(int from_fd, const char *from_name, int to_fd, const char *to_name, * strip -- * Use strip(1) to strip the target file. * Just invoke strip(1) on to_name if from_name is NULL, else try - * to run "strip -o to_name -- from_name" and return 0 on failure. + * to run "strip -o to_name from_name" and return 0 on failure. * Return 1 on success and assign result of digest_file(to_name) * to *dresp. */ @@ -1314,10 +1314,12 @@ static int strip(const char *to_name, int to_fd, const char *from_name, char **dresp) { const char *stripbin; - const char *args[6]; + const char *args[5]; + char *prefixed_from_name; pid_t pid; int error, serrno, status; + prefixed_from_name = NULL; stripbin = getenv("STRIPBIN"); if (stripbin == NULL) stripbin = "strip"; @@ -1328,9 +1330,16 @@ strip(const char *to_name, int to_fd, const char *from_name, char **dresp) } else { args[1] = "-o"; args[2] = to_name; - args[3] = "--"; - args[4] = from_name; - args[5] = NULL; + + /* Prepend './' if from_name begins with '-' */ + if (from_name[0] == '-') { + if (asprintf(&prefixed_from_name, "./%s", from_name) == -1) + return (0); + args[3] = prefixed_from_name; + } else { + args[3] = from_name; + } + args[4] = NULL; } error = posix_spawnp(&pid, stripbin, NULL, NULL, __DECONST(char **, args), environ); @@ -1339,6 +1348,7 @@ strip(const char *to_name, int to_fd, const char *from_name, char **dresp) errc(error == EAGAIN || error == EPROCLIM || error == ENOMEM ? EX_TEMPFAIL : EX_OSERR, error, "spawn %s", stripbin); } + free(prefixed_from_name); if (waitpid(pid, &status, 0) == -1) { error = errno; (void)unlink(to_name); From owner-dev-commits-src-all@freebsd.org Mon Aug 30 15:24:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E32E46586E8; Mon, 30 Aug 2021 15:24:46 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GyvJG5fNFz52j1; Mon, 30 Aug 2021 15:24:46 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f52.google.com with SMTP id n24so20369423ion.10; Mon, 30 Aug 2021 08:24:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/kbiN86vHAZDTI9uC90h7HsD9dZGGuLwmimit1fr/Iw=; b=aQh0ZbHWt1t3iWSweo1D+OKYkJl66DkEpAkZYdbT6flRIR13vK2qL74p8Y+QojutGe THJphf+3zJiazJ5+aVyVCR7xP5n5QnbwXwryqWrMsgzILGsD3KTwGVYymOmVyky/mW1F 3okPoi3wTbC3qUMRGKfR95mIAP8bMY27ISVas5z11MgR05mxYaW7h61xPvjbHbkQv+ez UnRcGMo3bBiQvAJXrrEPz9SZPMMF3dPXQ1zFQg4yXMu6L1VISomSwzJsTk92VdGtOBUW eRQySO52p8C+ehl8TzbxEsEgr/AeEEzNE9ttrNtEo7CosrBhJatP139dDhtyG0jvJtGs FEmg== X-Gm-Message-State: AOAM5339D1tywTR0NsEX6MLOaw4p31mfN9fiCTisV0LApx8ebvBPV1CF aKVp4BPF4YklO47TDRW/nEjdfP4mc52tZPApMDgGtVmfAok= X-Google-Smtp-Source: ABdhPJx/6VvhbG2iQfLyIU82PwSudqn4yyj1lTsdivVM/hf1aIoMvHMPhPYYjMMArnl2NS8hXa7MBVnviWjGUoVaQ64= X-Received: by 2002:a02:90d0:: with SMTP id c16mr20683367jag.106.1630337079217; Mon, 30 Aug 2021 08:24:39 -0700 (PDT) MIME-Version: 1.0 References: <202108301457.17UEvCRv008780@gitrepo.freebsd.org> In-Reply-To: <202108301457.17UEvCRv008780@gitrepo.freebsd.org> From: Ed Maste Date: Mon, 30 Aug 2021 11:24:24 -0400 Message-ID: Subject: Re: git: 4d0dc60f1401 - main - xinstall: fix invocation of llvm-strip To: Mitchell Horne Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GyvJG5fNFz52j1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 15:24:47 -0000 On Mon, 30 Aug 2021 at 10:57, Mitchell Horne wrote: > > The branch main has been updated by mhorne: > > URL: https://cgit.FreeBSD.org/src/commit/?id=4d0dc60f14019eab08f6d9dc656c9f9f1ebdde02 > > commit 4d0dc60f14019eab08f6d9dc656c9f9f1ebdde02 > Author: Mitchell Horne > AuthorDate: 2021-06-02 15:00:56 +0000 > Commit: Mitchell Horne > CommitDate: 2021-08-30 14:56:10 +0000 > > xinstall: fix invocation of llvm-strip > > When executing strip(1), '--' is passed as an argument to explicitly > terminate the getopt(3) loop. The option parsing in llvm-strip doesn't > support this however, so setting XSTRIPBIN=llvm-strip results in an > unsupported argument error. llvm-strip(1) is otherwise > commandline-compatible with FreeBSD's strip(1), so just use the > documented argument format that is common to both. GNU strip also handles --, so ideally we'd have llvm-strip also accept it. Given plans to switch to the LLVM version of various binutils (D31060) we should aim for as complete command-line compatibility as possible. I've added a note to this effect in D31060. From owner-dev-commits-src-all@freebsd.org Mon Aug 30 15:39:45 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B8673658670; Mon, 30 Aug 2021 15:39: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 4GyvdY4YTmz55Rg; Mon, 30 Aug 2021 15:39: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 8476620651; Mon, 30 Aug 2021 15:39: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 17UFdjl0062326; Mon, 30 Aug 2021 15:39:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UFdjZA062325; Mon, 30 Aug 2021 15:39:45 GMT (envelope-from git) Date: Mon, 30 Aug 2021 15:39:45 GMT Message-Id: <202108301539.17UFdjZA062325@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 0637070b5bca - main - ngatm: remove one of doubled semicolons 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/main X-Git-Reftype: branch X-Git-Commit: 0637070b5bca4691bf54c5985a74f4d7888050dc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 15:39:45 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0637070b5bca4691bf54c5985a74f4d7888050dc commit 0637070b5bca4691bf54c5985a74f4d7888050dc Author: Ed Maste AuthorDate: 2021-08-30 15:38:51 +0000 Commit: Ed Maste CommitDate: 2021-08-30 15:39:30 +0000 ngatm: remove one of doubled semicolons Discussed with: harti --- sys/contrib/ngatm/netnatm/sig/sig_party.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/ngatm/netnatm/sig/sig_party.c b/sys/contrib/ngatm/netnatm/sig/sig_party.c index f9d5cd0cf571..cdb8d25274f2 100644 --- a/sys/contrib/ngatm/netnatm/sig/sig_party.c +++ b/sys/contrib/ngatm/netnatm/sig/sig_party.c @@ -95,7 +95,7 @@ uni_create_partyx(struct call *c, u_int epref, u_int mine, uint32_t cookie) p->call = c; p->epref = epref; p->flags = mine; - p->state = UNI_EPSTATE_NULL;; + p->state = UNI_EPSTATE_NULL; TIMER_INIT_PARTY(p, t397); TIMER_INIT_PARTY(p, t398); From owner-dev-commits-src-all@freebsd.org Mon Aug 30 16:00:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 16:00:56 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 16:00:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 18:23:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7EF7165B43C; Mon, 30 Aug 2021 18:23: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 4GyzGb32gXz4d8K; Mon, 30 Aug 2021 18:23: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 5196222B1B; Mon, 30 Aug 2021 18:23: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 17UINZg9089199; Mon, 30 Aug 2021 18:23:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UINZJZ089198; Mon, 30 Aug 2021 18:23:35 GMT (envelope-from git) Date: Mon, 30 Aug 2021 18:23:35 GMT Message-Id: <202108301823.17UINZJZ089198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 564b6aa7fccd - main - aesni: Avoid a potential out-of-bounds load in aes_encrypt_icm() 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/main X-Git-Reftype: branch X-Git-Commit: 564b6aa7fccd98654207447f870b82659b895e7b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 18:23:35 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=564b6aa7fccd98654207447f870b82659b895e7b commit 564b6aa7fccd98654207447f870b82659b895e7b Author: Mark Johnston AuthorDate: 2021-08-30 18:22:20 +0000 Commit: Mark Johnston CommitDate: 2021-08-30 18:22:20 +0000 aesni: Avoid a potential out-of-bounds load in aes_encrypt_icm() Given a partial block at the end of a payload, aes_encrypt_icm() would perform a 16-byte load of the residual into a temporary variable. This is unsafe in principle since the full block may cross a page boundary. Fix the problem by copying the residual into a stack buffer first. Reported by: syzbot+b7e44cde9e2e89f0f6c9@syzkaller.appspotmail.com Reported by: syzbot+4b5eaf123a99456b5160@syzkaller.appspotmail.com Reported by: syzbot+70c74c1aa232633355ca@syzkaller.appspotmail.com Reported by: syzbot+2c663776a52828373d41@syzkaller.appspotmail.com Reviewed by: cem, jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31730 --- sys/crypto/aesni/aesni_wrap.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/crypto/aesni/aesni_wrap.c b/sys/crypto/aesni/aesni_wrap.c index 95f7e191d00d..4d2a45b7e4c4 100644 --- a/sys/crypto/aesni/aesni_wrap.c +++ b/sys/crypto/aesni/aesni_wrap.c @@ -213,9 +213,10 @@ aesni_encrypt_icm(int rounds, const void *key_schedule, size_t len, __m128i ctr5, ctr6, ctr7, ctr8; __m128i BSWAP_EPI64; __m128i tout[8]; + __m128i block; struct blocks8 *top; const struct blocks8 *blks; - size_t i, cnt; + size_t i, cnt, resid; BSWAP_EPI64 = _mm_set_epi8(8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7); @@ -273,12 +274,19 @@ aesni_encrypt_icm(int rounds, const void *key_schedule, size_t len, to += AES_BLOCK_LEN; } - /* handle remaining partial round */ - if (len % AES_BLOCK_LEN != 0) { + /* + * Handle remaining partial round. Copy the remaining payload onto the + * stack to ensure that the full block can be loaded safely. + */ + resid = len % AES_BLOCK_LEN; + if (resid != 0) { tmp1 = _mm_shuffle_epi8(ctr1, BSWAP_EPI64); tot = aesni_enc(rounds - 1, key_schedule, tmp1); - tot = tot ^ _mm_loadu_si128((const __m128i *)from); - memcpy(to, &tot, len % AES_BLOCK_LEN); + block = _mm_setzero_si128(); + memcpy(&block, from, resid); + tot = tot ^ _mm_loadu_si128(&block); + memcpy(to, &tot, resid); + explicit_bzero(&block, sizeof(block)); } } From owner-dev-commits-src-all@freebsd.org Mon Aug 30 19:15:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F02DE65C613; Mon, 30 Aug 2021 19:15: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 4Gz0Qy6Q2xz4sFp; Mon, 30 Aug 2021 19:15: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 C43CC23248; Mon, 30 Aug 2021 19:15: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 17UJFsbs056495; Mon, 30 Aug 2021 19:15:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UJFsce056494; Mon, 30 Aug 2021 19:15:54 GMT (envelope-from git) Date: Mon, 30 Aug 2021 19:15:54 GMT Message-Id: <202108301915.17UJFsce056494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 315cd55dba61 - main - hwpmc: consistently validate PMC class in allocation method 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/main X-Git-Reftype: branch X-Git-Commit: 315cd55dba61416495a847f0eed6e522421e2347 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 19:15:55 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=315cd55dba61416495a847f0eed6e522421e2347 commit 315cd55dba61416495a847f0eed6e522421e2347 Author: Mitchell Horne AuthorDate: 2021-08-30 17:02:23 +0000 Commit: Mitchell Horne CommitDate: 2021-08-30 19:12:59 +0000 hwpmc: consistently validate PMC class in allocation method It is always a good idea. In one case, attempting to allocate N+1 PMCs from a class with N hardware counters would incorrectly attempt to allocate from the next class in the list. Without this validation, this can lead to all kinds of strange behaviour. Since powerpc_allocate_pmc() is used by both the mpc7xxx and ppc970 classes, add a new global to track which is active (it will never be both). Reviewed by: luporl, ray MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31387 --- sys/dev/hwpmc/hwpmc_core.c | 3 +++ sys/dev/hwpmc/hwpmc_e500.c | 3 +++ sys/dev/hwpmc/hwpmc_mpc7xxx.c | 1 + sys/dev/hwpmc/hwpmc_power8.c | 3 +++ sys/dev/hwpmc/hwpmc_powerpc.c | 4 ++++ sys/dev/hwpmc/hwpmc_powerpc.h | 1 + sys/dev/hwpmc/hwpmc_ppc970.c | 1 + sys/dev/hwpmc/hwpmc_uncore.c | 3 +++ 8 files changed, 19 insertions(+) diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index afd587296e01..507b20488132 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -750,6 +750,9 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm, KASSERT(ri >= 0 && ri < core_iap_npmc, ("[core,%d] illegal row-index value %d", __LINE__, ri)); + if (a->pm_class != PMC_CLASS_IAP) + return (EINVAL); + /* check requested capabilities */ caps = a->pm_caps; if ((IAP_PMC_CAPS & caps) != caps) diff --git a/sys/dev/hwpmc/hwpmc_e500.c b/sys/dev/hwpmc/hwpmc_e500.c index 72c0868f08b5..b82bada95fe3 100644 --- a/sys/dev/hwpmc/hwpmc_e500.c +++ b/sys/dev/hwpmc/hwpmc_e500.c @@ -376,6 +376,9 @@ e500_allocate_pmc(int cpu, int ri, struct pmc *pm, KASSERT(ri >= 0 && ri < E500_MAX_PMCS, ("[powerpc,%d] illegal row index %d", __LINE__, ri)); + if (a->pm_class != PMC_CLASS_E500) + return (EINVAL); + caps = a->pm_caps; pe = a->pm_ev; diff --git a/sys/dev/hwpmc/hwpmc_mpc7xxx.c b/sys/dev/hwpmc/hwpmc_mpc7xxx.c index 987480e89efd..c62c0791af01 100644 --- a/sys/dev/hwpmc/hwpmc_mpc7xxx.c +++ b/sys/dev/hwpmc/hwpmc_mpc7xxx.c @@ -471,6 +471,7 @@ pmc_mpc7xxx_initialize(struct pmc_mdep *pmc_mdep) ppc_event_first = PMC_EV_PPC7450_FIRST; ppc_event_last = PMC_EV_PPC7450_LAST; ppc_max_pmcs = MPC7XXX_MAX_PMCS; + ppc_class = pcd->pcd_class; powerpc_set_pmc = mpc7xxx_set_pmc; powerpc_pmcn_read = mpc7xxx_pmcn_read; diff --git a/sys/dev/hwpmc/hwpmc_power8.c b/sys/dev/hwpmc/hwpmc_power8.c index 0d93e4ae2964..287aa45a966d 100644 --- a/sys/dev/hwpmc/hwpmc_power8.c +++ b/sys/dev/hwpmc/hwpmc_power8.c @@ -167,6 +167,9 @@ power8_allocate_pmc(int cpu, int ri, struct pmc *pm, counter = PM_EVENT_COUNTER(pe); config = PM_EVENT_CODE(pe); + if (a->pm_class != PMC_CLASS_POWER8) + return (EINVAL); + /* * PMC5 and PMC6 are not programmable and always count instructions * completed and cycles, respectively. diff --git a/sys/dev/hwpmc/hwpmc_powerpc.c b/sys/dev/hwpmc/hwpmc_powerpc.c index 0f14f93e6415..4377c3075bca 100644 --- a/sys/dev/hwpmc/hwpmc_powerpc.c +++ b/sys/dev/hwpmc/hwpmc_powerpc.c @@ -59,6 +59,7 @@ size_t ppc_event_codes_size; int ppc_event_first; int ppc_event_last; int ppc_max_pmcs; +enum pmc_class ppc_class; void (*powerpc_set_pmc)(int cpu, int ri, int config); pmc_value_t (*powerpc_pmcn_read)(unsigned int pmc); @@ -211,6 +212,9 @@ powerpc_allocate_pmc(int cpu, int ri, struct pmc *pm, KASSERT(ri >= 0 && ri < ppc_max_pmcs, ("[powerpc,%d] illegal row index %d", __LINE__, ri)); + if (a->pm_class != ppc_class) + return (EINVAL); + caps = a->pm_caps; pe = a->pm_ev; diff --git a/sys/dev/hwpmc/hwpmc_powerpc.h b/sys/dev/hwpmc/hwpmc_powerpc.h index 31c20592a21f..10aa0ad75b14 100644 --- a/sys/dev/hwpmc/hwpmc_powerpc.h +++ b/sys/dev/hwpmc/hwpmc_powerpc.h @@ -82,6 +82,7 @@ extern size_t ppc_event_codes_size; extern int ppc_event_first; extern int ppc_event_last; extern int ppc_max_pmcs; +extern enum pmc_class ppc_class; extern void (*powerpc_set_pmc)(int cpu, int ri, int config); extern pmc_value_t (*powerpc_pmcn_read)(unsigned int pmc); diff --git a/sys/dev/hwpmc/hwpmc_ppc970.c b/sys/dev/hwpmc/hwpmc_ppc970.c index 39dc4efb290a..3e92c4dc6aa2 100644 --- a/sys/dev/hwpmc/hwpmc_ppc970.c +++ b/sys/dev/hwpmc/hwpmc_ppc970.c @@ -380,6 +380,7 @@ pmc_ppc970_initialize(struct pmc_mdep *pmc_mdep) ppc_event_first = PMC_EV_PPC970_FIRST; ppc_event_last = PMC_EV_PPC970_LAST; ppc_max_pmcs = PPC970_MAX_PMCS; + ppc_class = pcd->pcd_class; powerpc_set_pmc = ppc970_set_pmc; powerpc_pmcn_read = powerpc_pmcn_read_default; diff --git a/sys/dev/hwpmc/hwpmc_uncore.c b/sys/dev/hwpmc/hwpmc_uncore.c index 2c638833dcd9..19017cabddd9 100644 --- a/sys/dev/hwpmc/hwpmc_uncore.c +++ b/sys/dev/hwpmc/hwpmc_uncore.c @@ -530,6 +530,9 @@ ucp_allocate_pmc(int cpu, int ri, struct pmc *pm, KASSERT(ri >= 0 && ri < uncore_ucp_npmc, ("[uncore,%d] illegal row-index value %d", __LINE__, ri)); + if (a->pm_class != PMC_CLASS_UCP) + return (EINVAL); + /* check requested capabilities */ caps = a->pm_caps; if ((UCP_PMC_CAPS & caps) != caps) From owner-dev-commits-src-all@freebsd.org Mon Aug 30 19:15:56 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BB8B965C3B4; Mon, 30 Aug 2021 19:15: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 4Gz0R005GNz4sJ9; Mon, 30 Aug 2021 19:15: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 DED192352F; Mon, 30 Aug 2021 19:15: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 17UJFtJN056519; Mon, 30 Aug 2021 19:15:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UJFtt2056518; Mon, 30 Aug 2021 19:15:55 GMT (envelope-from git) Date: Mon, 30 Aug 2021 19:15:55 GMT Message-Id: <202108301915.17UJFtt2056518@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 0e78510b7549 - main - hwpmc: don't validate capabilities in allocation method 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/main X-Git-Reftype: branch X-Git-Commit: 0e78510b75497d183ab1aafbd99ff1031798bd84 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 19:15:56 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0e78510b75497d183ab1aafbd99ff1031798bd84 commit 0e78510b75497d183ab1aafbd99ff1031798bd84 Author: Mitchell Horne AuthorDate: 2021-08-30 17:03:18 +0000 Commit: Mitchell Horne CommitDate: 2021-08-30 19:12:59 +0000 hwpmc: don't validate capabilities in allocation method These checks were inconsistently applied across the various hwpmc classes. The condition is already checked by the generic code in hwpmc_mod.c, so remove them. MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31388 --- sys/dev/hwpmc/hwpmc_amd.c | 2 -- sys/dev/hwpmc/hwpmc_arm64.c | 3 +-- sys/dev/hwpmc/hwpmc_armv7.c | 2 -- sys/dev/hwpmc/hwpmc_core.c | 11 ++--------- sys/dev/hwpmc/hwpmc_tsc.c | 6 ------ sys/dev/hwpmc/hwpmc_uncore.c | 13 ++----------- 6 files changed, 5 insertions(+), 32 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index 024024ece19b..b26e31cc1543 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -600,8 +600,6 @@ amd_allocate_pmc(int cpu, int ri, struct pmc *pm, if((ri >= 12 && ri < 16) && !(a->pm_md.pm_amd.pm_amd_sub_class == PMC_AMD_SUB_CLASS_DATA_FABRIC)) return EINVAL; - if ((pd->pd_caps & caps) != caps) - return EPERM; if (strlen(pmc_cpuid) != 0) { pm->pm_md.pm_amd.pm_amd_evsel = a->pm_md.pm_amd.pm_amd_config; diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index 8a149f5f508f..14283b22644d 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -164,7 +164,7 @@ static int arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) { - uint32_t caps, config; + uint32_t config; struct arm64_cpu *pac; enum pmc_event pe; @@ -175,7 +175,6 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, pac = arm64_pcpu[cpu]; - caps = a->pm_caps; if (a->pm_class != PMC_CLASS_ARMV8) { return (EINVAL); } diff --git a/sys/dev/hwpmc/hwpmc_armv7.c b/sys/dev/hwpmc/hwpmc_armv7.c index 84a983bbc69c..12b3fff4d743 100644 --- a/sys/dev/hwpmc/hwpmc_armv7.c +++ b/sys/dev/hwpmc/hwpmc_armv7.c @@ -141,7 +141,6 @@ armv7_allocate_pmc(int cpu, int ri, struct pmc *pm, struct armv7_cpu *pac; enum pmc_event pe; uint32_t config; - uint32_t caps; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[armv7,%d] illegal CPU value %d", __LINE__, cpu)); @@ -150,7 +149,6 @@ armv7_allocate_pmc(int cpu, int ri, struct pmc *pm, pac = armv7_pcpu[cpu]; - caps = a->pm_caps; if (a->pm_class != PMC_CLASS_ARMV7) return (EINVAL); pe = a->pm_ev; diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index 507b20488132..84967e8a6248 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -236,10 +236,7 @@ iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, if (ri < 0 || ri > core_iaf_npmc) return (EINVAL); - caps = a->pm_caps; - - if (a->pm_class != PMC_CLASS_IAF || - (caps & IAF_PMC_CAPS) != caps) + if (a->pm_class != PMC_CLASS_IAF) return (EINVAL); iap = &a->pm_md.pm_iap; @@ -275,6 +272,7 @@ iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, if (config & IAP_INT) flags |= IAF_PMI; + caps = a->pm_caps; if (caps & PMC_CAP_INTERRUPT) flags |= IAF_PMI; if (caps & PMC_CAP_SYSTEM) @@ -742,7 +740,6 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) { uint8_t ev; - uint32_t caps; const struct pmc_md_iap_op_pmcallocate *iap; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -753,10 +750,6 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm, if (a->pm_class != PMC_CLASS_IAP) return (EINVAL); - /* check requested capabilities */ - caps = a->pm_caps; - if ((IAP_PMC_CAPS & caps) != caps) - return (EPERM); iap = &a->pm_md.pm_iap; ev = IAP_EVSEL_GET(iap->pm_iap_config); diff --git a/sys/dev/hwpmc/hwpmc_tsc.c b/sys/dev/hwpmc/hwpmc_tsc.c index 6cd098a8113b..d59c8908f4ca 100644 --- a/sys/dev/hwpmc/hwpmc_tsc.c +++ b/sys/dev/hwpmc/hwpmc_tsc.c @@ -83,12 +83,6 @@ tsc_allocate_pmc(int cpu, int ri, struct pmc *pm, if (a->pm_class != PMC_CLASS_TSC) return (EINVAL); - if ((pm->pm_caps & TSC_CAPS) == 0) - return (EINVAL); - - if ((pm->pm_caps & ~TSC_CAPS) != 0) - return (EPERM); - if (a->pm_ev != PMC_EV_TSC_TSC || a->pm_mode != PMC_MODE_SC) return (EINVAL); diff --git a/sys/dev/hwpmc/hwpmc_uncore.c b/sys/dev/hwpmc/hwpmc_uncore.c index 19017cabddd9..adb0e12c7454 100644 --- a/sys/dev/hwpmc/hwpmc_uncore.c +++ b/sys/dev/hwpmc/hwpmc_uncore.c @@ -189,7 +189,7 @@ static int ucf_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) { - uint32_t caps, flags; + uint32_t flags; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[uncore,%d] illegal CPU %d", __LINE__, cpu)); @@ -199,10 +199,7 @@ ucf_allocate_pmc(int cpu, int ri, struct pmc *pm, if (ri < 0 || ri > uncore_ucf_npmc) return (EINVAL); - caps = a->pm_caps; - - if (a->pm_class != PMC_CLASS_UCF || - (caps & UCF_PMC_CAPS) != caps) + if (a->pm_class != PMC_CLASS_UCF) return (EINVAL); flags = UCF_EN; @@ -522,7 +519,6 @@ ucp_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) { uint8_t ev; - uint32_t caps; const struct pmc_md_ucp_op_pmcallocate *ucp; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -533,11 +529,6 @@ ucp_allocate_pmc(int cpu, int ri, struct pmc *pm, if (a->pm_class != PMC_CLASS_UCP) return (EINVAL); - /* check requested capabilities */ - caps = a->pm_caps; - if ((UCP_PMC_CAPS & caps) != caps) - return (EPERM); - ucp = &a->pm_md.pm_ucp; ev = UCP_EVSEL(ucp->pm_ucp_config); switch (uncore_cputype) { From owner-dev-commits-src-all@freebsd.org Mon Aug 30 19:20:08 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B2FB065C3EB for ; Mon, 30 Aug 2021 19:20: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 4Gz0Wr4kHQz4tjh; Mon, 30 Aug 2021 19:20: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 801AA2317E; Mon, 30 Aug 2021 19:20: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 17UJK81C059892; Mon, 30 Aug 2021 19:20:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UJK8R3059889; Mon, 30 Aug 2021 19:20:08 GMT (envelope-from git) Date: Mon, 30 Aug 2021 19:20:08 GMT Message-Id: <202108301920.17UJK8R3059889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: cbaad7c77fb8..66719ee573ac - vendor/openssh - vendor branch updated 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/vendor/openssh X-Git-Reftype: branch X-Git-Commit: 66719ee573ac2290622db642f6e89ab35b179f3d X-Git-Oldrev: cbaad7c77fb842fe6b6be03cbdb3e85a6de759bf X-Git-Newrev: 66719ee573ac2290622db642f6e89ab35b179f3d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 19:20:08 -0000 The branch vendor/openssh has been updated by emaste: URL: https://cgit.FreeBSD.org/src/log/?id=cbaad7c77fb8..66719ee573ac 66719ee573ac Vendor import of OpenSSH 8.7p1 From owner-dev-commits-src-all@freebsd.org Mon Aug 30 19:34:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B5DB865CD02; Mon, 30 Aug 2021 19:34: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 4Gz0rx4pLsz3Dc4; Mon, 30 Aug 2021 19:34: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 8BF9E23A88; Mon, 30 Aug 2021 19:34: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 17UJYv3B082752; Mon, 30 Aug 2021 19:34:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UJYvdh082751; Mon, 30 Aug 2021 19:34:57 GMT (envelope-from git) Date: Mon, 30 Aug 2021 19:34:57 GMT Message-Id: <202108301934.17UJYvdh082751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 130a690ae16e - main - 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/main X-Git-Reftype: branch X-Git-Commit: 130a690ae16e1b845629e586203b508eff699f38 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 19:34:57 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=130a690ae16e1b845629e586203b508eff699f38 commit 130a690ae16e1b845629e586203b508eff699f38 Author: Dimitry Andric AuthorDate: 2021-08-29 11:15:23 +0000 Commit: Dimitry Andric CommitDate: 2021-08-30 19:34:34 +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 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D31710 --- 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 e98e636a36a8..5069c59ee339 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-all@freebsd.org Mon Aug 30 19:35:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F17C465CD0F; Mon, 30 Aug 2021 19:35: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 4Gz0sF6VV0z3DlT; Mon, 30 Aug 2021 19:35: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 C7B4023A8A; Mon, 30 Aug 2021 19:35: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 17UJZDlh082903; Mon, 30 Aug 2021 19:35:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UJZDZN082902; Mon, 30 Aug 2021 19:35:13 GMT (envelope-from git) Date: Mon, 30 Aug 2021 19:35:13 GMT Message-Id: <202108301935.17UJZDZN082902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 35a034250896 - main - openssh: add information about a local change 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/main X-Git-Reftype: branch X-Git-Commit: 35a034250896584a63204f60fa57e6eddca049ac Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 19:35:14 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=35a034250896584a63204f60fa57e6eddca049ac commit 35a034250896584a63204f60fa57e6eddca049ac Author: Ed Maste AuthorDate: 2021-08-30 19:28:38 +0000 Commit: Ed Maste CommitDate: 2021-08-30 19:35:03 +0000 openssh: add information about a local change --- crypto/openssh/FREEBSD-upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crypto/openssh/FREEBSD-upgrade b/crypto/openssh/FREEBSD-upgrade index 397b68dee96f..dc3c963f9158 100644 --- a/crypto/openssh/FREEBSD-upgrade +++ b/crypto/openssh/FREEBSD-upgrade @@ -181,6 +181,11 @@ We've added code to auth2.c to enforce the host.allow, host.deny, times.allow and times.deny login class capabilities. + This change was introduced in 5b400a39b8ad and been reworked a few + times (35762f591338, 076ad2f836d5, fc3c19a9fcee, 8d8b29232156). + A simplified version has been submitted as an OpenSSH-portable pull + request in https://github.com/openssh/openssh-portable/pull/262. + 8) HPN We no longer have the HPN patches (adaptive buffer size for From owner-dev-commits-src-all@freebsd.org Mon Aug 30 20:30:21 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2ACF965DD03; Mon, 30 Aug 2021 20:30: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 4Gz24s0dNSz3jLn; Mon, 30 Aug 2021 20:30: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 F1A62242AA; Mon, 30 Aug 2021 20:30: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 17UKUKUu058080; Mon, 30 Aug 2021 20:30:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UKUKAK058068; Mon, 30 Aug 2021 20:30:20 GMT (envelope-from git) Date: Mon, 30 Aug 2021 20:30:20 GMT Message-Id: <202108302030.17UKUKAK058068@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 470e851c4b1e - main - ktls: Support asynchronous dispatch of AEAD ciphers. 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/main X-Git-Reftype: branch X-Git-Commit: 470e851c4b1efee4fdb146326239cffe7c3fdfba Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 20:30:21 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=470e851c4b1efee4fdb146326239cffe7c3fdfba commit 470e851c4b1efee4fdb146326239cffe7c3fdfba Author: John Baldwin AuthorDate: 2021-08-30 20:11:52 +0000 Commit: John Baldwin CommitDate: 2021-08-30 20:11:52 +0000 ktls: Support asynchronous dispatch of AEAD ciphers. KTLS OCF support was originally targeted at software backends that used host CPU cycles to encrypt TLS records. As a result, each KTLS worker thread queued a single TLS record at a time and waited for it to be encrypted before processing another TLS record. This works well for software backends but limits throughput on OCF drivers for coprocessors that support asynchronous operation such as qat(4) or ccr(4). This change uses an alternate function (ktls_encrypt_async) when encrypt TLS records via a coprocessor. This function queues TLS records for encryption and returns. It defers the work done after a TLS record has been encrypted (such as marking the mbufs ready) to a callback invoked asynchronously by the coprocessor driver when a record has been encrypted. - Add a struct ktls_ocf_state that holds the per-request state stored on the stack for synchronous requests. Asynchronous requests malloc this structure while synchronous requests continue to allocate this structure on the stack. - Add a ktls_encrypt_async() variant of ktls_encrypt() which does not perform request completion after dispatching a request to OCF. Instead, the ktls_ocf backends invoke ktls_encrypt_cb() when a TLS record request completes for an asynchronous request. - Flag AEAD software TLS sessions as async if the backend driver selected by OCF is an async driver. - Pull code to create and dispatch an OCF request out of ktls_encrypt() into a new ktls_encrypt_one() function used by both ktls_encrypt() and ktls_encrypt_async(). - Pull code to "finish" the VM page shuffling for a file-backed TLS record into a helper function ktls_finish_noanon() used by both ktls_encrypt() and ktls_encrypt_cb(). Reviewed by: markj Tested on: ccr(4) (jhb), qat(4) (markj) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31665 --- sys/kern/uipc_ktls.c | 303 ++++++++++++++++++++++++++++++++++------------ sys/opencrypto/ktls.h | 53 ++++++++ sys/opencrypto/ktls_ocf.c | 300 +++++++++++++++++++++++++++------------------ sys/sys/ktls.h | 9 +- 4 files changed, 465 insertions(+), 200 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 34b4b15153ce..ee615255d16a 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -73,7 +74,8 @@ __FBSDID("$FreeBSD$"); #ifdef TCP_OFFLOAD #include #endif -#include +#include +#include #include #include #include @@ -2024,6 +2026,72 @@ ktls_buffer_alloc(struct ktls_wq *wq, struct mbuf *m) return (buf); } +static int +ktls_encrypt_record(struct ktls_wq *wq, struct mbuf *m, + struct ktls_session *tls, struct ktls_ocf_encrypt_state *state) +{ + vm_page_t pg; + int error, i, len, off; + + KASSERT((m->m_flags & (M_EXTPG | M_NOTREADY)) == (M_EXTPG | M_NOTREADY), + ("%p not unready & nomap mbuf\n", m)); + KASSERT(ptoa(m->m_epg_npgs) <= ktls_maxlen, + ("page count %d larger than maximum frame length %d", m->m_epg_npgs, + ktls_maxlen)); + + /* Anonymous mbufs are encrypted in place. */ + if ((m->m_epg_flags & EPG_FLAG_ANON) != 0) + return (tls->sw_encrypt(state, tls, m, NULL, 0)); + + /* + * For file-backed mbufs (from sendfile), anonymous wired + * pages are allocated and used as the encryption destination. + */ + if ((state->cbuf = ktls_buffer_alloc(wq, m)) != NULL) { + len = ptoa(m->m_epg_npgs - 1) + m->m_epg_last_len - + m->m_epg_1st_off; + state->dst_iov[0].iov_base = (char *)state->cbuf + + m->m_epg_1st_off; + state->dst_iov[0].iov_len = len; + state->parray[0] = DMAP_TO_PHYS((vm_offset_t)state->cbuf); + i = 1; + } else { + off = m->m_epg_1st_off; + for (i = 0; i < m->m_epg_npgs; i++, off = 0) { + do { + pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | + VM_ALLOC_NOOBJ | VM_ALLOC_NODUMP | + VM_ALLOC_WIRED | VM_ALLOC_WAITFAIL); + } while (pg == NULL); + + len = m_epg_pagelen(m, i, off); + state->parray[i] = VM_PAGE_TO_PHYS(pg); + state->dst_iov[i].iov_base = + (char *)PHYS_TO_DMAP(state->parray[i]) + off; + state->dst_iov[i].iov_len = len; + } + } + KASSERT(i + 1 <= nitems(state->dst_iov), ("dst_iov is too small")); + state->dst_iov[i].iov_base = m->m_epg_trail; + state->dst_iov[i].iov_len = m->m_epg_trllen; + + error = tls->sw_encrypt(state, tls, m, state->dst_iov, i + 1); + + if (__predict_false(error != 0)) { + /* Free the anonymous pages. */ + if (state->cbuf != NULL) + uma_zfree(ktls_buffer_zone, state->cbuf); + else { + for (i = 0; i < m->m_epg_npgs; i++) { + pg = PHYS_TO_VM_PAGE(state->parray[i]); + (void)vm_page_unwire_noq(pg); + vm_page_free(pg); + } + } + } + return (error); +} + void ktls_enqueue(struct mbuf *m, struct socket *so, int page_count) { @@ -2055,19 +2123,48 @@ ktls_enqueue(struct mbuf *m, struct socket *so, int page_count) counter_u64_add(ktls_cnt_tx_queued, 1); } -#define MAX_TLS_PAGES (1 + btoc(TLS_MAX_MSG_SIZE_V10_2)) +/* + * Once a file-backed mbuf (from sendfile) has been encrypted, free + * the pages from the file and replace them with the anonymous pages + * allocated in ktls_encrypt_record(). + */ +static void +ktls_finish_nonanon(struct mbuf *m, struct ktls_ocf_encrypt_state *state) +{ + int i; + + MPASS((m->m_epg_flags & EPG_FLAG_ANON) == 0); + + /* Free the old pages. */ + m->m_ext.ext_free(m); + + /* Replace them with the new pages. */ + if (state->cbuf != NULL) { + for (i = 0; i < m->m_epg_npgs; i++) + m->m_epg_pa[i] = state->parray[0] + ptoa(i); + + /* Contig pages should go back to the cache. */ + m->m_ext.ext_free = ktls_free_mext_contig; + } else { + for (i = 0; i < m->m_epg_npgs; i++) + m->m_epg_pa[i] = state->parray[i]; + + /* Use the basic free routine. */ + m->m_ext.ext_free = mb_free_mext_pgs; + } + + /* Pages are now writable. */ + m->m_epg_flags |= EPG_FLAG_ANON; +} static __noinline void ktls_encrypt(struct ktls_wq *wq, struct mbuf *top) { + struct ktls_ocf_encrypt_state state; struct ktls_session *tls; struct socket *so; struct mbuf *m; - vm_paddr_t parray[MAX_TLS_PAGES + 1]; - struct iovec dst_iov[MAX_TLS_PAGES + 2]; - vm_page_t pg; - void *cbuf; - int error, i, len, npages, off, total_pages; + int error, npages, total_pages; so = top->m_epg_so; tls = top->m_epg_tls; @@ -2101,86 +2198,19 @@ ktls_encrypt(struct ktls_wq *wq, struct mbuf *top) KASSERT(m->m_epg_tls == tls, ("different TLS sessions in a single mbuf chain: %p vs %p", tls, m->m_epg_tls)); - KASSERT((m->m_flags & (M_EXTPG | M_NOTREADY)) == - (M_EXTPG | M_NOTREADY), - ("%p not unready & nomap mbuf (top = %p)\n", m, top)); KASSERT(npages + m->m_epg_npgs <= total_pages, ("page count mismatch: top %p, total_pages %d, m %p", top, total_pages, m)); - KASSERT(ptoa(m->m_epg_npgs) <= ktls_maxlen, - ("page count %d larger than maximum frame length %d", - m->m_epg_npgs, ktls_maxlen)); - - /* - * For anonymous mbufs, encryption is done in place. - * For file-backed mbufs (from sendfile), anonymous - * wired pages are allocated and used as the - * encryption destination. - */ - if ((m->m_epg_flags & EPG_FLAG_ANON) != 0) { - error = (*tls->sw_encrypt)(tls, m, NULL, 0); - } else { - if ((cbuf = ktls_buffer_alloc(wq, m)) != NULL) { - len = ptoa(m->m_epg_npgs - 1) + - m->m_epg_last_len - m->m_epg_1st_off; - dst_iov[0].iov_base = (char *)cbuf + - m->m_epg_1st_off; - dst_iov[0].iov_len = len; - parray[0] = DMAP_TO_PHYS((vm_offset_t)cbuf); - i = 1; - } else { - off = m->m_epg_1st_off; - for (i = 0; i < m->m_epg_npgs; i++, off = 0) { - do { - pg = vm_page_alloc(NULL, 0, - VM_ALLOC_NORMAL | - VM_ALLOC_NOOBJ | - VM_ALLOC_NODUMP | - VM_ALLOC_WIRED | - VM_ALLOC_WAITFAIL); - } while (pg == NULL); - - len = m_epg_pagelen(m, i, off); - parray[i] = VM_PAGE_TO_PHYS(pg); - dst_iov[i].iov_base = - (char *)(void *)PHYS_TO_DMAP( - parray[i]) + off; - dst_iov[i].iov_len = len; - } - } - KASSERT(i + 1 <= nitems(dst_iov), - ("dst_iov is too small")); - dst_iov[i].iov_base = m->m_epg_trail; - dst_iov[i].iov_len = m->m_epg_trllen; - - error = (*tls->sw_encrypt)(tls, m, dst_iov, i + 1); - - /* Free the old pages. */ - m->m_ext.ext_free(m); - - /* Replace them with the new pages. */ - if (cbuf != NULL) { - for (i = 0; i < m->m_epg_npgs; i++) - m->m_epg_pa[i] = parray[0] + ptoa(i); - - /* Contig pages should go back to the cache. */ - m->m_ext.ext_free = ktls_free_mext_contig; - } else { - for (i = 0; i < m->m_epg_npgs; i++) - m->m_epg_pa[i] = parray[i]; - - /* Use the basic free routine. */ - m->m_ext.ext_free = mb_free_mext_pgs; - } - /* Pages are now writable. */ - m->m_epg_flags |= EPG_FLAG_ANON; - } + error = ktls_encrypt_record(wq, m, tls, &state); if (error) { counter_u64_add(ktls_offload_failed_crypto, 1); break; } + if ((m->m_epg_flags & EPG_FLAG_ANON) == 0) + ktls_finish_nonanon(m, &state); + npages += m->m_epg_nrdy; /* @@ -2208,6 +2238,118 @@ ktls_encrypt(struct ktls_wq *wq, struct mbuf *top) CURVNET_RESTORE(); } +void +ktls_encrypt_cb(struct ktls_ocf_encrypt_state *state, int error) +{ + struct ktls_session *tls; + struct socket *so; + struct mbuf *m; + int npages; + + m = state->m; + + if ((m->m_epg_flags & EPG_FLAG_ANON) == 0) + ktls_finish_nonanon(m, state); + + so = state->so; + free(state, M_KTLS); + + /* + * Drop a reference to the session now that it is no longer + * needed. Existing code depends on encrypted records having + * no associated session vs yet-to-be-encrypted records having + * an associated session. + */ + tls = m->m_epg_tls; + m->m_epg_tls = NULL; + ktls_free(tls); + + if (error != 0) + counter_u64_add(ktls_offload_failed_crypto, 1); + + CURVNET_SET(so->so_vnet); + npages = m->m_epg_nrdy; + + if (error == 0) { + (void)(*so->so_proto->pr_usrreqs->pru_ready)(so, m, npages); + } else { + so->so_proto->pr_usrreqs->pru_abort(so); + so->so_error = EIO; + mb_free_notready(m, npages); + } + + SOCK_LOCK(so); + sorele(so); + CURVNET_RESTORE(); +} + +/* + * Similar to ktls_encrypt, but used with asynchronous OCF backends + * (coprocessors) where encryption does not use host CPU resources and + * it can be beneficial to queue more requests than CPUs. + */ +static __noinline void +ktls_encrypt_async(struct ktls_wq *wq, struct mbuf *top) +{ + struct ktls_ocf_encrypt_state *state; + struct ktls_session *tls; + struct socket *so; + struct mbuf *m, *n; + int error, mpages, npages, total_pages; + + so = top->m_epg_so; + tls = top->m_epg_tls; + KASSERT(tls != NULL, ("tls = NULL, top = %p\n", top)); + KASSERT(so != NULL, ("so = NULL, top = %p\n", top)); +#ifdef INVARIANTS + top->m_epg_so = NULL; +#endif + total_pages = top->m_epg_enc_cnt; + npages = 0; + + error = 0; + for (m = top; npages != total_pages; m = n) { + KASSERT(m->m_epg_tls == tls, + ("different TLS sessions in a single mbuf chain: %p vs %p", + tls, m->m_epg_tls)); + KASSERT(npages + m->m_epg_npgs <= total_pages, + ("page count mismatch: top %p, total_pages %d, m %p", top, + total_pages, m)); + + state = malloc(sizeof(*state), M_KTLS, M_WAITOK | M_ZERO); + soref(so); + state->so = so; + state->m = m; + + mpages = m->m_epg_nrdy; + n = m->m_next; + + error = ktls_encrypt_record(wq, m, tls, state); + if (error) { + counter_u64_add(ktls_offload_failed_crypto, 1); + free(state, M_KTLS); + CURVNET_SET(so->so_vnet); + SOCK_LOCK(so); + sorele(so); + CURVNET_RESTORE(); + break; + } + + npages += mpages; + } + + CURVNET_SET(so->so_vnet); + if (error != 0) { + so->so_proto->pr_usrreqs->pru_abort(so); + so->so_error = EIO; + mb_free_notready(m, total_pages - npages); + } + + SOCK_LOCK(so); + sorele(so); + CURVNET_RESTORE(); +} + static void ktls_alloc_thread(void *ctx) { @@ -2306,7 +2448,10 @@ ktls_work_thread(void *ctx) ktls_free(m->m_epg_tls); m_free_raw(m); } else { - ktls_encrypt(wq, m); + if (m->m_epg_tls->sync_dispatch) + ktls_encrypt(wq, m); + else + ktls_encrypt_async(wq, m); counter_u64_add(ktls_cnt_tx_queued, -1); } } diff --git a/sys/opencrypto/ktls.h b/sys/opencrypto/ktls.h new file mode 100644 index 000000000000..9eb01c9b02a5 --- /dev/null +++ b/sys/opencrypto/ktls.h @@ -0,0 +1,53 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Netflix Inc. + * + * 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef __OPENCRYPTO_KTLS_H__ +#define __OPENCRYPTO_KTLS_H__ + +#define MAX_TLS_PAGES (1 + btoc(TLS_MAX_MSG_SIZE_V10_2)) + +struct ktls_ocf_encrypt_state { + struct socket *so; + struct mbuf *m; + void *cbuf; + struct iovec dst_iov[MAX_TLS_PAGES + 2]; + vm_paddr_t parray[MAX_TLS_PAGES + 1]; + + struct cryptop crp; + struct uio uio; + union { + struct tls_mac_data mac; + struct tls_aead_data aead; + struct tls_aead_data_13 aead13; + }; +}; + +void ktls_encrypt_cb(struct ktls_ocf_encrypt_state *state, int error); +void ktls_ocf_free(struct ktls_session *tls); +int ktls_ocf_try(struct socket *so, struct ktls_session *tls, int direction); + +#endif /* !__OPENCRYPTO_KTLS_H__ */ diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index bbe26e3f5f18..a3b9ab49e4f0 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include struct ocf_session { crypto_session_t sid; @@ -180,13 +181,53 @@ ktls_ocf_dispatch(struct ocf_session *os, struct cryptop *crp) } static int -ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, struct mbuf *m, - struct iovec *outiov, int outiovcnt) +ktls_ocf_dispatch_async_cb(struct cryptop *crp) +{ + struct ktls_ocf_encrypt_state *state; + int error; + + state = crp->crp_opaque; + if (crp->crp_etype == EAGAIN) { + crp->crp_etype = 0; + crp->crp_flags &= ~CRYPTO_F_DONE; + counter_u64_add(ocf_retries, 1); + error = crypto_dispatch(crp); + if (error != 0) { + crypto_destroyreq(crp); + ktls_encrypt_cb(state, error); + } + return (0); + } + + error = crp->crp_etype; + crypto_destroyreq(crp); + ktls_encrypt_cb(state, error); + return (0); +} + +static int +ktls_ocf_dispatch_async(struct ktls_ocf_encrypt_state *state, + struct cryptop *crp) +{ + int error; + + crp->crp_opaque = state; + crp->crp_callback = ktls_ocf_dispatch_async_cb; + error = crypto_dispatch(crp); + if (error != 0) + crypto_destroyreq(crp); + return (error); +} + +static int +ktls_ocf_tls_cbc_encrypt(struct ktls_ocf_encrypt_state *state, + struct ktls_session *tls, struct mbuf *m, struct iovec *outiov, + int outiovcnt) { const struct tls_record_layer *hdr; - struct uio uio; - struct tls_mac_data ad; - struct cryptop crp; + struct uio *uio; + struct tls_mac_data *ad; + struct cryptop *crp; struct ocf_session *os; struct iovec iov[m->m_epg_npgs + 2]; u_int pgoff; @@ -198,6 +239,9 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, struct mbuf *m, os = tls->cipher; hdr = (const struct tls_record_layer *)m->m_epg_hdr; + crp = &state->crp; + uio = &state->uio; + MPASS(tls->sync_dispatch); #ifdef INVARIANTS if (os->implicit_iv) { @@ -221,15 +265,16 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, struct mbuf *m, tls_comp_len = m->m_len - (m->m_epg_hdrlen + m->m_epg_trllen); /* Initialize the AAD. */ - ad.seq = htobe64(m->m_epg_seqno); - ad.type = hdr->tls_type; - ad.tls_vmajor = hdr->tls_vmajor; - ad.tls_vminor = hdr->tls_vminor; - ad.tls_length = htons(tls_comp_len); + ad = &state->mac; + ad->seq = htobe64(m->m_epg_seqno); + ad->type = hdr->tls_type; + ad->tls_vmajor = hdr->tls_vmajor; + ad->tls_vminor = hdr->tls_vminor; + ad->tls_length = htons(tls_comp_len); /* First, compute the MAC. */ - iov[0].iov_base = &ad; - iov[0].iov_len = sizeof(ad); + iov[0].iov_base = ad; + iov[0].iov_len = sizeof(*ad); pgoff = m->m_epg_1st_off; for (i = 0; i < m->m_epg_npgs; i++, pgoff = 0) { iov[i + 1].iov_base = (void *)PHYS_TO_DMAP(m->m_epg_pa[i] + @@ -238,23 +283,23 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, struct mbuf *m, } iov[m->m_epg_npgs + 1].iov_base = m->m_epg_trail; iov[m->m_epg_npgs + 1].iov_len = os->mac_len; - uio.uio_iov = iov; - uio.uio_iovcnt = m->m_epg_npgs + 2; - uio.uio_offset = 0; - uio.uio_segflg = UIO_SYSSPACE; - uio.uio_td = curthread; - uio.uio_resid = sizeof(ad) + tls_comp_len + os->mac_len; - - crypto_initreq(&crp, os->mac_sid); - crp.crp_payload_start = 0; - crp.crp_payload_length = sizeof(ad) + tls_comp_len; - crp.crp_digest_start = crp.crp_payload_length; - crp.crp_op = CRYPTO_OP_COMPUTE_DIGEST; - crp.crp_flags = CRYPTO_F_CBIMM; - crypto_use_uio(&crp, &uio); - error = ktls_ocf_dispatch(os, &crp); - - crypto_destroyreq(&crp); + uio->uio_iov = iov; + uio->uio_iovcnt = m->m_epg_npgs + 2; + uio->uio_offset = 0; + uio->uio_segflg = UIO_SYSSPACE; + uio->uio_td = curthread; + uio->uio_resid = sizeof(*ad) + tls_comp_len + os->mac_len; + + crypto_initreq(crp, os->mac_sid); + crp->crp_payload_start = 0; + crp->crp_payload_length = sizeof(*ad) + tls_comp_len; + crp->crp_digest_start = crp->crp_payload_length; + crp->crp_op = CRYPTO_OP_COMPUTE_DIGEST; + crp->crp_flags = CRYPTO_F_CBIMM; + crypto_use_uio(crp, uio); + error = ktls_ocf_dispatch(os, crp); + + crypto_destroyreq(crp); if (error) { #ifdef INVARIANTS if (os->implicit_iv) { @@ -272,27 +317,27 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, struct mbuf *m, m->m_epg_trail[os->mac_len + i] = pad; /* Finally, encrypt the record. */ - crypto_initreq(&crp, os->sid); - crp.crp_payload_start = m->m_epg_hdrlen; - crp.crp_payload_length = tls_comp_len + m->m_epg_trllen; - KASSERT(crp.crp_payload_length % AES_BLOCK_LEN == 0, + crypto_initreq(crp, os->sid); + crp->crp_payload_start = m->m_epg_hdrlen; + crp->crp_payload_length = tls_comp_len + m->m_epg_trllen; + KASSERT(crp->crp_payload_length % AES_BLOCK_LEN == 0, ("invalid encryption size")); - crypto_use_single_mbuf(&crp, m); - crp.crp_op = CRYPTO_OP_ENCRYPT; - crp.crp_flags = CRYPTO_F_CBIMM | CRYPTO_F_IV_SEPARATE; + crypto_use_single_mbuf(crp, m); + crp->crp_op = CRYPTO_OP_ENCRYPT; + crp->crp_flags = CRYPTO_F_CBIMM | CRYPTO_F_IV_SEPARATE; if (os->implicit_iv) - memcpy(crp.crp_iv, os->iv, AES_BLOCK_LEN); + memcpy(crp->crp_iv, os->iv, AES_BLOCK_LEN); else - memcpy(crp.crp_iv, hdr + 1, AES_BLOCK_LEN); + memcpy(crp->crp_iv, hdr + 1, AES_BLOCK_LEN); if (outiov != NULL) { - uio.uio_iov = outiov; - uio.uio_iovcnt = outiovcnt; - uio.uio_offset = 0; - uio.uio_segflg = UIO_SYSSPACE; - uio.uio_td = curthread; - uio.uio_resid = crp.crp_payload_length; - crypto_use_output_uio(&crp, &uio); + uio->uio_iov = outiov; + uio->uio_iovcnt = outiovcnt; + uio->uio_offset = 0; + uio->uio_segflg = UIO_SYSSPACE; + uio->uio_td = curthread; + uio->uio_resid = crp->crp_payload_length; + crypto_use_output_uio(crp, uio); } if (os->implicit_iv) @@ -303,9 +348,9 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, struct mbuf *m, counter_u64_add(ocf_separate_output, 1); else counter_u64_add(ocf_inplace, 1); - error = ktls_ocf_dispatch(os, &crp); + error = ktls_ocf_dispatch(os, crp); - crypto_destroyreq(&crp); + crypto_destroyreq(crp); if (os->implicit_iv) { KASSERT(os->mac_len + pad + 1 >= AES_BLOCK_LEN, @@ -323,26 +368,29 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, struct mbuf *m, } static int -ktls_ocf_tls12_aead_encrypt(struct ktls_session *tls, struct mbuf *m, - struct iovec *outiov, int outiovcnt) +ktls_ocf_tls12_aead_encrypt(struct ktls_ocf_encrypt_state *state, + struct ktls_session *tls, struct mbuf *m, struct iovec *outiov, + int outiovcnt) { const struct tls_record_layer *hdr; - struct uio uio; - struct tls_aead_data ad; - struct cryptop crp; + struct uio *uio; + struct tls_aead_data *ad; + struct cryptop *crp; struct ocf_session *os; int error; uint16_t tls_comp_len; os = tls->cipher; hdr = (const struct tls_record_layer *)m->m_epg_hdr; + crp = &state->crp; + uio = &state->uio; - crypto_initreq(&crp, os->sid); + crypto_initreq(crp, os->sid); /* Setup the IV. */ if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) { - memcpy(crp.crp_iv, tls->params.iv, TLS_AEAD_GCM_LEN); - memcpy(crp.crp_iv + TLS_AEAD_GCM_LEN, hdr + 1, + memcpy(crp->crp_iv, tls->params.iv, TLS_AEAD_GCM_LEN); + memcpy(crp->crp_iv + TLS_AEAD_GCM_LEN, hdr + 1, sizeof(uint64_t)); } else { /* @@ -350,41 +398,42 @@ ktls_ocf_tls12_aead_encrypt(struct ktls_session *tls, struct mbuf *m, * identically to constructing the IV for AEAD in TLS * 1.3. */ - memcpy(crp.crp_iv, tls->params.iv, tls->params.iv_len); - *(uint64_t *)(crp.crp_iv + 4) ^= htobe64(m->m_epg_seqno); + memcpy(crp->crp_iv, tls->params.iv, tls->params.iv_len); + *(uint64_t *)(crp->crp_iv + 4) ^= htobe64(m->m_epg_seqno); } /* Setup the AAD. */ + ad = &state->aead; tls_comp_len = m->m_len - (m->m_epg_hdrlen + m->m_epg_trllen); - ad.seq = htobe64(m->m_epg_seqno); - ad.type = hdr->tls_type; - ad.tls_vmajor = hdr->tls_vmajor; - ad.tls_vminor = hdr->tls_vminor; - ad.tls_length = htons(tls_comp_len); - crp.crp_aad = &ad; - crp.crp_aad_length = sizeof(ad); + ad->seq = htobe64(m->m_epg_seqno); + ad->type = hdr->tls_type; + ad->tls_vmajor = hdr->tls_vmajor; + ad->tls_vminor = hdr->tls_vminor; + ad->tls_length = htons(tls_comp_len); + crp->crp_aad = ad; + crp->crp_aad_length = sizeof(*ad); /* Set fields for input payload. */ - crypto_use_single_mbuf(&crp, m); - crp.crp_payload_start = m->m_epg_hdrlen; - crp.crp_payload_length = tls_comp_len; + crypto_use_single_mbuf(crp, m); + crp->crp_payload_start = m->m_epg_hdrlen; + crp->crp_payload_length = tls_comp_len; if (outiov != NULL) { - crp.crp_digest_start = crp.crp_payload_length; - - uio.uio_iov = outiov; - uio.uio_iovcnt = outiovcnt; - uio.uio_offset = 0; - uio.uio_segflg = UIO_SYSSPACE; - uio.uio_td = curthread; - uio.uio_resid = crp.crp_payload_length + tls->params.tls_tlen; - crypto_use_output_uio(&crp, &uio); + crp->crp_digest_start = crp->crp_payload_length; + + uio->uio_iov = outiov; + uio->uio_iovcnt = outiovcnt; + uio->uio_offset = 0; + uio->uio_segflg = UIO_SYSSPACE; + uio->uio_td = curthread; + uio->uio_resid = crp->crp_payload_length + tls->params.tls_tlen; + crypto_use_output_uio(crp, uio); } else - crp.crp_digest_start = crp.crp_payload_start + - crp.crp_payload_length; + crp->crp_digest_start = crp->crp_payload_start + + crp->crp_payload_length; - crp.crp_op = CRYPTO_OP_ENCRYPT | CRYPTO_OP_COMPUTE_DIGEST; - crp.crp_flags = CRYPTO_F_CBIMM | CRYPTO_F_IV_SEPARATE; + crp->crp_op = CRYPTO_OP_ENCRYPT | CRYPTO_OP_COMPUTE_DIGEST; + crp->crp_flags = CRYPTO_F_CBIMM | CRYPTO_F_IV_SEPARATE; if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) counter_u64_add(ocf_tls12_gcm_crypts, 1); else @@ -393,9 +442,11 @@ ktls_ocf_tls12_aead_encrypt(struct ktls_session *tls, struct mbuf *m, counter_u64_add(ocf_separate_output, 1); else counter_u64_add(ocf_inplace, 1); - error = ktls_ocf_dispatch(os, &crp); - - crypto_destroyreq(&crp); + if (tls->sync_dispatch) { + error = ktls_ocf_dispatch(os, crp); + crypto_destroyreq(crp); + } else + error = ktls_ocf_dispatch_async(state, crp); return (error); } @@ -467,61 +518,66 @@ ktls_ocf_tls12_aead_decrypt(struct ktls_session *tls, } static int -ktls_ocf_tls13_aead_encrypt(struct ktls_session *tls, struct mbuf *m, - struct iovec *outiov, int outiovcnt) +ktls_ocf_tls13_aead_encrypt(struct ktls_ocf_encrypt_state *state, + struct ktls_session *tls, struct mbuf *m, struct iovec *outiov, + int outiovcnt) { const struct tls_record_layer *hdr; - struct uio uio; - struct tls_aead_data_13 ad; - char nonce[12]; - struct cryptop crp; + struct uio *uio; + struct tls_aead_data_13 *ad; + struct cryptop *crp; struct ocf_session *os; + char nonce[12]; int error; os = tls->cipher; hdr = (const struct tls_record_layer *)m->m_epg_hdr; + crp = &state->crp; + uio = &state->uio; - crypto_initreq(&crp, os->sid); + crypto_initreq(crp, os->sid); /* Setup the nonce. */ memcpy(nonce, tls->params.iv, tls->params.iv_len); *(uint64_t *)(nonce + 4) ^= htobe64(m->m_epg_seqno); /* Setup the AAD. */ - ad.type = hdr->tls_type; - ad.tls_vmajor = hdr->tls_vmajor; - ad.tls_vminor = hdr->tls_vminor; - ad.tls_length = hdr->tls_length; - crp.crp_aad = &ad; - crp.crp_aad_length = sizeof(ad); + ad = &state->aead13; + ad->type = hdr->tls_type; + ad->tls_vmajor = hdr->tls_vmajor; + ad->tls_vminor = hdr->tls_vminor; + ad->tls_length = hdr->tls_length; + crp->crp_aad = ad; + crp->crp_aad_length = sizeof(*ad); /* Set fields for input payload. */ - crypto_use_single_mbuf(&crp, m); - crp.crp_payload_start = m->m_epg_hdrlen; - crp.crp_payload_length = m->m_len - (m->m_epg_hdrlen + m->m_epg_trllen); + crypto_use_single_mbuf(crp, m); + crp->crp_payload_start = m->m_epg_hdrlen; + crp->crp_payload_length = m->m_len - + (m->m_epg_hdrlen + m->m_epg_trllen); /* Store the record type as the first byte of the trailer. */ m->m_epg_trail[0] = m->m_epg_record_type; - crp.crp_payload_length++; + crp->crp_payload_length++; if (outiov != NULL) { - crp.crp_digest_start = crp.crp_payload_length; - - uio.uio_iov = outiov; - uio.uio_iovcnt = outiovcnt; - uio.uio_offset = 0; - uio.uio_segflg = UIO_SYSSPACE; - uio.uio_td = curthread; - uio.uio_resid = m->m_len - m->m_epg_hdrlen; - crypto_use_output_uio(&crp, &uio); + crp->crp_digest_start = crp->crp_payload_length; + + uio->uio_iov = outiov; + uio->uio_iovcnt = outiovcnt; + uio->uio_offset = 0; + uio->uio_segflg = UIO_SYSSPACE; + uio->uio_td = curthread; + uio->uio_resid = m->m_len - m->m_epg_hdrlen; + crypto_use_output_uio(crp, uio); } else - crp.crp_digest_start = crp.crp_payload_start + - crp.crp_payload_length; + crp->crp_digest_start = crp->crp_payload_start + + crp->crp_payload_length; - crp.crp_op = CRYPTO_OP_ENCRYPT | CRYPTO_OP_COMPUTE_DIGEST; - crp.crp_flags = CRYPTO_F_CBIMM | CRYPTO_F_IV_SEPARATE; + crp->crp_op = CRYPTO_OP_ENCRYPT | CRYPTO_OP_COMPUTE_DIGEST; + crp->crp_flags = CRYPTO_F_CBIMM | CRYPTO_F_IV_SEPARATE; - memcpy(crp.crp_iv, nonce, sizeof(nonce)); + memcpy(crp->crp_iv, nonce, sizeof(nonce)); if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) counter_u64_add(ocf_tls13_gcm_crypts, 1); @@ -531,9 +587,11 @@ ktls_ocf_tls13_aead_encrypt(struct ktls_session *tls, struct mbuf *m, counter_u64_add(ocf_separate_output, 1); else counter_u64_add(ocf_inplace, 1); - error = ktls_ocf_dispatch(os, &crp); - - crypto_destroyreq(&crp); + if (tls->sync_dispatch) { + error = ktls_ocf_dispatch(os, crp); + crypto_destroyreq(crp); + } else + error = ktls_ocf_dispatch_async(state, crp); return (error); } @@ -705,5 +763,13 @@ ktls_ocf_try(struct socket *so, struct ktls_session *tls, int direction) memcpy(os->iv, tls->params.iv, AES_BLOCK_LEN); } } + + /* + * AES-CBC is always synchronous currently. Asynchronous + * operation would require multiple callbacks and an additional + * iovec array in ktls_ocf_encrypt_state. + */ + tls->sync_dispatch = CRYPTO_SESS_SYNC(os->sid) || + tls->params.cipher_algorithm == CRYPTO_AES_CBC; return (0); } diff --git a/sys/sys/ktls.h b/sys/sys/ktls.h index 437e36f965ea..9729fd6fe8c4 100644 --- a/sys/sys/ktls.h +++ b/sys/sys/ktls.h @@ -167,6 +167,7 @@ struct tls_session_params { #define KTLS_RX 2 struct iovec; +struct ktls_ocf_encrypt_state; struct ktls_session; struct m_snd_tag; struct mbuf; @@ -175,8 +176,9 @@ struct socket; struct ktls_session { union { - int (*sw_encrypt)(struct ktls_session *tls, struct mbuf *m, - struct iovec *dst, int iovcnt); + int (*sw_encrypt)(struct ktls_ocf_encrypt_state *state, + struct ktls_session *tls, struct mbuf *m, + struct iovec *outiov, int outiovcnt); int (*sw_decrypt)(struct ktls_session *tls, const struct tls_record_layer *hdr, struct mbuf *m, uint64_t seqno, int *trailer_len); @@ -195,6 +197,7 @@ struct ktls_session { struct inpcb *inp; bool reset_pending; bool disable_ifnet_pending; + bool sync_dispatch; } __aligned(CACHE_LINE_SIZE); extern unsigned int ktls_ifnet_max_rexmit_pct; @@ -206,8 +209,6 @@ int ktls_enable_tx(struct socket *so, struct tls_enable *en); void ktls_destroy(struct ktls_session *tls); void ktls_frame(struct mbuf *m, struct ktls_session *tls, int *enqueue_cnt, uint8_t record_type); -void ktls_ocf_free(struct ktls_session *tls); -int ktls_ocf_try(struct socket *so, struct ktls_session *tls, int direction); void ktls_seq(struct sockbuf *sb, struct mbuf *m); void ktls_enqueue(struct mbuf *m, struct socket *so, int page_count); void ktls_enqueue_to_free(struct mbuf *m); From owner-dev-commits-src-all@freebsd.org Mon Aug 30 21:13:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E14B965E804; Mon, 30 Aug 2021 21:13: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 4Gz33C5yY8z4RfR; Mon, 30 Aug 2021 21:13: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 B3C4624C59; Mon, 30 Aug 2021 21:13: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 17ULDxYg016226; Mon, 30 Aug 2021 21:13:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17ULDx7e016225; Mon, 30 Aug 2021 21:13:59 GMT (envelope-from git) Date: Mon, 30 Aug 2021 21:13:59 GMT Message-Id: <202108302113.17ULDx7e016225@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: f84c30106e8b - main - routing: Fix newly-added rt_get_inet[6]_parent() api. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f84c30106e8b725774b4e9a32c8dd11c90da8c25 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 21:13:59 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=f84c30106e8b725774b4e9a32c8dd11c90da8c25 commit f84c30106e8b725774b4e9a32c8dd11c90da8c25 Author: Alexander V. Chernikov AuthorDate: 2021-08-30 21:10:37 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-08-30 21:10:37 +0000 routing: Fix newly-added rt_get_inet[6]_parent() api. Correctly handle the case when no default route is present. Reported by: Konrad --- sys/net/route/route_helpers.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/net/route/route_helpers.c b/sys/net/route/route_helpers.c index 569e13a308eb..0696eec416b1 100644 --- a/sys/net/route/route_helpers.c +++ b/sys/net/route/route_helpers.c @@ -434,6 +434,9 @@ get_inet_parent_prefix(uint32_t fibnum, struct in_addr addr, int plen) struct radix_node *rn; rt = fib4_lookup_rt(fibnum, addr, 0, NHR_UNLOCKED, &rnd); + if (rt == NULL) + return (NULL); + rt_get_inet_prefix_plen(rt, &addr4, &parent_plen, &scopeid); if (parent_plen <= plen) return (rt); @@ -503,6 +506,9 @@ get_inet6_parent_prefix(uint32_t fibnum, const struct in6_addr *paddr, int plen) struct radix_node *rn; rt = fib6_lookup_rt(fibnum, paddr, 0, NHR_UNLOCKED, &rnd); + if (rt == NULL) + return (NULL); + rt_get_inet6_prefix_plen(rt, &addr6, &parent_plen, &scopeid); if (parent_plen <= plen) return (rt); From owner-dev-commits-src-all@freebsd.org Mon Aug 30 22:32:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1374165F66F; Mon, 30 Aug 2021 22:32: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 4Gz4nH6x43z4nYV; Mon, 30 Aug 2021 22:32: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 D65DD25A76; Mon, 30 Aug 2021 22:32: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 17UMW3oP022168; Mon, 30 Aug 2021 22:32:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UMW3QP022167; Mon, 30 Aug 2021 22:32:03 GMT (envelope-from git) Date: Mon, 30 Aug 2021 22:32:03 GMT Message-Id: <202108302232.17UMW3QP022167@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 64f09f234665 - main - cxgbei: Limit T5 transmit data segments to 15k. 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/main X-Git-Reftype: branch X-Git-Commit: 64f09f2346650f02b6deccbe05bb02b88fce4a5e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 22:32:04 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=64f09f2346650f02b6deccbe05bb02b88fce4a5e commit 64f09f2346650f02b6deccbe05bb02b88fce4a5e Author: John Baldwin AuthorDate: 2021-08-30 22:27:08 +0000 Commit: John Baldwin CommitDate: 2021-08-30 22:27:08 +0000 cxgbei: Limit T5 transmit data segments to 15k. This avoids exceeding a limit in the firmware when using ISO with jumbo frames. Reported by: Jithesh Arakkan @ Chelsio Sponsored by: Chelsio Communications --- sys/dev/cxgbe/cxgbei/cxgbei.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c index 6af7043460fb..e6ed2671711a 100644 --- a/sys/dev/cxgbe/cxgbei/cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/cxgbei.c @@ -132,6 +132,8 @@ read_pdu_limits(struct adapter *sc, uint32_t *max_tx_data_len, rx_len = min(rx_len, 4 * (1U << pr->pr_page_shift[0])); if (chip_id(sc) == CHELSIO_T5) { + tx_len = min(tx_len, 15360); + rx_len = rounddown2(rx_len, 512); tx_len = rounddown2(tx_len, 512); } From owner-dev-commits-src-all@freebsd.org Mon Aug 30 22:38:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B854065F8CE; Mon, 30 Aug 2021 22:38: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 4Gz4x54LPNz4pp3; Mon, 30 Aug 2021 22:38: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 7A13225F45; Mon, 30 Aug 2021 22:38: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 17UMcnCs022819; Mon, 30 Aug 2021 22:38:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UMcnFI022818; Mon, 30 Aug 2021 22:38:49 GMT (envelope-from git) Date: Mon, 30 Aug 2021 22:38:49 GMT Message-Id: <202108302238.17UMcnFI022818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: f5d78bea1f69 - main - sifive_spi: Add missing case for SPIBUS_MODE_NONE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5d78bea1f699c05e1694505088e61d22b8fb1f5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 22:38:49 -0000 The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=f5d78bea1f699c05e1694505088e61d22b8fb1f5 commit f5d78bea1f699c05e1694505088e61d22b8fb1f5 Author: Thomas Skibo AuthorDate: 2021-08-30 20:39:20 +0000 Commit: Jessica Clarke CommitDate: 2021-08-30 22:38:02 +0000 sifive_spi: Add missing case for SPIBUS_MODE_NONE Otherwise sckmode is left uninitialised, not zero. This mode is used for the on-board flash on the HiFive Unmatched board. Whilst here, catch unknown modes and return an error rather than silently continuing. Reviewed by: #riscv, jrtc27 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31562 --- sys/riscv/sifive/sifive_spi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/riscv/sifive/sifive_spi.c b/sys/riscv/sifive/sifive_spi.c index df72beaac7ae..4a5d79fec01d 100644 --- a/sys/riscv/sifive/sifive_spi.c +++ b/sys/riscv/sifive/sifive_spi.c @@ -219,6 +219,9 @@ sfspi_setup(struct sfspi_softc *sc, uint32_t cs, uint32_t mode, SFSPI_WRITE(sc, SFSPI_REG_SCKDIV, sckdiv); switch (mode) { + case SPIBUS_MODE_NONE: + sckmode = 0; + break; case SPIBUS_MODE_CPHA: sckmode = SFSPI_SCKMODE_PHA; break; @@ -228,6 +231,8 @@ sfspi_setup(struct sfspi_softc *sc, uint32_t cs, uint32_t mode, case SPIBUS_MODE_CPOL_CPHA: sckmode = SFSPI_SCKMODE_PHA | SFSPI_SCKMODE_POL; break; + default: + return (EINVAL); } SFSPI_WRITE(sc, SFSPI_REG_SCKMODE, sckmode); From owner-dev-commits-src-all@freebsd.org Mon Aug 30 22:38:50 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E4B7A65FA17; Mon, 30 Aug 2021 22:38: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 4Gz4x653l0z4px8; Mon, 30 Aug 2021 22:38: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 946B225B7E; Mon, 30 Aug 2021 22:38: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 17UMcowM022843; Mon, 30 Aug 2021 22:38:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UMcoXK022842; Mon, 30 Aug 2021 22:38:50 GMT (envelope-from git) Date: Mon, 30 Aug 2021 22:38:50 GMT Message-Id: <202108302238.17UMcoXK022842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 416ac155bb75 - main - mx25l: Add support for Integrated Silicon Solution is25wp256 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 416ac155bb750fa55917daf340abe4ef04e7d4e6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 22:38:51 -0000 The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=416ac155bb750fa55917daf340abe4ef04e7d4e6 commit 416ac155bb750fa55917daf340abe4ef04e7d4e6 Author: Thomas Skibo AuthorDate: 2021-08-30 20:39:20 +0000 Commit: Jessica Clarke CommitDate: 2021-08-30 22:38:02 +0000 mx25l: Add support for Integrated Silicon Solution is25wp256 This is used for the on-board flash on the HiFive Unmatched board. Reviewed by: #riscv, jrtc27 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31562 --- sys/dev/flash/mx25l.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/flash/mx25l.c b/sys/dev/flash/mx25l.c index be845c2064f9..9608bbf57314 100644 --- a/sys/dev/flash/mx25l.c +++ b/sys/dev/flash/mx25l.c @@ -152,6 +152,9 @@ static struct mx25l_flash_ident flash_devices[] = { /* GigaDevice */ { "gd25q64", 0xc8, 0x4017, 64 * 1024, 128, FL_ERASE_4K }, { "gd25q128", 0xc8, 0x4018, 64 * 1024, 256, FL_ERASE_4K }, + + /* Integrated Silicon Solution */ + { "is25wp256", 0x9d, 0x7019, 64 * 1024, 512, FL_ERASE_4K | FL_ENABLE_4B_ADDR}, }; static int From owner-dev-commits-src-all@freebsd.org Mon Aug 30 22:57:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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 481E465FA40; Mon, 30 Aug 2021 22:57: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 4Gz5L55zhdz4tGq; Mon, 30 Aug 2021 22:57: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 A84D3264BD; Mon, 30 Aug 2021 22:57: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 17UMv199049213; Mon, 30 Aug 2021 22:57:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UMv1I1049212; Mon, 30 Aug 2021 22:57:01 GMT (envelope-from git) Date: Mon, 30 Aug 2021 22:57:01 GMT Message-Id: <202108302257.17UMv1I1049212@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d39e65b5bdc0 - main - cxgbei: Add sysctls to report the maximum data segment lengths. 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/main X-Git-Reftype: branch X-Git-Commit: d39e65b5bdc04cac4521ad8e071015cd751c2302 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 22:57:02 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d39e65b5bdc04cac4521ad8e071015cd751c2302 commit d39e65b5bdc04cac4521ad8e071015cd751c2302 Author: John Baldwin AuthorDate: 2021-08-30 22:55:40 +0000 Commit: John Baldwin CommitDate: 2021-08-30 22:55:40 +0000 cxgbei: Add sysctls to report the maximum data segment lengths. These sysctls report the maximum data segment lengths supported by an adapter. These are the values advertised to the remote end during the login phase. Sponsored by: Chelsio Communications --- sys/dev/cxgbe/cxgbei/cxgbei.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c index e6ed2671711a..2fa38f941b91 100644 --- a/sys/dev/cxgbe/cxgbei/cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/cxgbei.c @@ -198,6 +198,13 @@ cxgbei_init(struct adapter *sc, struct cxgbei_data *ci) SYSCTL_ADD_UINT(&ci->ctx, children, OID_AUTO, "ddp_threshold", CTLFLAG_RW, &ci->ddp_threshold, 0, "Rx zero copy threshold"); + SYSCTL_ADD_UINT(&ci->ctx, children, OID_AUTO, "max_rx_data_len", + CTLFLAG_RD, &ci->max_rx_data_len, 0, + "Maximum receive data segment length"); + SYSCTL_ADD_UINT(&ci->ctx, children, OID_AUTO, "max_tx_data_len", + CTLFLAG_RD, &ci->max_tx_data_len, 0, + "Maximum transmit data segment length"); + return (0); } From owner-dev-commits-src-all@freebsd.org Mon Aug 30 23:13:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 23:13:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 23:13:19 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Mon Aug 30 23:33:18 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DA157660881; Mon, 30 Aug 2021 23:33:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.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 mx1.freebsd.org (Postfix) with ESMTPS id 4Gz67x6SSZz3KDj; Mon, 30 Aug 2021 23:33:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 17UNXAgD068354 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 31 Aug 2021 02:33:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 17UNXAgD068354 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 17UNXA7q068353; Tue, 31 Aug 2021 02:33:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 31 Aug 2021 02:33:10 +0300 From: Konstantin Belousov To: Dimitry Andric Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 5b8f07b12f84 - main - Fix -Wformat errors in pfctl on 32-bit architectures Message-ID: References: <202108291531.17TFVoah033310@gitrepo.freebsd.org> <6A084192-562D-404D-9833-51A708FA1BC0@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4Gz67x6SSZz3KDj X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-2.62 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_EQ_ADDR_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.62)[-0.625]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 23:33:18 -0000 On Sun, Aug 29, 2021 at 07:40:09PM +0200, Dimitry Andric wrote: > On 29 Aug 2021, at 18:00, Kristof Provost wrote: > > > > On 29 Aug 2021, at 17:31, Dimitry Andric wrote: > >> The branch main has been updated by dim: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=5b8f07b12f8477f1679013d6b3abdab8d33c7243 > >> > >> commit 5b8f07b12f8477f1679013d6b3abdab8d33c7243 > >> Author: Dimitry Andric > >> AuthorDate: 2021-08-29 15:31:28 +0000 > >> Commit: Dimitry Andric > >> CommitDate: 2021-08-29 15:31:28 +0000 > >> > >> Fix -Wformat errors in pfctl on 32-bit architectures > >> > >> Use PRIu64 to printf(3) uint64_t quantities, otherwise this will result > >> in "error: format specifies type 'unsigned long' but the argument has > >> type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]" on 32-bit > >> architectures. > >> > >> Fixes: 80078d9d38fd > >> MFC after: 1 week > > > > Thanks! > > > > I was running test builds for a fix, but it is so much more convenient when other people fix my mistakes for me. > > I was trying buildworld on i386 for something totally unrelated, and ran > into these -Wformat errors so I took the liberty of patching them up > quickly. :) Generally we do not use the PRIu64 (you should remember the term abomination). Why not cast to uintmax_t and use %ju as we typically do in other places. From owner-dev-commits-src-all@freebsd.org Tue Aug 31 00:38:45 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B2E60661585; Tue, 31 Aug 2021 00:38: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 4Gz7bT4Hmxz3sNt; Tue, 31 Aug 2021 00:38: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 7770227450; Tue, 31 Aug 2021 00:38: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 17V0cjUi082641; Tue, 31 Aug 2021 00:38:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V0cjI7082640; Tue, 31 Aug 2021 00:38:45 GMT (envelope-from git) Date: Tue, 31 Aug 2021 00:38:45 GMT Message-Id: <202108310038.17V0cjI7082640@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 31111372e6ba - main - nvme(4): Do not panic on admin queue construct error. 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/main X-Git-Reftype: branch X-Git-Commit: 31111372e6bad7212dbee36dd312e3b53fdfd3f6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 00:38:45 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=31111372e6bad7212dbee36dd312e3b53fdfd3f6 commit 31111372e6bad7212dbee36dd312e3b53fdfd3f6 Author: Alexander Motin AuthorDate: 2021-08-31 00:36:22 +0000 Commit: Alexander Motin CommitDate: 2021-08-31 00:38:23 +0000 nvme(4): Do not panic on admin queue construct error. MFC after: 1 week --- sys/dev/nvme/nvme_ctrlr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index d8760158a75f..c4a41c453b6a 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1474,6 +1474,8 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, device_t dev) if (ctrlr->resource == NULL) goto nores; + if (!mtx_initialized(&ctrlr->adminq.lock)) + goto noadminq; /* * Check whether it is a hot unplug or a clean driver detach. @@ -1519,6 +1521,7 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, device_t dev) if (!gone) nvme_ctrlr_disable(ctrlr); +noadminq: if (ctrlr->taskqueue) taskqueue_free(ctrlr->taskqueue); From owner-dev-commits-src-all@freebsd.org Tue Aug 31 01:42:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 16B01661D61; Tue, 31 Aug 2021 01:42: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 4Gz90R4wTtz4hR0; Tue, 31 Aug 2021 01:41: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 8B4367A4; Tue, 31 Aug 2021 01:41: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 17V1fxQG072346; Tue, 31 Aug 2021 01:41:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V1fxbt072345; Tue, 31 Aug 2021 01:41:59 GMT (envelope-from git) Date: Tue, 31 Aug 2021 01:41:59 GMT Message-Id: <202108310141.17V1fxbt072345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: bbf70270551d - main - 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/main X-Git-Reftype: branch X-Git-Commit: bbf70270551d8defb427316e5d0e0f368b9aac96 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 01:42:00 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=bbf70270551d8defb427316e5d0e0f368b9aac96 commit bbf70270551d8defb427316e5d0e0f368b9aac96 Author: Ed Maste AuthorDate: 2021-08-31 00:50:34 +0000 Commit: Ed Maste CommitDate: 2021-08-31 01:40:37 +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 --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index f2e5f9766589..461339f1bfcb 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 task: From owner-dev-commits-src-all@freebsd.org Tue Aug 31 01:46:18 2021 Return-Path: Delivered-To: dev-commits-src-all@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 5FFE16626E4; Tue, 31 Aug 2021 01:46: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 4Gz95Q2660z4kTy; Tue, 31 Aug 2021 01:46: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 2EC82A63; Tue, 31 Aug 2021 01:46: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 17V1kIDd075238; Tue, 31 Aug 2021 01:46:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V1kIRL075237; Tue, 31 Aug 2021 01:46:18 GMT (envelope-from git) Date: Tue, 31 Aug 2021 01:46:18 GMT Message-Id: <202108310146.17V1kIRL075237@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9939af1a161e - main - 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/main X-Git-Reftype: branch X-Git-Commit: 9939af1a161e5c219ece5e7c5bc02dcb9a9960f7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 01:46:18 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9939af1a161e5c219ece5e7c5bc02dcb9a9960f7 commit 9939af1a161e5c219ece5e7c5bc02dcb9a9960f7 Author: Konstantin Belousov AuthorDate: 2021-08-30 20:25:31 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-31 01:46:12 +0000 amd64: correctly calculate KVA of the preloaded ucode blob when kernphys != 2M Reported and tested by: kbowling Sponsored by: The FreeBSD Foundation MFC after: 3 days --- 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 eaf592c9b947..864caa144f0d 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1642,7 +1642,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-all@freebsd.org Tue Aug 31 03:04:27 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E29756637A3; Tue, 31 Aug 2021 03:04: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 4GzBqb4ZHHz3LxR; Tue, 31 Aug 2021 03:04: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 443181AB1; Tue, 31 Aug 2021 03:04: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 17V34RCc082488; Tue, 31 Aug 2021 03:04:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V34RXX082487; Tue, 31 Aug 2021 03:04:27 GMT (envelope-from git) Date: Tue, 31 Aug 2021 03:04:27 GMT Message-Id: <202108310304.17V34RXX082487@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Stone Subject: git: 315bca194a14 - main - Fix an early return in ctld UCL parser MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rstone X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 315bca194a14f3b9ec683675bafa8d990d16bfaf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 03:04:28 -0000 The branch main has been updated by rstone: URL: https://cgit.FreeBSD.org/src/commit/?id=315bca194a14f3b9ec683675bafa8d990d16bfaf commit 315bca194a14f3b9ec683675bafa8d990d16bfaf Author: Ryan Stone AuthorDate: 2021-07-07 20:04:10 +0000 Commit: Ryan Stone CommitDate: 2021-08-31 02:59:33 +0000 Fix an early return in ctld UCL parser If the UCL ctld parser encountered a port that used the CTL ioctl device, it fell into a special case that had an erroneous early return. This caused all configuration in the target following the port attribute to be skipped. Fix this by replacing the return with a continue so that the rest of the config is parsed correctly. Sponsored by: Dell EMC Isilon MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D31703 Reviewed by: bapt --- usr.sbin/ctld/uclparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/ctld/uclparse.c b/usr.sbin/ctld/uclparse.c index b73e6b48b2f6..d02530d1b808 100644 --- a/usr.sbin/ctld/uclparse.c +++ b/usr.sbin/ctld/uclparse.c @@ -847,7 +847,7 @@ uclparse_target(const char *name, const ucl_object_t *top) return (1); } - return (0); + continue; } pp = pport_find(conf, value); From owner-dev-commits-src-all@freebsd.org Tue Aug 31 04:23:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 89E9B663AFA; Tue, 31 Aug 2021 04:23: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 4GzDbK3LYjz4S0d; Tue, 31 Aug 2021 04:23: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 5684A2D8D; Tue, 31 Aug 2021 04:23: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 17V4NvN6089582; Tue, 31 Aug 2021 04:23:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V4NvlM089581; Tue, 31 Aug 2021 04:23:57 GMT (envelope-from git) Date: Tue, 31 Aug 2021 04:23:57 GMT Message-Id: <202108310423.17V4NvlM089581@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: df9c0e88e1e3 - main - qoriq_dw_pci: Fix typo in link status checking code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df9c0e88e1e30cb5d1c81c4c2f295f7d153ed02b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 04:23:57 -0000 The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=df9c0e88e1e30cb5d1c81c4c2f295f7d153ed02b commit df9c0e88e1e30cb5d1c81c4c2f295f7d153ed02b Author: Bartlomiej Grzesik AuthorDate: 2021-08-31 04:22:33 +0000 Commit: Wojciech Macek CommitDate: 2021-08-31 04:22:33 +0000 qoriq_dw_pci: Fix typo in link status checking code On some DesignWare PCIe controllers accessing config registers of slots whose link is down triggers a SError. Because of that we need to check the link status before any acceses config space. Due to a typo link was always reported up. This fixes a SError that occured during boot on LS1028A-RDB. Obtained from: Semihalf Reviewed by: wma Differential revision: https://reviews.freebsd.org/D31509 --- sys/arm64/qoriq/qoriq_dw_pci.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/arm64/qoriq/qoriq_dw_pci.c b/sys/arm64/qoriq/qoriq_dw_pci.c index 4d0c7928fc4c..d052c9910a47 100644 --- a/sys/arm64/qoriq/qoriq_dw_pci.c +++ b/sys/arm64/qoriq/qoriq_dw_pci.c @@ -101,13 +101,7 @@ static struct qoriq_dw_pci_cfg ls2028_cfg = { /* Compatible devices. */ static struct ofw_compat_data compat_data[] = { {"fsl,ls1012a-pcie", (uintptr_t)&ls1012_cfg}, - /* - * XXX: On LS1028ARDB attaching this driver causes external abort. - * Disable it for now. - */ -#ifdef notyet {"fsl,ls1028a-pcie", (uintptr_t)&ls2028_cfg}, -#endif {"fsl,ls1043a-pcie", (uintptr_t)&ls1043_cfg}, {"fsl,ls1046a-pcie", (uintptr_t)&ls1012_cfg}, {"fsl,ls2080a-pcie", (uintptr_t)&ls2080_cfg}, @@ -156,7 +150,7 @@ qorif_dw_pci_get_link(device_t dev, bool *status) reg = pci_dw_dbi_rd4(sc->dev, sc->soc_cfg->pex_pf0_dgb); reg >>= sc->soc_cfg->ltssm_bit; reg &= 0x3F; - *status = (reg = 0x11) ? true: false; + *status = (reg == 0x11) ? true : false; return (0); } From owner-dev-commits-src-all@freebsd.org Tue Aug 31 04:26:09 2021 Return-Path: Delivered-To: dev-commits-src-all@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 67AD7664986; Tue, 31 Aug 2021 04:26: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 4GzDds2Sv6z4T1v; Tue, 31 Aug 2021 04:26: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 3E11C2A70; Tue, 31 Aug 2021 04:26: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 17V4Q9Ml089842; Tue, 31 Aug 2021 04:26:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V4Q9bn089841; Tue, 31 Aug 2021 04:26:09 GMT (envelope-from git) Date: Tue, 31 Aug 2021 04:26:09 GMT Message-Id: <202108310426.17V4Q9bn089841@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 18027aa233f6 - main - pci_host_generic_fdt: set domain number MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 18027aa233f66ee2fd33e335f1d0e757e245aed0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 04:26:09 -0000 The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=18027aa233f66ee2fd33e335f1d0e757e245aed0 commit 18027aa233f66ee2fd33e335f1d0e757e245aed0 Author: Bartlomiej Grzesik AuthorDate: 2021-08-31 04:25:05 +0000 Commit: Wojciech Macek CommitDate: 2021-08-31 04:25:05 +0000 pci_host_generic_fdt: set domain number Set domain number to device unit. Some boards have multiple RCs handled by different drivers, this ensures that there are no collisions with ofw_pcib. Obtained from: Semihalf Reviewed by: wma Differential revision: https://reviews.freebsd.org/D31508 --- sys/dev/pci/pci_host_generic_fdt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/pci/pci_host_generic_fdt.c b/sys/dev/pci/pci_host_generic_fdt.c index cb77c0c674a9..91ffaf7357b9 100644 --- a/sys/dev/pci/pci_host_generic_fdt.c +++ b/sys/dev/pci/pci_host_generic_fdt.c @@ -138,6 +138,14 @@ pci_host_generic_setup_fdt(device_t dev) /* TODO parse FDT bus ranges */ sc->base.bus_start = 0; sc->base.bus_end = 0xFF; + + /* + * ofw_pcib uses device unit as PCI domain number. + * Do the same. Some boards have multiple RCs handled + * by different drivers, this ensures that there are + * no collisions. + */ + sc->base.ecam = device_get_unit(dev); error = pci_host_generic_core_attach(dev); if (error != 0) From owner-dev-commits-src-all@freebsd.org Tue Aug 31 04:38:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 653D266457A; Tue, 31 Aug 2021 04:38: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 4GzDwZ1x5Dz4XBt; Tue, 31 Aug 2021 04:38: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 28DFD29F5; Tue, 31 Aug 2021 04:38: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 17V4csB0003757; Tue, 31 Aug 2021 04:38:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V4csPp003756; Tue, 31 Aug 2021 04:38:54 GMT (envelope-from git) Date: Tue, 31 Aug 2021 04:38:54 GMT Message-Id: <202108310438.17V4csPp003756@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f822d4feb87a - main - ffs_update(): recalculate flags after relocking the vnode 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/main X-Git-Reftype: branch X-Git-Commit: f822d4feb87a7bd7747679aa779942d24fff08e0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 04:38:54 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f822d4feb87a7bd7747679aa779942d24fff08e0 commit f822d4feb87a7bd7747679aa779942d24fff08e0 Author: Konstantin Belousov AuthorDate: 2021-08-26 16:12:58 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-31 04:38:35 +0000 ffs_update(): recalculate flags after relocking the vnode Inode type could migrate between snapshot and regular types while the vnode is unlocked. Recalculate flags specific for snapshot after relock. Reviewed by: mckusick Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/ufs/ffs/ffs_inode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index b3d41aa023f9..2bc3da7e603f 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -145,10 +145,10 @@ ffs_update(vp, waitfor) * snapshot vnode to prevent it from being removed while we are * waiting for the buffer. */ +loop: flags = 0; if (IS_SNAPSHOT(ip)) flags = GB_LOCK_NOWAIT; -loop: bn = fsbtodb(fs, ino_to_fsba(fs, ip->i_number)); error = ffs_breadz(VFSTOUFS(vp->v_mount), ITODEVVP(ip), bn, bn, (int) fs->fs_bsize, NULL, NULL, 0, NOCRED, flags, NULL, &bp); @@ -176,6 +176,11 @@ loop: vrele(vp); if (VN_IS_DOOMED(vp)) return (ENOENT); + + /* + * Recalculate flags, because the vnode was relocked and + * could no longer be a snapshot. + */ goto loop; } if (DOINGSOFTDEP(vp)) From owner-dev-commits-src-all@freebsd.org Tue Aug 31 04:38:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9BEFA664948; Tue, 31 Aug 2021 04:38: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 4GzDwb3by1z4XGt; Tue, 31 Aug 2021 04:38: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 459932BEC; Tue, 31 Aug 2021 04:38: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 17V4ct1N003781; Tue, 31 Aug 2021 04:38:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V4cttH003780; Tue, 31 Aug 2021 04:38:55 GMT (envelope-from git) Date: Tue, 31 Aug 2021 04:38:55 GMT Message-Id: <202108310438.17V4cttH003780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: bb536de6c0d7 - main - ffs_update(): Do not assume that EBUSY can only come LK_NOWAIT trylock 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/main X-Git-Reftype: branch X-Git-Commit: bb536de6c0d73566e610881e12c55489a7c6ec44 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 04:38:55 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bb536de6c0d73566e610881e12c55489a7c6ec44 commit bb536de6c0d73566e610881e12c55489a7c6ec44 Author: Konstantin Belousov AuthorDate: 2021-08-26 16:17:39 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-31 04:38:35 +0000 ffs_update(): Do not assume that EBUSY can only come LK_NOWAIT trylock Instead do protective check for the local flags and do not interpret EBUSY specially if we did not request trylock mode for bread(). Reviewed by: mckusick Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/ufs/ffs/ffs_inode.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index 2bc3da7e603f..1159259fb2b6 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -153,9 +153,14 @@ loop: error = ffs_breadz(VFSTOUFS(vp->v_mount), ITODEVVP(ip), bn, bn, (int) fs->fs_bsize, NULL, NULL, 0, NOCRED, flags, NULL, &bp); if (error != 0) { - if (error != EBUSY) + /* + * If EBUSY was returned without GB_LOCK_NOWAIT (which + * requests trylock for buffer lock), it is for some + * other reason and we should not handle it specially. + */ + if (error != EBUSY || (flags & GB_LOCK_NOWAIT) == 0) return (error); - KASSERT((IS_SNAPSHOT(ip)), ("EBUSY from non-snapshot")); + /* * Wait for our inode block to become available. * From owner-dev-commits-src-all@freebsd.org Tue Aug 31 06:13:05 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 06:13:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 06:13:06 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 06:13:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 06:15:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 06:15:33 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 06:16:05 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 06:25:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9695F66662A; Tue, 31 Aug 2021 06:25: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 4GzHHQ3d8kz3L6W; Tue, 31 Aug 2021 06:25: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 5658D47BB; Tue, 31 Aug 2021 06:25: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 17V6PMtK050771; Tue, 31 Aug 2021 06:25:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V6PMpW050770; Tue, 31 Aug 2021 06:25:22 GMT (envelope-from git) Date: Tue, 31 Aug 2021 06:25:22 GMT Message-Id: <202108310625.17V6PMpW050770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 5438ef47e377 - main - mvneta: Fix MTU update sequence MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5438ef47e377d659acf7f97a66fe418223f2c847 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 06:25:22 -0000 The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=5438ef47e377d659acf7f97a66fe418223f2c847 commit 5438ef47e377d659acf7f97a66fe418223f2c847 Author: Kornel Duleba AuthorDate: 2021-08-31 06:22:29 +0000 Commit: Wojciech Macek CommitDate: 2021-08-31 06:22:29 +0000 mvneta: Fix MTU update sequence After MTU is updated we might start using allocating RX buffers from different pool. (MJUM9BYTES vs MCLBYTES) Because of that we need to update the RX buffer size in hardware. Previously it was done only when the interface was up, which is incorrect since MTU can be changed at any time. Differential revision: https://reviews.freebsd.org/D31724 Sponsored by: Stormshield Obtained from: Semihalf MFC after: 2 weeks Reviewed by: wma --- sys/dev/neta/if_mvneta.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/sys/dev/neta/if_mvneta.c b/sys/dev/neta/if_mvneta.c index 4ff830731e94..debb4a922cbc 100644 --- a/sys/dev/neta/if_mvneta.c +++ b/sys/dev/neta/if_mvneta.c @@ -2168,29 +2168,28 @@ mvneta_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_hwassist = CSUM_IP | CSUM_TCP | CSUM_UDP; } - - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - /* Stop hardware */ + /* + * Reinitialize RX queues. + * We need to update RX descriptor size. + */ + if (ifp->if_drv_flags & IFF_DRV_RUNNING) mvneta_stop_locked(sc); - /* - * Reinitialize RX queues. - * We need to update RX descriptor size. - */ - for (q = 0; q < MVNETA_RX_QNUM_MAX; q++) { - mvneta_rx_lockq(sc, q); - if (mvneta_rx_queue_init(ifp, q) != 0) { - device_printf(sc->dev, - "initialization failed:" - " cannot initialize queue\n"); - mvneta_rx_unlockq(sc, q); - error = ENOBUFS; - break; - } + + for (q = 0; q < MVNETA_RX_QNUM_MAX; q++) { + mvneta_rx_lockq(sc, q); + if (mvneta_rx_queue_init(ifp, q) != 0) { + device_printf(sc->dev, + "initialization failed:" + " cannot initialize queue\n"); mvneta_rx_unlockq(sc, q); + error = ENOBUFS; + break; } - /* Trigger reinitialization */ - mvneta_init_locked(sc); + mvneta_rx_unlockq(sc, q); } + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + mvneta_init_locked(sc); + mvneta_sc_unlock(sc); } break; From owner-dev-commits-src-all@freebsd.org Tue Aug 31 06:28:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 91F8D666845 for ; Tue, 31 Aug 2021 06:28: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 4GzHLS2VDyz3MTS; Tue, 31 Aug 2021 06:28: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 3D9BA47BC; Tue, 31 Aug 2021 06:28: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 17V6S0Rd051093; Tue, 31 Aug 2021 06:28:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V6S0gX051092; Tue, 31 Aug 2021 06:28:00 GMT (envelope-from git) Date: Tue, 31 Aug 2021 06:28:00 GMT Message-Id: <202108310628.17V6S0gX051092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 8ae86e2edc73..3b89d9518df2 - vendor/openzfs/master - vendor branch updated MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: 3b89d9518df2c7fd747e349873a3d4d498beb20e X-Git-Oldrev: 8ae86e2edc736483c1530fd689525aa2460eaec8 X-Git-Newrev: 3b89d9518df2c7fd747e349873a3d4d498beb20e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 06:28:00 -0000 The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=8ae86e2edc73..3b89d9518df2 3ee9a997a34d Initialize parity blocks before RAID-Z reconstruction benchmarking 2e9e2c8ff519 zpool-remove.8: describe top-level vdev sector size limitation b0f3f393d135 vdev_id: Return an error if config file is not found (#12508) 00888c089805 Extend zpool-iostat to account for ZIO_PRIORITY_REBUILD (#12319) 4dc115328f0f Make 'zpool labelclear -f' work on offlined disks 5bee265908fb Correct checking bdev_check_media_change message 70bf547a98ab ZTS: Waiting for zvols to be available f3bbeb970e03 FreeBSD: Implement hole-punching support c3cb57ae47b3 ZTS: Enable punch-hole tests on FreeBSD b1a1c64313c1 Fix cross-endian interoperability of zstd 3b89d9518df2 FreeBSD: Don't remove SA xattr if not SA znode From owner-dev-commits-src-all@freebsd.org Tue Aug 31 06:44:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3E2E1666CC0; Tue, 31 Aug 2021 06:44: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 4GzHjy0z9Hz3jvB; Tue, 31 Aug 2021 06:44: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 096484CB7; Tue, 31 Aug 2021 06:44: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 17V6ir16077374; Tue, 31 Aug 2021 06:44:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V6irSt077373; Tue, 31 Aug 2021 06:44:53 GMT (envelope-from git) Date: Tue, 31 Aug 2021 06:44:53 GMT Message-Id: <202108310644.17V6irSt077373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 28d549826844 - main - umodem: Add Huawei E3372h-320 device id MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28d549826844b89224f0335b6318eb277031ea78 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 06:44:54 -0000 The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=28d549826844b89224f0335b6318eb277031ea78 commit 28d549826844b89224f0335b6318eb277031ea78 Author: Kornel Duleba AuthorDate: 2021-08-31 06:44:36 +0000 Commit: Wojciech Macek CommitDate: 2021-08-31 06:44:36 +0000 umodem: Add Huawei E3372h-320 device id After switching the dongle to the Huawei alternate mode(modem mode) with usb_modeswitch the serial interfaces had all of their ids set to 0xFF. After modifying umodem to work with that it attached successfully and I've managed to configure device with standard AT commands to get internet connection. --- sys/dev/usb/serial/umodem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/usb/serial/umodem.c b/sys/dev/usb/serial/umodem.c index 573d74cdb526..4fa108e962f2 100644 --- a/sys/dev/usb/serial/umodem.c +++ b/sys/dev/usb/serial/umodem.c @@ -146,6 +146,8 @@ static const STRUCT_USB_HOST_ID umodem_host_devs[] = { {USB_VENDOR(USB_VENDOR_HUAWEI),USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(0xFF)}, + {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(0xFF), + USB_IFACE_SUBCLASS(0xF), USB_IFACE_PROTOCOL(0xFF)}, /* Kyocera AH-K3001V */ {USB_VPI(USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_AHK3001V, 1)}, {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720, 1)}, From owner-dev-commits-src-all@freebsd.org Tue Aug 31 06:47:50 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 07:02:33 2021 Return-Path: Delivered-To: dev-commits-src-all@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 76D246671AE; Tue, 31 Aug 2021 07:02: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 4GzJ6K2nzSz3psQ; Tue, 31 Aug 2021 07:02: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 48A304EBC; Tue, 31 Aug 2021 07:02: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 17V72XUH005411; Tue, 31 Aug 2021 07:02:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V72X10005410; Tue, 31 Aug 2021 07:02:33 GMT (envelope-from git) Date: Tue, 31 Aug 2021 07:02:33 GMT Message-Id: <202108310702.17V72X10005410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 21b492ed51aa - main - zfs: merge openzfs/zfs@3b89d9518 (master) into main MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21b492ed51aa6ff8008a8aa83333b1de30288a15 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 07:02:33 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=21b492ed51aa6ff8008a8aa83333b1de30288a15 commit 21b492ed51aa6ff8008a8aa83333b1de30288a15 Merge: 28d549826844 3b89d9518df2 Author: Martin Matuska AuthorDate: 2021-08-31 06:58:27 +0000 Commit: Martin Matuska CommitDate: 2021-08-31 07:02:21 +0000 zfs: merge openzfs/zfs@3b89d9518 (master) into main Notable upstream pull request merges: #12022 Fix endianness issues with zstd #12319 Extend zpool-iostat to account for ZIO_PRIORITY_REBUILD #12458 Add hole punching support on FreeBSD version 1400032 #12473 Initialize parity blocks before RAID-Z reconstruction benchmarking #12511 Make 'zpool labelclear -f' work on offlined disks #12514 FreeBSD: Don't remove SA xattr if not SA znode Obtained from: OpenZFS OpenZFS commit: 3b89d9518df2c7fd747e349873a3d4d498beb20e sys/contrib/openzfs/cmd/vdev_id/vdev_id | 5 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 6 +- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 66 +++++++-- .../openzfs/cmd/zpool_influxdb/zpool_influxdb.c | 7 + sys/contrib/openzfs/config/kernel-blkdev.m4 | 2 +- sys/contrib/openzfs/include/sys/fs/zfs.h | 5 + sys/contrib/openzfs/include/sys/zstd/zstd.h | 148 +++++++++++++++++++-- sys/contrib/openzfs/man/man8/zpool-iostat.8 | 8 ++ sys/contrib/openzfs/man/man8/zpool-remove.8 | 8 +- .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 59 +++++++- .../openzfs/module/os/freebsd/zfs/zfs_znode.c | 10 +- sys/contrib/openzfs/module/zfs/vdev.c | 9 +- sys/contrib/openzfs/module/zfs/vdev_label.c | 18 +++ sys/contrib/openzfs/module/zfs/vdev_raidz_math.c | 7 + sys/contrib/openzfs/module/zstd/Makefile.in | 1 + .../openzfs/module/zstd/include/sparc_compat.h | 4 + sys/contrib/openzfs/module/zstd/zfs_zstd.c | 14 +- sys/contrib/openzfs/module/zstd/zstd_sparc.c | 11 ++ sys/contrib/openzfs/tests/runfiles/common.run | 4 + sys/contrib/openzfs/tests/runfiles/linux.run | 2 +- .../openzfs/tests/test-runner/bin/zts-report.py.in | 8 ++ .../openzfs/tests/zfs-tests/include/blkdev.shlib | 2 +- .../openzfs/tests/zfs-tests/include/libtest.shlib | 20 +++ .../cli_root/zfs_copies/zfs_copies.kshlib | 2 +- .../cli_root/zfs_rename/zfs_rename_007_pos.ksh | 8 +- .../functional/fallocate/fallocate_punch-hole.ksh | 27 +++- .../functional/rsend/recv_dedup_encrypted_zvol.ksh | 2 +- .../rsend/send-c_stream_size_estimate.ksh | 2 +- .../zvol/zvol_swap/zvol_swap_004_pos.ksh | 2 +- sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 31 files changed, 407 insertions(+), 66 deletions(-) diff --cc sys/contrib/openzfs/module/zstd/include/sparc_compat.h index 000000000000,14c1bdde917c..14c1bdde917c mode 000000,100644..100644 --- a/sys/contrib/openzfs/module/zstd/include/sparc_compat.h +++ b/sys/contrib/openzfs/module/zstd/include/sparc_compat.h diff --cc sys/contrib/openzfs/module/zstd/zstd_sparc.c index 000000000000,463df99bd7e3..463df99bd7e3 mode 000000,100644..100644 --- a/sys/contrib/openzfs/module/zstd/zstd_sparc.c +++ b/sys/contrib/openzfs/module/zstd/zstd_sparc.c diff --cc sys/modules/zfs/zfs_config.h index 75eec9c705a4,000000000000..ecc1e2940105 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,849 -1,0 +1,849 @@@ +/* + * $FreeBSD$ + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAPPED */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* ->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* aops->direct_IO() uses iov_iter with rw and offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + +/* fops->iterate() is available */ +/* #undef HAVE_VFS_ITERATE */ + +/* fops->iterate_shared() is available */ +/* #undef HAVE_VFS_ITERATE_SHARED */ + +/* fops->readdir() is available */ +/* #undef HAVE_VFS_READDIR */ + +/* fops->read/write_iter() are available */ +/* #undef HAVE_VFS_RW_ITERATE */ + +/* __set_page_dirty_nobuffers exists */ +/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */ + +/* __vmalloc page flags exists */ +/* #undef HAVE_VMALLOC_PAGE_KERNEL */ + +/* yes */ +/* #undef HAVE_WAIT_ON_BIT_ACTION */ + +/* wait_queue_entry_t exists */ +/* #undef HAVE_WAIT_QUEUE_ENTRY_T */ + +/* wq_head->head and wq_entry->entry exist */ +/* #undef HAVE_WAIT_QUEUE_HEAD_ENTRY */ + +/* xattr_handler->get() wants dentry */ +/* #undef HAVE_XATTR_GET_DENTRY */ + +/* xattr_handler->get() wants both dentry and inode */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE */ + +/* xattr_handler->get() wants xattr_handler */ +/* #undef HAVE_XATTR_GET_HANDLER */ + +/* xattr_handler has name */ +/* #undef HAVE_XATTR_HANDLER_NAME */ + +/* xattr_handler->list() wants dentry */ +/* #undef HAVE_XATTR_LIST_DENTRY */ + +/* xattr_handler->list() wants xattr_handler */ +/* #undef HAVE_XATTR_LIST_HANDLER */ + +/* xattr_handler->list() wants simple */ +/* #undef HAVE_XATTR_LIST_SIMPLE */ + +/* xattr_handler->set() wants dentry */ +/* #undef HAVE_XATTR_SET_DENTRY */ + +/* xattr_handler->set() wants both dentry and inode */ +/* #undef HAVE_XATTR_SET_DENTRY_INODE */ + +/* xattr_handler->set() wants xattr_handler */ +/* #undef HAVE_XATTR_SET_HANDLER */ + +/* xattr_handler->set() takes user_namespace */ +/* #undef HAVE_XATTR_SET_USERNS */ + +/* Define if you have [z] */ +#define HAVE_ZLIB 1 + +/* __posix_acl_chmod() exists */ +/* #undef HAVE___POSIX_ACL_CHMOD */ + +/* kernel exports FPU functions */ +/* #undef KERNEL_EXPORTS_X86_FPU */ + +/* TBD: fetch(3) support */ +#if 0 +/* whether the chosen libfetch is to be loaded at run-time */ +#define LIBFETCH_DYNAMIC 1 + +/* libfetch is fetch(3) */ +#define LIBFETCH_IS_FETCH 1 + +/* libfetch is libcurl */ +#define LIBFETCH_IS_LIBCURL 0 + +/* soname of chosen libfetch */ +#define LIBFETCH_SONAME "libfetch.so.6" +#endif + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* make_request_fn() return type */ +/* #undef MAKE_REQUEST_FN_RET */ + +/* hardened module_param_call */ +/* #undef MODULE_PARAM_CALL_CONST */ + +/* struct shrink_control has nid */ +/* #undef SHRINK_CONTROL_HAS_NID */ + +/* Defined for legacy compatibility. */ +#define SPL_META_ALIAS ZFS_META_ALIAS + +/* Defined for legacy compatibility. */ +#define SPL_META_RELEASE ZFS_META_RELEASE + +/* Defined for legacy compatibility. */ +#define SPL_META_VERSION ZFS_META_VERSION + +/* True if ZFS is to be compiled for a FreeBSD system */ +#define SYSTEM_FREEBSD 1 + +/* True if ZFS is to be compiled for a Linux system */ +/* #undef SYSTEM_LINUX */ + +/* zfs debugging enabled */ +/* #undef ZFS_DEBUG */ + +/* /dev/zfs minor */ +/* #undef ZFS_DEVICE_MINOR */ + +/* enum node_stat_item contains NR_FILE_PAGES */ +/* #undef ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES */ + +/* enum node_stat_item contains NR_INACTIVE_ANON */ +/* #undef ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON */ + +/* enum node_stat_item contains NR_INACTIVE_FILE */ +/* #undef ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE */ + +/* enum zone_stat_item contains NR_FILE_PAGES */ +/* #undef ZFS_ENUM_ZONE_STAT_ITEM_NR_FILE_PAGES */ + +/* enum zone_stat_item contains NR_INACTIVE_ANON */ +/* #undef ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_ANON */ + +/* enum zone_stat_item contains NR_INACTIVE_FILE */ +/* #undef ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_FILE */ + +/* global_node_page_state() exists */ +/* #undef ZFS_GLOBAL_NODE_PAGE_STATE */ + +/* global_zone_page_state() exists */ +/* #undef ZFS_GLOBAL_ZONE_PAGE_STATE */ + +/* Define to 1 if GPL-only symbols can be used */ +/* #undef ZFS_IS_GPL_COMPATIBLE */ + +/* Define the project alias string. */ - #define ZFS_META_ALIAS "zfs-2.1.99-FreeBSD_g8ae86e2ed" ++#define ZFS_META_ALIAS "zfs-2.1.99-FreeBSD_g3b89d9518" + +/* Define the project author. */ +#define ZFS_META_AUTHOR "OpenZFS" + +/* Define the project release date. */ +/* #undef ZFS_META_DATA */ + +/* Define the maximum compatible kernel version. */ +#define ZFS_META_KVER_MAX "5.13" + +/* Define the minimum compatible kernel version. */ +#define ZFS_META_KVER_MIN "3.10" + +/* Define the project license. */ +#define ZFS_META_LICENSE "CDDL" + +/* Define the libtool library 'age' version information. */ +/* #undef ZFS_META_LT_AGE */ + +/* Define the libtool library 'current' version information. */ +/* #undef ZFS_META_LT_CURRENT */ + +/* Define the libtool library 'revision' version information. */ +/* #undef ZFS_META_LT_REVISION */ + +/* Define the project name. */ +#define ZFS_META_NAME "zfs" + +/* Define the project release. */ - #define ZFS_META_RELEASE "FreeBSD_g8ae86e2ed" ++#define ZFS_META_RELEASE "FreeBSD_g3b89d9518" + +/* Define the project version. */ +#define ZFS_META_VERSION "2.1.99" + +/* count is located in percpu_ref.data */ +/* #undef ZFS_PERCPU_REF_COUNT_IN_DATA */ + diff --cc sys/modules/zfs/zfs_gitrev.h index 264add9028dd,000000000000..ff8688315330 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_gitrev.h +++ b/sys/modules/zfs/zfs_gitrev.h @@@ -1,5 -1,0 +1,5 @@@ +/* + * $FreeBSD$ + */ + - #define ZFS_META_GITREV "zfs-2.1.99-419-g8ae86e2ed" ++#define ZFS_META_GITREV "zfs-2.1.99-430-g3b89d9518" From owner-dev-commits-src-all@freebsd.org Tue Aug 31 07:54:37 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8206F668217; Tue, 31 Aug 2021 07:54:37 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzKGP2V1fz4cSN; Tue, 31 Aug 2021 07:54:37 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 0CA6294E4; Tue, 31 Aug 2021 07:54:37 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 0B41C2D472; Tue, 31 Aug 2021 09:54:33 +0200 (CEST) From: Kristof Provost To: Konstantin Belousov Cc: Dimitry Andric , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5b8f07b12f84 - main - Fix -Wformat errors in pfctl on 32-bit architectures Date: Tue, 31 Aug 2021 09:54:32 +0200 X-Mailer: MailMate (1.14r5818) Message-ID: In-Reply-To: References: <202108291531.17TFVoah033310@gitrepo.freebsd.org> <6A084192-562D-404D-9833-51A708FA1BC0@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 07:54:37 -0000 On 31 Aug 2021, at 1:33, Konstantin Belousov wrote: > On Sun, Aug 29, 2021 at 07:40:09PM +0200, Dimitry Andric wrote: >> On 29 Aug 2021, at 18:00, Kristof Provost wrote: >>> >>> On 29 Aug 2021, at 17:31, Dimitry Andric wrote: >>>> The branch main has been updated by dim: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D5b8f07b12f8477f167901= 3d6b3abdab8d33c7243 >>>> >>>> commit 5b8f07b12f8477f1679013d6b3abdab8d33c7243 >>>> Author: Dimitry Andric >>>> AuthorDate: 2021-08-29 15:31:28 +0000 >>>> Commit: Dimitry Andric >>>> CommitDate: 2021-08-29 15:31:28 +0000 >>>> >>>> Fix -Wformat errors in pfctl on 32-bit architectures >>>> >>>> Use PRIu64 to printf(3) uint64_t quantities, otherwise this will = result >>>> in "error: format specifies type 'unsigned long' but the argument= has >>>> type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]" on= 32-bit >>>> architectures. >>>> >>>> Fixes: 80078d9d38fd >>>> MFC after: 1 week >>> >>> Thanks! >>> >>> I was running test builds for a fix, but it is so much more convenien= t when other people fix my mistakes for me. >> >> I was trying buildworld on i386 for something totally unrelated, and r= an >> into these -Wformat errors so I took the liberty of patching them up >> quickly. :) > > Generally we do not use the PRIu64 (you should remember the term > abomination). Why not cast to uintmax_t and use %ju as we typically do= > in other places. > There are a couple of examples in the tree, but it is indeed rare. I wanted to avoid casting so that the compiler would still shout at me if= data types changed. It=E2=80=99s much easier to miss places where a vari= able is used (and that need to be updated) if they=E2=80=99re getting cas= t to something. If this is something the project has strong feelings about I=E2=80=99ll c= hange it, but I think I like this slightly better than casting to uintmax= _t. Best regards, Kristof From owner-dev-commits-src-all@freebsd.org Tue Aug 31 08:14:25 2021 Return-Path: Delivered-To: dev-commits-src-all@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 954656686DC; Tue, 31 Aug 2021 08:14: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 4GzKjF3ZPpz4hrC; Tue, 31 Aug 2021 08:14: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 62B995D77; Tue, 31 Aug 2021 08:14: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 17V8EPf3098592; Tue, 31 Aug 2021 08:14:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V8EPac098591; Tue, 31 Aug 2021 08:14:25 GMT (envelope-from git) Date: Tue, 31 Aug 2021 08:14:25 GMT Message-Id: <202108310814.17V8EPac098591@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 639d7abec6cd - main - routing: simplify malloc flags in alloc_nhgrp(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 639d7abec6cd31db9d240d6439fe6098b19eb3d8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 08:14:25 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=639d7abec6cd31db9d240d6439fe6098b19eb3d8 commit 639d7abec6cd31db9d240d6439fe6098b19eb3d8 Author: Alexander V. Chernikov AuthorDate: 2021-08-31 08:12:54 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-08-31 08:14:16 +0000 routing: simplify malloc flags in alloc_nhgrp(). MFC after: 1 week --- sys/net/route/nhgrp_ctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/net/route/nhgrp_ctl.c b/sys/net/route/nhgrp_ctl.c index 9f1f3a5b4bc4..6a3f853e073d 100644 --- a/sys/net/route/nhgrp_ctl.c +++ b/sys/net/route/nhgrp_ctl.c @@ -255,7 +255,6 @@ static struct nhgrp_priv * alloc_nhgrp(struct weightened_nhop *wn, int num_nhops) { uint32_t nhgrp_size; - int flags = M_NOWAIT; struct nhgrp_object *nhg; struct nhgrp_priv *nhg_priv; @@ -266,7 +265,7 @@ alloc_nhgrp(struct weightened_nhop *wn, int num_nhops) } size_t sz = get_nhgrp_alloc_size(nhgrp_size, num_nhops); - nhg = malloc(sz, M_NHOP, flags | M_ZERO); + nhg = malloc(sz, M_NHOP, M_NOWAIT | M_ZERO); if (nhg == NULL) { return (NULL); } From owner-dev-commits-src-all@freebsd.org Tue Aug 31 09:03:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1149B6692B2; Tue, 31 Aug 2021 09:03:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzLnj6t8Qz3Fnh; Tue, 31 Aug 2021 09:03:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id B6F23A13C; Tue, 31 Aug 2021 09:03:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (unknown [IPv6:2001:470:7a58:0:44b7:a7ee:5a9b:104b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 77C0F60148; Tue, 31 Aug 2021 11:03:19 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_AD4B321B-6CB0-400A-9AB8-B866D4047995"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: git: 5b8f07b12f84 - main - Fix -Wformat errors in pfctl on 32-bit architectures Date: Tue, 31 Aug 2021 11:03:12 +0200 In-Reply-To: Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Konstantin Belousov References: <202108291531.17TFVoah033310@gitrepo.freebsd.org> <6A084192-562D-404D-9833-51A708FA1BC0@FreeBSD.org> X-Mailer: Apple Mail (2.3654.120.0.1.13) X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 09:03:22 -0000 --Apple-Mail=_AD4B321B-6CB0-400A-9AB8-B866D4047995 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 31 Aug 2021, at 01:33, Konstantin Belousov = wrote: >=20 > On Sun, Aug 29, 2021 at 07:40:09PM +0200, Dimitry Andric wrote: >> On 29 Aug 2021, at 18:00, Kristof Provost wrote: >>>=20 >>> On 29 Aug 2021, at 17:31, Dimitry Andric wrote: >>>> The branch main has been updated by dim: >>>>=20 >>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D5b8f07b12f8477f1679013d6b3abdab8= d33c7243 >>>>=20 >>>> commit 5b8f07b12f8477f1679013d6b3abdab8d33c7243 >>>> Author: Dimitry Andric >>>> AuthorDate: 2021-08-29 15:31:28 +0000 >>>> Commit: Dimitry Andric >>>> CommitDate: 2021-08-29 15:31:28 +0000 >>>>=20 >>>> Fix -Wformat errors in pfctl on 32-bit architectures >>>>=20 >>>> Use PRIu64 to printf(3) uint64_t quantities, otherwise this will = result >>>> in "error: format specifies type 'unsigned long' but the argument = has >>>> type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]" on = 32-bit >>>> architectures. >>>>=20 >>>> Fixes: 80078d9d38fd >>>> MFC after: 1 week >>>=20 >>> Thanks! >>>=20 >>> I was running test builds for a fix, but it is so much more = convenient when other people fix my mistakes for me. >>=20 >> I was trying buildworld on i386 for something totally unrelated, and = ran >> into these -Wformat errors so I took the liberty of patching them up >> quickly. :) >=20 > Generally we do not use the PRIu64 (you should remember the term > abomination). Why not cast to uintmax_t and use %ju as we typically = do > in other places. I personally see nothing wrong with PRIu64, but in this case I just copied the existing coding style. -Dimitry --Apple-Mail=_AD4B321B-6CB0-400A-9AB8-B866D4047995 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCYS3wUQAKCRCwXqMKLiCW o32ZAJ0R0CXtW9iGIuvbpwsW4vl/aemnxwCffLbVXqqM9wOVwonxgBSZp5LNfZM= =iqsy -----END PGP SIGNATURE----- --Apple-Mail=_AD4B321B-6CB0-400A-9AB8-B866D4047995-- From owner-dev-commits-src-all@freebsd.org Tue Aug 31 11:46:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E5FC066C86C; Tue, 31 Aug 2021 11:46: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 4GzQQP4gLBz4nBw; Tue, 31 Aug 2021 11:46: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 83536112A7; Tue, 31 Aug 2021 11:46: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 17VBkr4b084242; Tue, 31 Aug 2021 11:46:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VBkr1A084241; Tue, 31 Aug 2021 11:46:53 GMT (envelope-from git) Date: Tue, 31 Aug 2021 11:46:53 GMT Message-Id: <202108311146.17VBkr1A084241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0d29e4bc011d - main - sctp: Remove always-false checks in sctp_inpcb_bind() 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/main X-Git-Reftype: branch X-Git-Commit: 0d29e4bc011dd4557ff9bde373bd48c567c3a4bf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 11:46:54 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0d29e4bc011dd4557ff9bde373bd48c567c3a4bf commit 0d29e4bc011dd4557ff9bde373bd48c567c3a4bf Author: Mark Johnston AuthorDate: 2021-08-31 11:43:13 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 11:43:13 +0000 sctp: Remove always-false checks in sctp_inpcb_bind() No functional change intended. Reviewed by: tuexen MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31731 --- sys/netinet/sctp_pcb.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index bdc575de615f..f583862eae14 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -2804,7 +2804,7 @@ sctp_remove_laddr(struct sctp_laddr *laddr) /* sctp_ifap is used to bypass normal local address validation checks */ int sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, - struct sctp_ifa *sctp_ifap, struct thread *p) + struct sctp_ifa *sctp_ifap, struct thread *td) { /* bind a ep to a socket address */ struct sctppcbhead *head; @@ -2816,6 +2816,8 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, int error; uint32_t vrf_id; + KASSERT(td != NULL, ("%s: null thread", __func__)); + lport = 0; bindall = 1; inp = (struct sctp_inpcb *)so->so_pcb; @@ -2833,10 +2835,6 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EINVAL); return (EINVAL); } -#ifdef INVARIANTS - if (p == NULL) - panic("null proc/thread"); -#endif if (addr != NULL) { switch (addr->sa_family) { #ifdef INET @@ -2861,7 +2859,7 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, * will transmute the ip address to the * proper value. */ - if (p && (error = prison_local_ip4(p->td_ucred, &sin->sin_addr)) != 0) { + if ((error = prison_local_ip4(td->td_ucred, &sin->sin_addr)) != 0) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); return (error); } @@ -2892,7 +2890,7 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, * will transmute the ipv6 address to the * proper value. */ - if (p && (error = prison_local_ip6(p->td_ucred, &sin6->sin6_addr, + if ((error = prison_local_ip6(td->td_ucred, &sin6->sin6_addr, (SCTP_IPV6_V6ONLY(inp) != 0))) != 0) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); return (error); @@ -2929,9 +2927,7 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, */ /* got to be root to get at low ports */ if (ntohs(lport) < IPPORT_RESERVED) { - if ((p != NULL) && ((error = - priv_check(p, PRIV_NETINET_RESERVEDPORT) - ) != 0)) { + if ((error = priv_check(td, PRIV_NETINET_RESERVEDPORT)) != 0) { SCTP_INP_DECR_REF(inp); SCTP_INP_WUNLOCK(inp); SCTP_INP_INFO_WUNLOCK(); @@ -3021,9 +3017,7 @@ continue_anyway: first = MODULE_GLOBAL(ipport_hifirstauto); last = MODULE_GLOBAL(ipport_hilastauto); } else if (ip_inp->inp_flags & INP_LOWPORT) { - if (p && (error = - priv_check(p, PRIV_NETINET_RESERVEDPORT) - )) { + if ((error = priv_check(td, PRIV_NETINET_RESERVEDPORT)) != 0) { SCTP_INP_DECR_REF(inp); SCTP_INP_WUNLOCK(inp); SCTP_INP_INFO_WUNLOCK(); From owner-dev-commits-src-all@freebsd.org Tue Aug 31 11:46:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E2ED566CC90; Tue, 31 Aug 2021 11:46: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 4GzQQR5hs8z4n8j; Tue, 31 Aug 2021 11:46: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 A78F411328; Tue, 31 Aug 2021 11:46: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 17VBkt4g084297; Tue, 31 Aug 2021 11:46:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VBktWZ084296; Tue, 31 Aug 2021 11:46:55 GMT (envelope-from git) Date: Tue, 31 Aug 2021 11:46:55 GMT Message-Id: <202108311146.17VBktWZ084296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 2496d812a9c7 - main - sctp: Simplify the free port search in sctp_inpcb_bind() 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/main X-Git-Reftype: branch X-Git-Commit: 2496d812a9c781f8e4be1bfd22375c6e686665da Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 11:46:56 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2496d812a9c781f8e4be1bfd22375c6e686665da commit 2496d812a9c781f8e4be1bfd22375c6e686665da Author: Mark Johnston AuthorDate: 2021-08-31 11:43:39 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 11:43:39 +0000 sctp: Simplify the free port search in sctp_inpcb_bind() Eliminate a flag variable and reduce indentation. No functional change intended. Reviewed by: tuexen MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31733 --- sys/netinet/sctp_pcb.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index f55c3d4891a6..def6292456d4 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -3012,7 +3012,6 @@ continue_anyway: } else { uint16_t first, last, candidate; uint16_t count; - int done; if (ip_inp->inp_flags & INP_HIGHPORT) { first = MODULE_GLOBAL(ipport_hifirstauto); @@ -3040,25 +3039,22 @@ continue_anyway: count = last - first + 1; /* number of candidates */ candidate = first + sctp_select_initial_TSN(&inp->sctp_ep) % (count); - done = 0; - while (!done) { + for (;;) { if (sctp_isport_inuse(inp, htons(candidate), inp->def_vrf_id) == NULL) { - done = 1; + lport = htons(candidate); + break; } - if (!done) { - if (--count == 0) { - SCTP_INP_WUNLOCK(inp); - SCTP_INP_INFO_WUNLOCK(); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EADDRINUSE); - return (EADDRINUSE); - } - if (candidate == last) - candidate = first; - else - candidate = candidate + 1; + if (--count == 0) { + SCTP_INP_WUNLOCK(inp); + SCTP_INP_INFO_WUNLOCK(); + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EADDRINUSE); + return (EADDRINUSE); } + if (candidate == last) + candidate = first; + else + candidate = candidate + 1; } - lport = htons(candidate); } if (inp->sctp_flags & (SCTP_PCB_FLAGS_SOCKET_GONE | SCTP_PCB_FLAGS_SOCKET_ALLGONE)) { From owner-dev-commits-src-all@freebsd.org Tue Aug 31 11:46:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C548166CB7C; Tue, 31 Aug 2021 11:46: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 4GzQQQ58l9z4nL7; Tue, 31 Aug 2021 11:46: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 99AAD11177; Tue, 31 Aug 2021 11:46: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 17VBksf2084266; Tue, 31 Aug 2021 11:46:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VBksfm084265; Tue, 31 Aug 2021 11:46:54 GMT (envelope-from git) Date: Tue, 31 Aug 2021 11:46:54 GMT Message-Id: <202108311146.17VBksfm084265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 93908fce7280 - main - sctp: Avoid unnecessary refcount bumps in sctp_inpcb_bind() 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/main X-Git-Reftype: branch X-Git-Commit: 93908fce7280b1146bbc5135b78829e8f8ff1b74 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 11:46:54 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=93908fce7280b1146bbc5135b78829e8f8ff1b74 commit 93908fce7280b1146bbc5135b78829e8f8ff1b74 Author: Mark Johnston AuthorDate: 2021-08-31 11:43:27 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 11:43:27 +0000 sctp: Avoid unnecessary refcount bumps in sctp_inpcb_bind() We only drop the inp lock when binding to a specific port. So, only acquire an extra reference when required. This simplifies error handling a bit. Reviewed by: tuexen MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31732 --- sys/netinet/sctp_pcb.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index f583862eae14..f55c3d4891a6 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -2918,9 +2918,10 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, /* Setup a vrf_id to be the default for the non-bind-all case. */ vrf_id = inp->def_vrf_id; - /* increase our count due to the unlock we do */ - SCTP_INP_INCR_REF(inp); if (lport) { + /* increase our count due to the unlock we do */ + SCTP_INP_INCR_REF(inp); + /* * Did the caller specify a port? if so we must see if an ep * already has this one bound. @@ -2991,6 +2992,7 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, } continue_anyway: SCTP_INP_WLOCK(inp); + SCTP_INP_DECR_REF(inp); if (bindall) { /* verify that no lport is not used by a singleton */ if ((port_reuse_active == 0) && @@ -3000,7 +3002,6 @@ continue_anyway: (sctp_is_feature_on(inp_tmp, SCTP_PCB_FLAGS_PORTREUSE))) { port_reuse_active = 1; } else { - SCTP_INP_DECR_REF(inp); SCTP_INP_WUNLOCK(inp); SCTP_INP_INFO_WUNLOCK(); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EADDRINUSE); @@ -3018,7 +3019,6 @@ continue_anyway: last = MODULE_GLOBAL(ipport_hilastauto); } else if (ip_inp->inp_flags & INP_LOWPORT) { if ((error = priv_check(td, PRIV_NETINET_RESERVEDPORT)) != 0) { - SCTP_INP_DECR_REF(inp); SCTP_INP_WUNLOCK(inp); SCTP_INP_INFO_WUNLOCK(); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); @@ -3047,7 +3047,6 @@ continue_anyway: } if (!done) { if (--count == 0) { - SCTP_INP_DECR_REF(inp); SCTP_INP_WUNLOCK(inp); SCTP_INP_INFO_WUNLOCK(); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EADDRINUSE); @@ -3061,7 +3060,6 @@ continue_anyway: } lport = htons(candidate); } - SCTP_INP_DECR_REF(inp); if (inp->sctp_flags & (SCTP_PCB_FLAGS_SOCKET_GONE | SCTP_PCB_FLAGS_SOCKET_ALLGONE)) { /* From owner-dev-commits-src-all@freebsd.org Tue Aug 31 11:46:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 51A8C66CE05; Tue, 31 Aug 2021 11: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 4GzQQT148bz4n8p; Tue, 31 Aug 2021 11: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 EA5FD113B3; Tue, 31 Aug 2021 11:46: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 17VBku9u084321; Tue, 31 Aug 2021 11:46:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VBku0l084320; Tue, 31 Aug 2021 11:46:56 GMT (envelope-from git) Date: Tue, 31 Aug 2021 11:46:56 GMT Message-Id: <202108311146.17VBku0l084320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4a36122b1db1 - main - sctp: Fix racy UNBOUND flag check in sctp_inpcb_bind() 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/main X-Git-Reftype: branch X-Git-Commit: 4a36122b1db1b255cf21d926b997d524e6782429 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 11:46:57 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4a36122b1db1b255cf21d926b997d524e6782429 commit 4a36122b1db1b255cf21d926b997d524e6782429 Author: Mark Johnston AuthorDate: 2021-08-31 11:43:47 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 11:44:42 +0000 sctp: Fix racy UNBOUND flag check in sctp_inpcb_bind() SCTP needs to avoid binding a given socket twice. The check used to avoid this is racy since neither the inpcb lock nor the global info lock is held. Fix it by synchronizing using the global info lock. In particular, sctp_inpcb_bind() may drop the inpcb lock in some cases, but the info lock is sufficient to prevent double insertion into PCB hash tables. Reported by: syzbot+548a8560d959669d0e12@syzkaller.appspotmail.com Reviewed by: tuexen MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31734 --- sys/netinet/sctp_pcb.c | 108 ++++++++++++++++++++++++------------------------- 1 file changed, 53 insertions(+), 55 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index def6292456d4..12f2d5d7fb76 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -2818,6 +2818,7 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, KASSERT(td != NULL, ("%s: null thread", __func__)); + error = 0; lport = 0; bindall = 1; inp = (struct sctp_inpcb *)so->so_pcb; @@ -2830,10 +2831,13 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, SCTPDBG_ADDR(SCTP_DEBUG_PCB1, addr); } #endif + SCTP_INP_INFO_WLOCK(); + SCTP_INP_WLOCK(inp); if ((inp->sctp_flags & SCTP_PCB_FLAGS_UNBOUND) == 0) { + error = EINVAL; /* already did a bind, subsequent binds NOT allowed ! */ - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EINVAL); - return (EINVAL); + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out; } if (addr != NULL) { switch (addr->sa_family) { @@ -2844,12 +2848,14 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, /* IPV6_V6ONLY socket? */ if (SCTP_IPV6_V6ONLY(inp)) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EINVAL); - return (EINVAL); + error = EINVAL; + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out; } if (addr->sa_len != sizeof(*sin)) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EINVAL); - return (EINVAL); + error = EINVAL; + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out; } sin = (struct sockaddr_in *)addr; @@ -2861,7 +2867,7 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, */ if ((error = prison_local_ip4(td->td_ucred, &sin->sin_addr)) != 0) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); - return (error); + goto out; } if (sin->sin_addr.s_addr != INADDR_ANY) { bindall = 0; @@ -2879,10 +2885,10 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, struct sockaddr_in6 *sin6; sin6 = (struct sockaddr_in6 *)addr; - if (addr->sa_len != sizeof(*sin6)) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EINVAL); - return (EINVAL); + error = EINVAL; + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out; } lport = sin6->sin6_port; /* @@ -2893,14 +2899,15 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, if ((error = prison_local_ip6(td->td_ucred, &sin6->sin6_addr, (SCTP_IPV6_V6ONLY(inp) != 0))) != 0) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); - return (error); + goto out; } if (!IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { bindall = 0; /* KAME hack: embed scopeid */ if (sa6_embedscope(sin6, MODULE_GLOBAL(ip6_use_defzone)) != 0) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EINVAL); - return (EINVAL); + error = EINVAL; + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out; } } /* this must be cleared for ifa_ifwithaddr() */ @@ -2909,12 +2916,11 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, } #endif default: - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EAFNOSUPPORT); - return (EAFNOSUPPORT); + error = EAFNOSUPPORT; + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out; } } - SCTP_INP_INFO_WLOCK(); - SCTP_INP_WLOCK(inp); /* Setup a vrf_id to be the default for the non-bind-all case. */ vrf_id = inp->def_vrf_id; @@ -2930,9 +2936,7 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, if (ntohs(lport) < IPPORT_RESERVED) { if ((error = priv_check(td, PRIV_NETINET_RESERVEDPORT)) != 0) { SCTP_INP_DECR_REF(inp); - SCTP_INP_WUNLOCK(inp); - SCTP_INP_INFO_WUNLOCK(); - return (error); + goto out; } } SCTP_INP_WUNLOCK(inp); @@ -2959,9 +2963,9 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, goto continue_anyway; } SCTP_INP_DECR_REF(inp); - SCTP_INP_INFO_WUNLOCK(); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EADDRINUSE); - return (EADDRINUSE); + error = EADDRINUSE; + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out_inp_unlocked; } } else { inp_tmp = sctp_pcb_findep(addr, 0, 1, vrf_id); @@ -2985,9 +2989,9 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, goto continue_anyway; } SCTP_INP_DECR_REF(inp); - SCTP_INP_INFO_WUNLOCK(); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EADDRINUSE); - return (EADDRINUSE); + error = EADDRINUSE; + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out_inp_unlocked; } } continue_anyway: @@ -3002,10 +3006,9 @@ continue_anyway: (sctp_is_feature_on(inp_tmp, SCTP_PCB_FLAGS_PORTREUSE))) { port_reuse_active = 1; } else { - SCTP_INP_WUNLOCK(inp); - SCTP_INP_INFO_WUNLOCK(); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EADDRINUSE); - return (EADDRINUSE); + error = EADDRINUSE; + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out; } } } @@ -3018,10 +3021,8 @@ continue_anyway: last = MODULE_GLOBAL(ipport_hilastauto); } else if (ip_inp->inp_flags & INP_LOWPORT) { if ((error = priv_check(td, PRIV_NETINET_RESERVEDPORT)) != 0) { - SCTP_INP_WUNLOCK(inp); - SCTP_INP_INFO_WUNLOCK(); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); - return (error); + goto out; } first = MODULE_GLOBAL(ipport_lowfirstauto); last = MODULE_GLOBAL(ipport_lowlastauto); @@ -3045,10 +3046,9 @@ continue_anyway: break; } if (--count == 0) { - SCTP_INP_WUNLOCK(inp); - SCTP_INP_INFO_WUNLOCK(); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EADDRINUSE); - return (EADDRINUSE); + error = EADDRINUSE; + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out; } if (candidate == last) candidate = first; @@ -3062,10 +3062,9 @@ continue_anyway: * this really should not happen. The guy did a non-blocking * bind and then did a close at the same time. */ - SCTP_INP_WUNLOCK(inp); - SCTP_INP_INFO_WUNLOCK(); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EINVAL); - return (EINVAL); + error = EINVAL; + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out; } /* ok we look clear to give out this port, so lets setup the binding */ if (bindall) { @@ -3153,21 +3152,19 @@ continue_anyway: vrf_id, SCTP_ADDR_NOT_LOCKED); } if (ifa == NULL) { + error = EADDRNOTAVAIL; /* Can't find an interface with that address */ - SCTP_INP_WUNLOCK(inp); - SCTP_INP_INFO_WUNLOCK(); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EADDRNOTAVAIL); - return (EADDRNOTAVAIL); + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out; } #ifdef INET6 if (addr->sa_family == AF_INET6) { /* GAK, more FIXME IFA lock? */ if (ifa->localifa_flags & SCTP_ADDR_IFA_UNUSEABLE) { /* Can't bind a non-existent addr. */ - SCTP_INP_WUNLOCK(inp); - SCTP_INP_INFO_WUNLOCK(); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EINVAL); - return (EINVAL); + error = EINVAL; + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); + goto out; } } #endif @@ -3180,11 +3177,8 @@ continue_anyway: /* add this address to the endpoint list */ error = sctp_insert_laddr(&inp->sctp_addr_list, ifa, 0); - if (error != 0) { - SCTP_INP_WUNLOCK(inp); - SCTP_INP_INFO_WUNLOCK(); - return (error); - } + if (error != 0) + goto out; inp->laddr_count++; } /* find the bucket */ @@ -3203,10 +3197,14 @@ continue_anyway: inp->sctp_lport = lport; /* turn off just the unbound flag */ + KASSERT((inp->sctp_flags & SCTP_PCB_FLAGS_UNBOUND) != 0, + ("%s: inp %p is already bound", __func__, inp)); inp->sctp_flags &= ~SCTP_PCB_FLAGS_UNBOUND; +out: SCTP_INP_WUNLOCK(inp); +out_inp_unlocked: SCTP_INP_INFO_WUNLOCK(); - return (0); + return (error); } static void From owner-dev-commits-src-all@freebsd.org Tue Aug 31 11:51:45 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 11:51:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 11:51:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 11:51:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 11:51:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 11:51:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 13:42:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 16:25:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 17:45:51 2021 Return-Path: Delivered-To: dev-commits-src-all@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 32FBF6720B2; Tue, 31 Aug 2021 17:45: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 4GzZNZ6xcxz4VXS; Tue, 31 Aug 2021 17:45: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 C786016320; Tue, 31 Aug 2021 17:45: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 17VHjofX066426; Tue, 31 Aug 2021 17:45:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VHjoV5066425; Tue, 31 Aug 2021 17:45:50 GMT (envelope-from git) Date: Tue, 31 Aug 2021 17:45:50 GMT Message-Id: <202108311745.17VHjoV5066425@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: e3bdf3da769a - main - nvme(4): Add MSI and single MSI-X support. 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/main X-Git-Reftype: branch X-Git-Commit: e3bdf3da769a55f0944d9c337bb4d91b6435f02c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 17:45:51 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=e3bdf3da769a55f0944d9c337bb4d91b6435f02c commit e3bdf3da769a55f0944d9c337bb4d91b6435f02c Author: Alexander Motin AuthorDate: 2021-08-31 17:34:48 +0000 Commit: Alexander Motin CommitDate: 2021-08-31 17:45:46 +0000 nvme(4): Add MSI and single MSI-X support. If we can't allocate more MSI-X vectors, accept using single shared. If we can't allocate any MSI-X, try to allocate 2 MSI vectors, but accept single shared. If still no luck, fall back to shared INTx. This provides maximal flexibility in some limited scenarios. For example, vmd(4) does not support INTx and can handle only limited number of MSI/MSI-X vectors without sharing. MFC after: 1 week --- sys/dev/nvme/nvme_ahci.c | 9 ++--- sys/dev/nvme/nvme_ctrlr.c | 2 +- sys/dev/nvme/nvme_pci.c | 92 ++++++++++++++++++++++++++++----------------- sys/dev/nvme/nvme_private.h | 4 +- sys/dev/nvme/nvme_qpair.c | 14 ++++--- 5 files changed, 73 insertions(+), 48 deletions(-) diff --git a/sys/dev/nvme/nvme_ahci.c b/sys/dev/nvme/nvme_ahci.c index 1037fab66664..8542f6f55246 100644 --- a/sys/dev/nvme/nvme_ahci.c +++ b/sys/dev/nvme/nvme_ahci.c @@ -87,19 +87,18 @@ nvme_ahci_attach(device_t dev) ctrlr->rid = 0; ctrlr->res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &ctrlr->rid, RF_SHAREABLE | RF_ACTIVE); - if (ctrlr->res == NULL) { - nvme_printf(ctrlr, "unable to allocate shared IRQ\n"); + nvme_printf(ctrlr, "unable to allocate shared interrupt\n"); ret = ENOMEM; goto bad; } - ctrlr->msix_enabled = 0; + ctrlr->msi_count = 0; ctrlr->num_io_queues = 1; if (bus_setup_intr(dev, ctrlr->res, - INTR_TYPE_MISC | INTR_MPSAFE, NULL, nvme_ctrlr_intx_handler, + INTR_TYPE_MISC | INTR_MPSAFE, NULL, nvme_ctrlr_shared_handler, ctrlr, &ctrlr->tag) != 0) { - nvme_printf(ctrlr, "unable to setup intx handler\n"); + nvme_printf(ctrlr, "unable to setup shared interrupt\n"); ret = ENOMEM; goto bad; } diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index c4a41c453b6a..52eab6254d89 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1203,7 +1203,7 @@ nvme_ctrlr_poll(struct nvme_controller *ctrlr) * interrupts in the controller. */ void -nvme_ctrlr_intx_handler(void *arg) +nvme_ctrlr_shared_handler(void *arg) { struct nvme_controller *ctrlr = arg; diff --git a/sys/dev/nvme/nvme_pci.c b/sys/dev/nvme/nvme_pci.c index 1b28ab4d40e6..e87860bde7e6 100644 --- a/sys/dev/nvme/nvme_pci.c +++ b/sys/dev/nvme/nvme_pci.c @@ -47,7 +47,7 @@ static int nvme_pci_detach(device_t); static int nvme_pci_suspend(device_t); static int nvme_pci_resume(device_t); -static void nvme_ctrlr_setup_interrupts(struct nvme_controller *ctrlr); +static int nvme_ctrlr_setup_interrupts(struct nvme_controller *ctrlr); static device_method_t nvme_pci_methods[] = { /* Device interface */ @@ -188,7 +188,9 @@ nvme_pci_attach(device_t dev) if (status != 0) goto bad; pci_enable_busmaster(dev); - nvme_ctrlr_setup_interrupts(ctrlr); + status = nvme_ctrlr_setup_interrupts(ctrlr); + if (status != 0) + goto bad; return nvme_attach(dev); bad: if (ctrlr->resource != NULL) { @@ -208,7 +210,7 @@ bad: bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(ctrlr->res), ctrlr->res); - if (ctrlr->msix_enabled) + if (ctrlr->msi_count > 0) pci_release_msi(dev); return status; @@ -221,54 +223,60 @@ nvme_pci_detach(device_t dev) int rv; rv = nvme_detach(dev); - if (ctrlr->msix_enabled) + if (ctrlr->msi_count > 0) pci_release_msi(dev); pci_disable_busmaster(dev); return (rv); } static int -nvme_ctrlr_configure_intx(struct nvme_controller *ctrlr) +nvme_ctrlr_setup_shared(struct nvme_controller *ctrlr, int rid) { + int error; - ctrlr->msix_enabled = 0; ctrlr->num_io_queues = 1; - ctrlr->rid = 0; + ctrlr->rid = rid; ctrlr->res = bus_alloc_resource_any(ctrlr->dev, SYS_RES_IRQ, &ctrlr->rid, RF_SHAREABLE | RF_ACTIVE); - if (ctrlr->res == NULL) { - nvme_printf(ctrlr, "unable to allocate shared IRQ\n"); + nvme_printf(ctrlr, "unable to allocate shared interrupt\n"); return (ENOMEM); } - if (bus_setup_intr(ctrlr->dev, ctrlr->res, - INTR_TYPE_MISC | INTR_MPSAFE, NULL, nvme_ctrlr_intx_handler, - ctrlr, &ctrlr->tag) != 0) { - nvme_printf(ctrlr, "unable to setup intx handler\n"); - return (ENOMEM); + error = bus_setup_intr(ctrlr->dev, ctrlr->res, + INTR_TYPE_MISC | INTR_MPSAFE, NULL, nvme_ctrlr_shared_handler, + ctrlr, &ctrlr->tag); + if (error) { + nvme_printf(ctrlr, "unable to setup shared interrupt\n"); + return (error); } return (0); } -static void +static int nvme_ctrlr_setup_interrupts(struct nvme_controller *ctrlr) { device_t dev; int force_intx, num_io_queues, per_cpu_io_queues; int min_cpus_per_ioq; - int num_vectors_requested, num_vectors_allocated; + int num_vectors_requested; dev = ctrlr->dev; force_intx = 0; TUNABLE_INT_FETCH("hw.nvme.force_intx", &force_intx); - if (force_intx || pci_msix_count(dev) < 2) { - nvme_ctrlr_configure_intx(ctrlr); - return; - } + if (force_intx) + return (nvme_ctrlr_setup_shared(ctrlr, 0)); + if (pci_msix_count(dev) == 0) + goto msi; + + /* + * Try to allocate one MSI-X per core for I/O queues, plus one + * for admin queue, but accept single shared MSI-X if have to. + * Fall back to MSI if can't get any MSI-X. + */ num_io_queues = mp_ncpus; TUNABLE_INT_FETCH("hw.nvme.num_io_queues", &num_io_queues); if (num_io_queues < 1 || num_io_queues > mp_ncpus) @@ -286,31 +294,45 @@ nvme_ctrlr_setup_interrupts(struct nvme_controller *ctrlr) max(1, mp_ncpus / min_cpus_per_ioq)); } - num_io_queues = min(num_io_queues, pci_msix_count(dev) - 1); + num_io_queues = min(num_io_queues, max(1, pci_msix_count(dev) - 1)); again: if (num_io_queues > vm_ndomains) num_io_queues -= num_io_queues % vm_ndomains; - /* One vector for per core I/O queue, plus one vector for admin queue. */ - num_vectors_requested = num_io_queues + 1; - num_vectors_allocated = num_vectors_requested; - if (pci_alloc_msix(dev, &num_vectors_allocated) != 0) { - nvme_ctrlr_configure_intx(ctrlr); - return; - } - if (num_vectors_allocated < 2) { - pci_release_msi(dev); - nvme_ctrlr_configure_intx(ctrlr); - return; + num_vectors_requested = min(num_io_queues + 1, pci_msix_count(dev)); + ctrlr->msi_count = num_vectors_requested; + if (pci_alloc_msix(dev, &ctrlr->msi_count) != 0) { + nvme_printf(ctrlr, "unable to allocate MSI-X\n"); + ctrlr->msi_count = 0; + goto msi; } - if (num_vectors_allocated != num_vectors_requested) { + if (ctrlr->msi_count == 1) + return (nvme_ctrlr_setup_shared(ctrlr, 1)); + if (ctrlr->msi_count != num_vectors_requested) { pci_release_msi(dev); - num_io_queues = num_vectors_allocated - 1; + num_io_queues = ctrlr->msi_count - 1; goto again; } - ctrlr->msix_enabled = 1; ctrlr->num_io_queues = num_io_queues; + return (0); + +msi: + /* + * Try to allocate 2 MSIs (admin and I/O queues), but accept single + * shared if have to. Fall back to INTx if can't get any MSI. + */ + ctrlr->msi_count = min(pci_msi_count(dev), 2); + if (ctrlr->msi_count > 0) { + if (pci_alloc_msi(dev, &ctrlr->msi_count) != 0) { + nvme_printf(ctrlr, "unable to allocate MSI\n"); + ctrlr->msi_count = 0; + } else if (ctrlr->msi_count == 2) { + ctrlr->num_io_queues = 1; + return (0); + } + } + return (nvme_ctrlr_setup_shared(ctrlr, ctrlr->msi_count > 0 ? 1 : 0)); } static int diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index ee0a909e24ec..fba1b406e9ce 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -244,7 +244,7 @@ struct nvme_controller { int bar4_resource_id; struct resource *bar4_resource; - uint32_t msix_enabled; + int msi_count; uint32_t enable_aborts; uint32_t num_io_queues; @@ -553,7 +553,7 @@ void nvme_notify_fail_consumers(struct nvme_controller *ctrlr); void nvme_notify_new_controller(struct nvme_controller *ctrlr); void nvme_notify_ns(struct nvme_controller *ctrlr, int nsid); -void nvme_ctrlr_intx_handler(void *arg); +void nvme_ctrlr_shared_handler(void *arg); void nvme_ctrlr_poll(struct nvme_controller *ctrlr); int nvme_ctrlr_suspend(struct nvme_controller *ctrlr); diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 4402d1000e67..eea87e299d3d 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -652,7 +652,7 @@ nvme_qpair_process_completions(struct nvme_qpair *qpair) } static void -nvme_qpair_msix_handler(void *arg) +nvme_qpair_msi_handler(void *arg) { struct nvme_qpair *qpair = arg; @@ -670,7 +670,7 @@ nvme_qpair_construct(struct nvme_qpair *qpair, uint8_t *queuemem, *prpmem, *prp_list; int i, err; - qpair->vector = ctrlr->msix_enabled ? qpair->id : 0; + qpair->vector = ctrlr->msi_count > 1 ? qpair->id : 0; qpair->num_entries = num_entries; qpair->num_trackers = num_trackers; qpair->ctrlr = ctrlr; @@ -795,7 +795,7 @@ nvme_qpair_construct(struct nvme_qpair *qpair, qpair->num_entries, M_NVME, DOMAINSET_PREF(qpair->domain), M_ZERO | M_WAITOK); - if (ctrlr->msix_enabled) { + if (ctrlr->msi_count > 1) { /* * MSI-X vector resource IDs start at 1, so we add one to * the queue's vector to get the corresponding rid to use. @@ -804,10 +804,14 @@ nvme_qpair_construct(struct nvme_qpair *qpair, qpair->res = bus_alloc_resource_any(ctrlr->dev, SYS_RES_IRQ, &qpair->rid, RF_ACTIVE); + if (qpair->res == NULL) { + nvme_printf(ctrlr, "unable to allocate MSI\n"); + goto out; + } if (bus_setup_intr(ctrlr->dev, qpair->res, INTR_TYPE_MISC | INTR_MPSAFE, NULL, - nvme_qpair_msix_handler, qpair, &qpair->tag) != 0) { - nvme_printf(ctrlr, "unable to setup intx handler\n"); + nvme_qpair_msi_handler, qpair, &qpair->tag) != 0) { + nvme_printf(ctrlr, "unable to setup MSI\n"); goto out; } if (qpair->id == 0) { From owner-dev-commits-src-all@freebsd.org Tue Aug 31 19:06:30 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:06:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:06:33 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:43 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:44 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:48 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:51 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:52 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:09:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:11:25 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:11:27 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:13:37 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:26:08 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 19:57:38 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Tue Aug 31 20:03:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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 79D10675A86; Tue, 31 Aug 2021 20:03: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 4GzdRk0rFmz57WS; Tue, 31 Aug 2021 20:03: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 02BED17FAD; Tue, 31 Aug 2021 20:03: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 17VK3jrE056205; Tue, 31 Aug 2021 20:03:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VK3jju056204; Tue, 31 Aug 2021 20:03:45 GMT (envelope-from git) Date: Tue, 31 Aug 2021 20:03:45 GMT Message-Id: <202108312003.17VK3jju056204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 47619b604402 - main - md: Clamp to a multiple of the sector size when resizing 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/main X-Git-Reftype: branch X-Git-Commit: 47619b604402c9672a0f9bf62666f3bcba1dfb7e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 20:03:46 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=47619b604402c9672a0f9bf62666f3bcba1dfb7e commit 47619b604402c9672a0f9bf62666f3bcba1dfb7e Author: Mark Johnston AuthorDate: 2021-08-31 19:35:08 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:50:04 +0000 md: Clamp to a multiple of the sector size when resizing We do this when creating md(4) devices, in kern_mdattach_locked(), but not when resizing the provider. Apply the same policy when resizing, as many GEOM classes do not expect to deal with providers for which pp->mediasize % pp->sectorsize != 0. Reported by: syzkaller MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/dev/md/md.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 1627ee2e5fa6..08fb4b0c6574 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1580,6 +1580,7 @@ mdresize(struct md_s *sc, struct md_req *mdr) } sc->mediasize = mdr->md_mediasize; + g_topology_lock(); g_resize_provider(sc->pp, sc->mediasize); g_topology_unlock(); @@ -1787,6 +1788,7 @@ kern_mdresize_locked(struct md_req *mdr) return (ENOENT); if (mdr->md_mediasize < sc->sectorsize) return (EINVAL); + mdr->md_mediasize -= mdr->md_mediasize % sc->sectorsize; if (mdr->md_mediasize < sc->mediasize && !(sc->flags & MD_FORCE) && !(mdr->md_options & MD_FORCE)) From owner-dev-commits-src-all@freebsd.org Tue Aug 31 20:03:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9E74267588B; Tue, 31 Aug 2021 20:03: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 4GzdRl2GTVz57wF; Tue, 31 Aug 2021 20:03: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 279D317F5B; Tue, 31 Aug 2021 20:03: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 17VK3l06056231; Tue, 31 Aug 2021 20:03:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VK3lTn056230; Tue, 31 Aug 2021 20:03:47 GMT (envelope-from git) Date: Tue, 31 Aug 2021 20:03:47 GMT Message-Id: <202108312003.17VK3lTn056230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ed59446b4709 - main - mdconfig: Add a regression test for mediasize rounding 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/main X-Git-Reftype: branch X-Git-Commit: ed59446b47095fc20c1f77e832286f5b953cd289 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 20:03:47 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ed59446b47095fc20c1f77e832286f5b953cd289 commit ed59446b47095fc20c1f77e832286f5b953cd289 Author: Mark Johnston AuthorDate: 2021-08-31 19:50:09 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 19:50:09 +0000 mdconfig: Add a regression test for mediasize rounding MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sbin/mdconfig/tests/mdconfig_test.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/sbin/mdconfig/tests/mdconfig_test.sh b/sbin/mdconfig/tests/mdconfig_test.sh index 92ba0342447c..c3a5f85e341b 100755 --- a/sbin/mdconfig/tests/mdconfig_test.sh +++ b/sbin/mdconfig/tests/mdconfig_test.sh @@ -267,6 +267,36 @@ attach_with_specific_unit_number_cleanup() cleanup_common } +atf_test_case attach_size_rounddown cleanup +attach_size_rounddown() +{ + atf_set "descr" "Verify that md provider sizes are a multiple of the sector size" +} +attach_size_rounddown_body() +{ + local md + local ss=8192 + local ms=$(($ss + 4096)) + local ms2=$((2 * $ss + 4096)) + + # Use a sector size that's a likely multiple of PAGE_SIZE, as md(4) + # expects that for swap MDs. + atf_check -s exit:0 -o save:mdconfig.out -e empty \ + -x "mdconfig -a -t swap -S $ss -s ${ms}b" + md=$(cat mdconfig.out) + # 12288 bytes should be rounded down to one sector. + check_diskinfo "$md" 8192 1 $ss + + # Resize and verify that the new size was also rounded down. + atf_check -s exit:0 -o empty -e empty \ + -x "mdconfig -r -u ${md#md} -s ${ms2}b" + check_diskinfo "$md" 16384 2 $ss +} +attach_size_rounddown() +{ + cleanup_common +} + atf_init_test_cases() { atf_add_test_case attach_vnode_non_explicit_type @@ -277,4 +307,5 @@ atf_init_test_cases() atf_add_test_case attach_malloc atf_add_test_case attach_swap atf_add_test_case attach_with_specific_unit_number + atf_add_test_case attach_size_rounddown } From owner-dev-commits-src-all@freebsd.org Tue Aug 31 20:40:30 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D5DDC675F6C; Tue, 31 Aug 2021 20:40: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 4GzfG65JbXz3LNY; Tue, 31 Aug 2021 20:40: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 9A5E1186C0; Tue, 31 Aug 2021 20:40: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 17VKeUW6004899; Tue, 31 Aug 2021 20:40:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VKeURS004898; Tue, 31 Aug 2021 20:40:30 GMT (envelope-from git) Date: Tue, 31 Aug 2021 20:40:30 GMT Message-Id: <202108312040.17VKeURS004898@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 3138392a46a4 - main - itimer: Serialize access to the p_itimers array 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/main X-Git-Reftype: branch X-Git-Commit: 3138392a46a4a8ecfb8e36e9970e88bbae9caed3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 20:40:30 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3138392a46a4a8ecfb8e36e9970e88bbae9caed3 commit 3138392a46a4a8ecfb8e36e9970e88bbae9caed3 Author: Mark Johnston AuthorDate: 2021-08-31 20:38:05 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 20:38:05 +0000 itimer: Serialize access to the p_itimers array Fix the following race between itimer_proc_continue() and process exit. itimer_proc_continue() may be called via realitexpire(), the real interval timer. Note that exit1() drains this timer _after_ draining and freeing itimers. Moreover, itimers_exit() is called without the process lock held; it only acquires the proc lock when deleting individual itimers, so once they are drained we free p->p_itimers without any synchronization. Thus, itimer_proc_continue() may load a non-NULL p->p_itimers array and iterate over it after it has been freed. Fix the problem by using the process lock when clearing p->p_itimers, to synchronize with itimer_proc_continue(). Formally, accesses to this field should be protected by the process lock anyway, and since the array is allocated lazily this will not incur any overhead in the common case. Reported by: syzbot+c40aa8bf54fe333fc50b@syzkaller.appspotmail.com Reported by: syzbot+929be2f32503bbc3844f@syzkaller.appspotmail.com Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31759 --- sys/kern/kern_time.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 323ef9a1f7a0..a52dc83e9b4c 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -1822,8 +1822,11 @@ itimers_event_exit_exec(int start_idx, struct proc *p) } if (its->its_timers[0] == NULL && its->its_timers[1] == NULL && its->its_timers[2] == NULL) { - free(its, M_SUBPROC); + /* Synchronize with itimer_proc_continue(). */ + PROC_LOCK(p); p->p_itimers = NULL; + PROC_UNLOCK(p); + free(its, M_SUBPROC); } } From owner-dev-commits-src-all@freebsd.org Tue Aug 31 21:10:09 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A09946767EF; Tue, 31 Aug 2021 21:10: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 4GzfwK47tTz3jv0; Tue, 31 Aug 2021 21:10: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 7200618EA3; Tue, 31 Aug 2021 21:10: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 17VLA9Js040887; Tue, 31 Aug 2021 21:10:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VLA93f040883; Tue, 31 Aug 2021 21:10:09 GMT (envelope-from git) Date: Tue, 31 Aug 2021 21:10:09 GMT Message-Id: <202108312110.17VLA93f040883@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 9e9ba9c73de9 - main - graid: Avoid tasting devices with small sector sizes 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/main X-Git-Reftype: branch X-Git-Commit: 9e9ba9c73de9206d82b8390c47b07f71470d001a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 21:10:09 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9e9ba9c73de9206d82b8390c47b07f71470d001a commit 9e9ba9c73de9206d82b8390c47b07f71470d001a Author: Mark Johnston AuthorDate: 2021-08-31 21:09:52 +0000 Commit: Mark Johnston CommitDate: 2021-08-31 21:09:52 +0000 graid: Avoid tasting devices with small sector sizes The RAID metadata parsers effectively assume a sector size of 512 bytes or larger, but md(4) devices can be created with a sector size that's any power of 2. Add some seatbelts to graid tasting routines to ensure that the requested sector(s) are large enough for the device to plausibly contain RAID metadata. Reported by: syzbot+f43583c9bf8357c8b56f@syzkaller.appspotmail.com Reported by: syzbot+537dd9f22b91b698e161@syzkaller.appspotmail.com Reported by: syzbot+51509dd48871c57c6e47@syzkaller.appspotmail.com Reported by: syzbot+c882a31037ea2a54ff63@syzkaller.appspotmail.com MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/geom/raid/md_ddf.c | 3 +++ sys/geom/raid/md_intel.c | 3 ++- sys/geom/raid/md_jmicron.c | 3 ++- sys/geom/raid/md_nvidia.c | 3 ++- sys/geom/raid/md_promise.c | 2 ++ sys/geom/raid/md_sii.c | 3 ++- 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/sys/geom/raid/md_ddf.c b/sys/geom/raid/md_ddf.c index 0a3ec6637337..d4ceae343447 100644 --- a/sys/geom/raid/md_ddf.c +++ b/sys/geom/raid/md_ddf.c @@ -1046,8 +1046,11 @@ ddf_meta_read(struct g_consumer *cp, struct ddf_meta *meta) uint32_t val; ddf_meta_free(meta); + pp = cp->provider; ss = meta->sectorsize = pp->sectorsize; + if (ss < sizeof(*hdr)) + return (ENXIO); /* Read anchor block. */ abuf = g_read_data(cp, pp->mediasize - ss, ss, &error); if (abuf == NULL) { diff --git a/sys/geom/raid/md_intel.c b/sys/geom/raid/md_intel.c index 80ec182c53be..54fa7535bc0e 100644 --- a/sys/geom/raid/md_intel.c +++ b/sys/geom/raid/md_intel.c @@ -593,7 +593,8 @@ intel_meta_read(struct g_consumer *cp) uint32_t checksum, *ptr; pp = cp->provider; - + if (pp->sectorsize < sizeof(*meta)) + return (NULL); /* Read the anchor sector. */ buf = g_read_data(cp, pp->mediasize - pp->sectorsize * 2, pp->sectorsize, &error); diff --git a/sys/geom/raid/md_jmicron.c b/sys/geom/raid/md_jmicron.c index d0387bef4de0..02da9e1f02ab 100644 --- a/sys/geom/raid/md_jmicron.c +++ b/sys/geom/raid/md_jmicron.c @@ -270,7 +270,8 @@ jmicron_meta_read(struct g_consumer *cp) uint16_t checksum, *ptr; pp = cp->provider; - + if (pp->sectorsize < sizeof(*meta)) + return (NULL); /* Read the anchor sector. */ buf = g_read_data(cp, pp->mediasize - pp->sectorsize, pp->sectorsize, &error); diff --git a/sys/geom/raid/md_nvidia.c b/sys/geom/raid/md_nvidia.c index 1c758df5157d..79ec18fe17d7 100644 --- a/sys/geom/raid/md_nvidia.c +++ b/sys/geom/raid/md_nvidia.c @@ -250,7 +250,8 @@ nvidia_meta_read(struct g_consumer *cp) uint32_t checksum, *ptr; pp = cp->provider; - + if (pp->sectorsize < sizeof(*meta)) + return (NULL); /* Read the anchor sector. */ buf = g_read_data(cp, pp->mediasize - 2 * pp->sectorsize, pp->sectorsize, &error); diff --git a/sys/geom/raid/md_promise.c b/sys/geom/raid/md_promise.c index aacf0106ea15..dc9f444f2ac4 100644 --- a/sys/geom/raid/md_promise.c +++ b/sys/geom/raid/md_promise.c @@ -344,6 +344,8 @@ promise_meta_read(struct g_consumer *cp, struct promise_raid_conf **metaarr) pp = cp->provider; subdisks = 0; + if (pp->sectorsize * 4 < sizeof(*meta)) + return (subdisks); if (pp->sectorsize * 4 > maxphys) { G_RAID_DEBUG(1, "%s: Blocksize is too big.", pp->name); return (subdisks); diff --git a/sys/geom/raid/md_sii.c b/sys/geom/raid/md_sii.c index c8de0c8db8e9..06d58d45fe30 100644 --- a/sys/geom/raid/md_sii.c +++ b/sys/geom/raid/md_sii.c @@ -271,7 +271,8 @@ sii_meta_read(struct g_consumer *cp) uint16_t checksum, *ptr; pp = cp->provider; - + if (pp->sectorsize < sizeof(*meta)) + return (NULL); /* Read the anchor sector. */ buf = g_read_data(cp, pp->mediasize - pp->sectorsize, pp->sectorsize, &error); From owner-dev-commits-src-all@freebsd.org Wed Sep 1 00:40:06 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0DC42678C38; Wed, 1 Sep 2021 00:40:06 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzlZX4HBHz3R7H; Wed, 1 Sep 2021 00:40:04 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f179.google.com with SMTP id j15so1668664ila.1; Tue, 31 Aug 2021 17:40:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dl61Ud2MLVWzqm9oGPSWqNAwo/dT3cQA9ITeOY+T5J8=; b=lGCrgN4IGEis7mVZrypAHObnlTNxHBeOqUT/f9l8X9VJUQHbBg3AiTiiGpK0yo/NSD NcbC/G+yIcQEjM7e7g7SShwHRcBi5iMJ2d++7jYYZIGr+5LjmEmVZMVd8W2Y83W6byMH zse1h7RCWhBcdsxAt0P+2f7BPBAmeYozcots83yZc/2gxGNm92KvfocpGnmKknvqN+ih 4QrIMNppKInLkf4PXcAYyl8j6k6l78+ci6DnVGJjIAS6QSRaUvczr4dwUZbwGcgAlUEv zGlIAULp009FJB7lwfQkJA7bT+JEiyUOPB8Oeo1BmUpUn+BVdctDVDRTb3iwgCH9mfxw Zucw== X-Gm-Message-State: AOAM532nJLleDbGjUN3IXVZBY58IWBQjbZidI8tDeKUGA0YMHzHlA2He ZZLLFc/lCoUlMI6LIZF9Y5I9imJVfP4rRR7tarkc6/GDIhU= X-Google-Smtp-Source: ABdhPJzdECHq2CX9mJv5/h6NC7yNUYi1bNU1bphbnyfVMASDbCQcymThlX33FZCekERSaGN322+vk5idZlNZoASI0fA= X-Received: by 2002:a05:6e02:8f2:: with SMTP id n18mr22654924ilt.256.1630456797337; Tue, 31 Aug 2021 17:39:57 -0700 (PDT) MIME-Version: 1.0 References: <202108301457.17UEvCRv008780@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Tue, 31 Aug 2021 20:39:41 -0400 Message-ID: Subject: Re: git: 4d0dc60f1401 - main - xinstall: fix invocation of llvm-strip To: Mitchell Horne Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GzlZX4HBHz3R7H X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.179 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-1.74 / 15.00]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEFALL_USER(0.00)[carpeddiem]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; ARC_NA(0.00)[]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.26)[0.259]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.179:from]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.179:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 00:40:06 -0000 On Mon, 30 Aug 2021 at 11:24, Ed Maste wrote: > > GNU strip also handles --, so ideally we'd have llvm-strip also accept > it. Given plans to switch to the LLVM version of various binutils > (D31060) we should aim for as complete command-line compatibility as > possible. I've added a note to this effect in D31060. It looks like llvm-strip (main) supports -- now: $ llvm-strip11 -o /dev/null -- /usr/bin/true llvm-strip: error: unknown argument '--' $ ~/src/llvm-project/build/bin/llvm-strip -o /dev/null -- /usr/bin/true $ echo $? 0 so I expect this will be supported by the time we're ready to switch to llvm-binutils From owner-dev-commits-src-all@freebsd.org Wed Sep 1 02:00:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 02:31:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B9C7767A747 for ; Wed, 1 Sep 2021 02:31: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 4Gzp354VFsz4lDB; Wed, 1 Sep 2021 02:31: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 798051D1B7; Wed, 1 Sep 2021 02:31: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 1812VTcY072219; Wed, 1 Sep 2021 02:31:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1812VTFt072218; Wed, 1 Sep 2021 02:31:29 GMT (envelope-from git) Date: Wed, 1 Sep 2021 02:31:29 GMT Message-Id: <202109010231.1812VTFt072218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Jung-uk Kim Subject: git: 94fa08a4bcdf..c1d1798abd60 - vendor/openssl - vendor branch updated 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/vendor/openssl X-Git-Reftype: branch X-Git-Commit: c1d1798abd60f12527b70443cb7d0b9cd78ef7b1 X-Git-Oldrev: 94fa08a4bcdfbb3434b025d67d014af3b18e5380 X-Git-Newrev: c1d1798abd60f12527b70443cb7d0b9cd78ef7b1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 02:31:29 -0000 The branch vendor/openssl has been updated by jkim: URL: https://cgit.FreeBSD.org/src/log/?id=94fa08a4bcdf..c1d1798abd60 c1d1798abd60 Import OpenSSL 1.1.1l From owner-dev-commits-src-all@freebsd.org Wed Sep 1 02:31:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BA29E67A60F for ; Wed, 1 Sep 2021 02:31: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 4Gzp354sgYz4lKC; Wed, 1 Sep 2021 02:31: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 8F4B81CDD8; Wed, 1 Sep 2021 02:31: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 1812VTE8072243; Wed, 1 Sep 2021 02:31:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1812VTda072242; Wed, 1 Sep 2021 02:31:29 GMT (envelope-from git) Date: Wed, 1 Sep 2021 02:31:29 GMT Message-Id: <202109010231.1812VTda072242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Jung-uk Kim Subject: git: 14d4ff40d0e0 - Create tag vendor/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/tags/vendor/openssl/1.1.1l X-Git-Reftype: annotated tag X-Git-Commit: 14d4ff40d0e0b452c372d7303b41e29a4b5c8d4e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 02:31:29 -0000 The annotated tag vendor/openssl/1.1.1l has been created by jkim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/openssl/1.1.1l tag vendor/openssl/1.1.1l Tagger: Jung-uk Kim TaggerDate: 2021-09-01 02:30:49 +0000 Tag OpenSSL 1.1.1l commit c1d1798abd60f12527b70443cb7d0b9cd78ef7b1 Author: Jung-uk Kim AuthorDate: 2021-09-01 02:23:22 +0000 Commit: Jung-uk Kim CommitDate: 2021-09-01 02:23:22 +0000 Import OpenSSL 1.1.1l From owner-dev-commits-src-all@freebsd.org Wed Sep 1 03:50:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3CCF267B517; Wed, 1 Sep 2021 03:50: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 4Gzqpj1J4Xz3Qlp; Wed, 1 Sep 2021 03:50: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 149451E22A; Wed, 1 Sep 2021 03:50: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 1813oqn9076244; Wed, 1 Sep 2021 03:50:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1813oqZv076243; Wed, 1 Sep 2021 03:50:52 GMT (envelope-from git) Date: Wed, 1 Sep 2021 03:50:52 GMT Message-Id: <202109010350.1813oqZv076243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 706b1a5724d6 - main - Align taskqueue_enqueue_timeout() to hardclock. 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/main X-Git-Reftype: branch X-Git-Commit: 706b1a5724d668a8752ac89cd67113e4c6917d54 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 03:50:53 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=706b1a5724d668a8752ac89cd67113e4c6917d54 commit 706b1a5724d668a8752ac89cd67113e4c6917d54 Author: Alexander Motin AuthorDate: 2021-09-01 03:47:51 +0000 Commit: Alexander Motin CommitDate: 2021-09-01 03:50:35 +0000 Align taskqueue_enqueue_timeout() to hardclock. It is done for all other KPIs using HZ, but was missed here. MFC after: 2 weeks --- sys/kern/subr_taskqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c index 0f1503c7f7c7..061361cc06d7 100644 --- a/sys/kern/subr_taskqueue.c +++ b/sys/kern/subr_taskqueue.c @@ -343,7 +343,7 @@ taskqueue_enqueue_timeout(struct taskqueue *queue, { return (taskqueue_enqueue_timeout_sbt(queue, ttask, ticks * tick_sbt, - 0, 0)); + 0, C_HARDCLOCK)); } static void From owner-dev-commits-src-all@freebsd.org Wed Sep 1 04:29:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4811967BDAF; Wed, 1 Sep 2021 04:29: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 4Gzrfl1DhYz3qDR; Wed, 1 Sep 2021 04:29: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 0DBCE1E556; Wed, 1 Sep 2021 04:29: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 1814T2J2021460; Wed, 1 Sep 2021 04:29:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1814T2xP021459; Wed, 1 Sep 2021 04:29:02 GMT (envelope-from git) Date: Wed, 1 Sep 2021 04:29:02 GMT Message-Id: <202109010429.1814T2xP021459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: 9a3ae0cdef9a - main - 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/main X-Git-Reftype: branch X-Git-Commit: 9a3ae0cdef9ac9a4b8c5cc66305d9a516ce8d4a0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 04:29:03 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=9a3ae0cdef9ac9a4b8c5cc66305d9a516ce8d4a0 commit 9a3ae0cdef9ac9a4b8c5cc66305d9a516ce8d4a0 Author: Jung-uk Kim AuthorDate: 2021-09-01 04:26:38 +0000 Commit: Jung-uk Kim CommitDate: 2021-09-01 04:26:38 +0000 Import OpenSSL 1.1.1l --- 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 { static int s390x_aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc); *** 1967 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Sep 1 04:29:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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 967C967BA9D; Wed, 1 Sep 2021 04:29: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 4Gzrfm31YVz3qPb; Wed, 1 Sep 2021 04:29: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 4E0731EA93; Wed, 1 Sep 2021 04:29: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 1814T42J021484; Wed, 1 Sep 2021 04:29:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1814T4JQ021483; Wed, 1 Sep 2021 04:29:04 GMT (envelope-from git) Date: Wed, 1 Sep 2021 04:29:04 GMT Message-Id: <202109010429.1814T4JQ021483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: d594d17b8569 - main - 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/main X-Git-Reftype: branch X-Git-Commit: d594d17b8569fb7bc22263e7da3fd626b99d9203 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 04:29:04 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=d594d17b8569fb7bc22263e7da3fd626b99d9203 commit d594d17b8569fb7bc22263e7da3fd626b99d9203 Author: Jung-uk Kim AuthorDate: 2021-09-01 04:09:34 +0000 Commit: Jung-uk Kim CommitDate: 2021-09-01 04:27:45 +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 | 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 --- a/secure/lib/libcrypto/man/man3/BIO_f_null.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_null.3 *** 9984 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Sep 1 04:29:05 2021 Return-Path: Delivered-To: dev-commits-src-all@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 949A567BDBA; Wed, 1 Sep 2021 04:29: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 4Gzrfn3dtXz3qHW; Wed, 1 Sep 2021 04:29: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 61E081EA94; Wed, 1 Sep 2021 04:29: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 1814T5qh021514; Wed, 1 Sep 2021 04:29:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1814T5cN021513; Wed, 1 Sep 2021 04:29:05 GMT (envelope-from git) Date: Wed, 1 Sep 2021 04:29:05 GMT Message-Id: <202109010429.1814T5cN021513@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: 649ccdd75379 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 649ccdd753790069623e192185d133fd26a03bf9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 04:29:05 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=649ccdd753790069623e192185d133fd26a03bf9 commit 649ccdd753790069623e192185d133fd26a03bf9 Author: Jung-uk Kim AuthorDate: 2021-09-01 04:10:59 +0000 Commit: Jung-uk Kim CommitDate: 2021-09-01 04:27:45 +0000 OpenSSL: Reduce diff with the upstream No functional change expected. --- 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-all@freebsd.org Wed Sep 1 04:34:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 04:34:37 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 04:34:39 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 04:35:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 04:36:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 07:19:34 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9B452664280; Wed, 1 Sep 2021 07:19: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 4GzwRV3nxdz3vkx; Wed, 1 Sep 2021 07:19: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 6620E20DAB; Wed, 1 Sep 2021 07:19: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 1817JYbO049660; Wed, 1 Sep 2021 07:19:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1817JYpA049659; Wed, 1 Sep 2021 07:19:34 GMT (envelope-from git) Date: Wed, 1 Sep 2021 07:19:34 GMT Message-Id: <202109010719.1817JYpA049659@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 0a3a377aee9b - main - routing: Disallow zero nexthop weights in nexthop groups. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a3a377aee9bb28546fd2d1e45baa3fcad02439b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 07:19:34 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=0a3a377aee9bb28546fd2d1e45baa3fcad02439b commit 0a3a377aee9bb28546fd2d1e45baa3fcad02439b Author: Alexander V. Chernikov AuthorDate: 2021-08-30 21:49:00 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-09-01 07:16:24 +0000 routing: Disallow zero nexthop weights in nexthop groups. Adding such nexthops breaks calc_min_mpath_slots() assumptions, thus resulting in the incorrect nexthop group creation and eventually leading to panic. Reported by: avg MFC after: 1 week --- sys/net/route/route_ctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index 6db088102cd3..dc40b6b8de71 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -266,6 +266,8 @@ get_info_weight(const struct rt_addrinfo *info, uint32_t default_weight) /* Keep upper 1 byte for adm distance purposes */ if (weight > RT_MAX_WEIGHT) weight = RT_MAX_WEIGHT; + else if (weight == 0) + weight = default_weight; return (weight); } From owner-dev-commits-src-all@freebsd.org Wed Sep 1 09:41:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0C5C56661FF; Wed, 1 Sep 2021 09:41: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 4Gzzbh6Fk1z3LsV; Wed, 1 Sep 2021 09:41: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 BBF8823104; Wed, 1 Sep 2021 09:41: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 1819fqME048785; Wed, 1 Sep 2021 09:41:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1819fqRU048784; Wed, 1 Sep 2021 09:41:52 GMT (envelope-from git) Date: Wed, 1 Sep 2021 09:41:52 GMT Message-Id: <202109010941.1819fqRU048784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 0f49ecffb744 - main - cam: revert second half of 75b5caa08ef MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f49ecffb744762309b7dd7cf3b8f867d4fdc89d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 09:41:53 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=0f49ecffb744762309b7dd7cf3b8f867d4fdc89d commit 0f49ecffb744762309b7dd7cf3b8f867d4fdc89d Author: Edward Tomasz Napierala AuthorDate: 2021-09-01 09:34:27 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-09-01 09:35:27 +0000 cam: revert second half of 75b5caa08ef This turns debugging printf() into a KASSERT(). Reviewed By: imp Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D31523 --- sys/cam/scsi/scsi_xpt.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index c4c43ee87101..6bcf95506963 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -2620,18 +2620,10 @@ scsi_action(union ccb *start_ccb) { if (start_ccb->ccb_h.func_code != XPT_SCSI_IO) { -#ifdef notyet KASSERT((start_ccb->ccb_h.alloc_flags & CAM_CCB_FROM_UMA) == 0, ("%s: ccb %p, func_code %#x should not be allocated " "from UMA zone\n", __func__, start_ccb, start_ccb->ccb_h.func_code)); -#else - if ((start_ccb->ccb_h.alloc_flags & CAM_CCB_FROM_UMA) != 0) { - printf("%s: ccb %p, func_code %#x should not be allocated " - "from UMA zone\n", - __func__, start_ccb, start_ccb->ccb_h.func_code); - } -#endif } switch (start_ccb->ccb_h.func_code) { From owner-dev-commits-src-all@freebsd.org Wed Sep 1 10:10:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1670D66714A; Wed, 1 Sep 2021 10:10: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 4H00F174L7z3lxH; Wed, 1 Sep 2021 10:10: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 DA18E230D5; Wed, 1 Sep 2021 10:10: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 181AAjTm086402; Wed, 1 Sep 2021 10:10:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181AAjOl086401; Wed, 1 Sep 2021 10:10:45 GMT (envelope-from git) Date: Wed, 1 Sep 2021 10:10:45 GMT Message-Id: <202109011010.181AAjOl086401@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 4cab80a8dfec - main - pf: Add counters for syncookies 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/main X-Git-Reftype: branch X-Git-Commit: 4cab80a8dfecdf16333a1113513e046b9f4dd7f6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 10:10:46 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4cab80a8dfecdf16333a1113513e046b9f4dd7f6 commit 4cab80a8dfecdf16333a1113513e046b9f4dd7f6 Author: Kristof Provost AuthorDate: 2021-08-29 13:54:50 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 10:02:19 +0000 pf: Add counters for syncookies Count when we send a syncookie, receive a valid syncookie or detect a synflood. Reviewed by: kbowling MFC after: 1 week Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D31713 --- sys/net/pfvar.h | 2 +- sys/netpfil/pf/pf.h | 18 ++++++++++++++++++ sys/netpfil/pf/pf_ioctl.c | 10 +++++----- sys/netpfil/pf/pf_syncookies.c | 3 +++ 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 47f7c1efbffd..90d2a8c6a6b0 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1378,7 +1378,7 @@ enum pf_syncookies_mode { #ifdef _KERNEL struct pf_kstatus { counter_u64_t counters[PFRES_MAX]; /* reason for passing/dropping */ - counter_u64_t lcounters[LCNT_MAX]; /* limit counters */ + counter_u64_t lcounters[KLCNT_MAX]; /* limit counters */ struct pf_counter_u64 fcounters[FCNT_MAX]; /* state operation counters */ counter_u64_t scounters[SCNT_MAX]; /* src_node operation counters */ uint32_t states; diff --git a/sys/netpfil/pf/pf.h b/sys/netpfil/pf/pf.h index 2fa76def4385..91469dbc779f 100644 --- a/sys/netpfil/pf/pf.h +++ b/sys/netpfil/pf/pf.h @@ -161,6 +161,11 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE, PF_ADDR_DYNIFTL, #define LCNT_OVERLOAD_TABLE 5 /* entry added to overload table */ #define LCNT_OVERLOAD_FLUSH 6 /* state entries flushed */ #define LCNT_MAX 7 /* total+1 */ +/* Only available via the nvlist-based API */ +#define KLCNT_SYNFLOODS 7 /* synfloods detected */ +#define KLCNT_SYNCOOKIES_SENT 8 /* syncookies sent */ +#define KLCNT_SYNCOOKIES_VALID 9 /* syncookies validated */ +#define KLCNT_MAX 10 /* total+1 */ #define LCNT_NAMES { \ "max states per rule", \ @@ -172,6 +177,19 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE, PF_ADDR_DYNIFTL, "overload flush states", \ NULL \ } +#define KLCNT_NAMES { \ + "max states per rule", \ + "max-src-states", \ + "max-src-nodes", \ + "max-src-conn", \ + "max-src-conn-rate", \ + "overload table insertion", \ + "overload flush states", \ + "synfloods detected", \ + "syncookies sent", \ + "syncookies validated", \ + NULL \ +} /* state operation counters */ #define FCNT_STATE_SEARCH 0 diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index ec2c7108c1d2..08a2946ae484 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -368,7 +368,7 @@ pfattach_vnet(void) for (int i = 0; i < PFRES_MAX; i++) V_pf_status.counters[i] = counter_u64_alloc(M_WAITOK); - for (int i = 0; i < LCNT_MAX; i++) + for (int i = 0; i < KLCNT_MAX; i++) V_pf_status.lcounters[i] = counter_u64_alloc(M_WAITOK); for (int i = 0; i < FCNT_MAX; i++) pf_counter_u64_init(&V_pf_status.fcounters[i], M_WAITOK); @@ -3125,7 +3125,7 @@ DIOCGETSTATESV2_full: pf_counter_u64_zero(&V_pf_status.fcounters[i]); for (int i = 0; i < SCNT_MAX; i++) counter_u64_zero(V_pf_status.scounters[i]); - for (int i = 0; i < LCNT_MAX; i++) + for (int i = 0; i < KLCNT_MAX; i++) counter_u64_zero(V_pf_status.lcounters[i]); V_pf_status.since = time_second; if (*V_pf_status.ifname) @@ -4927,7 +4927,7 @@ pf_getstatus(struct pfioc_nv *nv) int error; struct pf_status s; char *pf_reasons[PFRES_MAX+1] = PFRES_NAMES; - char *pf_lcounter[LCNT_MAX+1] = LCNT_NAMES; + char *pf_lcounter[KLCNT_MAX+1] = KLCNT_NAMES; char *pf_fcounter[FCNT_MAX+1] = FCNT_NAMES; PF_RULES_RLOCK_TRACKER; @@ -4954,7 +4954,7 @@ pf_getstatus(struct pfioc_nv *nv) /* lcounters */ error = pf_add_status_counters(nvl, "lcounters", V_pf_status.lcounters, - LCNT_MAX, pf_lcounter); + KLCNT_MAX, pf_lcounter); if (error != 0) ERROUT(error); @@ -5805,7 +5805,7 @@ pf_unload_vnet(void) for (int i = 0; i < PFRES_MAX; i++) counter_u64_free(V_pf_status.counters[i]); - for (int i = 0; i < LCNT_MAX; i++) + for (int i = 0; i < KLCNT_MAX; i++) counter_u64_free(V_pf_status.lcounters[i]); for (int i = 0; i < FCNT_MAX; i++) pf_counter_u64_deinit(&V_pf_status.fcounters[i]); diff --git a/sys/netpfil/pf/pf_syncookies.c b/sys/netpfil/pf/pf_syncookies.c index 744a12e4e21d..4eabbb5e2744 100644 --- a/sys/netpfil/pf/pf_syncookies.c +++ b/sys/netpfil/pf/pf_syncookies.c @@ -256,6 +256,7 @@ pf_syncookie_send(struct mbuf *m, int off, struct pf_pdesc *pd) pf_send_tcp(NULL, pd->af, pd->dst, pd->src, *pd->dport, *pd->sport, iss, ntohl(pd->hdr.tcp.th_seq) + 1, TH_SYN|TH_ACK, 0, mss, 0, 1, 0); + counter_u64_add(V_pf_status.lcounters[KLCNT_SYNCOOKIES_SENT], 1); } uint8_t @@ -275,6 +276,8 @@ pf_syncookie_validate(struct pf_pdesc *pd) if ((ack & ~0xff) != (hash & ~0xff)) return (0); + counter_u64_add(V_pf_status.lcounters[KLCNT_SYNCOOKIES_VALID], 1); + return (1); } From owner-dev-commits-src-all@freebsd.org Wed Sep 1 10:10:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4CA006673A9; Wed, 1 Sep 2021 10:10: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 4H00F31Kwgz3llx; Wed, 1 Sep 2021 10:10: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 0341D2360F; Wed, 1 Sep 2021 10:10: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 181AAkjm086426; Wed, 1 Sep 2021 10:10:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181AAkT4086425; Wed, 1 Sep 2021 10:10:46 GMT (envelope-from git) Date: Wed, 1 Sep 2021 10:10:46 GMT Message-Id: <202109011010.181AAkT4086425@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: ce3ea45047c7 - main - pf: import pf_set_protostate() from OpenBSD 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/main X-Git-Reftype: branch X-Git-Commit: ce3ea45047c7321bcfcf0cd31272f0e4359640f2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 10:10:47 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ce3ea45047c7321bcfcf0cd31272f0e4359640f2 commit ce3ea45047c7321bcfcf0cd31272f0e4359640f2 Author: Kristof Provost AuthorDate: 2021-07-20 16:38:16 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 10:02:19 +0000 pf: import pf_set_protostate() from OpenBSD to change a state's state (that term is overloaded in pf, protocol state like ESTABLISHED for tcp here), don't do it directly, but go through a newly introduced pf_set_protostate() Reviewed by: kbowling Obtainted from: OpenBSD MFC after: 1 week Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D31729 --- sys/netpfil/pf/pf.c | 144 +++++++++++++++++++++++++++++++++++----------------- sys/netpfil/pf/pf.h | 1 + 2 files changed, 99 insertions(+), 46 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 66c11a450030..c4b29249ca6a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -277,12 +277,10 @@ static int pf_test_fragment(struct pf_krule **, int, struct pfi_kkif *, struct mbuf *, void *, struct pf_pdesc *, struct pf_krule **, struct pf_kruleset **); -static int pf_tcp_track_full(struct pf_state_peer *, - struct pf_state_peer *, struct pf_kstate **, +static int pf_tcp_track_full(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, struct pf_pdesc *, u_short *, int *); -static int pf_tcp_track_sloppy(struct pf_state_peer *, - struct pf_state_peer *, struct pf_kstate **, +static int pf_tcp_track_sloppy(struct pf_kstate **, struct pf_pdesc *, u_short *); static int pf_test_state_tcp(struct pf_kstate **, int, struct pfi_kkif *, struct mbuf *, int, @@ -327,6 +325,7 @@ static void pf_route6(struct mbuf **, struct pf_krule *, int, struct ifnet *, struct pf_kstate *, struct pf_pdesc *, struct inpcb *); #endif /* INET6 */ +static __inline void pf_set_protostate(struct pf_kstate *, int, u_int8_t); int in4_cksum(struct mbuf *m, u_int8_t nxt, int off, int len); @@ -487,6 +486,17 @@ pf_state_hash(struct pf_kstate *s) } #endif +static __inline void +pf_set_protostate(struct pf_kstate *s, int which, u_int8_t newstate) +{ + if (which == PF_PEER_DST || which == PF_PEER_BOTH) + s->dst.state = newstate; + if (which == PF_PEER_DST) + return; + + s->src.state = newstate; +} + #ifdef INET6 void pf_addrcpy(struct pf_addr *dst, struct pf_addr *src, sa_family_t af) @@ -567,7 +577,7 @@ pf_src_connlimit(struct pf_kstate **state) /* Kill this state. */ (*state)->timeout = PFTM_PURGE; - (*state)->src.state = (*state)->dst.state = TCPS_CLOSED; + pf_set_protostate(*state, PF_PEER_BOTH, TCPS_CLOSED); if ((*state)->rule.ptr->overload_tbl == NULL) return (1); @@ -668,7 +678,7 @@ pf_overload_task(void *v, int pending) (pfoe->dir == PF_IN && PF_AEQ(&pfoe->addr, &sk->addr[0], sk->af)))) { s->timeout = PFTM_PURGE; - s->src.state = s->dst.state = TCPS_CLOSED; + pf_set_protostate(s, PF_PEER_BOTH, TCPS_CLOSED); killed++; } } @@ -1084,8 +1094,8 @@ keyattach: * of the slot TAILQ, so that it won't * conflict with our new state. */ - si->src.state = si->dst.state = - TCPS_CLOSED; + pf_set_protostate(si, PF_PEER_BOTH, + TCPS_CLOSED); si->timeout = PFTM_PURGE; olds = si; } else { @@ -3945,13 +3955,13 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, s->src.seqhi++; s->dst.seqhi = 1; s->dst.max_win = 1; - s->src.state = TCPS_SYN_SENT; - s->dst.state = TCPS_CLOSED; + pf_set_protostate(s, PF_PEER_SRC, TCPS_SYN_SENT); + pf_set_protostate(s, PF_PEER_DST, TCPS_CLOSED); s->timeout = PFTM_TCP_FIRST_PACKET; break; case IPPROTO_UDP: - s->src.state = PFUDPS_SINGLE; - s->dst.state = PFUDPS_NO_TRAFFIC; + pf_set_protostate(s, PF_PEER_SRC, PFUDPS_SINGLE); + pf_set_protostate(s, PF_PEER_DST, PFUDPS_NO_TRAFFIC); s->timeout = PFTM_UDP_FIRST_PACKET; break; case IPPROTO_ICMP: @@ -3961,8 +3971,8 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, s->timeout = PFTM_ICMP_FIRST_PACKET; break; default: - s->src.state = PFOTHERS_SINGLE; - s->dst.state = PFOTHERS_NO_TRAFFIC; + pf_set_protostate(s, PF_PEER_SRC, PFOTHERS_SINGLE); + pf_set_protostate(s, PF_PEER_DST, PFOTHERS_NO_TRAFFIC); s->timeout = PFTM_OTHER_FIRST_PACKET; } @@ -4041,7 +4051,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, s->tag = tag; if (pd->proto == IPPROTO_TCP && (th->th_flags & (TH_SYN|TH_ACK)) == TH_SYN && r->keep_state == PF_STATE_SYNPROXY) { - s->src.state = PF_TCPS_PROXY_SRC; + pf_set_protostate(s, PF_PEER_SRC, PF_TCPS_PROXY_SRC); /* undo NAT changes, if they have taken place */ if (nr != NULL) { struct pf_state_key *skt = s->key[PF_SK_WIRE]; @@ -4223,16 +4233,29 @@ pf_test_fragment(struct pf_krule **rm, int direction, struct pfi_kkif *kif, } static int -pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst, - struct pf_kstate **state, struct pfi_kkif *kif, struct mbuf *m, int off, - struct pf_pdesc *pd, u_short *reason, int *copyback) +pf_tcp_track_full(struct pf_kstate **state, struct pfi_kkif *kif, + struct mbuf *m, int off, struct pf_pdesc *pd, u_short *reason, + int *copyback) { struct tcphdr *th = &pd->hdr.tcp; + struct pf_state_peer *src, *dst; u_int16_t win = ntohs(th->th_win); u_int32_t ack, end, seq, orig_seq; - u_int8_t sws, dws; + u_int8_t sws, dws, psrc, pdst; int ackskew; + if (pd->dir == (*state)->direction) { + src = &(*state)->src; + dst = &(*state)->dst; + psrc = PF_PEER_SRC; + pdst = PF_PEER_DST; + } else { + src = &(*state)->dst; + dst = &(*state)->src; + psrc = PF_PEER_DST; + pdst = PF_PEER_SRC; + } + if (src->wscale && dst->wscale && !(th->th_flags & TH_SYN)) { sws = src->wscale & PF_WSCALE_MASK; dws = dst->wscale & PF_WSCALE_MASK; @@ -4298,7 +4321,7 @@ pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst, src->seqlo = seq; if (src->state < TCPS_SYN_SENT) - src->state = TCPS_SYN_SENT; + pf_set_protostate(*state, psrc, TCPS_SYN_SENT); /* * May need to slide the window (seqhi may have been set by @@ -4399,13 +4422,14 @@ pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst, /* update states */ if (th->th_flags & TH_SYN) if (src->state < TCPS_SYN_SENT) - src->state = TCPS_SYN_SENT; + pf_set_protostate(*state, psrc, TCPS_SYN_SENT); if (th->th_flags & TH_FIN) if (src->state < TCPS_CLOSING) - src->state = TCPS_CLOSING; + pf_set_protostate(*state, psrc, TCPS_CLOSING); if (th->th_flags & TH_ACK) { if (dst->state == TCPS_SYN_SENT) { - dst->state = TCPS_ESTABLISHED; + pf_set_protostate(*state, pdst, + TCPS_ESTABLISHED); if (src->state == TCPS_ESTABLISHED && (*state)->src_node != NULL && pf_src_connlimit(state)) { @@ -4413,10 +4437,11 @@ pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst, return (PF_DROP); } } else if (dst->state == TCPS_CLOSING) - dst->state = TCPS_FIN_WAIT_2; + pf_set_protostate(*state, pdst, + TCPS_FIN_WAIT_2); } if (th->th_flags & TH_RST) - src->state = dst->state = TCPS_TIME_WAIT; + pf_set_protostate(*state, PF_PEER_BOTH, TCPS_TIME_WAIT); /* update expire time */ (*state)->expire = time_uptime; @@ -4501,9 +4526,9 @@ pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst, if (th->th_flags & TH_FIN) if (src->state < TCPS_CLOSING) - src->state = TCPS_CLOSING; + pf_set_protostate(*state, psrc, TCPS_CLOSING); if (th->th_flags & TH_RST) - src->state = dst->state = TCPS_TIME_WAIT; + pf_set_protostate(*state, PF_PEER_BOTH, TCPS_TIME_WAIT); /* Fall through to PASS packet */ @@ -4548,20 +4573,33 @@ pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst, } static int -pf_tcp_track_sloppy(struct pf_state_peer *src, struct pf_state_peer *dst, - struct pf_kstate **state, struct pf_pdesc *pd, u_short *reason) +pf_tcp_track_sloppy(struct pf_kstate **state, struct pf_pdesc *pd, u_short *reason) { struct tcphdr *th = &pd->hdr.tcp; + struct pf_state_peer *src, *dst; + u_int8_t psrc, pdst; + + if (pd->dir == (*state)->direction) { + src = &(*state)->src; + dst = &(*state)->dst; + psrc = PF_PEER_SRC; + pdst = PF_PEER_DST; + } else { + src = &(*state)->dst; + dst = &(*state)->src; + psrc = PF_PEER_DST; + pdst = PF_PEER_SRC; + } if (th->th_flags & TH_SYN) if (src->state < TCPS_SYN_SENT) - src->state = TCPS_SYN_SENT; + pf_set_protostate(*state, psrc, TCPS_SYN_SENT); if (th->th_flags & TH_FIN) if (src->state < TCPS_CLOSING) - src->state = TCPS_CLOSING; + pf_set_protostate(*state, psrc, TCPS_CLOSING); if (th->th_flags & TH_ACK) { if (dst->state == TCPS_SYN_SENT) { - dst->state = TCPS_ESTABLISHED; + pf_set_protostate(*state, pdst, TCPS_ESTABLISHED); if (src->state == TCPS_ESTABLISHED && (*state)->src_node != NULL && pf_src_connlimit(state)) { @@ -4569,7 +4607,7 @@ pf_tcp_track_sloppy(struct pf_state_peer *src, struct pf_state_peer *dst, return (PF_DROP); } } else if (dst->state == TCPS_CLOSING) { - dst->state = TCPS_FIN_WAIT_2; + pf_set_protostate(*state, pdst, TCPS_FIN_WAIT_2); } else if (src->state == TCPS_SYN_SENT && dst->state < TCPS_SYN_SENT) { /* @@ -4578,6 +4616,8 @@ pf_tcp_track_sloppy(struct pf_state_peer *src, struct pf_state_peer *dst, * the initial SYN without ever seeing a packet from * the destination, set the connection to established. */ + pf_set_protostate(*state, PF_PEER_BOTH, + TCPS_ESTABLISHED); dst->state = src->state = TCPS_ESTABLISHED; if ((*state)->src_node != NULL && pf_src_connlimit(state)) { @@ -4592,11 +4632,11 @@ pf_tcp_track_sloppy(struct pf_state_peer *src, struct pf_state_peer *dst, * don't see the full bidirectional FIN/ACK+ACK * handshake. */ - dst->state = TCPS_CLOSING; + pf_set_protostate(*state, pdst, TCPS_CLOSING); } } if (th->th_flags & TH_RST) - src->state = dst->state = TCPS_TIME_WAIT; + pf_set_protostate(*state, PF_PEER_BOTH, TCPS_TIME_WAIT); /* update expire time */ (*state)->expire = time_uptime; @@ -4650,7 +4690,8 @@ pf_synproxy(struct pf_pdesc *pd, struct pf_kstate **state, u_short *reason) REASON_SET(reason, PFRES_SRCLIMIT); return (PF_DROP); } else - (*state)->src.state = PF_TCPS_PROXY_DST; + pf_set_protostate(*state, PF_PEER_SRC, + PF_TCPS_PROXY_DST); } if ((*state)->src.state == PF_TCPS_PROXY_DST) { if (pd->dir == (*state)->direction) { @@ -4697,8 +4738,8 @@ pf_synproxy(struct pf_pdesc *pd, struct pf_kstate **state, u_short *reason) (*state)->dst.seqhi = (*state)->dst.seqlo + (*state)->src.max_win; (*state)->src.wscale = (*state)->dst.wscale = 0; - (*state)->src.state = (*state)->dst.state = - TCPS_ESTABLISHED; + pf_set_protostate(*state, PF_PEER_BOTH, + TCPS_ESTABLISHED); REASON_SET(reason, PFRES_SYNPROXY); return (PF_SYNPROXY_DROP); } @@ -4759,17 +4800,17 @@ pf_test_state_tcp(struct pf_kstate **state, int direction, struct pfi_kkif *kif, printf("\n"); } /* XXX make sure it's the same direction ?? */ - (*state)->src.state = (*state)->dst.state = TCPS_CLOSED; + pf_set_protostate(*state, PF_PEER_BOTH, TCPS_CLOSED); pf_unlink_state(*state, PF_ENTER_LOCKED); *state = NULL; return (PF_DROP); } if ((*state)->state_flags & PFSTATE_SLOPPY) { - if (pf_tcp_track_sloppy(src, dst, state, pd, reason) == PF_DROP) + if (pf_tcp_track_sloppy(state, pd, reason) == PF_DROP) return (PF_DROP); } else { - if (pf_tcp_track_full(src, dst, state, kif, m, off, pd, reason, + if (pf_tcp_track_full(state, kif, m, off, pd, reason, ©back) == PF_DROP) return (PF_DROP); } @@ -4806,6 +4847,7 @@ pf_test_state_udp(struct pf_kstate **state, int direction, struct pfi_kkif *kif, struct pf_state_peer *src, *dst; struct pf_state_key_cmp key; struct udphdr *uh = &pd->hdr.udp; + uint8_t psrc, pdst; bzero(&key, sizeof(key)); key.af = pd->af; @@ -4827,16 +4869,20 @@ pf_test_state_udp(struct pf_kstate **state, int direction, struct pfi_kkif *kif, if (direction == (*state)->direction) { src = &(*state)->src; dst = &(*state)->dst; + psrc = PF_PEER_SRC; + pdst = PF_PEER_DST; } else { src = &(*state)->dst; dst = &(*state)->src; + psrc = PF_PEER_DST; + pdst = PF_PEER_SRC; } /* update states */ if (src->state < PFUDPS_SINGLE) - src->state = PFUDPS_SINGLE; + pf_set_protostate(*state, psrc, PFUDPS_SINGLE); if (dst->state == PFUDPS_SINGLE) - dst->state = PFUDPS_MULTIPLE; + pf_set_protostate(*state, pdst, PFUDPS_MULTIPLE); /* update expire time */ (*state)->expire = time_uptime; @@ -5476,6 +5522,7 @@ pf_test_state_other(struct pf_kstate **state, int direction, struct pfi_kkif *ki { struct pf_state_peer *src, *dst; struct pf_state_key_cmp key; + uint8_t psrc, pdst; bzero(&key, sizeof(key)); key.af = pd->af; @@ -5495,16 +5542,20 @@ pf_test_state_other(struct pf_kstate **state, int direction, struct pfi_kkif *ki if (direction == (*state)->direction) { src = &(*state)->src; dst = &(*state)->dst; + psrc = PF_PEER_SRC; + pdst = PF_PEER_DST; } else { src = &(*state)->dst; dst = &(*state)->src; + psrc = PF_PEER_DST; + pdst = PF_PEER_SRC; } /* update states */ if (src->state < PFOTHERS_SINGLE) - src->state = PFOTHERS_SINGLE; + pf_set_protostate(*state, psrc, PFOTHERS_SINGLE); if (dst->state == PFOTHERS_SINGLE) - dst->state = PFOTHERS_MULTIPLE; + pf_set_protostate(*state, pdst, PFOTHERS_MULTIPLE); /* update expire time */ (*state)->expire = time_uptime; @@ -6266,7 +6317,8 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * - 1; s->src.seqlo = ntohl(pd.hdr.tcp.th_seq) - 1; - s->src.state = PF_TCPS_PROXY_DST; + pf_set_protostate(s, PF_PEER_SRC, + PF_TCPS_PROXY_DST); action = pf_synproxy(&pd, &s, &reason); if (action != PF_PASS) diff --git a/sys/netpfil/pf/pf.h b/sys/netpfil/pf/pf.h index 91469dbc779f..cc3063b887c9 100644 --- a/sys/netpfil/pf/pf.h +++ b/sys/netpfil/pf/pf.h @@ -61,6 +61,7 @@ enum { PF_CHANGE_NONE, PF_CHANGE_ADD_HEAD, PF_CHANGE_ADD_TAIL, PF_CHANGE_REMOVE, PF_CHANGE_GET_TICKET }; enum { PF_GET_NONE, PF_GET_CLR_CNTR }; enum { PF_SK_WIRE, PF_SK_STACK, PF_SK_BOTH }; +enum { PF_PEER_SRC, PF_PEER_DST, PF_PEER_BOTH }; /* * Note about PFTM_*: real indices into pf_rule.timeout[] come before From owner-dev-commits-src-all@freebsd.org Wed Sep 1 10:27:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0824A667846; Wed, 1 Sep 2021 10:27: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 4H00cd6Vmbz3qSY; Wed, 1 Sep 2021 10:27: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 C2CF823A0B; Wed, 1 Sep 2021 10:27: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 181ARjeF004914; Wed, 1 Sep 2021 10:27:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181ARjGE004913; Wed, 1 Sep 2021 10:27:45 GMT (envelope-from git) Date: Wed, 1 Sep 2021 10:27:45 GMT Message-Id: <202109011027.181ARjGE004913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: f0c393f781f0 - main - if_cdce: Add support for setting RX filtering MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0c393f781f01ffa727f90a8593e26a20869438b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 10:27:46 -0000 The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=f0c393f781f01ffa727f90a8593e26a20869438b commit f0c393f781f01ffa727f90a8593e26a20869438b Author: Kornel Duleba AuthorDate: 2021-08-31 12:22:30 +0000 Commit: Wojciech Macek CommitDate: 2021-09-01 10:27:14 +0000 if_cdce: Add support for setting RX filtering We can now set promisc and allmulti modes. Filtering of given multicast addresses is not supported. Changing the mode is done by sending a command described in: "USB CDC Subclass Specification for Ethernet Devices v1.2, section 6.2.4". This means that at least in theory this feature should work with all modems that are using this driver. This fixes Huawei E3372h-320 running new firmware in "HiLink" mode. Previously it would reset a few seconds after its mode was changed with "usb_modeswitch". Setting RX filter to default value at the end of attach function fixed that. Sponsored by: Stormshield Obtained from: Semihalf Differential revision: https://reviews.freebsd.org/D31766 MFC after: 2 weeks Reviewed by: hps --- sys/dev/usb/net/if_cdce.c | 41 +++++++++++++++++++++++++++++++++++++---- sys/dev/usb/net/if_cdcereg.h | 15 +++++++++++++++ 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/net/if_cdce.c b/sys/dev/usb/net/if_cdce.c index 24813ea305e4..ebc68e1f71cc 100644 --- a/sys/dev/usb/net/if_cdce.c +++ b/sys/dev/usb/net/if_cdce.c @@ -117,6 +117,7 @@ static int cdce_media_change_cb(struct ifnet *); static void cdce_media_status_cb(struct ifnet *, struct ifmediareq *); static uint32_t cdce_m_crc32(struct mbuf *, uint32_t, uint32_t); +static void cdce_set_filter(struct usb_ether *); #ifdef USB_DEBUG static int cdce_debug = 0; @@ -593,6 +594,9 @@ cdce_attach_post_sub(struct usb_ether *ue) ifmedia_add(&sc->sc_media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_set(&sc->sc_media, IFM_ETHER | IFM_AUTO); sc->sc_media.ifm_media = sc->sc_media.ifm_cur->ifm_media; + CDCE_LOCK(sc); + cdce_set_filter(ue); + CDCE_UNLOCK(sc); return 0; } @@ -1025,15 +1029,44 @@ cdce_stop(struct usb_ether *ue) static void cdce_setmulti(struct usb_ether *ue) { - /* no-op */ - return; + + cdce_set_filter(ue); } static void cdce_setpromisc(struct usb_ether *ue) { - /* no-op */ - return; + + cdce_set_filter(ue); +} + +static void +cdce_set_filter(struct usb_ether *ue) +{ + struct cdce_softc *sc = uether_getsc(ue); + struct ifnet *ifp = uether_getifp(ue); + struct usb_device_request req; + uint16_t value; + + value = CDC_PACKET_TYPE_DIRECTED | CDC_PACKET_TYPE_BROADCAST; + if (if_getflags(ifp) & IFF_PROMISC) + value |= CDC_PACKET_TYPE_PROMISC; + if (if_getflags(ifp) & IFF_ALLMULTI) + value |= CDC_PACKET_TYPE_ALL_MULTICAST; + + req.bmRequestType = UT_CLASS | UT_INTERFACE; + req.bRequest = CDC_SET_ETHERNET_PACKET_FILTER; + USETW(req.wValue, value); + req.wIndex[0] = sc->sc_ifaces_index[1]; + req.wIndex[1] = 0; + USETW(req.wLength, 0); + + /* + * Function below will drop the sc mutex. + * We can do that since we're called from a separate task, + * that simply wraps the setpromisc/setmulti methods. + */ + usbd_do_request(sc->sc_ue.ue_udev, &sc->sc_mtx, &req, NULL); } static int diff --git a/sys/dev/usb/net/if_cdcereg.h b/sys/dev/usb/net/if_cdcereg.h index 724aa0b9b017..19a7ac354341 100644 --- a/sys/dev/usb/net/if_cdcereg.h +++ b/sys/dev/usb/net/if_cdcereg.h @@ -37,6 +37,8 @@ #ifndef _USB_IF_CDCEREG_H_ #define _USB_IF_CDCEREG_H_ +#define CDCE_BIT(x) (1 << (x)) + #define CDCE_FRAMES_MAX 8 /* units */ #define CDCE_IND_SIZE_MAX 32 /* bytes */ @@ -104,6 +106,19 @@ struct cdce_softc { #define CDCE_NOTIFY_DONE 2 }; +/* + * Taken from USB CDC Subclass Specification for Ethernet Devices v1.2, + * section 6.2.4. + */ + +#define CDC_SET_ETHERNET_PACKET_FILTER 0x43 /* Command code. */ + +#define CDC_PACKET_TYPE_PROMISC CDCE_BIT(0) +#define CDC_PACKET_TYPE_ALL_MULTICAST CDCE_BIT(1) /* Allmulti. */ +#define CDC_PACKET_TYPE_DIRECTED CDCE_BIT(2) /* Filter unicast by mac. */ +#define CDC_PACKET_TYPE_BROADCAST CDCE_BIT(3) +#define CDC_PACKET_TYPE_MULTICAST CDCE_BIT(4) /* Multicast filtering, not supported. */ + #define CDCE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define CDCE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) #define CDCE_LOCK_ASSERT(_sc, t) mtx_assert(&(_sc)->sc_mtx, t) From owner-dev-commits-src-all@freebsd.org Wed Sep 1 10:34:19 2021 Return-Path: Delivered-To: dev-commits-src-all@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 18DC8667D84; Wed, 1 Sep 2021 10:34:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.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 mx1.freebsd.org (Postfix) with ESMTPS id 4H00mB0wzsz3sg0; Wed, 1 Sep 2021 10:34:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 181AY9CD090942 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 1 Sep 2021 13:34:12 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 181AY9CD090942 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 181AY9Ex090941; Wed, 1 Sep 2021 13:34:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 1 Sep 2021 13:34:09 +0300 From: Konstantin Belousov To: Kristof Provost , Dimitry Andric Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5b8f07b12f84 - main - Fix -Wformat errors in pfctl on 32-bit architectures Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4H00mB0wzsz3sg0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-2.99 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_SHORT(-0.99)[-0.993]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 10:34:19 -0000 On Tue, Aug 31, 2021 at 09:54:32AM +0200, Kristof Provost wrote: > On 31 Aug 2021, at 1:33, Konstantin Belousov wrote: > > On Sun, Aug 29, 2021 at 07:40:09PM +0200, Dimitry Andric wrote: > >> On 29 Aug 2021, at 18:00, Kristof Provost wrote: > >>> > >>> On 29 Aug 2021, at 17:31, Dimitry Andric wrote: > >>>> The branch main has been updated by dim: > >>>> > >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=5b8f07b12f8477f1679013d6b3abdab8d33c7243 > >>>> > >>>> commit 5b8f07b12f8477f1679013d6b3abdab8d33c7243 > >>>> Author: Dimitry Andric > >>>> AuthorDate: 2021-08-29 15:31:28 +0000 > >>>> Commit: Dimitry Andric > >>>> CommitDate: 2021-08-29 15:31:28 +0000 > >>>> > >>>> Fix -Wformat errors in pfctl on 32-bit architectures > >>>> > >>>> Use PRIu64 to printf(3) uint64_t quantities, otherwise this will result > >>>> in "error: format specifies type 'unsigned long' but the argument has > >>>> type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]" on 32-bit > >>>> architectures. > >>>> > >>>> Fixes: 80078d9d38fd > >>>> MFC after: 1 week > >>> > >>> Thanks! > >>> > >>> I was running test builds for a fix, but it is so much more convenient when other people fix my mistakes for me. > >> > >> I was trying buildworld on i386 for something totally unrelated, and ran > >> into these -Wformat errors so I took the liberty of patching them up > >> quickly. :) > > > > Generally we do not use the PRIu64 (you should remember the term > > abomination). Why not cast to uintmax_t and use %ju as we typically do > > in other places. > > > There are a couple of examples in the tree, but it is indeed rare. > > I wanted to avoid casting so that the compiler would still shout at me if data types changed. It’s much easier to miss places where a variable is used (and that need to be updated) if they’re getting cast to something. > You do not need to cast after uintmax_t cast. Point is that the type is the highest rank integer on the arch. Of course, uintmax_t on all existing arches is 64bit, and would stay the same even after 128bit integers (like long long long) are introduced. But I do not think it is relevant there. > If this is something the project has strong feelings about I’ll change it, but I think I like this slightly better than casting to uintmax_t. > > Best regards, > Kristof On Tue, Aug 31, 2021 at 11:03:12AM +0200, Dimitry Andric wrote: > On 31 Aug 2021, at 01:33, Konstantin Belousov wrote: > > > > On Sun, Aug 29, 2021 at 07:40:09PM +0200, Dimitry Andric wrote: > >> On 29 Aug 2021, at 18:00, Kristof Provost wrote: > >>> > >>> On 29 Aug 2021, at 17:31, Dimitry Andric wrote: > >>>> The branch main has been updated by dim: > >>>> > >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=5b8f07b12f8477f1679013d6b3abdab8d33c7243 > >>>> > >>>> commit 5b8f07b12f8477f1679013d6b3abdab8d33c7243 > >>>> Author: Dimitry Andric > >>>> AuthorDate: 2021-08-29 15:31:28 +0000 > >>>> Commit: Dimitry Andric > >>>> CommitDate: 2021-08-29 15:31:28 +0000 > >>>> > >>>> Fix -Wformat errors in pfctl on 32-bit architectures > >>>> > >>>> Use PRIu64 to printf(3) uint64_t quantities, otherwise this will result > >>>> in "error: format specifies type 'unsigned long' but the argument has > >>>> type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]" on 32-bit > >>>> architectures. > >>>> > >>>> Fixes: 80078d9d38fd > >>>> MFC after: 1 week > >>> > >>> Thanks! > >>> > >>> I was running test builds for a fix, but it is so much more convenient when other people fix my mistakes for me. > >> > >> I was trying buildworld on i386 for something totally unrelated, and ran > >> into these -Wformat errors so I took the liberty of patching them up > >> quickly. :) > > > > Generally we do not use the PRIu64 (you should remember the term > > abomination). Why not cast to uintmax_t and use %ju as we typically do > > in other places. > > I personally see nothing wrong with PRIu64, but in this case I just > copied the existing coding style. Well, PRIu64 is ugly. %ju is much easier to read and write. Anyway, I do not insist, just pointing out common practice for this specific case. From owner-dev-commits-src-all@freebsd.org Wed Sep 1 12:19:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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 34233669429; Wed, 1 Sep 2021 12:19: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 4H035h0SThz4rG1; Wed, 1 Sep 2021 12:19: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 DC48D25209; Wed, 1 Sep 2021 12:19: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 181CJZHS054355; Wed, 1 Sep 2021 12:19:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181CJZxH054354; Wed, 1 Sep 2021 12:19:35 GMT (envelope-from git) Date: Wed, 1 Sep 2021 12:19:35 GMT Message-Id: <202109011219.181CJZxH054354@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 92bb74fd4f01 - main - vfs: Use file_cred for VOP_DEALLOCATE in vn_deallocate if non-NULL 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/main X-Git-Reftype: branch X-Git-Commit: 92bb74fd4f015aad9f50b3bf100e89da7008fda6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 12:19:36 -0000 The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=92bb74fd4f015aad9f50b3bf100e89da7008fda6 commit 92bb74fd4f015aad9f50b3bf100e89da7008fda6 Author: Ka Ho Ng AuthorDate: 2021-09-01 12:18:24 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-01 12:19:08 +0000 vfs: Use file_cred for VOP_DEALLOCATE in vn_deallocate if non-NULL This changes vn_deallocate() to match the behavior of vn_rdwr() when picking which ucred to use. That is, vn_deallocate() uses file_cred for making VOP call if it is non-NULL, or use active_cred otherwise. Sponsored by: The FreeBSD Foundation Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D31712 --- sys/kern/vfs_vnops.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index bd512f73eae5..bf1270dc8ad8 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3463,7 +3463,8 @@ vn_fallocate(struct file *fp, off_t offset, off_t len, struct thread *td) static int vn_deallocate_impl(struct vnode *vp, off_t *offset, off_t *length, int flags, - int ioflag, struct ucred *active_cred, struct ucred *file_cred) + int ioflag, struct ucred *cred, struct ucred *active_cred, + struct ucred *file_cred) { struct mount *mp; void *rl_cookie; @@ -3510,7 +3511,7 @@ vn_deallocate_impl(struct vnode *vp, off_t *offset, off_t *length, int flags, #endif if (error == 0) error = VOP_DEALLOCATE(vp, &off, &len, flags, ioflag, - active_cred); + cred); if ((ioflag & IO_NODELOCKED) == 0) { VOP_UNLOCK(vp); @@ -3530,17 +3531,24 @@ out: return (error); } +/* + * This function is supposed to be used in the situations where the deallocation + * is not triggered by a user request. + */ int vn_deallocate(struct vnode *vp, off_t *offset, off_t *length, int flags, int ioflag, struct ucred *active_cred, struct ucred *file_cred) { + struct ucred *cred; + if (*offset < 0 || *length <= 0 || *length > OFF_MAX - *offset || flags != 0) return (EINVAL); if (vp->v_type != VREG) return (ENODEV); - return (vn_deallocate_impl(vp, offset, length, flags, ioflag, + cred = file_cred != NOCRED ? file_cred : active_cred; + return (vn_deallocate_impl(vp, offset, length, flags, ioflag, cred, active_cred, file_cred)); } @@ -3565,7 +3573,7 @@ vn_fspacectl(struct file *fp, int cmd, off_t *offset, off_t *length, int flags, switch (cmd) { case SPACECTL_DEALLOC: error = vn_deallocate_impl(vp, offset, length, flags, ioflag, - active_cred, fp->f_cred); + active_cred, active_cred, fp->f_cred); break; default: panic("vn_fspacectl: unknown cmd %d", cmd); From owner-dev-commits-src-all@freebsd.org Wed Sep 1 13:07:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:08:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:08:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:08:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:28:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:28:30 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:28:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:28:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:28:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:28:33 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:28:34 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:28:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:28:34 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:28:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:31:08 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:31:09 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:31:11 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 13:31:12 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 14:07:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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 53B9666B7D5; Wed, 1 Sep 2021 14:07: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 4H05Tx1fQVz3rsh; Wed, 1 Sep 2021 14:07: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 1C4BA2665B; Wed, 1 Sep 2021 14:07: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 181E7GNW001371; Wed, 1 Sep 2021 14:07:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181E7Gfx001370; Wed, 1 Sep 2021 14:07:16 GMT (envelope-from git) Date: Wed, 1 Sep 2021 14:07:16 GMT Message-Id: <202109011407.181E7Gfx001370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: be8ee77e9edc - main - sctp: Add macros to assert on inp info lock state 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/main X-Git-Reftype: branch X-Git-Commit: be8ee77e9edcb0bc8f94cb8695fc7fb49cc0a282 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 14:07:17 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=be8ee77e9edcb0bc8f94cb8695fc7fb49cc0a282 commit be8ee77e9edcb0bc8f94cb8695fc7fb49cc0a282 Author: Mark Johnston AuthorDate: 2021-09-01 14:06:02 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 14:06:18 +0000 sctp: Add macros to assert on inp info lock state Reviewed by: tuexen MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31756 --- sys/netinet/sctp_lock_bsd.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/netinet/sctp_lock_bsd.h b/sys/netinet/sctp_lock_bsd.h index 4d78664e3ba5..e7cf8b3221b9 100644 --- a/sys/netinet/sctp_lock_bsd.h +++ b/sys/netinet/sctp_lock_bsd.h @@ -107,6 +107,18 @@ __FBSDID("$FreeBSD$"); rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ } while (0) +#define SCTP_INP_INFO_LOCK_ASSERT() do { \ + rw_assert(&SCTP_BASE_INFO(ipi_ep_mtx), RA_LOCKED); \ +} while (0) + +#define SCTP_INP_INFO_RLOCK_ASSERT() do { \ + rw_assert(&SCTP_BASE_INFO(ipi_ep_mtx), RA_RLOCKED); \ +} while (0) + +#define SCTP_INP_INFO_WLOCK_ASSERT() do { \ + rw_assert(&SCTP_BASE_INFO(ipi_ep_mtx), RA_WLOCKED); \ +} while (0) + #define SCTP_MCORE_QLOCK_INIT(cpstr) do { \ mtx_init(&(cpstr)->que_mtx, "sctp-mcore_queue","queue_lock", \ MTX_DEF | MTX_DUPOK); \ From owner-dev-commits-src-all@freebsd.org Wed Sep 1 14:07:18 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6468D66BE03; Wed, 1 Sep 2021 14:07: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 4H05Ty2FNzz3rfn; Wed, 1 Sep 2021 14:07: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 34BC1262C1; Wed, 1 Sep 2021 14:07: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 181E7IVA001395; Wed, 1 Sep 2021 14:07:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181E7IIl001394; Wed, 1 Sep 2021 14:07:18 GMT (envelope-from git) Date: Wed, 1 Sep 2021 14:07:18 GMT Message-Id: <202109011407.181E7IIl001394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 457abbb85794 - main - sctp: Implement sctp_inpcb_bind_locked() 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/main X-Git-Reftype: branch X-Git-Commit: 457abbb85794ad8b28d11a7cd44260eabdf3114d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 14:07:18 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=457abbb85794ad8b28d11a7cd44260eabdf3114d commit 457abbb85794ad8b28d11a7cd44260eabdf3114d Author: Mark Johnston AuthorDate: 2021-09-01 14:04:47 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 14:06:18 +0000 sctp: Implement sctp_inpcb_bind_locked() This will be used by sctp_listen() to avoid dropping locks when performing an implicit bind. No functional change intended. Reviewed by: tuexen MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31757 --- sys/netinet/sctp_pcb.c | 53 +++++++++++++++++++++++++++++++++----------------- sys/netinet/sctp_pcb.h | 3 +++ 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 12f2d5d7fb76..7aa20b5e14b9 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -2801,14 +2801,19 @@ sctp_remove_laddr(struct sctp_laddr *laddr) SCTP_DECR_LADDR_COUNT(); } -/* sctp_ifap is used to bypass normal local address validation checks */ +/* + * Bind the socket, with the PCB and global info locks held. Note, if a + * socket address is specified, the PCB lock may be dropped and re-acquired. + * + * sctp_ifap is used to bypass normal local address validation checks. + */ int -sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, +sctp_inpcb_bind_locked(struct sctp_inpcb *inp, struct sockaddr *addr, struct sctp_ifa *sctp_ifap, struct thread *td) { /* bind a ep to a socket address */ struct sctppcbhead *head; - struct sctp_inpcb *inp, *inp_tmp; + struct sctp_inpcb *inp_tmp; struct inpcb *ip_inp; int port_reuse_active = 0; int bindall; @@ -2821,8 +2826,11 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, error = 0; lport = 0; bindall = 1; - inp = (struct sctp_inpcb *)so->so_pcb; - ip_inp = (struct inpcb *)so->so_pcb; + ip_inp = &inp->ip_inp.inp; + + SCTP_INP_INFO_WLOCK_ASSERT(); + SCTP_INP_WLOCK_ASSERT(inp); + #ifdef SCTP_DEBUG if (addr) { SCTPDBG(SCTP_DEBUG_PCB1, "Bind called port: %d\n", @@ -2831,8 +2839,6 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, SCTPDBG_ADDR(SCTP_DEBUG_PCB1, addr); } #endif - SCTP_INP_INFO_WLOCK(); - SCTP_INP_WLOCK(inp); if ((inp->sctp_flags & SCTP_PCB_FLAGS_UNBOUND) == 0) { error = EINVAL; /* already did a bind, subsequent binds NOT allowed ! */ @@ -2925,20 +2931,16 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, vrf_id = inp->def_vrf_id; if (lport) { - /* increase our count due to the unlock we do */ - SCTP_INP_INCR_REF(inp); - /* * Did the caller specify a port? if so we must see if an ep * already has this one bound. */ /* got to be root to get at low ports */ - if (ntohs(lport) < IPPORT_RESERVED) { - if ((error = priv_check(td, PRIV_NETINET_RESERVEDPORT)) != 0) { - SCTP_INP_DECR_REF(inp); - goto out; - } + if (ntohs(lport) < IPPORT_RESERVED && + (error = priv_check(td, PRIV_NETINET_RESERVEDPORT)) != 0) { + goto out; } + SCTP_INP_INCR_REF(inp); SCTP_INP_WUNLOCK(inp); if (bindall) { vrf_id = inp->def_vrf_id; @@ -2962,10 +2964,11 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, port_reuse_active = 1; goto continue_anyway; } + SCTP_INP_WLOCK(inp); SCTP_INP_DECR_REF(inp); error = EADDRINUSE; SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); - goto out_inp_unlocked; + goto out; } } else { inp_tmp = sctp_pcb_findep(addr, 0, 1, vrf_id); @@ -2988,10 +2991,11 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, port_reuse_active = 1; goto continue_anyway; } + SCTP_INP_WLOCK(inp); SCTP_INP_DECR_REF(inp); error = EADDRINUSE; SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); - goto out_inp_unlocked; + goto out; } } continue_anyway: @@ -3201,8 +3205,21 @@ continue_anyway: ("%s: inp %p is already bound", __func__, inp)); inp->sctp_flags &= ~SCTP_PCB_FLAGS_UNBOUND; out: + return (error); +} + +int +sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, + struct sctp_ifa *sctp_ifap, struct thread *td) +{ + struct sctp_inpcb *inp; + int error; + + inp = so->so_pcb; + SCTP_INP_INFO_WLOCK(); + SCTP_INP_WLOCK(inp); + error = sctp_inpcb_bind_locked(inp, addr, sctp_ifap, td); SCTP_INP_WUNLOCK(inp); -out_inp_unlocked: SCTP_INP_INFO_WUNLOCK(); return (error); } diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h index c978e8c72b42..e14c9f39356c 100644 --- a/sys/netinet/sctp_pcb.h +++ b/sys/netinet/sctp_pcb.h @@ -526,6 +526,9 @@ struct sctp_inpcb *sctp_pcb_findep(struct sockaddr *, int, int, uint32_t); int sctp_inpcb_bind(struct socket *, struct sockaddr *, struct sctp_ifa *, struct thread *); +int +sctp_inpcb_bind_locked(struct sctp_inpcb *, struct sockaddr *, + struct sctp_ifa *, struct thread *); struct sctp_tcb * sctp_findassociation_addr(struct mbuf *, int, From owner-dev-commits-src-all@freebsd.org Wed Sep 1 14:28:44 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B27EE66BDE8; Wed, 1 Sep 2021 14:28: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 4H05yh4gXMz4RKM; Wed, 1 Sep 2021 14:28: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 8484D26BA1; Wed, 1 Sep 2021 14:28: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 181ESiT5027504; Wed, 1 Sep 2021 14:28:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181ESiDJ027503; Wed, 1 Sep 2021 14:28:44 GMT (envelope-from git) Date: Wed, 1 Sep 2021 14:28:44 GMT Message-Id: <202109011428.181ESiDJ027503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 65f30a39e11b - main - sctp: Release the socket reference when detaching an association 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/main X-Git-Reftype: branch X-Git-Commit: 65f30a39e11bbbab927dbd2ca8de5ec5fc6af7ca Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 14:28:44 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=65f30a39e11bbbab927dbd2ca8de5ec5fc6af7ca commit 65f30a39e11bbbab927dbd2ca8de5ec5fc6af7ca Author: Mark Johnston AuthorDate: 2021-09-01 14:27:31 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 14:27:31 +0000 sctp: Release the socket reference when detaching an association Later in sctp_free_assoc(), when we clean up chunk lists, sctp_free_spbufspace() is used to reset the byte count in the socket send buffer. However, if the PCB is going away, the socket may already have been detached from the PCB, in which case this becomes a use-after free. Clear the socket reference from the association before detaching it from the PCB, if the PCB has already lost its socket reference. Reviewed by: tuexen MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31753 --- sys/netinet/sctp_pcb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 7aa20b5e14b9..2b8653ac8109 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -4900,6 +4900,9 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre if (stcb->asoc.in_asocid_hash) { LIST_REMOVE(stcb, sctp_tcbasocidhash); } + if (inp->sctp_socket == NULL) { + stcb->sctp_socket = NULL; + } /* Now lets remove it from the list of ALL associations in the EP */ LIST_REMOVE(stcb, sctp_tcblist); if (from_inpcbfree == SCTP_NORMAL_PROC) { From owner-dev-commits-src-all@freebsd.org Wed Sep 1 14:28:45 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D115066BE5F; Wed, 1 Sep 2021 14:28: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 4H05yj5Ldvz4RXn; Wed, 1 Sep 2021 14:28: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 9D58826A74; Wed, 1 Sep 2021 14:28: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 181ESj2F027535; Wed, 1 Sep 2021 14:28:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181ESjBH027534; Wed, 1 Sep 2021 14:28:45 GMT (envelope-from git) Date: Wed, 1 Sep 2021 14:28:45 GMT Message-Id: <202109011428.181ESjBH027534@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d35be50f5779 - main - sctp: Hold association locks across socket wakeups when 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/main X-Git-Reftype: branch X-Git-Commit: d35be50f57797a400ff68a37777405029bf9730a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 14:28:45 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d35be50f57797a400ff68a37777405029bf9730a commit d35be50f57797a400ff68a37777405029bf9730a Author: Mark Johnston AuthorDate: 2021-09-01 14:27:51 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 14:27:51 +0000 sctp: Hold association locks across socket wakeups when freeing At this point we do not hold the inpcb lock, so the only thing holding the socket reference live is the TCB lock, which needs to be acquired by sctp_inpcb_free() in order to destroy associations. Defer the unlock to until after we dereference the socket reference. Reported by: syzbot+1d0f2c4675de76a4cf1e@syzkaller.appspotmail.com Reported by: syzbot+fabee77954fe69d3a5ad@syzkaller.appspotmail.com Reviewed by: tuexen MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31754 --- sys/netinet/sctp_pcb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 2b8653ac8109..3e517889d171 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -4802,8 +4802,6 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre SCTP_CLEAR_SUBSTATE(stcb, SCTP_STATE_IN_ACCEPT_QUEUE); sctp_timer_start(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL); } - SCTP_TCB_SEND_UNLOCK(stcb); - SCTP_TCB_UNLOCK(stcb); if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE)) /* nothing around */ @@ -4813,6 +4811,8 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre sctp_sorwakeup(inp, so); sctp_sowwakeup(inp, so); } + SCTP_TCB_SEND_UNLOCK(stcb); + SCTP_TCB_UNLOCK(stcb); #ifdef SCTP_LOG_CLOSING sctp_log_closing(inp, stcb, 9); From owner-dev-commits-src-all@freebsd.org Wed Sep 1 14:28:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0F1F566C3CD; Wed, 1 Sep 2021 14:28: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 4H05yk6jwkz4RXw; Wed, 1 Sep 2021 14:28: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 C95B8267CD; Wed, 1 Sep 2021 14:28: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 181ESkwp027559; Wed, 1 Sep 2021 14:28:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181ESkBZ027558; Wed, 1 Sep 2021 14:28:46 GMT (envelope-from git) Date: Wed, 1 Sep 2021 14:28:46 GMT Message-Id: <202109011428.181ESkBZ027558@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c98bf2a45e05 - main - sctp: Always check for a vanishing inpcb when processing COOKIE-ECHO 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/main X-Git-Reftype: branch X-Git-Commit: c98bf2a45e0527e7c1958f0a311cb2be072f1411 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 14:28:47 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c98bf2a45e0527e7c1958f0a311cb2be072f1411 commit c98bf2a45e0527e7c1958f0a311cb2be072f1411 Author: Mark Johnston AuthorDate: 2021-09-01 14:28:17 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 14:28:17 +0000 sctp: Always check for a vanishing inpcb when processing COOKIE-ECHO We previously did this only in the normal case where no association exists yet. However, it is not safe to process COOKIE-ECHO even if an association exists, as sctp_process_cookie_existing() may dereference the socket pointer. See also commit 0c7dc84076b64ef74c24f04400d572f75ef61bb4. Reviewed by: tuexen MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31755 --- sys/netinet/sctp_input.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index f579d10333fb..61455e47dd71 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -4895,6 +4895,11 @@ process_control_chunks: struct sctp_inpcb *linp; struct sctp_tmit_chunk *chk; + if (inp->sctp_flags & (SCTP_PCB_FLAGS_SOCKET_GONE | + SCTP_PCB_FLAGS_SOCKET_ALLGONE)) { + goto abend; + } + if (stcb) { linp = NULL; } else { @@ -4903,11 +4908,6 @@ process_control_chunks: if (linp != NULL) { SCTP_ASOC_CREATE_LOCK(linp); - if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || - (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE)) { - SCTP_ASOC_CREATE_UNLOCK(linp); - goto abend; - } } if (netp != NULL) { From owner-dev-commits-src-all@freebsd.org Wed Sep 1 14:51:48 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6490366C4F3; Wed, 1 Sep 2021 14:51: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 4H06TJ286Gz4YTR; Wed, 1 Sep 2021 14: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 27A3D26DC4; Wed, 1 Sep 2021 14: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 181EpmlR064981; Wed, 1 Sep 2021 14: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 181EpmBv064980; Wed, 1 Sep 2021 14:51:48 GMT (envelope-from git) Date: Wed, 1 Sep 2021 14:51:48 GMT Message-Id: <202109011451.181EpmBv064980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: abe95116ba10 - main - unionfs: rework pathname handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: abe95116ba10c8ab56f3ccd72a969ee29a9eef0b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 14:51:48 -0000 The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=abe95116ba10c8ab56f3ccd72a969ee29a9eef0b commit abe95116ba10c8ab56f3ccd72a969ee29a9eef0b Author: Jason A. Harmening AuthorDate: 2021-08-29 21:36:15 +0000 Commit: Jason A. Harmening CommitDate: 2021-09-01 14:55:09 +0000 unionfs: rework pathname handling Running stress2 unionfs tests reliably produces a namei_zone corruption panic due to unionfs_relookup() attempting to NUL-terminate a newly- allocate pathname buffer without first validating the buffer length. Instead, avoid allocating new pathname buffers in unionfs entirely, using already-provided buffers while ensuring the the correct flags are set in struct componentname to prevent freeing or manipulation of those buffers at lower layers. While here, also compute and store the path length once in the unionfs node instead of constantly invoking strlen() on it. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D31728 --- sys/fs/unionfs/union.h | 4 +- sys/fs/unionfs/union_subr.c | 97 ++++++++++++-------------------------------- sys/fs/unionfs/union_vnops.c | 17 ++++---- 3 files changed, 39 insertions(+), 79 deletions(-) diff --git a/sys/fs/unionfs/union.h b/sys/fs/unionfs/union.h index 96180480dbec..a3484f818c66 100644 --- a/sys/fs/unionfs/union.h +++ b/sys/fs/unionfs/union.h @@ -98,6 +98,7 @@ struct unionfs_node { u_long un_hashmask; /* bit mask */ char *un_path; /* path */ + int un_pathlen; /* strlen of path */ int un_flag; /* unionfs node flag */ }; @@ -124,7 +125,8 @@ int unionfs_copyfile(struct unionfs_node *unp, int docopy, struct ucred *cred, s void unionfs_create_uppervattr_core(struct unionfs_mount *ump, struct vattr *lva, struct vattr *uva, struct thread *td); int unionfs_create_uppervattr(struct unionfs_mount *ump, struct vnode *lvp, struct vattr *uva, struct ucred *cred, struct thread *td); int unionfs_mkshadowdir(struct unionfs_mount *ump, struct vnode *duvp, struct unionfs_node *unp, struct componentname *cnp, struct thread *td); -int unionfs_mkwhiteout(struct vnode *dvp, struct componentname *cnp, struct thread *td, char *path); +int unionfs_mkwhiteout(struct vnode *dvp, struct componentname *cnp, + struct thread *td, char *path, int pathlen); int unionfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct componentname *cn, struct thread *td, char *path, int pathlen, u_long nameiop); int unionfs_relookup_for_create(struct vnode *dvp, struct componentname *cnp, struct thread *td); int unionfs_relookup_for_delete(struct vnode *dvp, struct componentname *cnp, struct thread *td); diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 04d00fd77e39..d7d6b16a6ac8 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -332,6 +332,7 @@ unionfs_nodeget(struct mount *mp, struct vnode *uppervp, malloc(cnp->cn_namelen +1, M_UNIONFSPATH, M_WAITOK|M_ZERO); bcopy(cnp->cn_nameptr, unp->un_path, cnp->cn_namelen); unp->un_path[cnp->cn_namelen] = '\0'; + unp->un_pathlen = cnp->cn_namelen; } vp->v_type = vt; vp->v_data = unp; @@ -420,6 +421,7 @@ unionfs_noderem(struct vnode *vp, struct thread *td) if (unp->un_path != NULL) { free(unp->un_path, M_UNIONFSPATH); unp->un_path = NULL; + unp->un_pathlen = 0; } if (unp->un_hashtbl != NULL) { @@ -576,16 +578,12 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp, int error; cn->cn_namelen = pathlen; - cn->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK); - bcopy(path, cn->cn_pnbuf, pathlen); - cn->cn_pnbuf[pathlen] = '\0'; - + cn->cn_pnbuf = path; cn->cn_nameiop = nameiop; cn->cn_flags = (LOCKPARENT | LOCKLEAF | HASBUF | SAVENAME | ISLASTCN); cn->cn_lkflags = LK_EXCLUSIVE; cn->cn_thread = td; cn->cn_cred = cnp->cn_cred; - cn->cn_nameptr = cn->cn_pnbuf; if (nameiop == DELETE) @@ -599,12 +597,16 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp, VOP_UNLOCK(dvp); if ((error = relookup(dvp, vpp, cn))) { - uma_zfree(namei_zone, cn->cn_pnbuf); - cn->cn_flags &= ~HASBUF; vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); } else vrele(dvp); + KASSERT((cn->cn_flags & HASBUF) != 0, + ("%s: HASBUF cleared", __func__)); + KASSERT((cn->cn_flags & SAVENAME) != 0, + ("%s: SAVENAME cleared", __func__)); + KASSERT(cn->cn_pnbuf == path, ("%s: cn_pnbuf changed", __func__)); + return (error); } @@ -630,7 +632,7 @@ unionfs_relookup_for_create(struct vnode *dvp, struct componentname *cnp, vp = NULLVP; error = unionfs_relookup(udvp, &vp, cnp, &cn, td, cnp->cn_nameptr, - strlen(cnp->cn_nameptr), CREATE); + cnp->cn_namelen, CREATE); if (error) return (error); @@ -643,16 +645,6 @@ unionfs_relookup_for_create(struct vnode *dvp, struct componentname *cnp, error = EEXIST; } - if (cn.cn_flags & HASBUF) { - uma_zfree(namei_zone, cn.cn_pnbuf); - cn.cn_flags &= ~HASBUF; - } - - if (!error) { - cn.cn_flags |= (cnp->cn_flags & HASBUF); - cnp->cn_flags = cn.cn_flags; - } - return (error); } @@ -674,7 +666,7 @@ unionfs_relookup_for_delete(struct vnode *dvp, struct componentname *cnp, vp = NULLVP; error = unionfs_relookup(udvp, &vp, cnp, &cn, td, cnp->cn_nameptr, - strlen(cnp->cn_nameptr), DELETE); + cnp->cn_namelen, DELETE); if (error) return (error); @@ -687,16 +679,6 @@ unionfs_relookup_for_delete(struct vnode *dvp, struct componentname *cnp, vput(vp); } - if (cn.cn_flags & HASBUF) { - uma_zfree(namei_zone, cn.cn_pnbuf); - cn.cn_flags &= ~HASBUF; - } - - if (!error) { - cn.cn_flags |= (cnp->cn_flags & HASBUF); - cnp->cn_flags = cn.cn_flags; - } - return (error); } @@ -718,7 +700,7 @@ unionfs_relookup_for_rename(struct vnode *dvp, struct componentname *cnp, vp = NULLVP; error = unionfs_relookup(udvp, &vp, cnp, &cn, td, cnp->cn_nameptr, - strlen(cnp->cn_nameptr), RENAME); + cnp->cn_namelen, RENAME); if (error) return (error); @@ -729,18 +711,7 @@ unionfs_relookup_for_rename(struct vnode *dvp, struct componentname *cnp, vput(vp); } - if (cn.cn_flags & HASBUF) { - uma_zfree(namei_zone, cn.cn_pnbuf); - cn.cn_flags &= ~HASBUF; - } - - if (!error) { - cn.cn_flags |= (cnp->cn_flags & HASBUF); - cnp->cn_flags = cn.cn_flags; - } - return (error); - } /* @@ -848,11 +819,11 @@ unionfs_mkshadowdir(struct unionfs_mount *ump, struct vnode *udvp, vput(uvp); error = EEXIST; - goto unionfs_mkshadowdir_free_out; + goto unionfs_mkshadowdir_abort; } if ((error = vn_start_write(udvp, &mp, V_WAIT | PCATCH))) - goto unionfs_mkshadowdir_free_out; + goto unionfs_mkshadowdir_abort; unionfs_create_uppervattr_core(ump, &lva, &va, td); error = VOP_MKDIR(udvp, &uvp, &nd.ni_cnd, &va); @@ -869,12 +840,6 @@ unionfs_mkshadowdir(struct unionfs_mount *ump, struct vnode *udvp, } vn_finished_write(mp); -unionfs_mkshadowdir_free_out: - if (nd.ni_cnd.cn_flags & HASBUF) { - uma_zfree(namei_zone, nd.ni_cnd.cn_pnbuf); - nd.ni_cnd.cn_flags &= ~HASBUF; - } - unionfs_mkshadowdir_abort: cnp->cn_cred = credbk; chgproccnt(cred->cr_ruidinfo, -1, 0); @@ -890,26 +855,20 @@ unionfs_mkshadowdir_abort: */ int unionfs_mkwhiteout(struct vnode *dvp, struct componentname *cnp, - struct thread *td, char *path) + struct thread *td, char *path, int pathlen) { - int error; struct vnode *wvp; struct nameidata nd; struct mount *mp; - - if (path == NULL) - path = cnp->cn_nameptr; + int error; wvp = NULLVP; NDPREINIT(&nd); if ((error = unionfs_relookup(dvp, &wvp, cnp, &nd.ni_cnd, td, path, - strlen(path), CREATE))) + pathlen, CREATE))) { return (error); + } if (wvp != NULLVP) { - if (nd.ni_cnd.cn_flags & HASBUF) { - uma_zfree(namei_zone, nd.ni_cnd.cn_pnbuf); - nd.ni_cnd.cn_flags &= ~HASBUF; - } if (dvp == wvp) vrele(wvp); else @@ -925,11 +884,6 @@ unionfs_mkwhiteout(struct vnode *dvp, struct componentname *cnp, vn_finished_write(mp); unionfs_mkwhiteout_free_out: - if (nd.ni_cnd.cn_flags & HASBUF) { - uma_zfree(namei_zone, nd.ni_cnd.cn_pnbuf); - nd.ni_cnd.cn_flags &= ~HASBUF; - } - return (error); } @@ -969,9 +923,8 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp, if (unp->un_path == NULL) panic("unionfs: un_path is null"); - nd.ni_cnd.cn_namelen = strlen(unp->un_path); - nd.ni_cnd.cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK); - bcopy(unp->un_path, nd.ni_cnd.cn_pnbuf, nd.ni_cnd.cn_namelen + 1); + nd.ni_cnd.cn_namelen = unp->un_pathlen; + nd.ni_cnd.cn_pnbuf = unp->un_path; nd.ni_cnd.cn_nameiop = CREATE; nd.ni_cnd.cn_flags = LOCKPARENT | LOCKLEAF | HASBUF | SAVENAME | ISLASTCN; @@ -1015,10 +968,12 @@ unionfs_vn_create_on_upper_free_out1: VOP_UNLOCK(udvp); unionfs_vn_create_on_upper_free_out2: - if (nd.ni_cnd.cn_flags & HASBUF) { - uma_zfree(namei_zone, nd.ni_cnd.cn_pnbuf); - nd.ni_cnd.cn_flags &= ~HASBUF; - } + KASSERT((nd.ni_cnd.cn_flags & HASBUF) != 0, + ("%s: HASBUF cleared", __func__)); + KASSERT((nd.ni_cnd.cn_flags & SAVENAME) != 0, + ("%s: SAVENAME cleared", __func__)); + KASSERT(nd.ni_cnd.cn_pnbuf == unp->un_path, + ("%s: cn_pnbuf changed", __func__)); return (error); } diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 09fbccb3d7ff..d09b8cd50854 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -961,7 +961,6 @@ unionfs_fsync(struct vop_fsync_args *ap) static int unionfs_remove(struct vop_remove_args *ap) { - int error; char *path; struct unionfs_node *dunp; struct unionfs_node *unp; @@ -973,6 +972,8 @@ unionfs_remove(struct vop_remove_args *ap) struct componentname *cnp; struct componentname cn; struct thread *td; + int error; + int pathlen; UNIONFS_INTERNAL_DEBUG("unionfs_remove: enter\n"); @@ -992,7 +993,7 @@ unionfs_remove(struct vop_remove_args *ap) /* search vnode */ VOP_UNLOCK(ap->a_vp); error = unionfs_relookup(udvp, &vp, cnp, &cn, td, - cnp->cn_nameptr, strlen(cnp->cn_nameptr), DELETE); + cnp->cn_nameptr, cnp->cn_namelen, DELETE); if (error != 0 && error != ENOENT) { vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY); return (error); @@ -1002,7 +1003,6 @@ unionfs_remove(struct vop_remove_args *ap) /* target vnode in upper */ uvp = vp; vrele(vp); - path = NULL; } else { /* target vnode in lower */ if (vp != NULLVP) { @@ -1013,14 +1013,16 @@ unionfs_remove(struct vop_remove_args *ap) } vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY); lvp = ap->a_vp; - path = ap->a_cnp->cn_nameptr; } + path = cnp->cn_nameptr; + pathlen = cnp->cn_namelen; } else { ump = MOUNTTOUNIONFSMOUNT(ap->a_vp->v_mount); unp = VTOUNIONFS(ap->a_vp); uvp = unp->un_uppervp; lvp = unp->un_lowervp; path = unp->un_path; + pathlen = unp->un_pathlen; } if (udvp == NULLVP) @@ -1036,7 +1038,7 @@ unionfs_remove(struct vop_remove_args *ap) cnp->cn_flags |= DOWHITEOUT; error = VOP_REMOVE(udvp, uvp, cnp); } else if (lvp != NULLVP) - error = unionfs_mkwhiteout(udvp, cnp, td, path); + error = unionfs_mkwhiteout(udvp, cnp, td, path, pathlen); UNIONFS_INTERNAL_DEBUG("unionfs_remove: leave (%d)\n", error); @@ -1262,7 +1264,7 @@ unionfs_rename(struct vop_rename_args *ap) if (error != 0) goto unionfs_rename_abort; - /* Locke of tvp is canceled in order to avoid recursive lock. */ + /* Lock of tvp is canceled in order to avoid recursive lock. */ if (tvp != NULLVP && tvp != tdvp) VOP_UNLOCK(tvp); error = unionfs_relookup_for_rename(tdvp, tcnp, td); @@ -1421,7 +1423,8 @@ unionfs_rmdir(struct vop_rmdir_args *ap) error = VOP_RMDIR(udvp, uvp, cnp); } else if (lvp != NULLVP) - error = unionfs_mkwhiteout(udvp, cnp, td, unp->un_path); + error = unionfs_mkwhiteout(udvp, cnp, td, + unp->un_path, unp->un_pathlen); if (error == 0) { cache_purge(ap->a_dvp); From owner-dev-commits-src-all@freebsd.org Wed Sep 1 14:51:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7433466C9EA; Wed, 1 Sep 2021 14: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 4H06TK2cVGz4YWh; Wed, 1 Sep 2021 14:51: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 4015226E51; Wed, 1 Sep 2021 14:51: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 181EpnpD065005; Wed, 1 Sep 2021 14:51:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181EpnBD065004; Wed, 1 Sep 2021 14:51:49 GMT (envelope-from git) Date: Wed, 1 Sep 2021 14:51:49 GMT Message-Id: <202109011451.181EpnBD065004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 312d49ef7afc - main - unionfs: style MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 312d49ef7afcef2d7f50dcf4925011bd948646b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 14:51:49 -0000 The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=312d49ef7afcef2d7f50dcf4925011bd948646b8 commit 312d49ef7afcef2d7f50dcf4925011bd948646b8 Author: Jason A. Harmening AuthorDate: 2021-08-31 01:55:42 +0000 Commit: Jason A. Harmening CommitDate: 2021-09-01 14:55:37 +0000 unionfs: style Fix the more egregious style(9) violations in unionfs. No functional change intended. --- sys/fs/unionfs/union.h | 48 ++++++++----- sys/fs/unionfs/union_subr.c | 131 +++++++++++++++++----------------- sys/fs/unionfs/union_vfsops.c | 26 +++---- sys/fs/unionfs/union_vnops.c | 162 ++++++++++++++++++++++++------------------ 4 files changed, 200 insertions(+), 167 deletions(-) diff --git a/sys/fs/unionfs/union.h b/sys/fs/unionfs/union.h index a3484f818c66..79469a5957f4 100644 --- a/sys/fs/unionfs/union.h +++ b/sys/fs/unionfs/union.h @@ -113,24 +113,36 @@ struct unionfs_node { #define VTOUNIONFS(vp) ((struct unionfs_node *)(vp)->v_data) #define UNIONFSTOV(xp) ((xp)->un_vnode) -int unionfs_init(struct vfsconf *vfsp); -int unionfs_uninit(struct vfsconf *vfsp); -int unionfs_nodeget(struct mount *mp, struct vnode *uppervp, struct vnode *lowervp, struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct thread *td); -void unionfs_noderem(struct vnode *vp, struct thread *td); -void unionfs_get_node_status(struct unionfs_node *unp, struct thread *td, struct unionfs_node_status **unspp); -void unionfs_tryrem_node_status(struct unionfs_node *unp, struct unionfs_node_status *unsp); - -int unionfs_check_rmdir(struct vnode *vp, struct ucred *cred, struct thread *td); -int unionfs_copyfile(struct unionfs_node *unp, int docopy, struct ucred *cred, struct thread *td); -void unionfs_create_uppervattr_core(struct unionfs_mount *ump, struct vattr *lva, struct vattr *uva, struct thread *td); -int unionfs_create_uppervattr(struct unionfs_mount *ump, struct vnode *lvp, struct vattr *uva, struct ucred *cred, struct thread *td); -int unionfs_mkshadowdir(struct unionfs_mount *ump, struct vnode *duvp, struct unionfs_node *unp, struct componentname *cnp, struct thread *td); -int unionfs_mkwhiteout(struct vnode *dvp, struct componentname *cnp, - struct thread *td, char *path, int pathlen); -int unionfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct componentname *cn, struct thread *td, char *path, int pathlen, u_long nameiop); -int unionfs_relookup_for_create(struct vnode *dvp, struct componentname *cnp, struct thread *td); -int unionfs_relookup_for_delete(struct vnode *dvp, struct componentname *cnp, struct thread *td); -int unionfs_relookup_for_rename(struct vnode *dvp, struct componentname *cnp, struct thread *td); +int unionfs_init(struct vfsconf *); +int unionfs_uninit(struct vfsconf *); +int unionfs_nodeget(struct mount *, struct vnode *, struct vnode *, + struct vnode *, struct vnode **, struct componentname *, + struct thread *); +void unionfs_noderem(struct vnode *, struct thread *); +void unionfs_get_node_status(struct unionfs_node *, struct thread *, + struct unionfs_node_status **); +void unionfs_tryrem_node_status(struct unionfs_node *, + struct unionfs_node_status *); +int unionfs_check_rmdir(struct vnode *, struct ucred *, struct thread *td); +int unionfs_copyfile(struct unionfs_node *, int, struct ucred *, + struct thread *); +void unionfs_create_uppervattr_core(struct unionfs_mount *, struct vattr *, + struct vattr *, struct thread *); +int unionfs_create_uppervattr(struct unionfs_mount *, struct vnode *, + struct vattr *, struct ucred *, struct thread *); +int unionfs_mkshadowdir(struct unionfs_mount *, struct vnode *, + struct unionfs_node *, struct componentname *, struct thread *); +int unionfs_mkwhiteout(struct vnode *, struct componentname *, + struct thread *, char *, int); +int unionfs_relookup(struct vnode *, struct vnode **, + struct componentname *, struct componentname *, struct thread *, + char *, int, u_long); +int unionfs_relookup_for_create(struct vnode *, struct componentname *, + struct thread *td); +int unionfs_relookup_for_delete(struct vnode *, struct componentname *, + struct thread *); +int unionfs_relookup_for_rename(struct vnode *, struct componentname *, + struct thread *td); #ifdef DIAGNOSTIC struct vnode *unionfs_checklowervp(struct vnode *vp, char *fil, int lno); diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index d7d6b16a6ac8..5cb27dc94d55 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -131,9 +131,9 @@ unionfs_deferred_rele(void *arg __unused, int pending __unused) static struct unionfs_node_hashhead * unionfs_get_hashhead(struct vnode *dvp, char *path) { + struct unionfs_node *unp; int count; char hash; - struct unionfs_node *unp; hash = 0; unp = VTOUNIONFS(dvp); @@ -150,11 +150,11 @@ unionfs_get_hashhead(struct vnode *dvp, char *path) */ static struct vnode * unionfs_get_cached_vnode(struct vnode *uvp, struct vnode *lvp, - struct vnode *dvp, char *path) + struct vnode *dvp, char *path) { struct unionfs_node_hashhead *hd; struct unionfs_node *unp; - struct vnode *vp; + struct vnode *vp; KASSERT((uvp == NULLVP || uvp->v_type == VDIR), ("unionfs_get_cached_vnode: v_type != VDIR")); @@ -188,11 +188,11 @@ unionfs_get_cached_vnode(struct vnode *uvp, struct vnode *lvp, */ static struct vnode * unionfs_ins_cached_vnode(struct unionfs_node *uncp, - struct vnode *dvp, char *path) + struct vnode *dvp, char *path) { struct unionfs_node_hashhead *hd; struct unionfs_node *unp; - struct vnode *vp; + struct vnode *vp; KASSERT((uncp->un_uppervp==NULLVP || uncp->un_uppervp->v_type==VDIR), ("unionfs_ins_cached_vnode: v_type != VDIR")); @@ -252,17 +252,16 @@ unionfs_rem_cached_vnode(struct unionfs_node *unp, struct vnode *dvp) */ int unionfs_nodeget(struct mount *mp, struct vnode *uppervp, - struct vnode *lowervp, struct vnode *dvp, - struct vnode **vpp, struct componentname *cnp, - struct thread *td) + struct vnode *lowervp, struct vnode *dvp, struct vnode **vpp, + struct componentname *cnp, struct thread *td) { + char *path; struct unionfs_mount *ump; struct unionfs_node *unp; struct vnode *vp; int error; int lkflags; enum vtype vt; - char *path; ump = MOUNTTOUNIONFSMOUNT(mp); lkflags = (cnp ? cnp->cn_lkflags : 0); @@ -328,8 +327,8 @@ unionfs_nodeget(struct mount *mp, struct vnode *uppervp, vp->v_vnlock = lowervp->v_vnlock; if (path != NULL) { - unp->un_path = (char *) - malloc(cnp->cn_namelen +1, M_UNIONFSPATH, M_WAITOK|M_ZERO); + unp->un_path = malloc(cnp->cn_namelen + 1, + M_UNIONFSPATH, M_WAITOK | M_ZERO); bcopy(cnp->cn_nameptr, unp->un_path, cnp->cn_namelen); unp->un_path[cnp->cn_namelen] = '\0'; unp->un_pathlen = cnp->cn_namelen; @@ -373,13 +372,13 @@ unionfs_nodeget_out: void unionfs_noderem(struct vnode *vp, struct thread *td) { - int count; struct unionfs_node *unp, *unp_t1, *unp_t2; struct unionfs_node_hashhead *hd; struct unionfs_node_status *unsp, *unsp_tmp; struct vnode *lvp; struct vnode *uvp; struct vnode *dvp; + int count; /* * Use the interlock to protect the clearing of v_data to @@ -456,10 +455,12 @@ unionfs_noderem(struct vnode *vp, struct thread *td) */ void unionfs_get_node_status(struct unionfs_node *unp, struct thread *td, - struct unionfs_node_status **unspp) + struct unionfs_node_status **unspp) { struct unionfs_node_status *unsp; - pid_t pid = td->td_proc->p_pid; + pid_t pid; + + pid = td->td_proc->p_pid; KASSERT(NULL != unspp, ("null pointer")); ASSERT_VOP_ELOCKED(UNIONFSTOV(unp), "unionfs_get_node_status"); @@ -487,7 +488,7 @@ unionfs_get_node_status(struct unionfs_node *unp, struct thread *td, */ void unionfs_tryrem_node_status(struct unionfs_node *unp, - struct unionfs_node_status *unsp) + struct unionfs_node_status *unsp) { KASSERT(NULL != unsp, ("null pointer")); ASSERT_VOP_ELOCKED(UNIONFSTOV(unp), "unionfs_get_node_status"); @@ -503,10 +504,8 @@ unionfs_tryrem_node_status(struct unionfs_node *unp, * Create upper node attr. */ void -unionfs_create_uppervattr_core(struct unionfs_mount *ump, - struct vattr *lva, - struct vattr *uva, - struct thread *td) +unionfs_create_uppervattr_core(struct unionfs_mount *ump, struct vattr *lva, + struct vattr *uva, struct thread *td) { VATTR_NULL(uva); uva->va_type = lva->va_type; @@ -523,11 +522,13 @@ unionfs_create_uppervattr_core(struct unionfs_mount *ump, case UNIONFS_MASQUERADE: if (ump->um_uid == lva->va_uid) { uva->va_mode = lva->va_mode & 077077; - uva->va_mode |= (lva->va_type == VDIR ? ump->um_udir : ump->um_ufile) & 0700; + uva->va_mode |= (lva->va_type == VDIR ? + ump->um_udir : ump->um_ufile) & 0700; uva->va_uid = lva->va_uid; uva->va_gid = lva->va_gid; } else { - uva->va_mode = (lva->va_type == VDIR ? ump->um_udir : ump->um_ufile); + uva->va_mode = (lva->va_type == VDIR ? + ump->um_udir : ump->um_ufile); uva->va_uid = ump->um_uid; uva->va_gid = ump->um_gid; } @@ -544,14 +545,11 @@ unionfs_create_uppervattr_core(struct unionfs_mount *ump, * Create upper node attr. */ int -unionfs_create_uppervattr(struct unionfs_mount *ump, - struct vnode *lvp, - struct vattr *uva, - struct ucred *cred, - struct thread *td) +unionfs_create_uppervattr(struct unionfs_mount *ump, struct vnode *lvp, + struct vattr *uva, struct ucred *cred, struct thread *td) { - int error; struct vattr lva; + int error; if ((error = VOP_GETATTR(lvp, &lva, cred))) return (error); @@ -572,10 +570,10 @@ unionfs_create_uppervattr(struct unionfs_mount *ump, */ int unionfs_relookup(struct vnode *dvp, struct vnode **vpp, - struct componentname *cnp, struct componentname *cn, - struct thread *td, char *path, int pathlen, u_long nameiop) + struct componentname *cnp, struct componentname *cn, struct thread *td, + char *path, int pathlen, u_long nameiop) { - int error; + int error; cn->cn_namelen = pathlen; cn->cn_pnbuf = path; @@ -621,12 +619,12 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp, */ int unionfs_relookup_for_create(struct vnode *dvp, struct componentname *cnp, - struct thread *td) + struct thread *td) { - int error; struct vnode *udvp; struct vnode *vp; struct componentname cn; + int error; udvp = UNIONFSVPTOUPPERVP(dvp); vp = NULLVP; @@ -655,12 +653,12 @@ unionfs_relookup_for_create(struct vnode *dvp, struct componentname *cnp, */ int unionfs_relookup_for_delete(struct vnode *dvp, struct componentname *cnp, - struct thread *td) + struct thread *td) { - int error; struct vnode *udvp; struct vnode *vp; struct componentname cn; + int error; udvp = UNIONFSVPTOUPPERVP(dvp); vp = NULLVP; @@ -689,12 +687,12 @@ unionfs_relookup_for_delete(struct vnode *dvp, struct componentname *cnp, */ int unionfs_relookup_for_rename(struct vnode *dvp, struct componentname *cnp, - struct thread *td) + struct thread *td) { - int error; struct vnode *udvp; struct vnode *vp; struct componentname cn; + int error; udvp = UNIONFSVPTOUPPERVP(dvp); vp = NULLVP; @@ -722,12 +720,12 @@ unionfs_relookup_for_rename(struct vnode *dvp, struct componentname *cnp, */ static void unionfs_node_update(struct unionfs_node *unp, struct vnode *uvp, - struct thread *td) + struct thread *td) { - unsigned count, lockrec; struct vnode *vp; struct vnode *lvp; struct vnode *dvp; + unsigned count, lockrec; vp = UNIONFSTOV(unp); lvp = unp->un_lowervp; @@ -768,10 +766,8 @@ unionfs_node_update(struct unionfs_node *unp, struct vnode *uvp, */ int unionfs_mkshadowdir(struct unionfs_mount *ump, struct vnode *udvp, - struct unionfs_node *unp, struct componentname *cnp, - struct thread *td) + struct unionfs_node *unp, struct componentname *cnp, struct thread *td) { - int error; struct vnode *lvp; struct vnode *uvp; struct vattr va; @@ -781,6 +777,7 @@ unionfs_mkshadowdir(struct unionfs_mount *ump, struct vnode *udvp, struct ucred *cred; struct ucred *credbk; struct uidinfo *rootinfo; + int error; if (unp->un_uppervp != NULLVP) return (EEXIST); @@ -855,7 +852,7 @@ unionfs_mkshadowdir_abort: */ int unionfs_mkwhiteout(struct vnode *dvp, struct componentname *cnp, - struct thread *td, char *path, int pathlen) + struct thread *td, char *path, int pathlen) { struct vnode *wvp; struct nameidata nd; @@ -897,17 +894,16 @@ unionfs_mkwhiteout_free_out: */ static int unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp, - struct unionfs_node *unp, struct vattr *uvap, - struct thread *td) + struct unionfs_node *unp, struct vattr *uvap, struct thread *td) { struct unionfs_mount *ump; struct vnode *vp; struct vnode *lvp; struct ucred *cred; struct vattr lva; + struct nameidata nd; int fmode; int error; - struct nameidata nd; ump = MOUNTTOUNIONFSMOUNT(UNIONFSTOV(unp)->v_mount); vp = NULLVP; @@ -956,8 +952,8 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp, goto unionfs_vn_create_on_upper_free_out1; } error = VOP_ADD_WRITECOUNT(vp, 1); - CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", __func__, vp, - vp->v_writecount); + CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", + __func__, vp, vp->v_writecount); if (error == 0) { *vpp = vp; } else { @@ -986,15 +982,15 @@ unionfs_vn_create_on_upper_free_out2: */ static int unionfs_copyfile_core(struct vnode *lvp, struct vnode *uvp, - struct ucred *cred, struct thread *td) + struct ucred *cred, struct thread *td) { - int error; - off_t offset; - int count; - int bufoffset; char *buf; struct uio uio; struct iovec iov; + off_t offset; + int count; + int error; + int bufoffset; error = 0; memset(&uio, 0, sizeof(uio)); @@ -1054,14 +1050,14 @@ unionfs_copyfile_core(struct vnode *lvp, struct vnode *uvp, */ int unionfs_copyfile(struct unionfs_node *unp, int docopy, struct ucred *cred, - struct thread *td) + struct thread *td) { - int error; struct mount *mp; struct vnode *udvp; struct vnode *lvp; struct vnode *uvp; struct vattr uva; + int error; lvp = unp->un_lowervp; uvp = NULLVP; @@ -1099,8 +1095,8 @@ unionfs_copyfile(struct unionfs_node *unp, int docopy, struct ucred *cred, } VOP_CLOSE(uvp, FWRITE, cred, td); VOP_ADD_WRITECOUNT_CHECKED(uvp, -1); - CTR3(KTR_VFS, "%s: vp %p v_writecount decreased to %d", __func__, uvp, - uvp->v_writecount); + CTR3(KTR_VFS, "%s: vp %p v_writecount decreased to %d", + __func__, uvp, uvp->v_writecount); vn_finished_write(mp); @@ -1124,22 +1120,23 @@ unionfs_copyfile(struct unionfs_node *unp, int docopy, struct ucred *cred, int unionfs_check_rmdir(struct vnode *vp, struct ucred *cred, struct thread *td) { - int error; - int eofflag; - int lookuperr; struct vnode *uvp; struct vnode *lvp; struct vnode *tvp; - struct vattr va; + struct dirent *dp; + struct dirent *edp; struct componentname cn; + struct iovec iov; + struct uio uio; + struct vattr va; + int error; + int eofflag; + int lookuperr; + /* * The size of buf needs to be larger than DIRBLKSIZ. */ char buf[256 * 6]; - struct dirent *dp; - struct dirent *edp; - struct uio uio; - struct iovec iov; ASSERT_VOP_ELOCKED(vp, "unionfs_check_rmdir"); @@ -1200,7 +1197,8 @@ unionfs_check_rmdir(struct vnode *vp, struct ucred *cred, struct thread *td) cn.cn_pnbuf = NULL; cn.cn_nameptr = dp->d_name; cn.cn_nameiop = LOOKUP; - cn.cn_flags = (LOCKPARENT | LOCKLEAF | SAVENAME | RDONLY | ISLASTCN); + cn.cn_flags = LOCKPARENT | LOCKLEAF | SAVENAME | + RDONLY | ISLASTCN; cn.cn_lkflags = LK_EXCLUSIVE; cn.cn_thread = td; cn.cn_cred = cred; @@ -1222,7 +1220,8 @@ unionfs_check_rmdir(struct vnode *vp, struct ucred *cred, struct thread *td) * If it has no exist/whiteout entry in upper, * directory is not empty. */ - cn.cn_flags = (LOCKPARENT | LOCKLEAF | SAVENAME | RDONLY | ISLASTCN); + cn.cn_flags = LOCKPARENT | LOCKLEAF | SAVENAME | + RDONLY | ISLASTCN; lookuperr = VOP_LOOKUP(uvp, &tvp, &cn); if (!lookuperr) diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index c17650dedc63..5096d46bea58 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -74,7 +74,6 @@ static struct vfsops unionfs_vfsops; static int unionfs_domount(struct mount *mp) { - int error; struct mount *lowermp, *uppermp; struct vnode *lowerrootvp; struct vnode *upperrootvp; @@ -83,18 +82,19 @@ unionfs_domount(struct mount *mp) char *target; char *tmp; char *ep; - int len; + struct nameidata nd, *ndp; + struct vattr va; + unionfs_copymode copymode; + unionfs_whitemode whitemode; int below; + int error; + int len; uid_t uid; gid_t gid; u_short udir; u_short ufile; - unionfs_copymode copymode; - unionfs_whitemode whitemode; - struct nameidata nd, *ndp; - struct vattr va; - UNIONFSDEBUG("unionfs_mount(mp = %p)\n", (void *)mp); + UNIONFSDEBUG("unionfs_mount(mp = %p)\n", mp); error = 0; below = 0; @@ -245,8 +245,8 @@ unionfs_domount(struct mount *mp) upperrootvp = ndp->ni_vp; /* create unionfs_mount */ - ump = (struct unionfs_mount *)malloc(sizeof(struct unionfs_mount), - M_UNIONFSMNT, M_WAITOK | M_ZERO); + ump = malloc(sizeof(struct unionfs_mount), M_UNIONFSMNT, + M_WAITOK | M_ZERO); /* * Save reference @@ -340,7 +340,7 @@ unionfs_unmount(struct mount *mp, int mntflags) int freeing; int flags; - UNIONFSDEBUG("unionfs_unmount: mp = %p\n", (void *)mp); + UNIONFSDEBUG("unionfs_unmount: mp = %p\n", mp); ump = MOUNTTOUNIONFSMOUNT(mp); flags = 0; @@ -371,7 +371,7 @@ static int unionfs_root(struct mount *mp, int flags, struct vnode **vpp) { struct unionfs_mount *ump; - struct vnode *vp; + struct vnode *vp; ump = MOUNTTOUNIONFSMOUNT(mp); vp = ump->um_rootvp; @@ -427,14 +427,14 @@ static int unionfs_statfs(struct mount *mp, struct statfs *sbp) { struct unionfs_mount *ump; - int error; struct statfs *mstat; uint64_t lbsize; + int error; ump = MOUNTTOUNIONFSMOUNT(mp); UNIONFSDEBUG("unionfs_statfs(mp = %p, lvp = %p, uvp = %p)\n", - (void *)mp, (void *)ump->um_lowervp, (void *)ump->um_uppervp); + mp, ump->um_lowervp, ump->um_uppervp); mstat = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK | M_ZERO); diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index d09b8cd50854..eb74192fd504 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -80,16 +80,16 @@ static int unionfs_lookup(struct vop_cachedlookup_args *ap) { - int iswhiteout; - int lockflag; - int error , uerror, lerror; - u_long nameiop; - u_long cnflags, cnflagsbk; struct unionfs_node *dunp; struct vnode *dvp, *udvp, *ldvp, *vp, *uvp, *lvp, *dtmpvp; struct vattr va; struct componentname *cnp; struct thread *td; + u_long nameiop; + u_long cnflags, cnflagsbk; + int iswhiteout; + int lockflag; + int error , uerror, lerror; iswhiteout = 0; lockflag = 0; @@ -105,7 +105,9 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) td = curthread; *(ap->a_vpp) = NULLVP; - UNIONFS_INTERNAL_DEBUG("unionfs_lookup: enter: nameiop=%ld, flags=%lx, path=%s\n", nameiop, cnflags, cnp->cn_nameptr); + UNIONFS_INTERNAL_DEBUG( + "unionfs_lookup: enter: nameiop=%ld, flags=%lx, path=%s\n", + nameiop, cnflags, cnp->cn_nameptr); if (dvp->v_type != VDIR) return (ENOTDIR); @@ -182,7 +184,8 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) *(ap->a_vpp) = dvp; vref(dvp); - UNIONFS_INTERNAL_DEBUG("unionfs_lookup: leave (%d)\n", uerror); + UNIONFS_INTERNAL_DEBUG( + "unionfs_lookup: leave (%d)\n", uerror); return (uerror); } @@ -200,7 +203,9 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) (va.va_flags & OPAQUE)) iswhiteout = 1; /* don't lookup lower */ #if 0 - UNIONFS_INTERNAL_DEBUG("unionfs_lookup: debug: whiteout=%d, path=%s\n", iswhiteout, cnp->cn_nameptr); + UNIONFS_INTERNAL_DEBUG( + "unionfs_lookup: debug: whiteout=%d, path=%s\n", + iswhiteout, cnp->cn_nameptr); #endif } @@ -227,7 +232,8 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) *(ap->a_vpp) = dvp; vref(dvp); - UNIONFS_INTERNAL_DEBUG("unionfs_lookup: leave (%d)\n", lerror); + UNIONFS_INTERNAL_DEBUG( + "unionfs_lookup: leave (%d)\n", lerror); return (lerror); } @@ -277,7 +283,8 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) if (lockflag != 0) VOP_UNLOCK(vp); if (error != 0) { - UNIONFSDEBUG("unionfs_lookup: Unable to create shadow dir."); + UNIONFSDEBUG( + "unionfs_lookup: Unable to create shadow dir."); if ((cnp->cn_lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE) vput(vp); else @@ -319,7 +326,8 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) error = unionfs_nodeget(dvp->v_mount, uvp, lvp, dvp, &vp, cnp, td); if (error != 0) { - UNIONFSDEBUG("unionfs_lookup: Unable to create unionfs vnode."); + UNIONFSDEBUG( + "unionfs_lookup: Unable to create unionfs vnode."); goto unionfs_lookup_out; } if ((nameiop == DELETE || nameiop == RENAME) && @@ -462,7 +470,6 @@ unionfs_mknod_abort: static int unionfs_open(struct vop_open_args *ap) { - int error; struct unionfs_node *unp; struct unionfs_node_status *unsp; struct vnode *uvp; @@ -470,6 +477,7 @@ unionfs_open(struct vop_open_args *ap) struct vnode *targetvp; struct ucred *cred; struct thread *td; + int error; UNIONFS_INTERNAL_DEBUG("unionfs_open: enter\n"); @@ -544,14 +552,14 @@ unionfs_open_abort: static int unionfs_close(struct vop_close_args *ap) { - int error; - int locked; struct unionfs_node *unp; struct unionfs_node_status *unsp; struct ucred *cred; struct thread *td; struct vnode *vp; struct vnode *ovp; + int error; + int locked; UNIONFS_INTERNAL_DEBUG("unionfs_close: enter\n"); @@ -619,9 +627,8 @@ unionfs_close_abort: * Check the access mode toward shadow file/dir. */ static int -unionfs_check_corrected_access(accmode_t accmode, - struct vattr *va, - struct ucred *cred) +unionfs_check_corrected_access(accmode_t accmode, struct vattr *va, + struct ucred *cred) { int count; uid_t uid; /* upper side vnode's uid */ @@ -723,7 +730,8 @@ unionfs_access(struct vop_access_args *ap) default: break; } - } else if (ap->a_vp->v_type == VREG || ap->a_vp->v_type == VDIR) { + } else if (ap->a_vp->v_type == VREG || + ap->a_vp->v_type == VDIR) { /* check shadow file/dir */ if (ump->um_copymode != UNIONFS_TRANSPARENT) { error = unionfs_create_uppervattr(ump, @@ -751,13 +759,13 @@ unionfs_access(struct vop_access_args *ap) static int unionfs_getattr(struct vop_getattr_args *ap) { - int error; struct unionfs_node *unp; struct unionfs_mount *ump; struct vnode *uvp; struct vnode *lvp; struct thread *td; struct vattr va; + int error; UNIONFS_INTERNAL_DEBUG("unionfs_getattr: enter\n"); @@ -771,9 +779,11 @@ unionfs_getattr(struct vop_getattr_args *ap) if (uvp != NULLVP) { if ((error = VOP_GETATTR(uvp, ap->a_vap, ap->a_cred)) == 0) - ap->a_vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0]; + ap->a_vap->va_fsid = + ap->a_vp->v_mount->mnt_stat.f_fsid.val[0]; - UNIONFS_INTERNAL_DEBUG("unionfs_getattr: leave mode=%o, uid=%d, gid=%d (%d)\n", + UNIONFS_INTERNAL_DEBUG( + "unionfs_getattr: leave mode=%o, uid=%d, gid=%d (%d)\n", ap->a_vap->va_mode, ap->a_vap->va_uid, ap->a_vap->va_gid, error); @@ -795,7 +805,8 @@ unionfs_getattr(struct vop_getattr_args *ap) if (error == 0) ap->a_vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0]; - UNIONFS_INTERNAL_DEBUG("unionfs_getattr: leave mode=%o, uid=%d, gid=%d (%d)\n", + UNIONFS_INTERNAL_DEBUG( + "unionfs_getattr: leave mode=%o, uid=%d, gid=%d (%d)\n", ap->a_vap->va_mode, ap->a_vap->va_uid, ap->a_vap->va_gid, error); return (error); @@ -804,12 +815,12 @@ unionfs_getattr(struct vop_getattr_args *ap) static int unionfs_setattr(struct vop_setattr_args *ap) { - int error; struct unionfs_node *unp; struct vnode *uvp; struct vnode *lvp; struct thread *td; struct vattr *vap; + int error; UNIONFS_INTERNAL_DEBUG("unionfs_setattr: enter\n"); @@ -847,9 +858,9 @@ unionfs_setattr(struct vop_setattr_args *ap) static int unionfs_read(struct vop_read_args *ap) { - int error; struct unionfs_node *unp; struct vnode *tvp; + int error; /* UNIONFS_INTERNAL_DEBUG("unionfs_read: enter\n"); */ @@ -868,9 +879,9 @@ unionfs_read(struct vop_read_args *ap) static int unionfs_write(struct vop_write_args *ap) { - int error; struct unionfs_node *unp; struct vnode *tvp; + int error; /* UNIONFS_INTERNAL_DEBUG("unionfs_write: enter\n"); */ @@ -889,10 +900,10 @@ unionfs_write(struct vop_write_args *ap) static int unionfs_ioctl(struct vop_ioctl_args *ap) { - int error; struct unionfs_node *unp; struct unionfs_node_status *unsp; struct vnode *ovp; + int error; UNIONFS_INTERNAL_DEBUG("unionfs_ioctl: enter\n"); @@ -921,7 +932,7 @@ unionfs_poll(struct vop_poll_args *ap) { struct unionfs_node *unp; struct unionfs_node_status *unsp; - struct vnode *ovp; + struct vnode *ovp; KASSERT_UNIONFS_VNODE(ap->a_vp); @@ -943,7 +954,7 @@ unionfs_fsync(struct vop_fsync_args *ap) { struct unionfs_node *unp; struct unionfs_node_status *unsp; - struct vnode *ovp; + struct vnode *ovp; KASSERT_UNIONFS_VNODE(ap->a_vp); @@ -1048,14 +1059,14 @@ unionfs_remove(struct vop_remove_args *ap) static int unionfs_link(struct vop_link_args *ap) { - int error; - int needrelookup; struct unionfs_node *dunp; struct unionfs_node *unp; struct vnode *udvp; struct vnode *uvp; struct componentname *cnp; struct thread *td; + int error; + int needrelookup; UNIONFS_INTERNAL_DEBUG("unionfs_link: enter\n"); @@ -1105,7 +1116,6 @@ unionfs_link(struct vop_link_args *ap) static int unionfs_rename(struct vop_rename_args *ap) { - int error; struct vnode *fdvp; struct vnode *fvp; struct componentname *fcnp; @@ -1122,9 +1132,10 @@ unionfs_rename(struct vop_rename_args *ap) struct vnode *rtdvp; struct vnode *rtvp; - int needrelookup; struct unionfs_mount *ump; struct unionfs_node *unp; + int error; + int needrelookup; UNIONFS_INTERNAL_DEBUG("unionfs_rename: enter\n"); @@ -1175,7 +1186,8 @@ unionfs_rename(struct vop_rename_args *ap) unp = VTOUNIONFS(fdvp); #ifdef UNIONFS_IDBG_RENAME - UNIONFS_INTERNAL_DEBUG("fdvp=%p, ufdvp=%p, lfdvp=%p\n", fdvp, unp->un_uppervp, unp->un_lowervp); + UNIONFS_INTERNAL_DEBUG("fdvp=%p, ufdvp=%p, lfdvp=%p\n", + fdvp, unp->un_uppervp, unp->un_lowervp); #endif if (unp->un_uppervp == NULLVP) { error = ENODEV; @@ -1186,7 +1198,8 @@ unionfs_rename(struct vop_rename_args *ap) unp = VTOUNIONFS(fvp); #ifdef UNIONFS_IDBG_RENAME - UNIONFS_INTERNAL_DEBUG("fvp=%p, ufvp=%p, lfvp=%p\n", fvp, unp->un_uppervp, unp->un_lowervp); + UNIONFS_INTERNAL_DEBUG("fvp=%p, ufvp=%p, lfvp=%p\n", + fvp, unp->un_uppervp, unp->un_lowervp); #endif ump = MOUNTTOUNIONFSMOUNT(fvp->v_mount); if (unp->un_uppervp == NULLVP) { @@ -1222,7 +1235,8 @@ unionfs_rename(struct vop_rename_args *ap) unp = VTOUNIONFS(tdvp); #ifdef UNIONFS_IDBG_RENAME - UNIONFS_INTERNAL_DEBUG("tdvp=%p, utdvp=%p, ltdvp=%p\n", tdvp, unp->un_uppervp, unp->un_lowervp); + UNIONFS_INTERNAL_DEBUG("tdvp=%p, utdvp=%p, ltdvp=%p\n", + tdvp, unp->un_uppervp, unp->un_lowervp); #endif if (unp->un_uppervp == NULLVP) { error = ENODEV; @@ -1238,7 +1252,8 @@ unionfs_rename(struct vop_rename_args *ap) } else if (tvp != NULLVP) { unp = VTOUNIONFS(tvp); #ifdef UNIONFS_IDBG_RENAME - UNIONFS_INTERNAL_DEBUG("tvp=%p, utvp=%p, ltvp=%p\n", tvp, unp->un_uppervp, unp->un_lowervp); + UNIONFS_INTERNAL_DEBUG("tvp=%p, utvp=%p, ltvp=%p\n", + tvp, unp->un_uppervp, unp->un_lowervp); #endif if (unp->un_uppervp == NULLVP) rtvp = NULLVP; @@ -1331,14 +1346,14 @@ unionfs_rename_abort: static int unionfs_mkdir(struct vop_mkdir_args *ap) { - int error; - int lkflags; struct unionfs_node *dunp; struct componentname *cnp; struct thread *td; struct vnode *udvp; struct vnode *uvp; struct vattr va; + int error; + int lkflags; UNIONFS_INTERNAL_DEBUG("unionfs_mkdir: enter\n"); @@ -1379,7 +1394,6 @@ unionfs_mkdir(struct vop_mkdir_args *ap) static int unionfs_rmdir(struct vop_rmdir_args *ap) { - int error; struct unionfs_node *dunp; struct unionfs_node *unp; struct unionfs_mount *ump; @@ -1388,6 +1402,7 @@ unionfs_rmdir(struct vop_rmdir_args *ap) struct vnode *udvp; struct vnode *uvp; struct vnode *lvp; + int error; UNIONFS_INTERNAL_DEBUG("unionfs_rmdir: enter\n"); @@ -1439,13 +1454,13 @@ unionfs_rmdir(struct vop_rmdir_args *ap) static int unionfs_symlink(struct vop_symlink_args *ap) { - int error; - int lkflags; struct unionfs_node *dunp; struct componentname *cnp; struct thread *td; struct vnode *udvp; struct vnode *uvp; + int error; + int lkflags; UNIONFS_INTERNAL_DEBUG("unionfs_symlink: enter\n"); @@ -1478,10 +1493,6 @@ unionfs_symlink(struct vop_symlink_args *ap) static int unionfs_readdir(struct vop_readdir_args *ap) { - int error; - int eofflag; - int locked; - int uio_offset_bk; struct unionfs_node *unp; struct unionfs_node_status *unsp; struct uio *uio; @@ -1491,8 +1502,12 @@ unionfs_readdir(struct vop_readdir_args *ap) struct thread *td; struct vattr va; - int ncookies_bk; u_long *cookies_bk; + int error; + int eofflag; + int locked; + int ncookies_bk; + int uio_offset_bk; UNIONFS_INTERNAL_DEBUG("unionfs_readdir: enter\n"); @@ -1647,7 +1662,8 @@ unionfs_readdir(struct vop_readdir_args *ap) memcpy(pos, cookies_bk, ncookies_bk * sizeof(u_long)); pos += ncookies_bk; - memcpy(pos, *(ap->a_cookies), *(ap->a_ncookies) * sizeof(u_long)); + memcpy(pos, *(ap->a_cookies), + *(ap->a_ncookies) * sizeof(u_long)); free(cookies_bk, M_TEMP); free(*(ap->a_cookies), M_TEMP); *(ap->a_ncookies) = size; @@ -1666,9 +1682,9 @@ unionfs_readdir_exit: static int unionfs_readlink(struct vop_readlink_args *ap) { - int error; struct unionfs_node *unp; struct vnode *vp; + int error; UNIONFS_INTERNAL_DEBUG("unionfs_readlink: enter\n"); @@ -1687,9 +1703,9 @@ unionfs_readlink(struct vop_readlink_args *ap) static int unionfs_getwritemount(struct vop_getwritemount_args *ap) { - int error; struct vnode *uvp; struct vnode *vp; *** 209 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Sep 1 16:13:48 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7E36A66D7F5; Wed, 1 Sep 2021 16:13: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 4H08Hw2Sjmz3HX4; Wed, 1 Sep 2021 16:13: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 3C8C438E; Wed, 1 Sep 2021 16:13: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 181GDm0x073469; Wed, 1 Sep 2021 16:13:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181GDm6H073468; Wed, 1 Sep 2021 16:13:48 GMT (envelope-from git) Date: Wed, 1 Sep 2021 16:13:48 GMT Message-Id: <202109011613.181GDm6H073468@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: d491b42535db - main - 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/main X-Git-Reftype: branch X-Git-Commit: d491b42535db50693eac5946557f7527f9903b4b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 16:13:48 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d491b42535db50693eac5946557f7527f9903b4b commit d491b42535db50693eac5946557f7527f9903b4b Author: Kristof Provost AuthorDate: 2021-09-01 14:09:14 +0000 Commit: Kristof Provost CommitDate: 2021-09-01 14:13:11 +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") --- 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-all@freebsd.org Wed Sep 1 18:43:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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 CB3AC66F8C1; Wed, 1 Sep 2021 18:43: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 4H0CdC58rQz4l8Z; Wed, 1 Sep 2021 18:43: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 8E3172504; Wed, 1 Sep 2021 18:43: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 181IhxWH072769; Wed, 1 Sep 2021 18:43:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181Ihx8e072768; Wed, 1 Sep 2021 18:43:59 GMT (envelope-from git) Date: Wed, 1 Sep 2021 18:43:59 GMT Message-Id: <202109011843.181Ihx8e072768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c511383de7a0 - main - kevent: Fix races between timer detach and kqtimer_proc_continue() 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/main X-Git-Reftype: branch X-Git-Commit: c511383de7a0325a80b9c5d2b8678b438db146dc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 18:43:59 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c511383de7a0325a80b9c5d2b8678b438db146dc commit c511383de7a0325a80b9c5d2b8678b438db146dc Author: Mark Johnston AuthorDate: 2021-09-01 18:18:58 +0000 Commit: Mark Johnston CommitDate: 2021-09-01 18:18:58 +0000 kevent: Fix races between timer detach and kqtimer_proc_continue() - When detaching a knote, we need to double check the enqueued flag after acquiring the process lock, as kqtimer_proc_continue() may have toggled it. - kqtimer_proc_continue() could in principle reschedule a stopped callout after filt_timerdetach() drains the callout. So, we need to re-check. Reported by: syzbot+4a4cebb3ec07892cb040@syzkaller.appspotmail.com Reported by: syzbot+a9c04bc76078a3b7dd8d@syzkaller.appspotmail.com Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31772 --- sys/kern/kern_event.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 63b28cd6024f..859248569f76 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -859,14 +859,24 @@ filt_timerdetach(struct knote *kn) { struct kq_timer_cb_data *kc; unsigned int old __unused; + bool pending; kc = kn->kn_ptr.p_v; - callout_drain(&kc->c); - if ((kc->flags & KQ_TIMER_CB_ENQUEUED) != 0) { + do { + callout_drain(&kc->c); + + /* + * kqtimer_proc_continue() might have rescheduled this callout. + * Double-check, using the process mutex as an interlock. + */ PROC_LOCK(kc->p); - TAILQ_REMOVE(&kc->p->p_kqtim_stop, kc, link); + if ((kc->flags & KQ_TIMER_CB_ENQUEUED) != 0) { + kc->flags &= ~KQ_TIMER_CB_ENQUEUED; + TAILQ_REMOVE(&kc->p->p_kqtim_stop, kc, link); + } + pending = callout_pending(&kc->c); PROC_UNLOCK(kc->p); - } + } while (pending); free(kc, M_KQUEUE); old = atomic_fetchadd_int(&kq_ncallouts, -1); KASSERT(old > 0, ("Number of callouts cannot become negative")); From owner-dev-commits-src-all@freebsd.org Wed Sep 1 19:53:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A4457670754; Wed, 1 Sep 2021 19:53: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 4H0F9t44zYz3LPM; Wed, 1 Sep 2021 19:53: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 74D6632BA; Wed, 1 Sep 2021 19:53: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 181Jrs0S066565; Wed, 1 Sep 2021 19:53:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181Jrs6S066564; Wed, 1 Sep 2021 19:53:54 GMT (envelope-from git) Date: Wed, 1 Sep 2021 19:53:54 GMT Message-Id: <202109011953.181Jrs6S066564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 27ceebbc2402 - main - openssh: simplify login class restrictions 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/main X-Git-Reftype: branch X-Git-Commit: 27ceebbc2402e4c98203c7eef9696f4bd3d326f8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 19:53:54 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=27ceebbc2402e4c98203c7eef9696f4bd3d326f8 commit 27ceebbc2402e4c98203c7eef9696f4bd3d326f8 Author: Ed Maste AuthorDate: 2021-08-31 19:30:50 +0000 Commit: Ed Maste CommitDate: 2021-09-01 19:53:09 +0000 openssh: simplify login class restrictions Login class-based restrictions were introduced in 5b400a39b8ad. The code was adapted for sshd's Capsicum sandbox and received many changes over time, including at least fc3c19a9fcee, bd393de91cc3, and e8c56fba2926. During an attempt to upstream the work a much simpler approach was suggested. Adopt it now in the in-tree OpenSSH to reduce conflicts with future updates. Submitted by: Yuchiro Naito (against OpenSSH-portable on GitHub) Obtained from: https://github.com/openssh/openssh-portable/pull/262 Reviewed by: allanjude, kevans MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D31760 --- crypto/openssh/auth.c | 18 +++++++ crypto/openssh/auth2.c | 19 ------- crypto/openssh/config.h | 6 +++ crypto/openssh/configure.ac | 2 + crypto/openssh/monitor.c | 61 +++++---------------- crypto/openssh/monitor.h | 3 +- crypto/openssh/monitor_wrap.c | 77 +++++++-------------------- crypto/openssh/monitor_wrap.h | 4 -- crypto/openssh/ssh_namespace.h | 3 -- crypto/openssh/sshbuf-getput-basic.c | 100 ----------------------------------- crypto/openssh/sshbuf.h | 15 ------ 11 files changed, 58 insertions(+), 250 deletions(-) diff --git a/crypto/openssh/auth.c b/crypto/openssh/auth.c index 83be3cb5cbb5..a2e1fa10ce45 100644 --- a/crypto/openssh/auth.c +++ b/crypto/openssh/auth.c @@ -568,6 +568,9 @@ getpwnamallow(const char *user) struct ssh *ssh = active_state; /* XXX */ #ifdef HAVE_LOGIN_CAP extern login_cap_t *lc; +#ifdef HAVE_AUTH_HOSTOK + const char *from_host, *from_ip; +#endif #ifdef BSD_AUTH auth_session_t *as; #endif @@ -622,6 +625,21 @@ getpwnamallow(const char *user) debug("unable to get login class: %s", user); return (NULL); } +#ifdef HAVE_AUTH_HOSTOK + from_host = auth_get_canonical_hostname(ssh, options.use_dns); + from_ip = ssh_remote_ipaddr(ssh); + if (!auth_hostok(lc, from_host, from_ip)) { + debug("Denied connection for %.200s from %.200s [%.200s].", + pw->pw_name, from_host, from_ip); + return (NULL); + } +#endif /* HAVE_AUTH_HOSTOK */ +#ifdef HAVE_AUTH_TIMEOK + if (!auth_timeok(lc, time(NULL))) { + debug("LOGIN %.200s REFUSED (TIME)", pw->pw_name); + return (NULL); + } +#endif /* HAVE_AUTH_TIMEOK */ #ifdef BSD_AUTH if ((as = auth_open()) == NULL || auth_setpwd(as, pw) != 0 || auth_approval(as, lc, pw->pw_name, "ssh") <= 0) { diff --git a/crypto/openssh/auth2.c b/crypto/openssh/auth2.c index 612cc3f8f2f3..af6fdae97193 100644 --- a/crypto/openssh/auth2.c +++ b/crypto/openssh/auth2.c @@ -314,25 +314,6 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh) authctxt->user, authctxt->service, user, service); } -#ifdef HAVE_LOGIN_CAP - if (authctxt->pw != NULL && - (lc = PRIVSEP(login_getpwclass(authctxt->pw))) != NULL) { - from_host = auth_get_canonical_hostname(ssh, options.use_dns); - from_ip = ssh_remote_ipaddr(ssh); - if (!auth_hostok(lc, from_host, from_ip)) { - logit("Denied connection for %.200s from %.200s [%.200s].", - authctxt->pw->pw_name, from_host, from_ip); - packet_disconnect("Sorry, you are not allowed to connect."); - } - if (!auth_timeok(lc, time(NULL))) { - logit("LOGIN %.200s REFUSED (TIME) FROM %.200s", - authctxt->pw->pw_name, from_host); - packet_disconnect("Logins not available right now."); - } - PRIVSEP(login_close(lc)); - } -#endif /* HAVE_LOGIN_CAP */ - /* reset state */ auth2_challenge_stop(ssh); diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h index 17d7e53666e9..dbdad4faaca1 100644 --- a/crypto/openssh/config.h +++ b/crypto/openssh/config.h @@ -211,6 +211,12 @@ /* Define to 1 if you have the `aug_get_machine' function. */ /* #undef HAVE_AUG_GET_MACHINE */ +/* Define to 1 if you have the `auth_hostok' function. */ +#define HAVE_AUTH_HOSTOK 1 + +/* Define to 1 if you have the `auth_timeok' function. */ +#define HAVE_AUTH_TIMEOK 1 + /* Define to 1 if you have the `b64_ntop' function. */ /* #undef HAVE_B64_NTOP */ diff --git a/crypto/openssh/configure.ac b/crypto/openssh/configure.ac index 60c170285979..538f389c6da3 100644 --- a/crypto/openssh/configure.ac +++ b/crypto/openssh/configure.ac @@ -1751,6 +1751,8 @@ fi dnl Checks for library functions. Please keep in alphabetical order AC_CHECK_FUNCS([ \ + auth_hostok \ + auth_timeok \ Blowfish_initstate \ Blowfish_expandstate \ Blowfish_expand0state \ diff --git a/crypto/openssh/monitor.c b/crypto/openssh/monitor.c index c5e3708c2563..531b2993ab6b 100644 --- a/crypto/openssh/monitor.c +++ b/crypto/openssh/monitor.c @@ -114,9 +114,6 @@ static struct sshbuf *child_state; int mm_answer_moduli(int, struct sshbuf *); int mm_answer_sign(int, struct sshbuf *); -#ifdef HAVE_LOGIN_CAP -int mm_answer_login_getpwclass(int, struct sshbuf *); -#endif int mm_answer_pwnamallow(int, struct sshbuf *); int mm_answer_auth2_read_banner(int, struct sshbuf *); int mm_answer_authserv(int, struct sshbuf *); @@ -192,9 +189,6 @@ struct mon_table mon_dispatch_proto20[] = { {MONITOR_REQ_MODULI, MON_ONCE, mm_answer_moduli}, #endif {MONITOR_REQ_SIGN, MON_ONCE, mm_answer_sign}, -#ifdef HAVE_LOGIN_CAP - {MONITOR_REQ_GETPWCLASS, MON_ISAUTH, mm_answer_login_getpwclass}, -#endif {MONITOR_REQ_PWNAM, MON_ONCE, mm_answer_pwnamallow}, {MONITOR_REQ_AUTHSERV, MON_ONCE, mm_answer_authserv}, {MONITOR_REQ_AUTH2_READ_BANNER, MON_ONCE, mm_answer_auth2_read_banner}, @@ -713,48 +707,6 @@ mm_answer_sign(int sock, struct sshbuf *m) return (0); } -#ifdef HAVE_LOGIN_CAP -int -mm_answer_login_getpwclass(int sock, struct sshbuf *m) -{ - login_cap_t *lc; - struct passwd *pw; - int r; - u_int len; - - debug3("%s", __func__); - - pw = sshbuf_get_passwd(m); - if (pw == NULL) - fatal("%s: receive get struct passwd failed", __func__); - - lc = login_getpwclass(pw); - - sshbuf_reset(m); - - if (lc == NULL) { - if (r = sshbuf_put_u8(m, 0) != 0) - fatal("%s: buffer error: %s", __func__, ssh_err(r)); - goto out; - } - - if ((r = sshbuf_put_u8(m, 1)) != 0 || - (r = sshbuf_put_cstring(m, lc->lc_class)) != 0 || - (r = sshbuf_put_cstring(m, lc->lc_cap)) != 0 || - (r = sshbuf_put_cstring(m, lc->lc_style)) != 0) - fatal("%s: buffer error: %s", __func__, ssh_err(r)); - - login_close(lc); - out: - debug3("%s: sending MONITOR_ANS_GETPWCLASS", __func__); - mm_request_send(sock, MONITOR_ANS_GETPWCLASS, m); - - sshbuf_free_passwd(pw); - - return (0); -} -#endif - /* Retrieves the password entry and also checks if the user is permitted */ int @@ -793,8 +745,19 @@ mm_answer_pwnamallow(int sock, struct sshbuf *m) authctxt->pw = pwent; authctxt->valid = 1; + /* XXX don't sent pwent to unpriv; send fake class/dir/shell too */ if ((r = sshbuf_put_u8(m, 1)) != 0 || - (r = sshbuf_put_passwd(m, pwent)) != 0) + (r = sshbuf_put_string(m, pwent, sizeof(*pwent))) != 0 || + (r = sshbuf_put_cstring(m, pwent->pw_name)) != 0 || + (r = sshbuf_put_cstring(m, "*")) != 0 || +#ifdef HAVE_STRUCT_PASSWD_PW_GECOS + (r = sshbuf_put_cstring(m, pwent->pw_gecos)) != 0 || +#endif +#ifdef HAVE_STRUCT_PASSWD_PW_CLASS + (r = sshbuf_put_cstring(m, pwent->pw_class)) != 0 || +#endif + (r = sshbuf_put_cstring(m, pwent->pw_dir)) != 0 || + (r = sshbuf_put_cstring(m, pwent->pw_shell)) != 0) fatal("%s: buffer error: %s", __func__, ssh_err(r)); out: diff --git a/crypto/openssh/monitor.h b/crypto/openssh/monitor.h index abf2ca4018b4..16047299f882 100644 --- a/crypto/openssh/monitor.h +++ b/crypto/openssh/monitor.h @@ -53,8 +53,7 @@ enum monitor_reqtype { MONITOR_REQ_GSSSTEP = 44, MONITOR_ANS_GSSSTEP = 45, MONITOR_REQ_GSSUSEROK = 46, MONITOR_ANS_GSSUSEROK = 47, MONITOR_REQ_GSSCHECKMIC = 48, MONITOR_ANS_GSSCHECKMIC = 49, - MONITOR_REQ_GETPWCLASS = 50, MONITOR_ANS_GETPWCLASS = 51, - MONITOR_REQ_TERM = 52, + MONITOR_REQ_TERM = 50, MONITOR_REQ_PAM_START = 100, MONITOR_REQ_PAM_ACCOUNT = 102, MONITOR_ANS_PAM_ACCOUNT = 103, diff --git a/crypto/openssh/monitor_wrap.c b/crypto/openssh/monitor_wrap.c index bb458f131483..732fb3476bf0 100644 --- a/crypto/openssh/monitor_wrap.c +++ b/crypto/openssh/monitor_wrap.c @@ -247,61 +247,6 @@ mm_sshkey_sign(struct sshkey *key, u_char **sigp, size_t *lenp, return (0); } -#ifdef HAVE_LOGIN_CAP -login_cap_t * -mm_login_getpwclass(const struct passwd *pwent) -{ - int r; - struct sshbuf *m; - char rc; - login_cap_t *lc; - - debug3("%s entering", __func__); - - if ((m = sshbuf_new()) == NULL) - fatal("%s: sshbuf_new failed", __func__); - if ((r = sshbuf_put_passwd(m, pwent)) != 0) - fatal("%s: buffer error: %s", __func__, ssh_err(r)); - - mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GETPWCLASS, m); - - debug3("%s: waiting for MONITOR_ANS_GETPWCLASS", __func__); - mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GETPWCLASS, m); - - if ((r = sshbuf_get_u8(m, &rc)) != 0) - fatal("%s: buffer error: %s", __func__, ssh_err(r)); - - if (rc == 0) { - lc = NULL; - goto out; - } - - lc = xmalloc(sizeof(*lc)); - if ((r = sshbuf_get_cstring(m, &lc->lc_class, NULL)) != 0 || - (r = sshbuf_get_cstring(m, &lc->lc_cap, NULL)) != 0 || - (r = sshbuf_get_cstring(m, &lc->lc_style, NULL)) != 0) - fatal("%s: buffer error: %s", __func__, ssh_err(r)); - - out: - sshbuf_free(m); - - return (lc); -} -#endif - -#ifdef HAVE_LOGIN_CAP -void -mm_login_close(login_cap_t *lc) -{ - if (lc == NULL) - return; - free(lc->lc_style); - free(lc->lc_class); - free(lc->lc_cap); - free(lc); -} -#endif - struct passwd * mm_getpwnamallow(const char *username) { @@ -334,9 +279,25 @@ mm_getpwnamallow(const char *username) goto out; } - pw = sshbuf_get_passwd(m); - if (pw == NULL) - fatal("%s: receive get struct passwd failed", __func__); + /* XXX don't like passing struct passwd like this */ + pw = xcalloc(sizeof(*pw), 1); + if ((r = sshbuf_get_string_direct(m, &p, &len)) != 0) + fatal("%s: buffer error: %s", __func__, ssh_err(r)); + if (len != sizeof(*pw)) + fatal("%s: struct passwd size mismatch", __func__); + memcpy(pw, p, sizeof(*pw)); + + if ((r = sshbuf_get_cstring(m, &pw->pw_name, NULL)) != 0 || + (r = sshbuf_get_cstring(m, &pw->pw_passwd, NULL)) != 0 || +#ifdef HAVE_STRUCT_PASSWD_PW_GECOS + (r = sshbuf_get_cstring(m, &pw->pw_gecos, NULL)) != 0 || +#endif +#ifdef HAVE_STRUCT_PASSWD_PW_CLASS + (r = sshbuf_get_cstring(m, &pw->pw_class, NULL)) != 0 || +#endif + (r = sshbuf_get_cstring(m, &pw->pw_dir, NULL)) != 0 || + (r = sshbuf_get_cstring(m, &pw->pw_shell, NULL)) != 0) + fatal("%s: buffer error: %s", __func__, ssh_err(r)); out: /* copy options block as a Match directive may have changed some */ diff --git a/crypto/openssh/monitor_wrap.h b/crypto/openssh/monitor_wrap.h index 5b5dea1ed828..644da081db8d 100644 --- a/crypto/openssh/monitor_wrap.h +++ b/crypto/openssh/monitor_wrap.h @@ -44,10 +44,6 @@ DH *mm_choose_dh(int, int, int); int mm_sshkey_sign(struct sshkey *, u_char **, size_t *, const u_char *, size_t, const char *, u_int compat); void mm_inform_authserv(char *, char *); -#ifdef HAVE_LOGIN_CAP -struct login_cap *mm_login_getpwclass(const struct passwd *pwd); -void mm_login_close(struct login_cap *lc); -#endif struct passwd *mm_getpwnamallow(const char *); char *mm_auth2_read_banner(void); int mm_auth_password(struct ssh *, char *); diff --git a/crypto/openssh/ssh_namespace.h b/crypto/openssh/ssh_namespace.h index f6a100622de8..57b7bb3e375c 100644 --- a/crypto/openssh/ssh_namespace.h +++ b/crypto/openssh/ssh_namespace.h @@ -657,7 +657,6 @@ #define sshbuf_dump_data Fssh_sshbuf_dump_data #define sshbuf_dup_string Fssh_sshbuf_dup_string #define sshbuf_free Fssh_sshbuf_free -#define sshbuf_free_passwd Fssh_sshbuf_free_passwd #define sshbuf_from Fssh_sshbuf_from #define sshbuf_fromb Fssh_sshbuf_fromb #define sshbuf_froms Fssh_sshbuf_froms @@ -668,7 +667,6 @@ #define sshbuf_get_cstring Fssh_sshbuf_get_cstring #define sshbuf_get_ec Fssh_sshbuf_get_ec #define sshbuf_get_eckey Fssh_sshbuf_get_eckey -#define sshbuf_get_passwd Fssh_sshbuf_get_passwd #define sshbuf_get_string Fssh_sshbuf_get_string #define sshbuf_get_string_direct Fssh_sshbuf_get_string_direct #define sshbuf_get_stringb Fssh_sshbuf_get_stringb @@ -690,7 +688,6 @@ #define sshbuf_put_cstring Fssh_sshbuf_put_cstring #define sshbuf_put_ec Fssh_sshbuf_put_ec #define sshbuf_put_eckey Fssh_sshbuf_put_eckey -#define sshbuf_put_passwd Fssh_sshbuf_put_passwd #define sshbuf_put_string Fssh_sshbuf_put_string #define sshbuf_put_stringb Fssh_sshbuf_put_stringb #define sshbuf_put_u16 Fssh_sshbuf_put_u16 diff --git a/crypto/openssh/sshbuf-getput-basic.c b/crypto/openssh/sshbuf-getput-basic.c index 70ee303a23e4..9092a7eebf97 100644 --- a/crypto/openssh/sshbuf-getput-basic.c +++ b/crypto/openssh/sshbuf-getput-basic.c @@ -463,103 +463,3 @@ sshbuf_get_bignum2_bytes_direct(struct sshbuf *buf, } return 0; } - -/* - * store struct pwd - */ -int -sshbuf_put_passwd(struct sshbuf *buf, const struct passwd *pwent) -{ - int r; - - /* - * We never send pointer values of struct passwd. - * It is safe from wild pointer even if a new pointer member is added. - */ - - if ((r = sshbuf_put_u64(buf, sizeof(*pwent)) != 0) || - (r = sshbuf_put_cstring(buf, pwent->pw_name)) != 0 || - (r = sshbuf_put_cstring(buf, "*")) != 0 || - (r = sshbuf_put_u32(buf, pwent->pw_uid)) != 0 || - (r = sshbuf_put_u32(buf, pwent->pw_gid)) != 0 || -#ifdef HAVE_STRUCT_PASSWD_PW_CHANGE - (r = sshbuf_put_time(buf, pwent->pw_change)) != 0 || -#endif -#ifdef HAVE_STRUCT_PASSWD_PW_GECOS - (r = sshbuf_put_cstring(buf, pwent->pw_gecos)) != 0 || -#endif -#ifdef HAVE_STRUCT_PASSWD_PW_CLASS - (r = sshbuf_put_cstring(buf, pwent->pw_class)) != 0 || -#endif - (r = sshbuf_put_cstring(buf, pwent->pw_dir)) != 0 || - (r = sshbuf_put_cstring(buf, pwent->pw_shell)) != 0 || -#ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE - (r = sshbuf_put_time(buf, pwent->pw_expire)) != 0 || -#endif - (r = sshbuf_put_u32(buf, pwent->pw_fields)) != 0) { - return r; - } - return 0; -} - -/* - * extract struct pwd - */ -struct passwd * -sshbuf_get_passwd(struct sshbuf *buf) -{ - struct passwd *pw; - u_int64_t len; - int r; - - /* check if size of struct passwd is as same as sender's size */ - r = sshbuf_get_u64(buf, &len); - if (r != 0 || len != sizeof(*pw)) - return NULL; - - pw = xcalloc(1, sizeof(*pw)); - if (sshbuf_get_cstring(buf, &pw->pw_name, NULL) != 0 || - sshbuf_get_cstring(buf, &pw->pw_passwd, NULL) != 0 || - sshbuf_get_u32(buf, &pw->pw_uid) != 0 || - sshbuf_get_u32(buf, &pw->pw_gid) != 0 || -#ifdef HAVE_STRUCT_PASSWD_PW_CHANGE - sshbuf_get_time(buf, &pw->pw_change) != 0 || -#endif -#ifdef HAVE_STRUCT_PASSWD_PW_GECOS - sshbuf_get_cstring(buf, &pw->pw_gecos, NULL) != 0 || -#endif -#ifdef HAVE_STRUCT_PASSWD_PW_CLASS - sshbuf_get_cstring(buf, &pw->pw_class, NULL) != 0 || -#endif - sshbuf_get_cstring(buf, &pw->pw_dir, NULL) != 0 || - sshbuf_get_cstring(buf, &pw->pw_shell, NULL) != 0 || -#ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE - sshbuf_get_time(buf, &pw->pw_expire) != 0 || -#endif - sshbuf_get_u32(buf, &pw->pw_fields) != 0) { - sshbuf_free_passwd(pw); - return NULL; - } - return pw; -} - -/* - * free struct passwd obtained from sshbuf_get_passwd. - */ -void -sshbuf_free_passwd(struct passwd *pwent) -{ - if (pwent == NULL) - return; - free(pwent->pw_shell); - free(pwent->pw_dir); -#ifdef HAVE_STRUCT_PASSWD_PW_CLASS - free(pwent->pw_class); -#endif -#ifdef HAVE_STRUCT_PASSWD_PW_GECOS - free(pwent->pw_gecos); -#endif - free(pwent->pw_passwd); - free(pwent->pw_name); - free(pwent); -} diff --git a/crypto/openssh/sshbuf.h b/crypto/openssh/sshbuf.h index aba18d2aa922..87aa1560eabe 100644 --- a/crypto/openssh/sshbuf.h +++ b/crypto/openssh/sshbuf.h @@ -254,21 +254,6 @@ int sshbuf_b64tod(struct sshbuf *buf, const char *b64); */ char *sshbuf_dup_string(struct sshbuf *buf); -/* - * store struct pwd - */ -int sshbuf_put_passwd(struct sshbuf *buf, const struct passwd *pwent); - -/* - * extract struct pwd - */ -struct passwd *sshbuf_get_passwd(struct sshbuf *buf); - -/* - * free struct passwd obtained from sshbuf_get_passwd. - */ -void sshbuf_free_passwd(struct passwd *pwent); - /* Macros for decoding/encoding integers */ #define PEEK_U64(p) \ (((u_int64_t)(((const u_char *)(p))[0]) << 56) | \ From owner-dev-commits-src-all@freebsd.org Wed Sep 1 20:10:38 2021 Return-Path: Delivered-To: dev-commits-src-all@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 139EA670E92; Wed, 1 Sep 2021 20:10: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 4H0FYB01cBz3PsX; Wed, 1 Sep 2021 20:10: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 DD29D30FC; Wed, 1 Sep 2021 20:10: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 181KAbh7090556; Wed, 1 Sep 2021 20:10:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181KAbYf090555; Wed, 1 Sep 2021 20:10:37 GMT (envelope-from git) Date: Wed, 1 Sep 2021 20:10:37 GMT Message-Id: <202109012010.181KAbYf090555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f3fd88507489 - main - openssh: update note about class-based login restrictions 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/main X-Git-Reftype: branch X-Git-Commit: f3fd88507489f6b80402ab7a0fb195ca9c708334 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 20:10:38 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f3fd88507489f6b80402ab7a0fb195ca9c708334 commit f3fd88507489f6b80402ab7a0fb195ca9c708334 Author: Ed Maste AuthorDate: 2021-09-01 20:09:56 +0000 Commit: Ed Maste CommitDate: 2021-09-01 20:09:56 +0000 openssh: update note about class-based login restrictions --- crypto/openssh/FREEBSD-upgrade | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/crypto/openssh/FREEBSD-upgrade b/crypto/openssh/FREEBSD-upgrade index dc3c963f9158..f064583af495 100644 --- a/crypto/openssh/FREEBSD-upgrade +++ b/crypto/openssh/FREEBSD-upgrade @@ -176,15 +176,12 @@ counting; the agent will automatically exit when the last client disconnects. -7) Class-based login restrictions +7) Class-based login restrictions (27ceebbc2402) - We've added code to auth2.c to enforce the host.allow, host.deny, - times.allow and times.deny login class capabilities. - - This change was introduced in 5b400a39b8ad and been reworked a few - times (35762f591338, 076ad2f836d5, fc3c19a9fcee, 8d8b29232156). - A simplified version has been submitted as an OpenSSH-portable pull - request in https://github.com/openssh/openssh-portable/pull/262. + We've added code to auth.c to enforce the host.allow, host.deny, + times.allow and times.deny login class capabilities, based on an + upstream submission from + https://github.com/openssh/openssh-portable/pull/262. 8) HPN From owner-dev-commits-src-all@freebsd.org Wed Sep 1 20:12:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 72BA6670F27; Wed, 1 Sep 2021 20:12: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 4H0Fbs2rZkz3Qh2; Wed, 1 Sep 2021 20:12: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 4ABA434F1; Wed, 1 Sep 2021 20:12: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 181KCvQN093946; Wed, 1 Sep 2021 20:12:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181KCvLZ093945; Wed, 1 Sep 2021 20:12:57 GMT (envelope-from git) Date: Wed, 1 Sep 2021 20:12:57 GMT Message-Id: <202109012012.181KCvLZ093945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: c62aa65b2a7a - main - ppbus: Set the lock for pps interface, update to latest api MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c62aa65b2a7a6492e712a69c58a35347aa441a98 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 20:12:57 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c62aa65b2a7a6492e712a69c58a35347aa441a98 commit c62aa65b2a7a6492e712a69c58a35347aa441a98 Author: Warner Losh AuthorDate: 2021-09-01 19:37:27 +0000 Commit: Warner Losh CommitDate: 2021-09-01 20:12:53 +0000 ppbus: Set the lock for pps interface, update to latest api Since we take a lock when we enter the ioctl, we need to set driver_mtx in the pps structure so it can be dropped while sleeping during a call to timepps_fetch() with a non-zero timeout (PPS_CANWAIT feature). MFC After: 5 days Sponsored by: Netflix Reviewed by: ian Differential Revision: https://reviews.freebsd.org/D31763 --- sys/dev/ppbus/ppb_base.c | 8 ++++++++ sys/dev/ppbus/ppbconf.h | 1 + sys/dev/ppbus/pps.c | 8 ++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/sys/dev/ppbus/ppb_base.c b/sys/dev/ppbus/ppb_base.c index 20782385acc0..b399f4cc2d17 100644 --- a/sys/dev/ppbus/ppb_base.c +++ b/sys/dev/ppbus/ppb_base.c @@ -220,6 +220,14 @@ ppb_unlock(device_t bus) mtx_unlock(ppb->ppc_lock); } +struct mtx * +ppb_get_lock(device_t bus) +{ + struct ppb_data *ppb = DEVTOSOFTC(bus); + + return (ppb->ppc_lock); +} + void _ppb_assert_locked(device_t bus, const char *file, int line) { diff --git a/sys/dev/ppbus/ppbconf.h b/sys/dev/ppbus/ppbconf.h index 6a90f5729971..723db73412f8 100644 --- a/sys/dev/ppbus/ppbconf.h +++ b/sys/dev/ppbus/ppbconf.h @@ -259,6 +259,7 @@ extern int ppb_release_bus(device_t, device_t); /* bus related functions */ extern void ppb_lock(device_t); extern void ppb_unlock(device_t); +extern struct mtx *ppb_get_lock(device_t); extern void _ppb_assert_locked(device_t, const char *, int); extern void ppb_init_callout(device_t, struct callout *, int); extern int ppb_sleep(device_t, void *, int, const char *, int); diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c index cf0c1a1c2f07..897ae1b78bd7 100644 --- a/sys/dev/ppbus/pps.c +++ b/sys/dev/ppbus/pps.c @@ -141,9 +141,11 @@ ppsattach(device_t dev) UID_ROOT, GID_WHEEL, 0600, PPS_NAME "%d", unit); sc->devs[0] = d; sc->pps[0].ppscap = PPS_CAPTUREASSERT | PPS_ECHOASSERT; + sc->pps[0].driver_abi = PPS_ABI_VERSION; + sc->pps[0].driver_mtx = ppb_get_lock(ppbus); d->si_drv1 = sc; d->si_drv2 = (void*)0; - pps_init(&sc->pps[0]); + pps_init_abi(&sc->pps[0]); ppb_lock(ppbus); if (ppb_request_bus(ppbus, dev, PPB_DONTWAIT)) { @@ -193,9 +195,11 @@ ppsattach(device_t dev) UID_ROOT, GID_WHEEL, 0600, PPS_NAME "%db%d", unit, i - 1); sc->devs[i] = d; sc->pps[i].ppscap = PPS_CAPTUREASSERT | PPS_CAPTURECLEAR; + sc->pps[i].driver_abi = PPS_ABI_VERSION; + sc->pps[i].driver_mtx = ppb_get_lock(ppbus); d->si_drv1 = sc; d->si_drv2 = (void *)(intptr_t)i; - pps_init(&sc->pps[i]); + pps_init_abi(&sc->pps[i]); } ppb_lock(ppbus); } while (0); From owner-dev-commits-src-all@freebsd.org Wed Sep 1 20:13:39 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D6C6C670EC3; Wed, 1 Sep 2021 20:13: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 4H0Fcg5gmTz3RGJ; Wed, 1 Sep 2021 20:13:39 +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 AB25E39B8; Wed, 1 Sep 2021 20:13:39 +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 181KDdwW094104; Wed, 1 Sep 2021 20:13:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181KDdH2094103; Wed, 1 Sep 2021 20:13:39 GMT (envelope-from git) Date: Wed, 1 Sep 2021 20:13:39 GMT Message-Id: <202109012013.181KDdH2094103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 5647f85ade3a - main - 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/main X-Git-Reftype: branch X-Git-Commit: 5647f85ade3ae1db042560a3354b6a9945d619a4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 20:13:39 -0000 The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5647f85ade3ae1db042560a3354b6a9945d619a4 commit 5647f85ade3ae1db042560a3354b6a9945d619a4 Author: Kevin Bowling AuthorDate: 2021-09-01 20:06:27 +0000 Commit: Kevin Bowling CommitDate: 2021-09-01 20:13:27 +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 --- 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-all@freebsd.org Wed Sep 1 20:57:33 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 20:57:34 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Wed Sep 1 20:59:48 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9C638671CC5; Wed, 1 Sep 2021 20:59: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 4H0Gdw41XVz3t9G; Wed, 1 Sep 2021 20:59: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 6E0413FBE; Wed, 1 Sep 2021 20:59: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 181KxmY8047558; Wed, 1 Sep 2021 20:59:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181KxmMN047557; Wed, 1 Sep 2021 20:59:48 GMT (envelope-from git) Date: Wed, 1 Sep 2021 20:59:48 GMT Message-Id: <202109012059.181KxmMN047557@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6945df3fff57 - main - makesyscalls.lua: add a CAPENABLED flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6945df3fff57a9606f8c8a4e3865def3a0e915e7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 20:59:48 -0000 The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6945df3fff57a9606f8c8a4e3865def3a0e915e7 commit 6945df3fff57a9606f8c8a4e3865def3a0e915e7 Author: Brooks Davis AuthorDate: 2021-09-01 20:54:38 +0000 Commit: Brooks Davis CommitDate: 2021-09-01 20:58:06 +0000 makesyscalls.lua: add a CAPENABLED flag The CAPENABLED flag indicates that the syscall can be used in capsicum capability mode. It is intended to replace capabilities.conf. Reviewed by: kevans, emaste MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D31349 --- sys/kern/syscalls.master | 2 ++ sys/tools/makesyscalls.lua | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 11247aed8fd6..6cc462a206c9 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -17,6 +17,7 @@ ; COMPAT7, COMPAT11, COMPAT12, NODEF, NOARGS, NOPROTO, NOSTD ; The COMPAT* options may be combined with one or more NO* ; options separated by '|' with no spaces (e.g. COMPAT|NOARGS) +; The CAPENABLED option may be ORed into a type. ; name pseudo-prototype of syscall routine ; If one of the following alts is different, then all appear: ; altname name of system call if different @@ -47,6 +48,7 @@ ; function prototype in sys/sysproto.h. Does add a ; definition to syscall.h besides adding a sysent. ; NOTSTATIC syscall is loadable +; CAPENABLED syscall is allowed in capability mode ; annotations: ; SAL 2.0 annotations are used to specify how system calls treat diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index dab8e0e01f82..55fb8de63526 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -151,6 +151,7 @@ local known_flags = { NOPROTO = 0x00000040, NOSTD = 0x00000080, NOTSTATIC = 0x00000100, + CAPENABLED = 0x00000200, -- Compat flags start from here. We have plenty of space. } @@ -1059,7 +1060,8 @@ process_syscall_def = function(line) -- If applicable; strip the ABI prefix from the name local stripped_name = strip_abi_prefix(funcname) - if config["capenabled"][funcname] ~= nil or + if flags & known_flags['CAPENABLED'] ~= 0 or + config["capenabled"][funcname] ~= nil or config["capenabled"][stripped_name] ~= nil then sysflags = "SYF_CAPENABLED" end From owner-dev-commits-src-all@freebsd.org Wed Sep 1 20:59:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D0FC3671AB7; Wed, 1 Sep 2021 20:59: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 4H0Gdx4lRbz3t9V; Wed, 1 Sep 2021 20:59: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 8379F41EF; Wed, 1 Sep 2021 20:59: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 181KxnSH047582; Wed, 1 Sep 2021 20:59:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181KxnLF047581; Wed, 1 Sep 2021 20:59:49 GMT (envelope-from git) Date: Wed, 1 Sep 2021 20:59:49 GMT Message-Id: <202109012059.181KxnLF047581@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: df501bac6939 - main - syscalls.master: switch to CAPENABLED flags MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df501bac6939b5358d1afb66932e50151c54e514 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 20:59:50 -0000 The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=df501bac6939b5358d1afb66932e50151c54e514 commit df501bac6939b5358d1afb66932e50151c54e514 Author: Brooks Davis AuthorDate: 2021-09-01 20:54:38 +0000 Commit: Brooks Davis CommitDate: 2021-09-01 20:58:16 +0000 syscalls.master: switch to CAPENABLED flags Switch the main syscall table to use CAPENABLED flags rather than capabilities.conf. This avoid synchronization issues between syscalls.master and capabilities.conf (e.g. when renaming a syscall during development). For now, move capabilities.conf to sys/compat/freebsd32 and use it there. Use of sys/compat/freebsd32/syscalls.master should be replaced by makesyscalls.lua enhancements to allow the main one to be used. This change results in no changes to generated files after running `make sysent`. Reviewed by: kevans, emaste MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D31350 --- sys/compat/freebsd32/Makefile | 1 + sys/{kern => compat/freebsd32}/capabilities.conf | 0 sys/compat/freebsd32/syscalls.conf | 2 +- sys/conf/sysent.mk | 1 - sys/kern/Makefile | 1 - sys/kern/syscalls.master | 558 +++++++++++------------ 6 files changed, 281 insertions(+), 282 deletions(-) diff --git a/sys/compat/freebsd32/Makefile b/sys/compat/freebsd32/Makefile index b0c5b818e1ee..8777b1992768 100644 --- a/sys/compat/freebsd32/Makefile +++ b/sys/compat/freebsd32/Makefile @@ -3,5 +3,6 @@ # $FreeBSD$ GENERATED_PREFIX= freebsd32_ +CAPABILITIES_CONF= capabilities.conf .include "../../conf/sysent.mk" diff --git a/sys/kern/capabilities.conf b/sys/compat/freebsd32/capabilities.conf similarity index 100% rename from sys/kern/capabilities.conf rename to sys/compat/freebsd32/capabilities.conf diff --git a/sys/compat/freebsd32/syscalls.conf b/sys/compat/freebsd32/syscalls.conf index 0b3d59f2fcf3..6817bd25b787 100644 --- a/sys/compat/freebsd32/syscalls.conf +++ b/sys/compat/freebsd32/syscalls.conf @@ -10,4 +10,4 @@ switchname="freebsd32_sysent" namesname="freebsd32_syscallnames" systrace="freebsd32_systrace_args.c" abi_func_prefix="freebsd32_" -capabilities_conf="../../kern/capabilities.conf" +capabilities_conf="capabilities.conf" diff --git a/sys/conf/sysent.mk b/sys/conf/sysent.mk index 761905f3ffa6..489504da2ec8 100644 --- a/sys/conf/sysent.mk +++ b/sys/conf/sysent.mk @@ -26,7 +26,6 @@ SRCS+= ${SYSENT_CONF} # even though it is not an explicit input to makesyscalls.lua. For some # targets, like Linux system calls, this is unnecessary, but a spurious rebuild # is both rare and harmless. -CAPABILITIES_CONF?= ${SYSDIR}/kern/capabilities.conf SRCS+= ${CAPABILITIES_CONF} MAKESYSCALLS_INTERP?= ${LUA} diff --git a/sys/kern/Makefile b/sys/kern/Makefile index 5e14eb2d9ed2..453a6d8251c1 100644 --- a/sys/kern/Makefile +++ b/sys/kern/Makefile @@ -3,7 +3,6 @@ # # Makefile for init_sysent -SRCS+= capabilities.conf SYSENT_CONF= GENERATED= init_sysent.c \ syscalls.c \ diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 6cc462a206c9..8a06b4b3ab70 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -87,22 +87,22 @@ 0 AUE_NULL STD { int nosys(void); } syscall nosys_args int -1 AUE_EXIT STD { +1 AUE_EXIT STD|CAPENABLED { void sys_exit( int rval ); } exit sys_exit_args void -2 AUE_FORK STD { +2 AUE_FORK STD|CAPENABLED { int fork(void); } -3 AUE_READ STD { +3 AUE_READ STD|CAPENABLED { ssize_t read( int fd, _Out_writes_bytes_(nbyte) void *buf, size_t nbyte ); } -4 AUE_WRITE STD { +4 AUE_WRITE STD|CAPENABLED { ssize_t write( int fd, _In_reads_bytes_(nbyte) const void *buf, @@ -118,7 +118,7 @@ } ; XXX should be { int open(const char *path, int flags, ...); } ; but we're not ready for varargs. -6 AUE_CLOSE STD { +6 AUE_CLOSE STD|CAPENABLED { int close( int fd ); @@ -179,7 +179,7 @@ int gid ); } -17 AUE_NULL STD { +17 AUE_NULL STD|CAPENABLED { void *break( _In_ char *nsize ); @@ -191,14 +191,14 @@ int mode ); } -19 AUE_LSEEK COMPAT { +19 AUE_LSEEK COMPAT|CAPENABLED { long lseek( int fd, long offset, int whence ); } -20 AUE_GETPID STD { +20 AUE_GETPID STD|CAPENABLED { pid_t getpid(void); } 21 AUE_MOUNT STD { @@ -215,15 +215,15 @@ int flags ); } -23 AUE_SETUID STD { +23 AUE_SETUID STD|CAPENABLED { int setuid( uid_t uid ); } -24 AUE_GETUID STD { +24 AUE_GETUID STD|CAPENABLED { uid_t getuid(void); } -25 AUE_GETEUID STD { +25 AUE_GETEUID STD|CAPENABLED { uid_t geteuid(void); } 26 AUE_PTRACE STD { @@ -234,21 +234,21 @@ int data ); } -27 AUE_RECVMSG STD { +27 AUE_RECVMSG STD|CAPENABLED { int recvmsg( int s, _Inout_ struct msghdr *msg, int flags ); } -28 AUE_SENDMSG STD { +28 AUE_SENDMSG STD|CAPENABLED { int sendmsg( int s, _In_ struct msghdr *msg, int flags ); } -29 AUE_RECVFROM STD { +29 AUE_RECVFROM STD|CAPENABLED { int recvfrom( int s, _Out_writes_bytes_(len) void *buf, @@ -258,21 +258,21 @@ _Inout_opt_ __socklen_t *fromlenaddr ); } -30 AUE_ACCEPT STD { +30 AUE_ACCEPT STD|CAPENABLED { int accept( int s, _Out_writes_bytes_opt_(*anamelen) struct sockaddr *name, _Inout_opt_ __socklen_t *anamelen ); } -31 AUE_GETPEERNAME STD { +31 AUE_GETPEERNAME STD|CAPENABLED { int getpeername( int fdes, _Out_writes_bytes_(*alen) struct sockaddr *asa, _Inout_opt_ __socklen_t *alen ); } -32 AUE_GETSOCKNAME STD { +32 AUE_GETSOCKNAME STD|CAPENABLED { int getsockname( int fdes, _Out_writes_bytes_(*alen) struct sockaddr *asa, @@ -291,16 +291,16 @@ u_long flags ); } -35 AUE_FCHFLAGS STD { +35 AUE_FCHFLAGS STD|CAPENABLED { int fchflags( int fd, u_long flags ); } -36 AUE_SYNC STD { +36 AUE_SYNC STD|CAPENABLED { int sync(void); } -37 AUE_KILL STD { +37 AUE_KILL STD|CAPENABLED { int kill( int pid, int signum @@ -312,7 +312,7 @@ _Out_ struct ostat *ub ); } -39 AUE_GETPPID STD { +39 AUE_GETPPID STD|CAPENABLED { pid_t getppid(void); } 40 AUE_LSTAT COMPAT { @@ -321,18 +321,18 @@ _Out_ struct ostat *ub ); } -41 AUE_DUP STD { +41 AUE_DUP STD|CAPENABLED { int dup( u_int fd ); } -42 AUE_PIPE COMPAT10 { +42 AUE_PIPE COMPAT10|CAPENABLED { int pipe(void); } -43 AUE_GETEGID STD { +43 AUE_GETEGID STD|CAPENABLED { gid_t getegid(void); } -44 AUE_PROFILE STD { +44 AUE_PROFILE STD|CAPENABLED { int profil( _Out_writes_bytes_(size) char *samples, size_t size, @@ -348,17 +348,17 @@ int pid ); } -46 AUE_SIGACTION COMPAT { +46 AUE_SIGACTION COMPAT|CAPENABLED { int sigaction( int signum, _In_opt_ struct osigaction *nsa, _Out_opt_ struct osigaction *osa ); } -47 AUE_GETGID STD { +47 AUE_GETGID STD|CAPENABLED { gid_t getgid(void); } -48 AUE_SIGPROCMASK COMPAT { +48 AUE_SIGPROCMASK COMPAT|CAPENABLED { int sigprocmask( int how, osigset_t mask @@ -367,7 +367,7 @@ ; XXX note nonstandard (bogus) calling convention - the libc stub passes ; us the mask, not a pointer to it, and we return the old mask as the ; (int) return value. -49 AUE_GETLOGIN STD { +49 AUE_GETLOGIN STD|CAPENABLED { int getlogin( _Out_writes_z_(namelen) char *namebuf, u_int namelen @@ -383,16 +383,16 @@ _In_z_ const char *path ); } -52 AUE_SIGPENDING COMPAT { +52 AUE_SIGPENDING COMPAT|CAPENABLED { int sigpending(void); } -53 AUE_SIGALTSTACK STD { +53 AUE_SIGALTSTACK STD|CAPENABLED { int sigaltstack( _In_opt_ stack_t *ss, _Out_opt_ stack_t *oss ); } -54 AUE_IOCTL STD { +54 AUE_IOCTL STD|CAPENABLED { int ioctl( int fd, u_long com, @@ -429,7 +429,7 @@ _In_z_ char **envv ); } -60 AUE_UMASK STD { +60 AUE_UMASK STD|CAPENABLED { int umask( mode_t newmask ); @@ -439,7 +439,7 @@ _In_z_ const char *path ); } -62 AUE_FSTAT COMPAT { +62 AUE_FSTAT COMPAT|CAPENABLED { int fstat( int fd, _Out_ struct ostat *sb @@ -454,10 +454,10 @@ int arg ); } -64 AUE_NULL COMPAT { +64 AUE_NULL COMPAT|CAPENABLED { int getpagesize(void); } -65 AUE_MSYNC STD { +65 AUE_MSYNC STD|CAPENABLED { int msync( _In_ void *addr, size_t len, @@ -469,17 +469,17 @@ } 67 AUE_NULL OBSOL vread 68 AUE_NULL OBSOL vwrite -69 AUE_SBRK STD { +69 AUE_SBRK STD|CAPENABLED { int sbrk( int incr ); } -70 AUE_SSTK STD { +70 AUE_SSTK STD|CAPENABLED { int sstk( int incr ); } -71 AUE_MMAP COMPAT { +71 AUE_MMAP COMPAT|CAPENABLED { void *mmap( _In_ void *addr, int len, @@ -494,20 +494,20 @@ int anom ); } -73 AUE_MUNMAP STD { +73 AUE_MUNMAP STD|CAPENABLED { int munmap( _In_ void *addr, size_t len ); } -74 AUE_MPROTECT STD { +74 AUE_MPROTECT STD|CAPENABLED { int mprotect( _In_ void *addr, size_t len, int prot ); } -75 AUE_MADVISE STD { +75 AUE_MADVISE STD|CAPENABLED { int madvise( _In_ void *addr, size_t len, @@ -516,14 +516,14 @@ } 76 AUE_NULL OBSOL vhangup 77 AUE_NULL OBSOL vlimit -78 AUE_MINCORE STD { +78 AUE_MINCORE STD|CAPENABLED { int mincore( _In_ const void *addr, size_t len, _Out_writes_bytes_(len/PAGE_SIZE) char *vec ); } -79 AUE_GETGROUPS STD { +79 AUE_GETGROUPS STD|CAPENABLED { int getgroups( int gidsetsize, _Out_writes_opt_(gidsetsize) gid_t *gidset @@ -535,7 +535,7 @@ _In_reads_(gidsetsize) gid_t *gidset ); } -81 AUE_GETPGRP STD { +81 AUE_GETPGRP STD|CAPENABLED { int getpgrp(void); } 82 AUE_SETPGRP STD { @@ -544,7 +544,7 @@ int pgid ); } -83 AUE_SETITIMER STD { +83 AUE_SETITIMER STD|CAPENABLED { int setitimer( u_int which, _In_ struct itimerval *itv, @@ -559,13 +559,13 @@ _In_z_ const char *name ); } -86 AUE_GETITIMER STD { +86 AUE_GETITIMER STD|CAPENABLED { int getitimer( u_int which, _Out_ struct itimerval *itv ); } -87 AUE_SYSCTL COMPAT { +87 AUE_SYSCTL COMPAT|CAPENABLED { int gethostname( _Out_writes_z_(len) char *hostname, u_int len @@ -577,17 +577,17 @@ u_int len ); } -89 AUE_GETDTABLESIZE STD { +89 AUE_GETDTABLESIZE STD|CAPENABLED { int getdtablesize(void); } -90 AUE_DUP2 STD { +90 AUE_DUP2 STD|CAPENABLED { int dup2( u_int from, u_int to ); } 91 AUE_NULL RESERVED -92 AUE_FCNTL STD { +92 AUE_FCNTL STD|CAPENABLED { int fcntl( int fd, int cmd, @@ -596,7 +596,7 @@ } ; XXX should be { int fcntl(int fd, int cmd, ...); } ; but we're not ready for varargs. -93 AUE_SELECT STD { +93 AUE_SELECT STD|CAPENABLED { int select( int nd, _Inout_opt_ fd_set *in, @@ -606,19 +606,19 @@ ); } 94 AUE_NULL RESERVED -95 AUE_FSYNC STD { +95 AUE_FSYNC STD|CAPENABLED { int fsync( int fd ); } -96 AUE_SETPRIORITY STD { +96 AUE_SETPRIORITY STD|CAPENABLED { int setpriority( int which, int who, int prio ); } -97 AUE_SOCKET STD { +97 AUE_SOCKET STD|CAPENABLED { int socket( int domain, int type, @@ -632,20 +632,20 @@ int namelen ); } -99 AUE_ACCEPT COMPAT { +99 AUE_ACCEPT COMPAT|CAPENABLED { int accept( int s, _Out_writes_bytes_opt_(*anamelen) struct sockaddr *name, int *anamelen ); } -100 AUE_GETPRIORITY STD { +100 AUE_GETPRIORITY STD|CAPENABLED { int getpriority( int which, int who ); } -101 AUE_SEND COMPAT { +101 AUE_SEND COMPAT|CAPENABLED { int send( int s, _In_reads_bytes_(len) const void *buf, @@ -653,7 +653,7 @@ int flags ); } -102 AUE_RECV COMPAT { +102 AUE_RECV COMPAT|CAPENABLED { int recv( int s, _Out_writes_bytes_(len) void *buf, @@ -661,7 +661,7 @@ int flags ); } -103 AUE_SIGRETURN COMPAT { +103 AUE_SIGRETURN COMPAT|CAPENABLED { int sigreturn( _In_ struct osigcontext *sigcntxp ); @@ -673,7 +673,7 @@ int namelen ); } -105 AUE_SETSOCKOPT STD { +105 AUE_SETSOCKOPT STD|CAPENABLED { int setsockopt( int s, int level, @@ -682,51 +682,51 @@ int valsize ); } -106 AUE_LISTEN STD { +106 AUE_LISTEN STD|CAPENABLED { int listen( int s, int backlog ); } 107 AUE_NULL OBSOL vtimes -108 AUE_NULL COMPAT { +108 AUE_NULL COMPAT|CAPENABLED { int sigvec( int signum, _In_opt_ struct sigvec *nsv, _Out_opt_ struct sigvec *osv ); } -109 AUE_NULL COMPAT { +109 AUE_NULL COMPAT|CAPENABLED { int sigblock( int mask ); } -110 AUE_NULL COMPAT { +110 AUE_NULL COMPAT|CAPENABLED { int sigsetmask( int mask ); } -111 AUE_NULL COMPAT { +111 AUE_NULL COMPAT|CAPENABLED { int sigsuspend( osigset_t mask ); } ; XXX note nonstandard (bogus) calling convention - the libc stub passes ; us the mask, not a pointer to it. -112 AUE_NULL COMPAT { +112 AUE_NULL COMPAT|CAPENABLED { int sigstack( _In_opt_ struct sigstack *nss, _Out_opt_ struct sigstack *oss ); } -113 AUE_RECVMSG COMPAT { +113 AUE_RECVMSG COMPAT|CAPENABLED { int recvmsg( int s, _Inout_ struct omsghdr *msg, int flags ); } -114 AUE_SENDMSG COMPAT { +114 AUE_SENDMSG COMPAT|CAPENABLED { int sendmsg( int s, _In_ const void *msg, @@ -734,19 +734,19 @@ ); } 115 AUE_NULL OBSOL vtrace -116 AUE_GETTIMEOFDAY STD { +116 AUE_GETTIMEOFDAY STD|CAPENABLED { int gettimeofday( _Out_ struct timeval *tp, _Out_opt_ struct timezone *tzp ); } -117 AUE_GETRUSAGE STD { +117 AUE_GETRUSAGE STD|CAPENABLED { int getrusage( int who, _Out_ struct rusage *rusage ); } -118 AUE_GETSOCKOPT STD { +118 AUE_GETSOCKOPT STD|CAPENABLED { int getsockopt( int s, int level, @@ -756,14 +756,14 @@ ); } 119 AUE_NULL RESERVED -120 AUE_READV STD { +120 AUE_READV STD|CAPENABLED { int readv( int fd, _Inout_updates_(iovcnt) struct iovec *iovp, u_int iovcnt ); } -121 AUE_WRITEV STD { +121 AUE_WRITEV STD|CAPENABLED { int writev( int fd, _In_reads_opt_(iovcnt) struct iovec *iovp, @@ -776,20 +776,20 @@ _In_opt_ struct timezone *tzp ); } -123 AUE_FCHOWN STD { +123 AUE_FCHOWN STD|CAPENABLED { int fchown( int fd, int uid, int gid ); } -124 AUE_FCHMOD STD { +124 AUE_FCHMOD STD|CAPENABLED { int fchmod( int fd, mode_t mode ); } -125 AUE_RECVFROM COMPAT|NOARGS { +125 AUE_RECVFROM COMPAT|NOARGS|CAPENABLED { int recvfrom( int s, _Out_writes_(len) void *buf, @@ -799,13 +799,13 @@ _Inout_ int *fromlenaddr ); } recvfrom recvfrom_args int -126 AUE_SETREUID STD { +126 AUE_SETREUID STD|CAPENABLED { int setreuid( int ruid, int euid ); } -127 AUE_SETREGID STD { +127 AUE_SETREGID STD|CAPENABLED { int setregid( int rgid, int egid @@ -823,13 +823,13 @@ long length ); } -130 AUE_FTRUNCATE COMPAT { +130 AUE_FTRUNCATE COMPAT|CAPENABLED { int ftruncate( int fd, long length ); } -131 AUE_FLOCK STD { +131 AUE_FLOCK STD|CAPENABLED { int flock( int fd, int how @@ -841,7 +841,7 @@ mode_t mode ); } -133 AUE_SENDTO STD { +133 AUE_SENDTO STD|CAPENABLED { int sendto( int s, _In_reads_bytes_(len) const void *buf, @@ -851,13 +851,13 @@ int tolen ); } -134 AUE_SHUTDOWN STD { +134 AUE_SHUTDOWN STD|CAPENABLED { int shutdown( int s, int how ); } -135 AUE_SOCKETPAIR STD { +135 AUE_SOCKETPAIR STD|CAPENABLED { int socketpair( int domain, int type, @@ -889,14 +889,14 @@ _Out_opt_ struct timeval *olddelta ); } -141 AUE_GETPEERNAME COMPAT { +141 AUE_GETPEERNAME COMPAT|CAPENABLED { int getpeername( int fdes, _Out_writes_bytes_(*alen) struct sockaddr *asa, _Inout_opt_ int *alen ); } -142 AUE_SYSCTL COMPAT { +142 AUE_SYSCTL COMPAT|CAPENABLED { long gethostid(void); } 143 AUE_SYSCTL COMPAT { @@ -904,13 +904,13 @@ long hostid ); } -144 AUE_GETRLIMIT COMPAT { +144 AUE_GETRLIMIT COMPAT|CAPENABLED { int getrlimit( u_int which, _Out_ struct orlimit *rlp ); } -145 AUE_SETRLIMIT COMPAT { +145 AUE_SETRLIMIT COMPAT|CAPENABLED { int setrlimit( u_int which, _Out_ struct orlimit *rlp @@ -922,7 +922,7 @@ int signum ); } -147 AUE_SETSID STD { +147 AUE_SETSID STD|CAPENABLED { int setsid(void); } 148 AUE_QUOTACTL STD { @@ -936,7 +936,7 @@ 149 AUE_O_QUOTA COMPAT { int quota(void); } -150 AUE_GETSOCKNAME COMPAT|NOARGS { +150 AUE_GETSOCKNAME COMPAT|NOARGS|CAPENABLED { int getsockname( int fdec, _Out_writes_bytes_(*alen) struct sockaddr *asa, @@ -961,7 +961,7 @@ _In_ void *argp ); } -156 AUE_GETDIRENTRIES COMPAT { +156 AUE_GETDIRENTRIES COMPAT|CAPENABLED { int getdirentries( int fd, _Out_writes_bytes_(count) char *buf, @@ -975,7 +975,7 @@ _Out_ struct ostatfs *buf ); } -158 AUE_FSTATFS COMPAT4 { +158 AUE_FSTATFS COMPAT4|CAPENABLED { int fstatfs( int fd, _Out_ struct ostatfs *buf @@ -994,7 +994,7 @@ _Out_ struct fhandle *fhp ); } -162 AUE_SYSCTL COMPAT4 { +162 AUE_SYSCTL COMPAT4|CAPENABLED { int getdomainname( _Out_writes_z_(len) char *domainname, int len @@ -1011,13 +1011,13 @@ _Out_ struct utsname *name ); } -165 AUE_SYSARCH STD { +165 AUE_SYSARCH STD|CAPENABLED { int sysarch( int op, _In_z_ char *parms ); } -166 AUE_RTPRIO STD { +166 AUE_RTPRIO STD|CAPENABLED { int rtprio( int function, pid_t pid, @@ -1056,7 +1056,7 @@ } ; XXX should be { int shmsys(int which, ...); } 172 AUE_NULL RESERVED -173 AUE_PREAD COMPAT6 { +173 AUE_PREAD COMPAT6|CAPENABLED { ssize_t pread( int fd, _Out_writes_bytes_(nbyte) void *buf, @@ -1065,7 +1065,7 @@ off_t offset ); } -174 AUE_PWRITE COMPAT6 { +174 AUE_PWRITE COMPAT6|CAPENABLED { ssize_t pwrite( int fd, _In_reads_bytes_(nbyte) const void *buf, @@ -1085,17 +1085,17 @@ ); } 177-180 AUE_NULL RESERVED -181 AUE_SETGID STD { +181 AUE_SETGID STD|CAPENABLED { int setgid( gid_t gid ); } -182 AUE_SETEGID STD { +182 AUE_SETEGID STD|CAPENABLED { int setegid( gid_t egid ); } -183 AUE_SETEUID STD { +183 AUE_SETEUID STD|CAPENABLED { int seteuid( uid_t euid ); @@ -1110,7 +1110,7 @@ _Out_ struct freebsd11_stat *ub ); } -189 AUE_FSTAT COMPAT11 { +189 AUE_FSTAT COMPAT11|CAPENABLED { int fstat( int fd, _Out_ struct freebsd11_stat *sb @@ -1128,26 +1128,26 @@ int name ); } -192 AUE_FPATHCONF STD { +192 AUE_FPATHCONF STD|CAPENABLED { int fpathconf( int fd, int name ); } 193 AUE_NULL RESERVED -194 AUE_GETRLIMIT STD { +194 AUE_GETRLIMIT STD|CAPENABLED { int getrlimit( u_int which, _Out_ struct rlimit *rlp ); } getrlimit __getrlimit_args int -195 AUE_SETRLIMIT STD { +195 AUE_SETRLIMIT STD|CAPENABLED { int setrlimit( u_int which, _In_ struct rlimit *rlp ); } setrlimit __setrlimit_args int -196 AUE_GETDIRENTRIES COMPAT11 { +196 AUE_GETDIRENTRIES COMPAT11|CAPENABLED { int getdirentries( int fd, _Out_writes_bytes_(count) char *buf, @@ -1155,7 +1155,7 @@ _Out_ long *basep ); } -197 AUE_MMAP COMPAT6 { +197 AUE_MMAP COMPAT6|CAPENABLED { void *mmap( _In_ void *addr, size_t len, @@ -1169,7 +1169,7 @@ 198 AUE_NULL NOPROTO { int nosys(void); } __syscall __syscall_args int -199 AUE_LSEEK COMPAT6 { +199 AUE_LSEEK COMPAT6|CAPENABLED { off_t lseek( int fd, int pad, @@ -1184,14 +1184,14 @@ off_t length ); } -201 AUE_FTRUNCATE COMPAT6 { +201 AUE_FTRUNCATE COMPAT6|CAPENABLED { int ftruncate( int fd, int pad, off_t length ); } -202 AUE_SYSCTL STD { +202 AUE_SYSCTL STD|CAPENABLED { int __sysctl( _In_reads_(namelen) int *name, u_int namelen, @@ -1201,13 +1201,13 @@ size_t newlen ); } __sysctl sysctl_args int -203 AUE_MLOCK STD { +203 AUE_MLOCK STD|CAPENABLED { int mlock( _In_ const void *addr, size_t len ); } -204 AUE_MUNLOCK STD { +204 AUE_MUNLOCK STD|CAPENABLED { int munlock( _In_ const void *addr, size_t len @@ -1218,19 +1218,19 @@ _In_z_ const char *path ); } -206 AUE_FUTIMES STD { +206 AUE_FUTIMES STD|CAPENABLED { int futimes( int fd, _In_reads_(2) struct timeval *tptr ); } -207 AUE_GETPGID STD { +207 AUE_GETPGID STD|CAPENABLED { int getpgid( pid_t pid ); } 208 AUE_NULL RESERVED -209 AUE_POLL STD { +209 AUE_POLL STD|CAPENABLED { int poll( _Inout_updates_(nfds) struct pollfd *fds, u_int nfds, @@ -1330,7 +1330,7 @@ int shmflg ); } -232 AUE_NULL STD { *** 1300 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Sep 1 20:59:51 2021 Return-Path: Delivered-To: dev-commits-src-all@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 701C3671CD0; Wed, 1 Sep 2021 20:59: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 4H0Gdy6RSPz3t9Z; Wed, 1 Sep 2021 20:59: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 ADE0741F0; Wed, 1 Sep 2021 20:59: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 181Kxocb047606; Wed, 1 Sep 2021 20:59:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181Kxo9P047605; Wed, 1 Sep 2021 20:59:50 GMT (envelope-from git) Date: Wed, 1 Sep 2021 20:59:50 GMT Message-Id: <202109012059.181Kxo9P047605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6bc90e8acf88 - main - syscalls.master: correct formatting issues MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6bc90e8acf884f659415a919bc9cd9cfea701e0a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 20:59:51 -0000 The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6bc90e8acf884f659415a919bc9cd9cfea701e0a commit 6bc90e8acf884f659415a919bc9cd9cfea701e0a Author: Brooks Davis AuthorDate: 2021-09-01 20:54:38 +0000 Commit: Brooks Davis CommitDate: 2021-09-01 20:58:22 +0000 syscalls.master: correct formatting issues Reviewed by: kevans, emaste MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D31351 --- sys/kern/syscalls.master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 8a06b4b3ab70..0176916b850a 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -943,7 +943,6 @@ _Inout_ int *alen ); } getsockname getsockname_args int - 151-153 AUE_NULL RESERVED ; 154 is initialised by the NLM code, if present. 154 AUE_NULL NOSTD { @@ -1664,7 +1663,8 @@ ); } 325 AUE_MUNLOCKALL STD|CAPENABLED { - int munlockall(void); } + int munlockall(void); + } 326 AUE_GETCWD STD { int __getcwd( _Out_writes_z_(buflen) char *buf, From owner-dev-commits-src-all@freebsd.org Wed Sep 1 23:07:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C71D76731F0; Wed, 1 Sep 2021 23:07: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 4H0KTJ4kjPz4y94; Wed, 1 Sep 2021 23:07: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 878B15CF2; Wed, 1 Sep 2021 23:07: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 181N7WwB020773; Wed, 1 Sep 2021 23:07:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181N7WfM020772; Wed, 1 Sep 2021 23:07:32 GMT (envelope-from git) Date: Wed, 1 Sep 2021 23:07:32 GMT Message-Id: <202109012307.181N7WfM020772@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: c81f8c26115a - main - ena: Avoid unnecessary mbuf collapses for LLQ condition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c81f8c26115a64b9a97ecdb2a64e824dd839ee73 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 23:07:32 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=c81f8c26115a64b9a97ecdb2a64e824dd839ee73 commit c81f8c26115a64b9a97ecdb2a64e824dd839ee73 Author: Artur Rojek AuthorDate: 2021-08-12 08:34:17 +0000 Commit: Marcin Wojtas CommitDate: 2021-09-01 23:05:38 +0000 ena: Avoid unnecessary mbuf collapses for LLQ condition In case of Low-latency Queue, one small enough descriptor can be pushed directly to the ENA hw, thus saving one fragment. Check for this condition before performing collapse. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena_datapath.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 15bd09c489cf..c0066b1209cc 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -801,6 +801,11 @@ ena_check_and_collapse_mbuf(struct ena_ring *tx_ring, struct mbuf **mbuf) /* One segment must be reserved for configuration descriptor. */ if (num_frags < adapter->max_tx_sgl_size) return (0); + + if ((num_frags == adapter->max_tx_sgl_size) && + ((*mbuf)->m_pkthdr.len < tx_ring->tx_max_header_size)) + return (0); + counter_u64_add(tx_ring->tx_stats.collapse, 1); collapsed_mbuf = m_collapse(*mbuf, M_NOWAIT, From owner-dev-commits-src-all@freebsd.org Wed Sep 1 23:07:34 2021 Return-Path: Delivered-To: dev-commits-src-all@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 01B636732DB; Wed, 1 Sep 2021 23:07: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 4H0KTK5cYKz4yST; Wed, 1 Sep 2021 23:07: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 A59606061; Wed, 1 Sep 2021 23:07: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 181N7XXb020803; Wed, 1 Sep 2021 23:07:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181N7Xk2020802; Wed, 1 Sep 2021 23:07:33 GMT (envelope-from git) Date: Wed, 1 Sep 2021 23:07:33 GMT Message-Id: <202109012307.181N7Xk2020802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 36130d2979d6 - main - ena: Trigger reset on ena_com_prepare_tx failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36130d2979d695dd439bc607feb00dcdb9a1937b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 23:07:34 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=36130d2979d695dd439bc607feb00dcdb9a1937b commit 36130d2979d695dd439bc607feb00dcdb9a1937b Author: Artur Rojek AuthorDate: 2021-08-12 08:34:24 +0000 Commit: Marcin Wojtas CommitDate: 2021-09-01 23:05:54 +0000 ena: Trigger reset on ena_com_prepare_tx failure All ena_com_prepare_tx errors other than ENA_COM_NO_MEM are fatal and require device reset. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena_datapath.c | 2 ++ sys/dev/ena/ena_netmap.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index c0066b1209cc..1581bc2db87c 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -1000,6 +1000,8 @@ ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf **mbuf) tx_ring->que->id); } else { ena_log(pdev, ERR, "failed to prepare tx bufs\n"); + ena_trigger_reset(adapter, + ENA_REGS_RESET_DRIVER_INVALID_STATE); } counter_u64_add(tx_ring->tx_stats.prepare_ctx_err, 1); goto dma_error; diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index daed81986f13..7e07b0a8c555 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -444,6 +444,8 @@ ena_netmap_tx_frame(struct ena_netmap_ctx *ctx) } else { ena_log_nm(adapter->pdev, ERR, "Failed to prepare Tx bufs\n"); + ena_trigger_reset(adapter, + ENA_REGS_RESET_DRIVER_INVALID_STATE); } counter_u64_add(tx_ring->tx_stats.prepare_ctx_err, 1); From owner-dev-commits-src-all@freebsd.org Wed Sep 1 23:07:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BC5136734A8; Wed, 1 Sep 2021 23:07: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 4H0KTN1GcVz4yLw; Wed, 1 Sep 2021 23:07: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 EAD975EF9; Wed, 1 Sep 2021 23:07: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 181N7ZIB020851; Wed, 1 Sep 2021 23:07:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181N7Zlk020850; Wed, 1 Sep 2021 23:07:35 GMT (envelope-from git) Date: Wed, 1 Sep 2021 23:07:35 GMT Message-Id: <202109012307.181N7Zlk020850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 77160654a162 - main - ena: Add extra log messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77160654a162b5faa8ad7a02e18d2bef2589f868 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 23:07:36 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=77160654a162b5faa8ad7a02e18d2bef2589f868 commit 77160654a162b5faa8ad7a02e18d2bef2589f868 Author: Artur Rojek AuthorDate: 2021-08-12 08:34:26 +0000 Commit: Marcin Wojtas CommitDate: 2021-09-01 23:06:12 +0000 ena: Add extra log messages Stay aligned with the Linux driver by adding the following logs: * inform the user about retrying queue creation * warn on non-empty ena_tx_buffer.mbuf prior to ena_tx_map_mbuf Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 4 ++++ sys/dev/ena/ena_datapath.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 7615bf4d7cc0..dbe5b9f785a9 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -2079,6 +2079,10 @@ err_setup_tx: return (rc); } + ena_log(pdev, INFO, + "Retrying queue creation with sizes TX=%d, RX=%d\n", + new_tx_ring_size, new_rx_ring_size); + set_io_rings_size(adapter, new_tx_ring_size, new_rx_ring_size); } } diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 1581bc2db87c..e6286ebfc25f 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -967,6 +967,9 @@ ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf **mbuf) tx_info = &tx_ring->tx_buffer_info[req_id]; tx_info->num_of_bufs = 0; + ENA_WARN(tx_info->mbuf != NULL, adapter->ena_dev, + "mbuf isn't NULL for req_id %d\n", req_id); + rc = ena_tx_map_mbuf(tx_ring, tx_info, *mbuf, &push_hdr, &header_len); if (unlikely(rc != 0)) { ena_log_io(pdev, WARN, "Failed to map TX mbuf\n"); From owner-dev-commits-src-all@freebsd.org Wed Sep 1 23:07:37 2021 Return-Path: Delivered-To: dev-commits-src-all@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 87C53673630; Wed, 1 Sep 2021 23:07: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 4H0KTP25l8z4yJL; Wed, 1 Sep 2021 23:07: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 2109B5E44; Wed, 1 Sep 2021 23:07: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 181N7b1s020875; Wed, 1 Sep 2021 23:07:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181N7bhH020874; Wed, 1 Sep 2021 23:07:37 GMT (envelope-from git) Date: Wed, 1 Sep 2021 23:07:37 GMT Message-Id: <202109012307.181N7bhH020874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: cb98c439d66c - main - ena: Add locking assertions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb98c439d66c303353a9f4abbbe9ddb51559c638 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 23:07:37 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=cb98c439d66c303353a9f4abbbe9ddb51559c638 commit cb98c439d66c303353a9f4abbbe9ddb51559c638 Author: Artur Rojek AuthorDate: 2021-08-12 08:34:26 +0000 Commit: Marcin Wojtas CommitDate: 2021-09-01 23:06:21 +0000 ena: Add locking assertions ENA silently assumed that ena_up, ena_down and ena_start_xmit routines should be called within locked context. Driver's logic heavily assumes on concurrent access to those routines, so for safety and better documentation about this assumption, the locking assertions were added to the above functions. The assertion was added only for the main steps (skipping the helper functions) which can be called from multiple places including the kernel and the driver itself. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 4 ++++ sys/dev/ena/ena.h | 4 ++++ sys/dev/ena/ena_datapath.c | 2 ++ 3 files changed, 10 insertions(+) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index dbe5b9f785a9..faa1278c6d81 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -2092,6 +2092,8 @@ ena_up(struct ena_adapter *adapter) { int rc = 0; + ENA_LOCK_ASSERT(adapter); + if (unlikely(device_is_attached(adapter->pdev) == 0)) { ena_log(adapter->pdev, ERR, "device is not attached!\n"); return (ENXIO); @@ -2465,6 +2467,8 @@ ena_down(struct ena_adapter *adapter) { int rc; + ENA_LOCK_ASSERT(adapter); + if (!ENA_FLAG_ISSET(ENA_FLAG_DEV_UP, adapter)) return; diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 1d06a3cb56de..f05c2d69fbe4 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -480,12 +480,16 @@ struct ena_adapter { #define ENA_RING_MTX_LOCK(_ring) mtx_lock(&(_ring)->ring_mtx) #define ENA_RING_MTX_TRYLOCK(_ring) mtx_trylock(&(_ring)->ring_mtx) #define ENA_RING_MTX_UNLOCK(_ring) mtx_unlock(&(_ring)->ring_mtx) +#define ENA_RING_MTX_ASSERT(_ring) \ + mtx_assert(&(_ring)->ring_mtx, MA_OWNED) #define ENA_LOCK_INIT(adapter) \ sx_init(&(adapter)->global_lock, "ENA global lock") #define ENA_LOCK_DESTROY(adapter) sx_destroy(&(adapter)->global_lock) #define ENA_LOCK_LOCK(adapter) sx_xlock(&(adapter)->global_lock) #define ENA_LOCK_UNLOCK(adapter) sx_unlock(&(adapter)->global_lock) +#define ENA_LOCK_ASSERT(adapter) \ + sx_assert(&(adapter)->global_lock, SA_XLOCKED) #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) #define clamp_val(val, lo, hi) clamp_t(__typeof(val), val, lo, hi) diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index e6286ebfc25f..6506c808e4cb 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -1075,6 +1075,8 @@ ena_start_xmit(struct ena_ring *tx_ring) int ena_qid; int ret = 0; + ENA_RING_MTX_ASSERT(tx_ring); + if (unlikely((if_getdrvflags(adapter->ifp) & IFF_DRV_RUNNING) == 0)) return; From owner-dev-commits-src-all@freebsd.org Wed Sep 1 23:07:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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 37FF1673628; Wed, 1 Sep 2021 23:07: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 4H0KTM0FwTz4yRf; Wed, 1 Sep 2021 23:07: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 C97776062; Wed, 1 Sep 2021 23:07: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 181N7YW6020827; Wed, 1 Sep 2021 23:07:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181N7Yd5020826; Wed, 1 Sep 2021 23:07:34 GMT (envelope-from git) Date: Wed, 1 Sep 2021 23:07:34 GMT Message-Id: <202109012307.181N7Yd5020826@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 433ab9b6987b - main - ena: Prevent reset after device destruction MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 433ab9b6987b42b3e5b25b8b5dc7e5178c7ef9bb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 23:07:35 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=433ab9b6987b42b3e5b25b8b5dc7e5178c7ef9bb commit 433ab9b6987b42b3e5b25b8b5dc7e5178c7ef9bb Author: Artur Rojek AuthorDate: 2021-08-12 08:34:25 +0000 Commit: Marcin Wojtas CommitDate: 2021-09-01 23:06:06 +0000 ena: Prevent reset after device destruction Check for ENA_FLAG_TRIGGER_RESET inside a locked context in order to avoid potential race conditions with ena_destroy_device. This aligns the reset task logic with the Linux driver. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 84d58c844332..7615bf4d7cc0 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3539,15 +3539,11 @@ ena_reset_task(void *arg, int pending) { struct ena_adapter *adapter = (struct ena_adapter *)arg; - if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_TRIGGER_RESET, adapter))) { - ena_log(adapter->pdev, WARN, - "device reset scheduled but trigger_reset is off\n"); - return; - } - ENA_LOCK_LOCK(adapter); - ena_destroy_device(adapter, false); - ena_restore_device(adapter); + if (likely(ENA_FLAG_ISSET(ENA_FLAG_TRIGGER_RESET, adapter))) { + ena_destroy_device(adapter, false); + ena_restore_device(adapter); + } ENA_LOCK_UNLOCK(adapter); } From owner-dev-commits-src-all@freebsd.org Wed Sep 1 23:07:38 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D8729673633; Wed, 1 Sep 2021 23:07: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 4H0KTQ3YgDz4yJP; Wed, 1 Sep 2021 23:07: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 4447B6102; Wed, 1 Sep 2021 23:07: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 181N7cAh020899; Wed, 1 Sep 2021 23:07:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181N7cF1020898; Wed, 1 Sep 2021 23:07:38 GMT (envelope-from git) Date: Wed, 1 Sep 2021 23:07:38 GMT Message-Id: <202109012307.181N7cF1020898@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 986e7b922766 - main - ena: Move RSS logic into its own source files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 986e7b9227668caf9620f207e3c1d708c87b634d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 23:07:39 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=986e7b9227668caf9620f207e3c1d708c87b634d commit 986e7b9227668caf9620f207e3c1d708c87b634d Author: Artur Rojek AuthorDate: 2021-08-12 08:34:27 +0000 Commit: Marcin Wojtas CommitDate: 2021-09-01 23:06:26 +0000 ena: Move RSS logic into its own source files Delegate RSS related functionality into separate .c/.h files in preparation for the full RSS support. While at it, reorder functions and remove prototypes for ones with internal linkage. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 149 +------------------------------------- sys/dev/ena/ena.h | 1 - sys/dev/ena/ena_rss.c | 182 +++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/ena/ena_rss.h | 49 +++++++++++++ sys/modules/ena/Makefile | 2 +- 5 files changed, 233 insertions(+), 150 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index faa1278c6d81..7dff59043bb2 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -63,9 +63,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef RSS -#include -#endif #include #include @@ -84,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include "ena_datapath.h" #include "ena.h" #include "ena_sysctl.h" +#include "ena_rss.h" #ifdef DEV_NETMAP #include "ena_netmap.h" @@ -143,7 +141,6 @@ static void ena_free_io_irq(struct ena_adapter *); static void ena_free_irqs(struct ena_adapter*); static void ena_disable_msix(struct ena_adapter *); static void ena_unmask_all_io_irqs(struct ena_adapter *); -static int ena_rss_configure(struct ena_adapter *); static int ena_up_complete(struct ena_adapter *); static uint64_t ena_get_counter(if_t, ift_counter); static int ena_media_change(if_t); @@ -161,8 +158,6 @@ static int ena_set_queues_placement_policy(device_t, struct ena_com_dev *, static uint32_t ena_calc_max_io_queue_num(device_t, struct ena_com_dev *, struct ena_com_dev_get_features_ctx *); static int ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *); -static int ena_rss_init_default(struct ena_adapter *); -static void ena_rss_init_default_deferred(void *); static void ena_config_host_info(struct ena_com_dev *, device_t); static int ena_attach(device_t); static int ena_detach(device_t); @@ -265,27 +260,6 @@ fail_tag: return (error); } -/* - * This function should generate unique key for the whole driver. - * If the key was already genereated in the previous call (for example - * for another adapter), then it should be returned instead. - */ -void -ena_rss_key_fill(void *key, size_t size) -{ - static bool key_generated; - static uint8_t default_key[ENA_HASH_KEY_SIZE]; - - KASSERT(size <= ENA_HASH_KEY_SIZE, ("Requested more bytes than ENA RSS key can hold")); - - if (!key_generated) { - arc4random_buf(default_key, ENA_HASH_KEY_SIZE); - key_generated = true; - } - - memcpy(key, default_key, size); -} - static void ena_free_pci_resources(struct ena_adapter *adapter) { @@ -1922,43 +1896,6 @@ ena_unmask_all_io_irqs(struct ena_adapter *adapter) } } -/* Configure the Rx forwarding */ -static int -ena_rss_configure(struct ena_adapter *adapter) -{ - struct ena_com_dev *ena_dev = adapter->ena_dev; - int rc; - - /* In case the RSS table was destroyed */ - if (!ena_dev->rss.tbl_log_size) { - rc = ena_rss_init_default(adapter); - if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { - ena_log(adapter->pdev, ERR, - "WARNING: RSS was not properly re-initialized," - " it will affect bandwidth\n"); - ENA_FLAG_CLEAR_ATOMIC(ENA_FLAG_RSS_ACTIVE, adapter); - return (rc); - } - } - - /* Set indirect table */ - rc = ena_com_indirect_table_set(ena_dev); - if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) - return (rc); - - /* Configure hash function (if supported) */ - rc = ena_com_set_hash_function(ena_dev); - if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) - return (rc); - - /* Configure hash inputs (if supported) */ - rc = ena_com_set_hash_ctrl(ena_dev); - if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) - return (rc); - - return (0); -} - static int ena_up_complete(struct ena_adapter *adapter) { @@ -2730,90 +2667,6 @@ ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx) return (0); } -static int -ena_rss_init_default(struct ena_adapter *adapter) -{ - struct ena_com_dev *ena_dev = adapter->ena_dev; - device_t dev = adapter->pdev; - int qid, rc, i; - - rc = ena_com_rss_init(ena_dev, ENA_RX_RSS_TABLE_LOG_SIZE); - if (unlikely(rc != 0)) { - ena_log(dev, ERR, "Cannot init indirect table\n"); - return (rc); - } - - for (i = 0; i < ENA_RX_RSS_TABLE_SIZE; i++) { - qid = i % adapter->num_io_queues; - rc = ena_com_indirect_table_fill_entry(ena_dev, i, - ENA_IO_RXQ_IDX(qid)); - if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { - ena_log(dev, ERR, "Cannot fill indirect table\n"); - goto err_rss_destroy; - } - } - -#ifdef RSS - uint8_t rss_algo = rss_gethashalgo(); - if (rss_algo == RSS_HASH_TOEPLITZ) { - uint8_t hash_key[RSS_KEYSIZE]; - - rss_getkey(hash_key); - rc = ena_com_fill_hash_function(ena_dev, ENA_ADMIN_TOEPLITZ, - hash_key, RSS_KEYSIZE, 0xFFFFFFFF); - } else -#endif - rc = ena_com_fill_hash_function(ena_dev, ENA_ADMIN_CRC32, NULL, - ENA_HASH_KEY_SIZE, 0xFFFFFFFF); - if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { - ena_log(dev, ERR, "Cannot fill hash function\n"); - goto err_rss_destroy; - } - - rc = ena_com_set_default_hash_ctrl(ena_dev); - if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { - ena_log(dev, ERR, "Cannot fill hash control\n"); - goto err_rss_destroy; - } - - return (0); - -err_rss_destroy: - ena_com_rss_destroy(ena_dev); - return (rc); -} - -static void -ena_rss_init_default_deferred(void *arg) -{ - struct ena_adapter *adapter; - devclass_t dc; - int max; - int rc; - - dc = devclass_find("ena"); - if (unlikely(dc == NULL)) { - ena_log_raw(ERR, "SYSINIT: %s: No devclass ena\n", __func__); - return; - } - - max = devclass_get_maxunit(dc); - while (max-- >= 0) { - adapter = devclass_get_softc(dc, max); - if (adapter != NULL) { - rc = ena_rss_init_default(adapter); - ENA_FLAG_SET_ATOMIC(ENA_FLAG_RSS_ACTIVE, adapter); - if (unlikely(rc != 0)) { - ena_log(adapter->pdev, WARN, - "WARNING: RSS was not properly initialized," - " it will affect bandwidth\n"); - ENA_FLAG_CLEAR_ATOMIC(ENA_FLAG_RSS_ACTIVE, adapter); - } - } - } -} -SYSINIT(ena_rss_init, SI_SUB_KICK_SCHEDULER, SI_ORDER_SECOND, ena_rss_init_default_deferred, NULL); - static void ena_config_host_info(struct ena_com_dev *ena_dev, device_t dev) { diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index f05c2d69fbe4..c7e952f5b571 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -34,7 +34,6 @@ #ifndef ENA_H #define ENA_H -#include #include "ena-com/ena_com.h" #include "ena-com/ena_eth_com.h" diff --git a/sys/dev/ena/ena_rss.c b/sys/dev/ena/ena_rss.c new file mode 100644 index 000000000000..f314905559d2 --- /dev/null +++ b/sys/dev/ena/ena_rss.c @@ -0,0 +1,182 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates. + * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER 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 +__FBSDID("$FreeBSD$"); + +#include "opt_rss.h" + +#include "ena_rss.h" + +/* + * This function should generate unique key for the whole driver. + * If the key was already genereated in the previous call (for example + * for another adapter), then it should be returned instead. + */ +void +ena_rss_key_fill(void *key, size_t size) +{ + static bool key_generated; + static uint8_t default_key[ENA_HASH_KEY_SIZE]; + + KASSERT(size <= ENA_HASH_KEY_SIZE, ("Requested more bytes than ENA RSS key can hold")); + + if (!key_generated) { + arc4random_buf(default_key, ENA_HASH_KEY_SIZE); + key_generated = true; + } + + memcpy(key, default_key, size); +} + +static int +ena_rss_init_default(struct ena_adapter *adapter) +{ + struct ena_com_dev *ena_dev = adapter->ena_dev; + device_t dev = adapter->pdev; + int qid, rc, i; + + rc = ena_com_rss_init(ena_dev, ENA_RX_RSS_TABLE_LOG_SIZE); + if (unlikely(rc != 0)) { + ena_log(dev, ERR, "Cannot init indirect table\n"); + return (rc); + } + + for (i = 0; i < ENA_RX_RSS_TABLE_SIZE; i++) { + qid = i % adapter->num_io_queues; + rc = ena_com_indirect_table_fill_entry(ena_dev, i, + ENA_IO_RXQ_IDX(qid)); + if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { + ena_log(dev, ERR, "Cannot fill indirect table\n"); + goto err_rss_destroy; + } + } + + +#ifdef RSS + uint8_t rss_algo = rss_gethashalgo(); + if (rss_algo == RSS_HASH_TOEPLITZ) { + uint8_t hash_key[RSS_KEYSIZE]; + + rss_getkey(hash_key); + rc = ena_com_fill_hash_function(ena_dev, ENA_ADMIN_TOEPLITZ, + hash_key, RSS_KEYSIZE, 0xFFFFFFFF); + } else +#endif + rc = ena_com_fill_hash_function(ena_dev, ENA_ADMIN_CRC32, NULL, + ENA_HASH_KEY_SIZE, 0xFFFFFFFF); + if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { + ena_log(dev, ERR, "Cannot fill hash function\n"); + goto err_rss_destroy; + } + + rc = ena_com_set_default_hash_ctrl(ena_dev); + if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { + ena_log(dev, ERR, "Cannot fill hash control\n"); + goto err_rss_destroy; + } + + return (0); + +err_rss_destroy: + ena_com_rss_destroy(ena_dev); + return (rc); +} + +/* Configure the Rx forwarding */ +int +ena_rss_configure(struct ena_adapter *adapter) +{ + struct ena_com_dev *ena_dev = adapter->ena_dev; + int rc; + + /* In case the RSS table was destroyed */ + if (!ena_dev->rss.tbl_log_size) { + rc = ena_rss_init_default(adapter); + if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { + ena_log(adapter->pdev, ERR, + "WARNING: RSS was not properly re-initialized," + " it will affect bandwidth\n"); + ENA_FLAG_CLEAR_ATOMIC(ENA_FLAG_RSS_ACTIVE, adapter); + return (rc); + } + } + + /* Set indirect table */ + rc = ena_com_indirect_table_set(ena_dev); + if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) + return (rc); + + /* Configure hash function (if supported) */ + rc = ena_com_set_hash_function(ena_dev); + if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) + return (rc); + + /* Configure hash inputs (if supported) */ + rc = ena_com_set_hash_ctrl(ena_dev); + if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) + return (rc); + + return (0); +} + +static void +ena_rss_init_default_deferred(void *arg) +{ + struct ena_adapter *adapter; + devclass_t dc; + int max; + int rc; + + dc = devclass_find("ena"); + if (unlikely(dc == NULL)) { + ena_log_raw(ERR, "SYSINIT: %s: No devclass ena\n", __func__); + return; + } + + max = devclass_get_maxunit(dc); + while (max-- >= 0) { + adapter = devclass_get_softc(dc, max); + if (adapter != NULL) { + rc = ena_rss_init_default(adapter); + ENA_FLAG_SET_ATOMIC(ENA_FLAG_RSS_ACTIVE, adapter); + if (unlikely(rc != 0)) { + ena_log(adapter->pdev, WARN, + "WARNING: RSS was not properly initialized," + " it will affect bandwidth\n"); + ENA_FLAG_CLEAR_ATOMIC(ENA_FLAG_RSS_ACTIVE, adapter); + } + } + } +} +SYSINIT(ena_rss_init, SI_SUB_KICK_SCHEDULER, SI_ORDER_SECOND, ena_rss_init_default_deferred, NULL); diff --git a/sys/dev/ena/ena_rss.h b/sys/dev/ena/ena_rss.h new file mode 100644 index 000000000000..14e686a5c045 --- /dev/null +++ b/sys/dev/ena/ena_rss.h @@ -0,0 +1,49 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates. + * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#ifndef ENA_RSS_H +#define ENA_RSS_H + +#include "opt_rss.h" + +#include + +#ifdef RSS +#include +#endif + +#include "ena.h" + +int ena_rss_configure(struct ena_adapter *); + +#endif /* !(ENA_RSS_H) */ diff --git a/sys/modules/ena/Makefile b/sys/modules/ena/Makefile index c6a0c56e7ffb..d619b5d7fa56 100644 --- a/sys/modules/ena/Makefile +++ b/sys/modules/ena/Makefile @@ -35,7 +35,7 @@ KMOD = if_ena SRCS = ena_com.c ena_eth_com.c -SRCS += ena.c ena_sysctl.c ena_datapath.c ena_netmap.c +SRCS += ena.c ena_sysctl.c ena_datapath.c ena_netmap.c ena_rss.c SRCS += device_if.h bus_if.h pci_if.h SRCS += opt_rss.h CFLAGS += -I${SRCTOP}/sys/contrib From owner-dev-commits-src-all@freebsd.org Wed Sep 1 23:07:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1337C6736ED; Wed, 1 Sep 2021 23:07: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 4H0KTR5WZXz4yP4; Wed, 1 Sep 2021 23:07:39 +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 715AF5C38; Wed, 1 Sep 2021 23:07:39 +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 181N7dIf020929; Wed, 1 Sep 2021 23:07:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181N7dwE020928; Wed, 1 Sep 2021 23:07:39 GMT (envelope-from git) Date: Wed, 1 Sep 2021 23:07:39 GMT Message-Id: <202109012307.181N7dwE020928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: a831466830de - main - ena: Disable meta descriptor caching for netmap MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a831466830de6ab55fc03170290b313157196e81 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 23:07:40 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=a831466830de6ab55fc03170290b313157196e81 commit a831466830de6ab55fc03170290b313157196e81 Author: Artur Rojek AuthorDate: 2021-08-12 08:34:28 +0000 Commit: Marcin Wojtas CommitDate: 2021-09-01 23:06:31 +0000 ena: Disable meta descriptor caching for netmap If LLQ is being used, `ena_tx_ctx.meta_valid` must stay enabled. This fixes netmap support on latest generation ENA HW and aligns it with the core driver behavior. As netmap doesn't support any csum offloads, the `adapter->disable_meta_caching` value can be simply passed to the HW. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena_netmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index 7e07b0a8c555..74cdea6c34fa 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -426,6 +426,7 @@ ena_netmap_tx_frame(struct ena_netmap_ctx *ctx) ena_tx_ctx.num_bufs = tx_info->num_of_bufs; ena_tx_ctx.req_id = req_id; ena_tx_ctx.header_len = header_len; + ena_tx_ctx.meta_valid = adapter->disable_meta_caching; /* There are no any offloads, as the netmap doesn't support them */ From owner-dev-commits-src-all@freebsd.org Wed Sep 1 23:07:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D18E56736EE; Wed, 1 Sep 2021 23:07: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 4H0KTT1X0zz4ybp; Wed, 1 Sep 2021 23:07: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 818645EFA; Wed, 1 Sep 2021 23:07: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 181N7es7020953; Wed, 1 Sep 2021 23:07:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181N7eHe020952; Wed, 1 Sep 2021 23:07:40 GMT (envelope-from git) Date: Wed, 1 Sep 2021 23:07:40 GMT Message-Id: <202109012307.181N7eHe020952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 07aff471c0de - main - ena: Share ena_global_lock between driver instances MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 07aff471c0de2de9a1dc5c7749c46b525bdd0201 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 23:07:42 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=07aff471c0de2de9a1dc5c7749c46b525bdd0201 commit 07aff471c0de2de9a1dc5c7749c46b525bdd0201 Author: Artur Rojek AuthorDate: 2021-08-12 08:34:28 +0000 Commit: Marcin Wojtas CommitDate: 2021-09-01 23:06:37 +0000 ena: Share ena_global_lock between driver instances In order to use `ena_global_lock` in sysctl context, it must be kept outside the driver instance's software context, as sysctls can be called before attach and after detach, leading to lock use before sx_init and after sx_destroy otherwise. Solve this issue by turning `ena_global_lock` into a file scope variable, shared between all instances of the driver and associated sysctl context, and in turn initialized/destroyed in dedicated SYSINIT/SYSUNINIT functions. As a side effect, this change also fixes existing race in the reset routine, when simultaneously accessing sysctl exposed properties. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 74 ++++++++++++++++++++++++------------------------ sys/dev/ena/ena.h | 17 ++++++----- sys/dev/ena/ena_netmap.c | 4 +-- sys/dev/ena/ena_sysctl.c | 62 +++++++++++++++++++++++++++++++++------- 4 files changed, 99 insertions(+), 58 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 7dff59043bb2..c1b770926b0f 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -181,6 +181,8 @@ static ena_vendor_info_t ena_vendor_info_array[] = { { 0, 0, 0 } }; +struct sx ena_global_lock; + /* * Contains pointers to event handlers, e.g. link state chage. */ @@ -1127,8 +1129,6 @@ ena_update_buf_ring_size(struct ena_adapter *adapter, int rc = 0; bool dev_was_up; - ENA_LOCK_LOCK(adapter); - old_buf_ring_size = adapter->buf_ring_size; adapter->buf_ring_size = new_buf_ring_size; @@ -1163,8 +1163,6 @@ ena_update_buf_ring_size(struct ena_adapter *adapter, } } - ENA_LOCK_UNLOCK(adapter); - return (rc); } @@ -1176,8 +1174,6 @@ ena_update_queue_size(struct ena_adapter *adapter, uint32_t new_tx_size, int rc = 0; bool dev_was_up; - ENA_LOCK_LOCK(adapter); - old_tx_size = adapter->requested_tx_ring_size; old_rx_size = adapter->requested_rx_ring_size; adapter->requested_tx_ring_size = new_tx_size; @@ -1218,8 +1214,6 @@ ena_update_queue_size(struct ena_adapter *adapter, uint32_t new_tx_size, } } - ENA_LOCK_UNLOCK(adapter); - return (rc); } @@ -1242,8 +1236,6 @@ ena_update_io_queue_nb(struct ena_adapter *adapter, uint32_t new_num) int rc = 0; bool dev_was_up; - ENA_LOCK_LOCK(adapter); - dev_was_up = ENA_FLAG_ISSET(ENA_FLAG_DEV_UP, adapter); old_num = adapter->num_io_queues; ena_down(adapter); @@ -1273,8 +1265,6 @@ ena_update_io_queue_nb(struct ena_adapter *adapter, uint32_t new_num) } } - ENA_LOCK_UNLOCK(adapter); - return (rc); } @@ -2029,7 +2019,7 @@ ena_up(struct ena_adapter *adapter) { int rc = 0; - ENA_LOCK_ASSERT(adapter); + ENA_LOCK_ASSERT(); if (unlikely(device_is_attached(adapter->pdev) == 0)) { ena_log(adapter->pdev, ERR, "device is not attached!\n"); @@ -2148,13 +2138,13 @@ ena_media_status(if_t ifp, struct ifmediareq *ifmr) struct ena_adapter *adapter = if_getsoftc(ifp); ena_log(adapter->pdev, DBG, "Media status update\n"); - ENA_LOCK_LOCK(adapter); + ENA_LOCK_LOCK(); ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; if (!ENA_FLAG_ISSET(ENA_FLAG_LINK_UP, adapter)) { - ENA_LOCK_UNLOCK(adapter); + ENA_LOCK_UNLOCK(); ena_log(adapter->pdev, INFO, "Link is down\n"); return; } @@ -2162,7 +2152,7 @@ ena_media_status(if_t ifp, struct ifmediareq *ifmr) ifmr->ifm_status |= IFM_ACTIVE; ifmr->ifm_active |= IFM_UNKNOWN | IFM_FDX; - ENA_LOCK_UNLOCK(adapter); + ENA_LOCK_UNLOCK(); } static void @@ -2171,9 +2161,9 @@ ena_init(void *arg) struct ena_adapter *adapter = (struct ena_adapter *)arg; if (!ENA_FLAG_ISSET(ENA_FLAG_DEV_UP, adapter)) { - ENA_LOCK_LOCK(adapter); + ENA_LOCK_LOCK(); ena_up(adapter); - ENA_LOCK_UNLOCK(adapter); + ENA_LOCK_UNLOCK(); } } @@ -2195,13 +2185,13 @@ ena_ioctl(if_t ifp, u_long command, caddr_t data) case SIOCSIFMTU: if (ifp->if_mtu == ifr->ifr_mtu) break; - ENA_LOCK_LOCK(adapter); + ENA_LOCK_LOCK(); ena_down(adapter); ena_change_mtu(ifp, ifr->ifr_mtu); rc = ena_up(adapter); - ENA_LOCK_UNLOCK(adapter); + ENA_LOCK_UNLOCK(); break; case SIOCSIFFLAGS: @@ -2213,15 +2203,15 @@ ena_ioctl(if_t ifp, u_long command, caddr_t data) "ioctl promisc/allmulti\n"); } } else { - ENA_LOCK_LOCK(adapter); + ENA_LOCK_LOCK(); rc = ena_up(adapter); - ENA_LOCK_UNLOCK(adapter); + ENA_LOCK_UNLOCK(); } } else { if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0) { - ENA_LOCK_LOCK(adapter); + ENA_LOCK_LOCK(); ena_down(adapter); - ENA_LOCK_UNLOCK(adapter); + ENA_LOCK_UNLOCK(); } } break; @@ -2246,10 +2236,10 @@ ena_ioctl(if_t ifp, u_long command, caddr_t data) if ((reinit != 0) && ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0)) { - ENA_LOCK_LOCK(adapter); + ENA_LOCK_LOCK(); ena_down(adapter); rc = ena_up(adapter); - ENA_LOCK_UNLOCK(adapter); + ENA_LOCK_UNLOCK(); } } @@ -2404,7 +2394,7 @@ ena_down(struct ena_adapter *adapter) { int rc; - ENA_LOCK_ASSERT(adapter); + ENA_LOCK_ASSERT(); if (!ENA_FLAG_ISSET(ENA_FLAG_DEV_UP, adapter)) return; @@ -3400,12 +3390,12 @@ ena_reset_task(void *arg, int pending) { struct ena_adapter *adapter = (struct ena_adapter *)arg; - ENA_LOCK_LOCK(adapter); + ENA_LOCK_LOCK(); if (likely(ENA_FLAG_ISSET(ENA_FLAG_TRIGGER_RESET, adapter))) { ena_destroy_device(adapter, false); ena_restore_device(adapter); } - ENA_LOCK_UNLOCK(adapter); + ENA_LOCK_UNLOCK(); } /** @@ -3434,8 +3424,6 @@ ena_attach(device_t pdev) adapter = device_get_softc(pdev); adapter->pdev = pdev; - ENA_LOCK_INIT(adapter); - /* * Set up the timer service - driver is responsible for avoiding * concurrency, as the callout won't be using any locking inside. @@ -3677,19 +3665,19 @@ ena_detach(device_t pdev) ether_ifdetach(adapter->ifp); /* Stop timer service */ - ENA_LOCK_LOCK(adapter); + ENA_LOCK_LOCK(); callout_drain(&adapter->timer_service); - ENA_LOCK_UNLOCK(adapter); + ENA_LOCK_UNLOCK(); /* Release reset task */ while (taskqueue_cancel(adapter->reset_tq, &adapter->reset_task, NULL)) taskqueue_drain(adapter->reset_tq, &adapter->reset_task); taskqueue_free(adapter->reset_tq); - ENA_LOCK_LOCK(adapter); + ENA_LOCK_LOCK(); ena_down(adapter); ena_destroy_device(adapter, true); - ENA_LOCK_UNLOCK(adapter); + ENA_LOCK_UNLOCK(); /* Restore unregistered sysctl queue nodes. */ ena_sysctl_update_queue_node_nb(adapter, adapter->num_io_queues, @@ -3723,8 +3711,6 @@ ena_detach(device_t pdev) ena_com_delete_host_info(ena_dev); - ENA_LOCK_DESTROY(adapter); - if_free(adapter->ifp); free(ena_dev->bus, M_DEVBUF); @@ -3790,6 +3776,20 @@ static void ena_notification(void *adapter_data, } } +static void +ena_lock_init(void *arg) +{ + ENA_LOCK_INIT(); +} +SYSINIT(ena_lock_init, SI_SUB_LOCK, SI_ORDER_FIRST, ena_lock_init, NULL); + +static void +ena_lock_uninit(void *arg) +{ + ENA_LOCK_DESTROY(); +} +SYSUNINIT(ena_lock_uninit, SI_SUB_LOCK, SI_ORDER_FIRST, ena_lock_uninit, NULL); + /** * This handler will called for unknown event group or unimplemented handlers **/ diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index c7e952f5b571..0e85cb39b001 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -401,8 +401,6 @@ struct ena_adapter { struct resource *msix; int msix_rid; - struct sx global_lock; - /* MSI-X */ struct msix_entry *msix_entries; int msix_vecs; @@ -482,17 +480,18 @@ struct ena_adapter { #define ENA_RING_MTX_ASSERT(_ring) \ mtx_assert(&(_ring)->ring_mtx, MA_OWNED) -#define ENA_LOCK_INIT(adapter) \ - sx_init(&(adapter)->global_lock, "ENA global lock") -#define ENA_LOCK_DESTROY(adapter) sx_destroy(&(adapter)->global_lock) -#define ENA_LOCK_LOCK(adapter) sx_xlock(&(adapter)->global_lock) -#define ENA_LOCK_UNLOCK(adapter) sx_unlock(&(adapter)->global_lock) -#define ENA_LOCK_ASSERT(adapter) \ - sx_assert(&(adapter)->global_lock, SA_XLOCKED) +#define ENA_LOCK_INIT() \ + sx_init(&ena_global_lock, "ENA global lock") +#define ENA_LOCK_DESTROY() sx_destroy(&ena_global_lock) +#define ENA_LOCK_LOCK() sx_xlock(&ena_global_lock) +#define ENA_LOCK_UNLOCK() sx_unlock(&ena_global_lock) +#define ENA_LOCK_ASSERT() sx_assert(&ena_global_lock, SA_XLOCKED) #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) #define clamp_val(val, lo, hi) clamp_t(__typeof(val), val, lo, hi) +extern struct sx ena_global_lock; + static inline int ena_mbuf_count(struct mbuf *mbuf) { int count = 1; diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index 74cdea6c34fa..1525b1efd954 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -278,7 +278,7 @@ ena_netmap_reg(struct netmap_adapter *na, int onoff) enum txrx t; int rc, i; - ENA_LOCK_LOCK(adapter); + ENA_LOCK_LOCK(); ENA_FLAG_CLEAR_ATOMIC(ENA_FLAG_TRIGGER_RESET, adapter); ena_down(adapter); @@ -315,7 +315,7 @@ ena_netmap_reg(struct netmap_adapter *na, int onoff) ENA_FLAG_SET_ATOMIC(ENA_FLAG_DEV_UP_BEFORE_RESET, adapter); rc = ena_restore_device(adapter); } - ENA_LOCK_UNLOCK(adapter); + ENA_LOCK_UNLOCK(); return (rc); } diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index c9a5419811a8..cc8dff4af0c0 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -442,6 +442,12 @@ ena_sysctl_buf_ring_size(SYSCTL_HANDLER_ARGS) uint32_t val; int error; + ENA_LOCK_LOCK(); + if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_DEVICE_RUNNING, adapter))) { + error = EINVAL; + goto unlock; + } + val = 0; error = sysctl_wire_old_buffer(req, sizeof(val)); if (error == 0) { @@ -449,13 +455,14 @@ ena_sysctl_buf_ring_size(SYSCTL_HANDLER_ARGS) error = sysctl_handle_32(oidp, &val, 0, req); } if (error != 0 || req->newptr == NULL) - return (error); + goto unlock; if (!powerof2(val) || val == 0) { ena_log(adapter->pdev, ERR, "Requested new Tx buffer ring size (%u) is not a power of 2\n", val); - return (EINVAL); + error = EINVAL; + goto unlock; } if (val != adapter->buf_ring_size) { @@ -470,6 +477,9 @@ ena_sysctl_buf_ring_size(SYSCTL_HANDLER_ARGS) adapter->buf_ring_size); } +unlock: + ENA_LOCK_UNLOCK(); + return (error); } @@ -480,6 +490,12 @@ ena_sysctl_rx_queue_size(SYSCTL_HANDLER_ARGS) uint32_t val; int error; + ENA_LOCK_LOCK(); + if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_DEVICE_RUNNING, adapter))) { + error = EINVAL; + goto unlock; + } + val = 0; error = sysctl_wire_old_buffer(req, sizeof(val)); if (error == 0) { @@ -487,13 +503,14 @@ ena_sysctl_rx_queue_size(SYSCTL_HANDLER_ARGS) error = sysctl_handle_32(oidp, &val, 0, req); } if (error != 0 || req->newptr == NULL) - return (error); + goto unlock; if (val < ENA_MIN_RING_SIZE || val > adapter->max_rx_ring_size) { ena_log(adapter->pdev, ERR, "Requested new Rx queue size (%u) is out of range: [%u, %u]\n", val, ENA_MIN_RING_SIZE, adapter->max_rx_ring_size); - return (EINVAL); + error = EINVAL; + goto unlock; } /* Check if the parameter is power of 2 */ @@ -501,7 +518,8 @@ ena_sysctl_rx_queue_size(SYSCTL_HANDLER_ARGS) ena_log(adapter->pdev, ERR, "Requested new Rx queue size (%u) is not a power of 2\n", val); - return (EINVAL); + error = EINVAL; + goto unlock; } if (val != adapter->requested_rx_ring_size) { @@ -517,6 +535,9 @@ ena_sysctl_rx_queue_size(SYSCTL_HANDLER_ARGS) adapter->requested_rx_ring_size); } +unlock: + ENA_LOCK_UNLOCK(); + return (error); } @@ -530,18 +551,25 @@ ena_sysctl_io_queues_nb(SYSCTL_HANDLER_ARGS) uint32_t old_num_queues, tmp = 0; int error; + ENA_LOCK_LOCK(); + if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_DEVICE_RUNNING, adapter))) { + error = EINVAL; + goto unlock; + } + error = sysctl_wire_old_buffer(req, sizeof(tmp)); if (error == 0) { tmp = adapter->num_io_queues; error = sysctl_handle_int(oidp, &tmp, 0, req); } if (error != 0 || req->newptr == NULL) - return (error); + goto unlock; if (tmp == 0) { ena_log(adapter->pdev, ERR, "Requested number of IO queues is zero\n"); - return (EINVAL); + error = EINVAL; + goto unlock; } /* @@ -555,7 +583,8 @@ ena_sysctl_io_queues_nb(SYSCTL_HANDLER_ARGS) ena_log(adapter->pdev, ERR, "Requested number of IO queues is higher than maximum " "allowed (%u)\n", adapter->msix_vecs - ENA_ADMIN_MSIX_VEC); - return (EINVAL); + error = EINVAL; + goto unlock; } if (tmp == adapter->num_io_queues) { ena_log(adapter->pdev, ERR, @@ -574,6 +603,9 @@ ena_sysctl_io_queues_nb(SYSCTL_HANDLER_ARGS) ena_sysctl_update_queue_node_nb(adapter, old_num_queues, tmp); } +unlock: + ENA_LOCK_UNLOCK(); + return (error); } @@ -584,19 +616,26 @@ ena_sysctl_eni_metrics_interval(SYSCTL_HANDLER_ARGS) uint16_t interval; int error; + ENA_LOCK_LOCK(); + if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_DEVICE_RUNNING, adapter))) { + error = EINVAL; + goto unlock; + } + error = sysctl_wire_old_buffer(req, sizeof(interval)); if (error == 0) { interval = adapter->eni_metrics_sample_interval; error = sysctl_handle_16(oidp, &interval, 0, req); } if (error != 0 || req->newptr == NULL) - return (error); + goto unlock; if (interval > ENI_METRICS_MAX_SAMPLE_INTERVAL) { ena_log(adapter->pdev, ERR, "ENI metrics update interval is out of range - maximum allowed value: %d seconds\n", ENI_METRICS_MAX_SAMPLE_INTERVAL); - return (EINVAL); + error = EINVAL; + goto unlock; } if (interval == 0) { @@ -611,5 +650,8 @@ ena_sysctl_eni_metrics_interval(SYSCTL_HANDLER_ARGS) adapter->eni_metrics_sample_interval = interval; +unlock: + ENA_LOCK_UNLOCK(); + return (0); } From owner-dev-commits-src-all@freebsd.org Wed Sep 1 23:07:43 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0C3E76734DE; Wed, 1 Sep 2021 23:07: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 4H0KTV2CtRz4yFq; Wed, 1 Sep 2021 23:07: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 AD0296106; Wed, 1 Sep 2021 23:07: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 181N7fJb020977; Wed, 1 Sep 2021 23:07:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181N7fsG020976; Wed, 1 Sep 2021 23:07:41 GMT (envelope-from git) Date: Wed, 1 Sep 2021 23:07:41 GMT Message-Id: <202109012307.181N7fsG020976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 223c8cb12e95 - main - ena: Add missing statistics MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 223c8cb12e951c63807300a0cbdc4a1569520b4b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 23:07:43 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=223c8cb12e951c63807300a0cbdc4a1569520b4b commit 223c8cb12e951c63807300a0cbdc4a1569520b4b Author: Artur Rojek AuthorDate: 2021-08-12 08:34:29 +0000 Commit: Marcin Wojtas CommitDate: 2021-09-01 23:06:47 +0000 ena: Add missing statistics Provide the following sysctl statistics in order to stay aligned with the Linux driver: * rx_ring.csum_good * tx_ring.unmask_interrupt_num Also rename the 'bad_csum' statistic name to 'csum_bad' for alignment. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 3 +++ sys/dev/ena/ena.h | 4 +++- sys/dev/ena/ena_datapath.c | 6 ++++-- sys/dev/ena/ena_sysctl.c | 11 +++++++++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index c1b770926b0f..91ddc7733b9f 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -1874,6 +1874,7 @@ ena_unmask_all_io_irqs(struct ena_adapter *adapter) { struct ena_com_io_cq* io_cq; struct ena_eth_io_intr_reg intr_reg; + struct ena_ring *tx_ring; uint16_t ena_qid; int i; @@ -1882,6 +1883,8 @@ ena_unmask_all_io_irqs(struct ena_adapter *adapter) ena_qid = ENA_IO_TXQ_IDX(i); io_cq = &adapter->ena_dev->io_cq_queues[ena_qid]; ena_com_update_intr_reg(&intr_reg, 0, 0, true); + tx_ring = &adapter->tx_ring[i]; + counter_u64_add(tx_ring->tx_stats.unmask_interrupt_num, 1); ena_com_unmask_intr(io_cq, &intr_reg); } } diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 0e85cb39b001..bc0f59a6f711 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -280,19 +280,21 @@ struct ena_stats_tx { counter_u64_t queue_wakeup; counter_u64_t queue_stop; counter_u64_t llq_buffer_copy; + counter_u64_t unmask_interrupt_num; }; struct ena_stats_rx { counter_u64_t cnt; counter_u64_t bytes; counter_u64_t refil_partial; - counter_u64_t bad_csum; + counter_u64_t csum_bad; counter_u64_t mjum_alloc_fail; counter_u64_t mbuf_alloc_fail; counter_u64_t dma_mapping_err; counter_u64_t bad_desc_num; counter_u64_t bad_req_id; counter_u64_t empty_rx_ring; + counter_u64_t csum_good; }; struct ena_ring { diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 6506c808e4cb..e1993a714fa0 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -103,6 +103,7 @@ ena_cleanup(void *arg, int pending) RX_IRQ_INTERVAL, TX_IRQ_INTERVAL, true); + counter_u64_add(tx_ring->tx_stats.unmask_interrupt_num, 1); ena_com_unmask_intr(io_cq, &intr_reg); } @@ -516,7 +517,7 @@ ena_rx_checksum(struct ena_ring *rx_ring, struct ena_com_rx_ctx *ena_rx_ctx, ena_rx_ctx->l3_csum_err)) { /* ipv4 checksum error */ mbuf->m_pkthdr.csum_flags = 0; - counter_u64_add(rx_ring->rx_stats.bad_csum, 1); + counter_u64_add(rx_ring->rx_stats.csum_bad, 1); ena_log_io(pdev, DBG, "RX IPv4 header checksum error\n"); return; } @@ -527,11 +528,12 @@ ena_rx_checksum(struct ena_ring *rx_ring, struct ena_com_rx_ctx *ena_rx_ctx, if (ena_rx_ctx->l4_csum_err) { /* TCP/UDP checksum error */ mbuf->m_pkthdr.csum_flags = 0; - counter_u64_add(rx_ring->rx_stats.bad_csum, 1); + counter_u64_add(rx_ring->rx_stats.csum_bad, 1); ena_log_io(pdev, DBG, "RX L4 checksum error\n"); } else { mbuf->m_pkthdr.csum_flags = CSUM_IP_CHECKED; mbuf->m_pkthdr.csum_flags |= CSUM_IP_VALID; + counter_u64_add(rx_ring->rx_stats.csum_good, 1); } } } diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index cc8dff4af0c0..91bd0f74b341 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -238,6 +238,10 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) "llq_buffer_copy", CTLFLAG_RD, &tx_stats->llq_buffer_copy, "Header copies for llq transaction"); + SYSCTL_ADD_COUNTER_U64(ctx, tx_list, OID_AUTO, + "unmask_interrupt_num", CTLFLAG_RD, + &tx_stats->unmask_interrupt_num, + "Unmasked interrupt count"); /* RX specific stats */ rx_node = SYSCTL_ADD_NODE(ctx, queue_list, OID_AUTO, @@ -256,8 +260,8 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) "refil_partial", CTLFLAG_RD, &rx_stats->refil_partial, "Partial refilled mbufs"); SYSCTL_ADD_COUNTER_U64(ctx, rx_list, OID_AUTO, - "bad_csum", CTLFLAG_RD, - &rx_stats->bad_csum, "Bad RX checksum"); + "csum_bad", CTLFLAG_RD, + &rx_stats->csum_bad, "Bad RX checksum"); SYSCTL_ADD_COUNTER_U64(ctx, rx_list, OID_AUTO, "mbuf_alloc_fail", CTLFLAG_RD, &rx_stats->mbuf_alloc_fail, "Failed mbuf allocs"); @@ -276,6 +280,9 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) SYSCTL_ADD_COUNTER_U64(ctx, rx_list, OID_AUTO, "empty_rx_ring", CTLFLAG_RD, &rx_stats->empty_rx_ring, "RX descriptors depletion count"); + SYSCTL_ADD_COUNTER_U64(ctx, rx_list, OID_AUTO, + "csum_good", CTLFLAG_RD, + &rx_stats->csum_good, "Valid RX checksum calculations"); } /* Stats read from device */ From owner-dev-commits-src-all@freebsd.org Wed Sep 1 23:07:43 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BA0F26734E7; Wed, 1 Sep 2021 23:07: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 4H0KTW0b7Qz4ybw; Wed, 1 Sep 2021 23:07: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 C9C876107; Wed, 1 Sep 2021 23:07: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 181N7gL2021001; Wed, 1 Sep 2021 23:07:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181N7gjR021000; Wed, 1 Sep 2021 23:07:42 GMT (envelope-from git) Date: Wed, 1 Sep 2021 23:07:42 GMT Message-Id: <202109012307.181N7gjR021000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 6d1ef2abd330 - main - ena: Implement full RSS reconfiguration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d1ef2abd330fac4057f092abbbdc28a568b4327 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 23:07:43 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=6d1ef2abd330fac4057f092abbbdc28a568b4327 commit 6d1ef2abd330fac4057f092abbbdc28a568b4327 Author: Artur Rojek AuthorDate: 2021-08-12 08:34:29 +0000 Commit: Marcin Wojtas CommitDate: 2021-09-01 23:06:53 +0000 ena: Implement full RSS reconfiguration Bind RX/TX queues and MSI-X vectors to matching CPUs based on the RSS bucket entries. Introduce sysctls for the following RSS functionality: - rss.indir_table: indirection table mapping - rss.indir_table_size: indirection table size - rss.key: RSS hash key (if Toeplitz used) Said sysctls are only available when compiled without `option RSS`, as kernel-side RSS support currently doesn't offer RSS reconfiguration. Migrate the hash algorithm from CRC32 to Toeplitz and change the initial hash value to 0x0 in order to match the standard Toeplitz implementation. Provide helpers for hash key inversion required for HW operations. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- share/man/man4/ena.4 | 51 +++++++++ sys/dev/ena/ena.c | 62 ++++++++--- sys/dev/ena/ena.h | 10 +- sys/dev/ena/ena_datapath.c | 14 ++- sys/dev/ena/ena_rss.c | 128 ++++++++++++++++++++++- sys/dev/ena/ena_rss.h | 24 +++++ sys/dev/ena/ena_sysctl.c | 256 +++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 525 insertions(+), 20 deletions(-) diff --git a/share/man/man4/ena.4 b/share/man/man4/ena.4 index cd98fe2c84ba..aacf7956c9f8 100644 --- a/share/man/man4/ena.4 +++ b/share/man/man4/ena.4 @@ -269,6 +269,57 @@ command should be used: .Bd -literal -offset indent sysctl dev.ena.1.eni_metrics.sample_interval=10 .Ed +.It Va dev.ena.X.rss.indir_table_size +RSS indirection table size. +The default is 128. +Returns the number of entries in the RSS indirection table. +.Pp +Example: +To read the RSS indirection table size, the following command should be used: +.Bd -literal -offset indent +sysctl dev.ena.0.rss.indir_table_size +.Ed +.It Va dev.ena.X.rss.indir_table +RSS indirection table mapping. +The default is x:y key-pairs of indir_table_size length. +Updates selected indices of the RSS indirection table. +.Pp +The entry string consists of one or more x:y keypairs, where x stands for +the table index and y for its new value. Table indices that don't need to be +updated can be omitted from the string and will retain their existing values. +.Pp +If an index is entered more than once, the last value is used. +.Pp +Example: +To update two selected indices in the RSS indirection table, e.g. setting index +0 to queue 5 and then index 5 to queue 0, the following command should be used: +.Bd -literal -offset indent +sysctl dev.ena.0.rss.indir_table="0:5 5:0" +.Ed +.It Va dev.ena.X.rss.key +RSS hash key. +The default is 40 bytes long randomly generated hash key. +Controls the RSS Toeplitz hash algorithm key value. +.Pp +Only available when driver compiled without the kernel side RSS support. +.Pp +Example: +To change the RSS hash key value to +.Pp +0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, +.br +0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, +.br +0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4, +.br +0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, +.br +0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa +.Pp +the following command should be used: +.Bd -literal -offset indent +sysctl dev.ena.0.rss.key=6d5a56da255b0ec24167253d43a38fb0d0ca2bcbae7b30b477cb2da38030f20c6a42b73bbeac01fa +.Ed .El .Sh DIAGNOSTICS .Ss Device initialization phase diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 91ddc7733b9f..84ef234cd937 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -601,8 +601,10 @@ static int ena_setup_tx_resources(struct ena_adapter *adapter, int qid) { device_t pdev = adapter->pdev; + char thread_name[MAXCOMLEN + 1]; struct ena_que *que = &adapter->que[qid]; struct ena_ring *tx_ring = que->tx_ring; + cpuset_t *cpu_mask = NULL; int size, i, err; #ifdef DEV_NETMAP bus_dmamap_t *map; @@ -686,8 +688,16 @@ ena_setup_tx_resources(struct ena_adapter *adapter, int qid) tx_ring->running = true; - taskqueue_start_threads(&tx_ring->enqueue_tq, 1, PI_NET, - "%s txeq %d", device_get_nameunit(adapter->pdev), que->cpu); +#ifdef RSS + cpu_mask = &que->cpu_mask; + snprintf(thread_name, sizeof(thread_name), "%s txeq %d", + device_get_nameunit(adapter->pdev), que->cpu); +#else + snprintf(thread_name, sizeof(thread_name), "%s txeq %d", + device_get_nameunit(adapter->pdev), que->id); +#endif + taskqueue_start_threads_cpuset(&tx_ring->enqueue_tq, 1, PI_NET, + cpu_mask, "%s", thread_name); return (0); @@ -1423,6 +1433,7 @@ ena_create_io_queues(struct ena_adapter *adapter) struct ena_que *queue; uint16_t ena_qid; uint32_t msix_vector; + cpuset_t *cpu_mask = NULL; int rc, i; /* Create TX queues */ @@ -1489,7 +1500,11 @@ ena_create_io_queues(struct ena_adapter *adapter) queue->cleanup_tq = taskqueue_create_fast("ena cleanup", M_WAITOK, taskqueue_thread_enqueue, &queue->cleanup_tq); - taskqueue_start_threads(&queue->cleanup_tq, 1, PI_NET, +#ifdef RSS + cpu_mask = &queue->cpu_mask; +#endif + taskqueue_start_threads_cpuset(&queue->cleanup_tq, 1, PI_NET, + cpu_mask, "%s queue %d cleanup", device_get_nameunit(adapter->pdev), i); } @@ -1628,7 +1643,10 @@ ena_setup_mgmnt_intr(struct ena_adapter *adapter) static int ena_setup_io_intr(struct ena_adapter *adapter) { - static int last_bind_cpu = -1; +#ifdef RSS + int num_buckets = rss_getnumbuckets(); + static int last_bind = 0; +#endif int irq_idx; if (adapter->msix_entries == NULL) @@ -1646,15 +1664,12 @@ ena_setup_io_intr(struct ena_adapter *adapter) ena_log(adapter->pdev, DBG, "ena_setup_io_intr vector: %d\n", adapter->msix_entries[irq_idx].vector); - /* - * We want to bind rings to the corresponding cpu - * using something similar to the RSS round-robin technique. - */ - if (unlikely(last_bind_cpu < 0)) - last_bind_cpu = CPU_FIRST(); +#ifdef RSS adapter->que[i].cpu = adapter->irq_tbl[irq_idx].cpu = - last_bind_cpu; - last_bind_cpu = CPU_NEXT(last_bind_cpu); + rss_getcpu(last_bind); + last_bind = (last_bind + 1) % num_buckets; + CPU_SETOF(adapter->que[i].cpu, &adapter->que[i].cpu_mask); +#endif } return (0); @@ -1746,6 +1761,19 @@ ena_request_io_irq(struct ena_adapter *adapter) goto err; } irq->requested = true; + +#ifdef RSS + rc = bus_bind_intr(adapter->pdev, irq->res, irq->cpu); + if (unlikely(rc != 0)) { + ena_log(pdev, ERR, "failed to bind " + "interrupt handler for irq %ju to cpu %d: %d\n", + rman_get_start(irq->res), irq->cpu, rc); + goto err; + } + + ena_log(pdev, INFO, "queue %d - cpu %d\n", + i - ENA_IO_IRQ_FIRST_IDX, irq->cpu); +#endif } return (rc); @@ -2464,6 +2492,10 @@ ena_calc_max_io_queue_num(device_t pdev, struct ena_com_dev *ena_dev, /* 1 IRQ for for mgmnt and 1 IRQ for each TX/RX pair */ max_num_io_queues = min_t(uint32_t, max_num_io_queues, pci_msix_count(pdev) - 1); +#ifdef RSS + max_num_io_queues = min_t(uint32_t, max_num_io_queues, + rss_getnumbuckets()); +#endif return (max_num_io_queues); } @@ -2692,7 +2724,8 @@ ena_config_host_info(struct ena_com_dev *ena_dev, device_t dev) (DRV_MODULE_VER_SUBMINOR << ENA_ADMIN_HOST_INFO_SUB_MINOR_SHIFT); host_info->num_cpus = mp_ncpus; host_info->driver_supported_features = - ENA_ADMIN_HOST_INFO_RX_OFFSET_MASK; + ENA_ADMIN_HOST_INFO_RX_OFFSET_MASK | + ENA_ADMIN_HOST_INFO_RSS_CONFIGURABLE_FUNCTION_KEY_MASK; rc = ena_com_set_host_attributes(ena_dev); if (unlikely(rc != 0)) { @@ -3709,6 +3742,9 @@ ena_detach(device_t pdev) ena_free_pci_resources(adapter); + if (adapter->rss_indir != NULL) + free(adapter->rss_indir, M_DEVBUF); + if (likely(ENA_FLAG_ISSET(ENA_FLAG_RSS_ACTIVE, adapter))) ena_com_rss_destroy(ena_dev); diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index bc0f59a6f711..50467ffe0707 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -34,6 +34,7 @@ #ifndef ENA_H #define ENA_H +#include "opt_rss.h" #include "ena-com/ena_com.h" #include "ena-com/ena_eth_com.h" @@ -122,6 +123,8 @@ #define ENA_IO_TXQ_IDX(q) (2 * (q)) #define ENA_IO_RXQ_IDX(q) (2 * (q) + 1) +#define ENA_IO_TXQ_IDX_TO_COMBINED_IDX(q) ((q) / 2) +#define ENA_IO_RXQ_IDX_TO_COMBINED_IDX(q) (((q) - 1) / 2) #define ENA_MGMNT_IRQ_IDX 0 #define ENA_IO_IRQ_FIRST_IDX 1 @@ -200,7 +203,9 @@ struct ena_irq { void *cookie; unsigned int vector; bool requested; +#ifdef RSS int cpu; +#endif char name[ENA_IRQNAME_SIZE]; }; @@ -213,7 +218,10 @@ struct ena_que { struct taskqueue *cleanup_tq; uint32_t id; +#ifdef RSS int cpu; + cpuset_t cpu_mask; +#endif struct sysctl_oid *oid; }; @@ -431,7 +439,7 @@ struct ena_adapter { uint32_t buf_ring_size; /* RSS*/ - uint8_t rss_ind_tbl[ENA_RX_RSS_TABLE_SIZE]; + struct ena_indir *rss_indir; uint8_t mac_addr[ETHER_ADDR_LEN]; /* mdio and phy*/ diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index e1993a714fa0..0e6a6fe82038 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #ifdef DEV_NETMAP #include "ena_netmap.h" #endif /* DEV_NETMAP */ +#ifdef RSS +#include +#endif /* RSS */ /********************************************************************* * Static functions prototypes @@ -129,6 +132,9 @@ ena_mq_start(if_t ifp, struct mbuf *m) struct ena_ring *tx_ring; int ret, is_drbr_empty; uint32_t i; +#ifdef RSS + uint32_t bucket_id; +#endif if (unlikely((if_getdrvflags(adapter->ifp) & IFF_DRV_RUNNING) == 0)) return (ENODEV); @@ -140,7 +146,13 @@ ena_mq_start(if_t ifp, struct mbuf *m) * It should improve performance. */ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) { - i = m->m_pkthdr.flowid % adapter->num_io_queues; +#ifdef RSS + if (rss_hash2bucket(m->m_pkthdr.flowid, M_HASHTYPE_GET(m), + &bucket_id) == 0) + i = bucket_id % adapter->num_io_queues; + else +#endif + i = m->m_pkthdr.flowid % adapter->num_io_queues; } else { i = curcpu % adapter->num_io_queues; } diff --git a/sys/dev/ena/ena_rss.c b/sys/dev/ena/ena_rss.c index f314905559d2..116eaa425b01 100644 --- a/sys/dev/ena/ena_rss.c +++ b/sys/dev/ena/ena_rss.c @@ -59,6 +59,45 @@ ena_rss_key_fill(void *key, size_t size) memcpy(key, default_key, size); } +/* + * ENA HW expects the key to be in reverse-byte order. + */ +static void +ena_rss_reorder_hash_key(u8 *reordered_key, const u8 *key, size_t key_size) +{ + int i; + + key = key + key_size - 1; + + for (i = 0; i < key_size; ++i) + *reordered_key++ = *key--; +} + +int ena_rss_set_hash(struct ena_com_dev *ena_dev, const u8 *key) +{ + enum ena_admin_hash_functions ena_func = ENA_ADMIN_TOEPLITZ; + u8 hw_key[ENA_HASH_KEY_SIZE]; + + ena_rss_reorder_hash_key(hw_key, key, ENA_HASH_KEY_SIZE); + + return (ena_com_fill_hash_function(ena_dev, ena_func, hw_key, + ENA_HASH_KEY_SIZE, 0x0)); +} + +int ena_rss_get_hash_key(struct ena_com_dev *ena_dev, u8 *key) +{ + u8 hw_key[ENA_HASH_KEY_SIZE]; + int rc; + + rc = ena_com_get_hash_key(ena_dev, hw_key); + if (rc != 0) + return rc; + + ena_rss_reorder_hash_key(key, hw_key, ENA_HASH_KEY_SIZE); + + return (0); +} + static int ena_rss_init_default(struct ena_adapter *adapter) { @@ -73,7 +112,11 @@ ena_rss_init_default(struct ena_adapter *adapter) } for (i = 0; i < ENA_RX_RSS_TABLE_SIZE; i++) { +#ifdef RSS + qid = rss_get_indirection_to_bucket(i) % adapter->num_io_queues; +#else qid = i % adapter->num_io_queues; +#endif rc = ena_com_indirect_table_fill_entry(ena_dev, i, ENA_IO_RXQ_IDX(qid)); if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { @@ -89,12 +132,11 @@ ena_rss_init_default(struct ena_adapter *adapter) uint8_t hash_key[RSS_KEYSIZE]; rss_getkey(hash_key); - rc = ena_com_fill_hash_function(ena_dev, ENA_ADMIN_TOEPLITZ, - hash_key, RSS_KEYSIZE, 0xFFFFFFFF); + rc = ena_rss_set_hash(ena_dev, hash_key); } else #endif - rc = ena_com_fill_hash_function(ena_dev, ENA_ADMIN_CRC32, NULL, - ENA_HASH_KEY_SIZE, 0xFFFFFFFF); + rc = ena_com_fill_hash_function(ena_dev, ENA_ADMIN_TOEPLITZ, NULL, + ENA_HASH_KEY_SIZE, 0x0); if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { ena_log(dev, ERR, "Cannot fill hash function\n"); goto err_rss_destroy; @@ -106,7 +148,9 @@ ena_rss_init_default(struct ena_adapter *adapter) goto err_rss_destroy; } - return (0); + rc = ena_rss_indir_init(adapter); + + return (rc == EOPNOTSUPP ? 0 : rc); err_rss_destroy: ena_com_rss_destroy(ena_dev); @@ -180,3 +224,77 @@ ena_rss_init_default_deferred(void *arg) } } SYSINIT(ena_rss_init, SI_SUB_KICK_SCHEDULER, SI_ORDER_SECOND, ena_rss_init_default_deferred, NULL); + +int +ena_rss_indir_get(struct ena_adapter *adapter, uint32_t *table) +{ + int rc, i; + + rc = ena_com_indirect_table_get(adapter->ena_dev, table); + if (rc != 0) { + if (rc == EOPNOTSUPP) + device_printf(adapter->pdev, + "Reading from indirection table not supported\n"); + else + device_printf(adapter->pdev, + "Unable to get indirection table\n"); + return (rc); + } + + for (i = 0; i < ENA_RX_RSS_TABLE_SIZE; ++i) + table[i] = ENA_IO_RXQ_IDX_TO_COMBINED_IDX(table[i]); + + return (0); +} + +int +ena_rss_indir_set(struct ena_adapter *adapter, uint32_t *table) +{ + int rc, i; + + for (i = 0; i < ENA_RX_RSS_TABLE_SIZE; ++i) { + rc = ena_com_indirect_table_fill_entry(adapter->ena_dev, i, + ENA_IO_RXQ_IDX(table[i])); + if (rc != 0) { + device_printf(adapter->pdev, + "Cannot fill indirection table entry %d\n", i); + return (rc); + } + } + + rc = ena_com_indirect_table_set(adapter->ena_dev); + if (rc == EOPNOTSUPP) + device_printf(adapter->pdev, + "Writing to indirection table not supported\n"); + else if (rc != 0) + device_printf(adapter->pdev, + "Cannot set indirection table\n"); + + return (rc); +} + +int +ena_rss_indir_init(struct ena_adapter *adapter) +{ + struct ena_indir *indir = adapter->rss_indir; + int rc; + + if (indir == NULL) { + adapter->rss_indir = indir = malloc(sizeof(struct ena_indir), + M_DEVBUF, M_WAITOK | M_ZERO); + if (indir == NULL) + return (ENOMEM); + } + + rc = ena_rss_indir_get(adapter, indir->table); + if (rc != 0) { + free(adapter->rss_indir, M_DEVBUF); + adapter->rss_indir = NULL; + + return (rc); + } + + ena_rss_copy_indir_buf(indir->sysctl_buf, indir->table); + + return (0); +} diff --git a/sys/dev/ena/ena_rss.h b/sys/dev/ena/ena_rss.h index 14e686a5c045..42bec6fb2aa6 100644 --- a/sys/dev/ena/ena_rss.h +++ b/sys/dev/ena/ena_rss.h @@ -44,6 +44,30 @@ #include "ena.h" +#define ENA_RX_RSS_MSG_RECORD_SZ 8 + +struct ena_indir { + uint32_t table[ENA_RX_RSS_TABLE_SIZE]; + /* This is the buffer wired to `rss.indir_table` sysctl. */ + char sysctl_buf[ENA_RX_RSS_TABLE_SIZE * ENA_RX_RSS_MSG_RECORD_SZ]; +}; + +int ena_rss_set_hash(struct ena_com_dev *ena_dev, const u8 *key); +int ena_rss_get_hash_key(struct ena_com_dev *ena_dev, u8 *key); int ena_rss_configure(struct ena_adapter *); +int ena_rss_indir_get(struct ena_adapter *adapter, uint32_t *table); +int ena_rss_indir_set(struct ena_adapter *adapter, uint32_t *table); +int ena_rss_indir_init(struct ena_adapter *adapter); + +static inline void +ena_rss_copy_indir_buf(char *buf, uint32_t *table) +{ + int i; + + for (i = 0; i < ENA_RX_RSS_TABLE_SIZE; ++i) { + buf += snprintf(buf, ENA_RX_RSS_MSG_RECORD_SZ + 1, + "%s%d:%d", i == 0 ? "" : " ", i, table[i]); + } +} #endif /* !(ENA_RSS_H) */ diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index 91bd0f74b341..db3eb69cd369 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -31,19 +31,31 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_rss.h" + #include "ena_sysctl.h" +#include "ena_rss.h" static void ena_sysctl_add_wd(struct ena_adapter *); static void ena_sysctl_add_stats(struct ena_adapter *); static void ena_sysctl_add_eni_metrics(struct ena_adapter *); static void ena_sysctl_add_tuneables(struct ena_adapter *); +/* Kernel option RSS prevents manipulation of key hash and indirection table. */ +#ifndef RSS +static void ena_sysctl_add_rss(struct ena_adapter *); +#endif static int ena_sysctl_buf_ring_size(SYSCTL_HANDLER_ARGS); static int ena_sysctl_rx_queue_size(SYSCTL_HANDLER_ARGS); static int ena_sysctl_io_queues_nb(SYSCTL_HANDLER_ARGS); static int ena_sysctl_eni_metrics_interval(SYSCTL_HANDLER_ARGS); +#ifndef RSS +static int ena_sysctl_rss_key(SYSCTL_HANDLER_ARGS); +static int ena_sysctl_rss_indir_table(SYSCTL_HANDLER_ARGS); +#endif /* Limit max ENI sample rate to be an hour. */ #define ENI_METRICS_MAX_SAMPLE_INTERVAL 3600 +#define ENA_HASH_KEY_MSG_SIZE (ENA_HASH_KEY_SIZE * 2 + 1) static SYSCTL_NODE(_hw, OID_AUTO, ena, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "ENA driver parameters"); @@ -83,6 +95,8 @@ SYSCTL_BOOL(_hw_ena, OID_AUTO, force_large_llq_header, CTLFLAG_RDTUN, &ena_force_large_llq_header, 0, "Increases maximum supported header size in LLQ mode to 224 bytes, while reducing the maximum Tx queue size by half.\n"); +int ena_rss_table_size = ENA_RX_RSS_TABLE_SIZE; + void ena_sysctl_add_nodes(struct ena_adapter *adapter) { @@ -90,6 +104,9 @@ ena_sysctl_add_nodes(struct ena_adapter *adapter) ena_sysctl_add_stats(adapter); ena_sysctl_add_eni_metrics(adapter); ena_sysctl_add_tuneables(adapter); +#ifndef RSS + ena_sysctl_add_rss(adapter); +#endif } static void @@ -405,6 +422,45 @@ ena_sysctl_add_tuneables(struct ena_adapter *adapter) ena_sysctl_io_queues_nb, "I", "Number of IO queues."); } +/* Kernel option RSS prevents manipulation of key hash and indirection table. */ +#ifndef RSS +static void +ena_sysctl_add_rss(struct ena_adapter *adapter) +{ + device_t dev; + + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + struct sysctl_oid_list *child; + + dev = adapter->pdev; + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + child = SYSCTL_CHILDREN(tree); + + /* RSS options */ + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "rss", + CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, "Receive Side Scaling options."); + child = SYSCTL_CHILDREN(tree); + + /* RSS hash key */ + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "key", + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, adapter, 0, + ena_sysctl_rss_key, "A", "RSS key."); + + /* Tuneable RSS indirection table */ + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "indir_table", + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, adapter, 0, + ena_sysctl_rss_indir_table, "A", "RSS indirection table."); + + /* RSS indirection table size */ + SYSCTL_ADD_INT(ctx, child, OID_AUTO, "indir_table_size", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, &ena_rss_table_size, 0, + "RSS indirection table size."); +} +#endif /* RSS */ + /* * ena_sysctl_update_queue_node_nb - Register/unregister sysctl queue nodes. @@ -662,3 +718,203 @@ unlock: return (0); } + +#ifndef RSS +/* + * Change the Receive Side Scaling hash key. + */ +static int +ena_sysctl_rss_key(SYSCTL_HANDLER_ARGS) +{ + struct ena_adapter *adapter = arg1; + struct ena_com_dev *ena_dev = adapter->ena_dev; + enum ena_admin_hash_functions ena_func; + char msg[ENA_HASH_KEY_MSG_SIZE]; + char elem[3] = { 0 }; + char *endp; + u8 rss_key[ENA_HASH_KEY_SIZE]; + int error, i; + + ENA_LOCK_LOCK(); + if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_DEVICE_RUNNING, adapter))) { + error = EINVAL; + goto unlock; + } + + if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_RSS_ACTIVE, adapter))) { + error = ENOTSUP; + goto unlock; + } + + error = sysctl_wire_old_buffer(req, sizeof(msg)); + if (error != 0) + goto unlock; + + error = ena_com_get_hash_function(adapter->ena_dev, &ena_func); + if (error != 0) { + device_printf(adapter->pdev, "Cannot get hash function\n"); + goto unlock; + } + + if (ena_func != ENA_ADMIN_TOEPLITZ) { + error = EINVAL; + device_printf(adapter->pdev, "Unsupported hash algorithm\n"); + goto unlock; + } + + error = ena_rss_get_hash_key(ena_dev, rss_key); + if (error != 0) { + device_printf(adapter->pdev, "Cannot get hash key\n"); + goto unlock; + } + + for (i = 0; i < ENA_HASH_KEY_SIZE; ++i) + snprintf(&msg[i * 2], 3, "%02x", rss_key[i]); + + error = sysctl_handle_string(oidp, msg, sizeof(msg), req); + if (error != 0 || req->newptr == NULL) + goto unlock; + + if (strlen(msg) != sizeof(msg) - 1) { + error = EINVAL; + device_printf(adapter->pdev, "Invalid key size\n"); + goto unlock; + } + + for (i = 0; i < ENA_HASH_KEY_SIZE; ++i) { + strncpy(elem, &msg[i * 2], 2); + rss_key[i] = strtol(elem, &endp, 16); + + /* Both hex nibbles in the string must be valid to continue. */ + if (endp == elem || *endp != '\0' || rss_key[i] < 0) { + error = EINVAL; + device_printf(adapter->pdev, + "Invalid key hex value: '%c'\n", *endp); + goto unlock; + } + } + + error = ena_rss_set_hash(ena_dev, rss_key); + if (error != 0) + device_printf(adapter->pdev, "Cannot fill hash key\n"); + +unlock: + ENA_LOCK_UNLOCK(); + + return (error); +} + +/* + * Change the Receive Side Scaling indirection table. + * + * The sysctl entry string consists of one or more `x:y` keypairs, where + * x stands for the table index and y for its new value. + * Table indices that don't need to be updated can be omitted from the string + * and will retain their existing values. If an index is entered more than once, + * the last value is used. + * + * Example: + * To update two selected indices in the RSS indirection table, e.g. setting + * index 0 to queue 5 and then index 5 to queue 0, the below command should be + * used: + * sysctl dev.ena.0.rss.indir_table="0:5 5:0" + */ +static int +ena_sysctl_rss_indir_table(SYSCTL_HANDLER_ARGS) +{ + int num_queues, error; + struct ena_adapter *adapter = arg1; + struct ena_com_dev *ena_dev; + struct ena_indir *indir; + char *msg, *buf, *endp; + uint32_t idx, value; + + ENA_LOCK_LOCK(); + if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_DEVICE_RUNNING, adapter))) { + error = EINVAL; + goto unlock; + } + + if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_RSS_ACTIVE, adapter))) { + error = ENOTSUP; + goto unlock; + } + + ena_dev = adapter->ena_dev; + indir = adapter->rss_indir; + msg = indir->sysctl_buf; + + if (unlikely(indir == NULL)) { + error = ENOTSUP; + goto unlock; + } + + error = sysctl_handle_string(oidp, msg, sizeof(indir->sysctl_buf), req); + if (error != 0 || req->newptr == NULL) + goto unlock; + + num_queues = adapter->num_io_queues; + + /* + * This sysctl expects msg to be a list of `x:y` record pairs, + * where x is the indirection table index and y is its value. + */ + for (buf = msg; *buf != '\0'; buf = endp) { + idx = strtol(buf, &endp, 10); + + if (endp == buf || idx < 0) { + device_printf(adapter->pdev, "Invalid index: %s\n", + buf); + error = EINVAL; + break; + } + + if (idx >= ENA_RX_RSS_TABLE_SIZE) { + device_printf(adapter->pdev, "Index %d out of range\n", + idx); + error = ERANGE; + break; + } + + buf = endp; + + if (*buf++ != ':') { + device_printf(adapter->pdev, "Missing ':' separator\n"); + error = EINVAL; + break; + } + + value = strtol(buf, &endp, 10); + + if (endp == buf || value < 0) { + device_printf(adapter->pdev, "Invalid value: %s\n", + buf); + error = EINVAL; + break; + } + + if (value >= num_queues) { + device_printf(adapter->pdev, "Value %d out of range\n", + value); + error = ERANGE; + break; + } + + indir->table[idx] = value; + } + + if (error != 0) /* Reload indirection table with last good data. */ + ena_rss_indir_get(adapter, indir->table); + + /* At this point msg has been clobbered by sysctl_handle_string. */ + ena_rss_copy_indir_buf(msg, indir->table); + + if (error == 0) + error = ena_rss_indir_set(adapter, indir->table); + +unlock: + ENA_LOCK_UNLOCK(); + + return (error); +} +#endif /* RSS */ From owner-dev-commits-src-all@freebsd.org Wed Sep 1 23:07:44 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B39B96734EA; Wed, 1 Sep 2021 23:07: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 4H0KTX0zZTz4yc6; Wed, 1 Sep 2021 23:07: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 EE01B6068; Wed, 1 Sep 2021 23:07: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 181N7hlT021025; Wed, 1 Sep 2021 23:07:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181N7hVp021024; Wed, 1 Sep 2021 23:07:43 GMT (envelope-from git) Date: Wed, 1 Sep 2021 23:07:43 GMT Message-Id: <202109012307.181N7hVp021024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 42c7760be3ea - main - ena: Update driver version to v2.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42c7760be3ea420668f625f2064ae347aa7e818e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 23:07:44 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=42c7760be3ea420668f625f2064ae347aa7e818e commit 42c7760be3ea420668f625f2064ae347aa7e818e Author: Michal Krawczyk AuthorDate: 2021-08-12 08:34:30 +0000 Commit: Marcin Wojtas CommitDate: 2021-09-01 23:06:58 +0000 ena: Update driver version to v2.4.1 Some of the changes in this release: * Hardware RSS hash key reconfiguration and indirection table reconfiguration support. * Full kernel RSS support. * Extra statistic counters. * Netmap support for ENAv3. * Locking assertions. * Extra log messages. * Reset handling fixes. Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 50467ffe0707..f559f9127c11 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -41,7 +41,7 @@ #define DRV_MODULE_VER_MAJOR 2 #define DRV_MODULE_VER_MINOR 4 -#define DRV_MODULE_VER_SUBMINOR 0 +#define DRV_MODULE_VER_SUBMINOR 1 #define DRV_MODULE_NAME "ena" From owner-dev-commits-src-all@freebsd.org Thu Sep 2 00:45:48 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2618C675016; Thu, 2 Sep 2021 00:45: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 4H0Mfg6hr5z3h0d; Thu, 2 Sep 2021 00:45: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 CF76D739D; Thu, 2 Sep 2021 00:45: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 1820jlQg053541; Thu, 2 Sep 2021 00:45:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1820jlBW053540; Thu, 2 Sep 2021 00:45:47 GMT (envelope-from git) Date: Thu, 2 Sep 2021 00:45:47 GMT Message-Id: <202109020045.1820jlBW053540@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 5e4dd21fd609 - main - openssh: clarify krb5 use in freebsd-configure 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/main X-Git-Reftype: branch X-Git-Commit: 5e4dd21fd60958ceef4e4fd14b000844b957287e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 00:45:48 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5e4dd21fd60958ceef4e4fd14b000844b957287e commit 5e4dd21fd60958ceef4e4fd14b000844b957287e Author: Ed Maste AuthorDate: 2021-09-02 00:23:40 +0000 Commit: Ed Maste CommitDate: 2021-09-02 00:42:34 +0000 openssh: clarify krb5 use in freebsd-configure freebsd-configure.sh runs configure twice, --with-kerberos5 and --without-kerberos5, in order to build a config.h that defaults to kerberos5 disabled, and a small config file that represents the differences. Rename config.h.orig to config.h.kerberos5 to clarify the intent of this script. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- crypto/openssh/freebsd-configure.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/openssh/freebsd-configure.sh b/crypto/openssh/freebsd-configure.sh index fbc0f5139c88..b2ac309d86b0 100755 --- a/crypto/openssh/freebsd-configure.sh +++ b/crypto/openssh/freebsd-configure.sh @@ -30,14 +30,14 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin # Generate config.h with krb5 and stash it sh configure $configure_args --with-kerberos5=/usr -mv config.log config.log.orig -mv config.h config.h.orig +mv config.log config.log.kerberos5 +mv config.h config.h.kerberos5 # Generate config.h without krb5 sh configure $configure_args --without-kerberos5 # Extract the difference echo '/* $Free''BSD$ */' > krb5_config.h -diff -u config.h.orig config.h | +diff -u config.h.kerberos5 config.h | sed -n '/^-#define/s/^-//p' | - grep -Ff /dev/stdin config.h.orig >> krb5_config.h + grep -Ff /dev/stdin config.h.kerberos5 >> krb5_config.h From owner-dev-commits-src-all@freebsd.org Thu Sep 2 00:45:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 30ECE674FAF; Thu, 2 Sep 2021 00:45: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 4H0Mfj0rzWz3h0g; Thu, 2 Sep 2021 00:45: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 06E78761C; Thu, 2 Sep 2021 00:45: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 1820jmke053565; Thu, 2 Sep 2021 00:45:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1820jmWO053564; Thu, 2 Sep 2021 00:45:48 GMT (envelope-from git) Date: Thu, 2 Sep 2021 00:45:48 GMT Message-Id: <202109020045.1820jmWO053564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 36cd1e5e8c21 - main - openssh: disable libwrap (TCP wrappers) at configure time 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/main X-Git-Reftype: branch X-Git-Commit: 36cd1e5e8c216e0f67832d59d629f2910a02d4fc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 00:45:49 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=36cd1e5e8c216e0f67832d59d629f2910a02d4fc commit 36cd1e5e8c216e0f67832d59d629f2910a02d4fc Author: Ed Maste AuthorDate: 2021-09-02 00:30:05 +0000 Commit: Ed Maste CommitDate: 2021-09-02 00:42:41 +0000 openssh: disable libwrap (TCP wrappers) at configure time We define LIBWRAP at build time in secure/usr.sbin/sshd/Makefile if WITH_TCPWRAPPERS is in effect, so it should not be set in config.h. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- crypto/openssh/freebsd-configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/openssh/freebsd-configure.sh b/crypto/openssh/freebsd-configure.sh index b2ac309d86b0..d89d536bfd6a 100755 --- a/crypto/openssh/freebsd-configure.sh +++ b/crypto/openssh/freebsd-configure.sh @@ -8,7 +8,7 @@ configure_args=" --sysconfdir=/etc/ssh --with-pam --with-ssl-dir=/usr - --with-tcp-wrappers + --without-tcp-wrappers --with-libedit --with-ssl-engine --without-xauth From owner-dev-commits-src-all@freebsd.org Thu Sep 2 00:45:50 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7C1B3675129; Thu, 2 Sep 2021 00:45: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 4H0Mfk29zYz3h9f; Thu, 2 Sep 2021 00:45: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 2CB3875C8; Thu, 2 Sep 2021 00:45: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 1820joVC053589; Thu, 2 Sep 2021 00:45:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1820jokp053588; Thu, 2 Sep 2021 00:45:50 GMT (envelope-from git) Date: Thu, 2 Sep 2021 00:45:50 GMT Message-Id: <202109020045.1820jokp053588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 7b529268a54a - main - openssh: regenerate config.h 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/main X-Git-Reftype: branch X-Git-Commit: 7b529268a54a377f40ba435930f0c3fa8c255733 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 00:45:50 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7b529268a54a377f40ba435930f0c3fa8c255733 commit 7b529268a54a377f40ba435930f0c3fa8c255733 Author: Ed Maste AuthorDate: 2021-09-02 00:35:45 +0000 Commit: Ed Maste CommitDate: 2021-09-02 00:42:41 +0000 openssh: regenerate config.h Since config.h was last regenerated FreeBSD has added (a stub) libdl, and has removed sys/dir.h. Regenerate config.h to avoid spurious additional changes when OpenSSH is next updated. There should be no issue if this change is MFC'd, but I don't plan to do so. Although configure checks for libdl HAVE_LIBDL isn't even used, and sys/dir.h was non-functional before being removed. The state of these two config.h settings should make no difference in the built OpenSSH. Sponsored by: The FreeBSD Foundation --- crypto/openssh/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h index dbdad4faaca1..df98cea2b4ba 100644 --- a/crypto/openssh/config.h +++ b/crypto/openssh/config.h @@ -794,7 +794,7 @@ /* #undef HAVE_LIBCRYPT */ /* Define to 1 if you have the `dl' library (-ldl). */ -/* #undef HAVE_LIBDL */ +#define HAVE_LIBDL 1 /* Define to 1 if you have the header file. */ #define HAVE_LIBGEN_H 1 @@ -1358,7 +1358,7 @@ #define HAVE_SYS_CDEFS_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_SYS_DIR_H 1 +/* #undef HAVE_SYS_DIR_H */ /* Define if your system defines sys_errlist[] */ #define HAVE_SYS_ERRLIST 1 From owner-dev-commits-src-all@freebsd.org Thu Sep 2 00:53:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 00:53:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 06:14:10 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 06:16:43 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 07:14:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 498F467A1F0; Thu, 2 Sep 2021 07:14: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 4H0XHk1ct8z3LLm; Thu, 2 Sep 2021 07:14: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 1F2B514971; Thu, 2 Sep 2021 07:14: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 1827Ew7v074155; Thu, 2 Sep 2021 07:14:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1827EwWg074154; Thu, 2 Sep 2021 07:14:58 GMT (envelope-from git) Date: Thu, 2 Sep 2021 07:14:58 GMT Message-Id: <202109020714.1827EwWg074154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: d5c541c2678b - main - stress2: Make test less verbose MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5c541c2678b17442aa11620a3a1117512741733 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 07:14:58 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=d5c541c2678b17442aa11620a3a1117512741733 commit d5c541c2678b17442aa11620a3a1117512741733 Author: Peter Holm AuthorDate: 2021-09-02 07:06:55 +0000 Commit: Peter Holm CommitDate: 2021-09-02 07:06:55 +0000 stress2: Make test less verbose --- tools/test/stress2/misc/gnop11.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/gnop11.sh b/tools/test/stress2/misc/gnop11.sh index 8a23eb072144..4d4f936bd8c6 100755 --- a/tools/test/stress2/misc/gnop11.sh +++ b/tools/test/stress2/misc/gnop11.sh @@ -74,11 +74,11 @@ while [ $((`date +%s` - start)) -lt 120 ]; do while (a=`mount | egrep /mnt`) do sleep 1; done # first fsck will attempt journal recovery - $fsck -d -y /dev/$md + $fsck -y /dev/$md # second fsck will do traditional fsck to check for any errors # from journal recovery - $fsck -d -y /dev/$md + $fsck -y /dev/$md wait done mdconfig -d -u ${md#md} From owner-dev-commits-src-all@freebsd.org Thu Sep 2 07:14:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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 65F4567A288; Thu, 2 Sep 2021 07:14: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 4H0XHl2Nhcz3L7L; Thu, 2 Sep 2021 07:14: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 39B3314D02; Thu, 2 Sep 2021 07:14: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 1827ExQR074179; Thu, 2 Sep 2021 07:14:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1827ExmD074178; Thu, 2 Sep 2021 07:14:59 GMT (envelope-from git) Date: Thu, 2 Sep 2021 07:14:59 GMT Message-Id: <202109020714.1827ExmD074178@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 9d1eb47fa113 - main - stress2: Fix cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d1eb47fa113d02f2082cf8104156e19484e75cf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 07:14:59 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=9d1eb47fa113d02f2082cf8104156e19484e75cf commit 9d1eb47fa113d02f2082cf8104156e19484e75cf Author: Peter Holm AuthorDate: 2021-09-02 07:07:44 +0000 Commit: Peter Holm CommitDate: 2021-09-02 07:07:44 +0000 stress2: Fix cleanup --- tools/test/stress2/misc/mmap3.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/test/stress2/misc/mmap3.sh b/tools/test/stress2/misc/mmap3.sh index 8a319377070f..56a64ee8cdee 100755 --- a/tools/test/stress2/misc/mmap3.sh +++ b/tools/test/stress2/misc/mmap3.sh @@ -42,13 +42,13 @@ while [ `date '+%s'` -lt $((start + 5 * 60)) ]; do ./mmap3 done echo "Expect Segmentation faults" -trap "ls /tmp/mmap3* | grep -E 'mmap3\.[0-9]{6}\.[0-9]{4}$' | xargs rm -v" \ - EXIT INT +trap "ls /tmp/mmap3* 2>/dev/null | grep -E 'mmap3\.[0-9]{6}\.[0-9]{4}$' | \ + xargs rm -v" EXIT INT start=`date '+%s'` while [ `date '+%s'` -lt $((start + 5 * 60)) ]; do ./mmap3 random done -rm -f mmap3 mmap3.core +rm -f /tmp/mmap3 mmap3.core exit EOF From owner-dev-commits-src-all@freebsd.org Thu Sep 2 07:15:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B7A5367A28B; Thu, 2 Sep 2021 07:15: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 4H0XHm4C1nz3LNy; Thu, 2 Sep 2021 07:15: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 771D614BFF; Thu, 2 Sep 2021 07:15: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 1827F0E4074216; Thu, 2 Sep 2021 07:15:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1827F02p074215; Thu, 2 Sep 2021 07:15:00 GMT (envelope-from git) Date: Thu, 2 Sep 2021 07:15:00 GMT Message-Id: <202109020715.1827F02p074215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: d57bfbce7c99 - main - stress2: Fix cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d57bfbce7c99aab49126fbc2fc372c633be69478 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 07:15:00 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=d57bfbce7c99aab49126fbc2fc372c633be69478 commit d57bfbce7c99aab49126fbc2fc372c633be69478 Author: Peter Holm AuthorDate: 2021-09-02 07:08:58 +0000 Commit: Peter Holm CommitDate: 2021-09-02 07:08:58 +0000 stress2: Fix cleanup --- tools/test/stress2/misc/mmap34.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/stress2/misc/mmap34.sh b/tools/test/stress2/misc/mmap34.sh index 028d23b4f71f..02bd193421b9 100755 --- a/tools/test/stress2/misc/mmap34.sh +++ b/tools/test/stress2/misc/mmap34.sh @@ -71,7 +71,7 @@ for i in `jot 6`; do done mdconfig -d -u $mdstart rm -f $dir/mmap34 -[ $s -eq 0 ] && rm -f mmap34.c +[ $s -eq 0 ] && rm -f /tmp/mmap34.c exit $s EOF From owner-dev-commits-src-all@freebsd.org Thu Sep 2 07:15:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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 068A3679F49; Thu, 2 Sep 2021 07:15: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 4H0XHp5z4mz3L9P; Thu, 2 Sep 2021 07:15: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 A81F914C88; Thu, 2 Sep 2021 07:15: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 1827F2go074264; Thu, 2 Sep 2021 07:15:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1827F2Gn074263; Thu, 2 Sep 2021 07:15:02 GMT (envelope-from git) Date: Thu, 2 Sep 2021 07:15:02 GMT Message-Id: <202109020715.1827F2Gn074263@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 78f718e2c835 - main - stress2: Added timeout for looping mdnsd MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78f718e2c835fa31d784d437ed168791cd2eb88b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 07:15:03 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=78f718e2c835fa31d784d437ed168791cd2eb88b commit 78f718e2c835fa31d784d437ed168791cd2eb88b Author: Peter Holm AuthorDate: 2021-09-02 07:11:01 +0000 Commit: Peter Holm CommitDate: 2021-09-02 07:11:01 +0000 stress2: Added timeout for looping mdnsd --- tools/test/stress2/misc/multicast2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/stress2/misc/multicast2.sh b/tools/test/stress2/misc/multicast2.sh index bd95cd0bd9e6..2d81565a7afb 100755 --- a/tools/test/stress2/misc/multicast2.sh +++ b/tools/test/stress2/misc/multicast2.sh @@ -20,7 +20,7 @@ ifconfig vtnet0 delete 2>/dev/null ifconfig epair create ifconfig epair0a 0/24 up ifconfig epair0a destroy -service mdnsd onestop +timeout 2m service mdnsd onestop while pkill swap; do :; done wait From owner-dev-commits-src-all@freebsd.org Thu Sep 2 07:15:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2CDC667A384; Thu, 2 Sep 2021 07:15: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 4H0XHn5DjGz3LCr; Thu, 2 Sep 2021 07:15: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 83A4114D80; Thu, 2 Sep 2021 07:15: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 1827F1Vv074240; Thu, 2 Sep 2021 07:15:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1827F1QQ074239; Thu, 2 Sep 2021 07:15:01 GMT (envelope-from git) Date: Thu, 2 Sep 2021 07:15:01 GMT Message-Id: <202109020715.1827F1QQ074239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 2a58b9c5db8a - main - stress2: Fix cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a58b9c5db8ae1f15905eb7c9e0845100c0e4ced Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 07:15:02 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=2a58b9c5db8ae1f15905eb7c9e0845100c0e4ced commit 2a58b9c5db8ae1f15905eb7c9e0845100c0e4ced Author: Peter Holm AuthorDate: 2021-09-02 07:09:39 +0000 Commit: Peter Holm CommitDate: 2021-09-02 07:09:39 +0000 stress2: Fix cleanup --- tools/test/stress2/misc/mmap36.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/stress2/misc/mmap36.sh b/tools/test/stress2/misc/mmap36.sh index 2c38fd26890b..89fc6721fbeb 100755 --- a/tools/test/stress2/misc/mmap36.sh +++ b/tools/test/stress2/misc/mmap36.sh @@ -44,7 +44,7 @@ s=$? [ -f mmap36.core ] && { ls -l mmap36.core; mv mmap36.core $dir; s=1; } cd $odir -[ $s -eq 0 ] && rm -f mmap36.c mmap36 +[ $s -eq 0 ] && rm -f $dir/mmap36.c $dir/mmap36 exit $s EOF From owner-dev-commits-src-all@freebsd.org Thu Sep 2 07:15:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3F002679F56; Thu, 2 Sep 2021 07: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 4H0XHq6rRBz3LP7; Thu, 2 Sep 2021 07:15: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 C2A1514D03; Thu, 2 Sep 2021 07:15: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 1827F3Jg074288; Thu, 2 Sep 2021 07:15:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1827F3fT074287; Thu, 2 Sep 2021 07:15:03 GMT (envelope-from git) Date: Thu, 2 Sep 2021 07:15:03 GMT Message-Id: <202109020715.1827F3fT074287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: dbb0cb19ec7f - main - stress2: Update test to new working of option nomtime MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dbb0cb19ec7fcfc103b72c895cf0fdaa99e7ac04 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 07:15:04 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=dbb0cb19ec7fcfc103b72c895cf0fdaa99e7ac04 commit dbb0cb19ec7fcfc103b72c895cf0fdaa99e7ac04 Author: Peter Holm AuthorDate: 2021-09-02 07:12:58 +0000 Commit: Peter Holm CommitDate: 2021-09-02 07:12:58 +0000 stress2: Update test to new working of option nomtime --- tools/test/stress2/misc/tmpfs22.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/tmpfs22.sh b/tools/test/stress2/misc/tmpfs22.sh index 36d2cc59dabd..4439ad1bf1d5 100755 --- a/tools/test/stress2/misc/tmpfs22.sh +++ b/tools/test/stress2/misc/tmpfs22.sh @@ -105,8 +105,8 @@ main(void) if (fstat(fd, &st2) == -1) err(1, "fstat 2"); s = 0; - if (st1.st_mtime != st2.st_mtime) { - fprintf(stderr, "mtime differs: %ld %ld\n", + if (st1.st_mtime == st2.st_mtime) { + fprintf(stderr, "mtime is unchanged: %ld %ld\n", (long)st1.st_mtime, (long)st2.st_mtime); s=1; } From owner-dev-commits-src-all@freebsd.org Thu Sep 2 07:38:27 2021 Return-Path: Delivered-To: dev-commits-src-all@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 CFF2567A6B9; Thu, 2 Sep 2021 07:38: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 4H0Xpq5GsTz3hWF; Thu, 2 Sep 2021 07:38: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 9D24714ED8; Thu, 2 Sep 2021 07:38: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 1827cRE1000751; Thu, 2 Sep 2021 07:38:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1827cRDE000749; Thu, 2 Sep 2021 07:38:27 GMT (envelope-from git) Date: Thu, 2 Sep 2021 07:38:27 GMT Message-Id: <202109020738.1827cRDE000749@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 795d78a46713 - main - pfctl: Don't use PRIu64 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/main X-Git-Reftype: branch X-Git-Commit: 795d78a46713fc16153966e77f20da2f40aac2a3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 07:38:27 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=795d78a46713fc16153966e77f20da2f40aac2a3 commit 795d78a46713fc16153966e77f20da2f40aac2a3 Author: Kristof Provost AuthorDate: 2021-09-01 16:18:26 +0000 Commit: Kristof Provost CommitDate: 2021-09-02 07:35:36 +0000 pfctl: Don't use PRIu64 Rather than PRIu64 we can just treat the data as uintmax_t, and use %jx instead. MFC after: 1 week Suggested by: kib Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl_parser.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 9f955a8b1c96..04c3bf76bfd8 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pfctl_parser.h" @@ -576,9 +575,9 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) (unsigned long long)s->pcounters[1][1][PF_DROP]); } printf("%-27s %14s %16s\n", "State Table", "Total", "Rate"); - printf(" %-25s %14" PRIu64 " %14s\n", "current entries", s->states, ""); + printf(" %-25s %14jx %14s\n", "current entries", s->states, ""); TAILQ_FOREACH(c, &s->fcounters, entry) { - printf(" %-25s %14" PRIu64 " ", c->name, c->counter); + printf(" %-25s %14jx ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime); @@ -587,10 +586,10 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) } if (opts & PF_OPT_VERBOSE) { printf("Source Tracking Table\n"); - printf(" %-25s %14" PRIu64 " %14s\n", "current entries", + printf(" %-25s %14jx %14s\n", "current entries", s->src_nodes, ""); TAILQ_FOREACH(c, &s->scounters, entry) { - printf(" %-25s %14" PRIu64 " ", c->name, c->counter); + printf(" %-25s %14jx ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime); @@ -600,7 +599,7 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) } printf("Counters\n"); TAILQ_FOREACH(c, &s->counters, entry) { - printf(" %-25s %14" PRIu64 " ", c->name, c->counter); + printf(" %-25s %14jx ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime); @@ -610,7 +609,7 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) if (opts & PF_OPT_VERBOSE) { printf("Limit Counters\n"); TAILQ_FOREACH(c, &s->lcounters, entry) { - printf(" %-25s %14" PRIu64 " ", c->name, c->counter); + printf(" %-25s %14jx ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime); From owner-dev-commits-src-all@freebsd.org Thu Sep 2 13:11:30 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AFFA967F3B0; Thu, 2 Sep 2021 13:11: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 4H0hC64HzXz4qlW; Thu, 2 Sep 2021 13:11: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 7C1D019665; Thu, 2 Sep 2021 13:11: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 182DBUqw050656; Thu, 2 Sep 2021 13:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182DBUnr050655; Thu, 2 Sep 2021 13:11:30 GMT (envelope-from git) Date: Thu, 2 Sep 2021 13:11:30 GMT Message-Id: <202109021311.182DBUnr050655@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 483e3cda0c83 - main - man: A trailing space cleanup in man9's Makefile 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/main X-Git-Reftype: branch X-Git-Commit: 483e3cda0c834eb2cf73fc4584932bc6b10a9c0c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 13:11:30 -0000 The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=483e3cda0c834eb2cf73fc4584932bc6b10a9c0c commit 483e3cda0c834eb2cf73fc4584932bc6b10a9c0c Author: Ka Ho Ng AuthorDate: 2021-09-02 13:04:01 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-02 13:04:03 +0000 man: A trailing space cleanup in man9's Makefile Sponsored by: The FreeBSD Foundation --- share/man/man9/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index ac0451ece3fe..4764db983f8a 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -2311,7 +2311,7 @@ MLINKS+=vmem.9 vmem_add.9 \ vmem.9 vmem_destroy.9 \ vmem.9 vmem_free.9 \ vmem.9 vmem_xalloc.9 \ - vmem.9 vmem_xfree.9 + vmem.9 vmem_xfree.9 MLINKS+=vm_map_lock.9 vm_map_lock_downgrade.9 \ vm_map_lock.9 vm_map_lock_read.9 \ vm_map_lock.9 vm_map_lock_upgrade.9 \ From owner-dev-commits-src-all@freebsd.org Thu Sep 2 13:11:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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 178F667F6C9; Thu, 2 Sep 2021 13:11: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 4H0hC76M0zz4r2h; Thu, 2 Sep 2021 13:11: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 A3DD81973F; Thu, 2 Sep 2021 13:11: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 182DBVGr050682; Thu, 2 Sep 2021 13:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182DBVCF050681; Thu, 2 Sep 2021 13:11:31 GMT (envelope-from git) Date: Thu, 2 Sep 2021 13:11:31 GMT Message-Id: <202109021311.182DBVCF050681@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 9bb8304c1012 - main - Symbol.map: Remove an extra space before _Fork 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/main X-Git-Reftype: branch X-Git-Commit: 9bb8304c10122dfd52187b169b9e0293fd499065 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 13:11:32 -0000 The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=9bb8304c10122dfd52187b169b9e0293fd499065 commit 9bb8304c10122dfd52187b169b9e0293fd499065 Author: Ka Ho Ng AuthorDate: 2021-09-02 13:07:08 +0000 Commit: Ka Ho Ng CommitDate: 2021-09-02 13:10:22 +0000 Symbol.map: Remove an extra space before _Fork Make it consistent with all other entries. Sponsored by: The FreeBSD Foundation --- lib/libc/sys/Symbol.map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index 764d712958be..eb379874c247 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -418,7 +418,7 @@ FBSD_1.6 { }; FBSD_1.7 { - _Fork; + _Fork; fspacectl; }; From owner-dev-commits-src-all@freebsd.org Thu Sep 2 13:41:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7DBC067FBA6; Thu, 2 Sep 2021 13:41: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 4H0hs92vTLz3G89; Thu, 2 Sep 2021 13:41: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 4C6E819F00; Thu, 2 Sep 2021 13:41: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 182Df1T0090773; Thu, 2 Sep 2021 13:41:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Df1sV090756; Thu, 2 Sep 2021 13:41:01 GMT (envelope-from git) Date: Thu, 2 Sep 2021 13:41:01 GMT Message-Id: <202109021341.182Df1sV090756@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 5c8e8e82aeaf - main - dtrace: fix ipfw_rule_info_t translator 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/main X-Git-Reftype: branch X-Git-Commit: 5c8e8e82aeaf3aa788acdd6cfca30ef09094230d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 13:41:01 -0000 The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=5c8e8e82aeaf3aa788acdd6cfca30ef09094230d commit 5c8e8e82aeaf3aa788acdd6cfca30ef09094230d Author: Andrey V. Elsukov AuthorDate: 2021-09-02 13:35:01 +0000 Commit: Andrey V. Elsukov CommitDate: 2021-09-02 13:35:01 +0000 dtrace: fix ipfw_rule_info_t translator 322e5efda8578b has changed field names in the struct ip_fw. Use correct names in ipfw_rule_info_t translator in the ipfw.d script. Reported by: Keith White MFC after: 1 week --- share/dtrace/ipfw.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/dtrace/ipfw.d b/share/dtrace/ipfw.d index 61d1388c2685..3db51da04887 100644 --- a/share/dtrace/ipfw.d +++ b/share/dtrace/ipfw.d @@ -212,8 +212,8 @@ translator ipfw_rule_info_t < struct ip_fw *r > { flags = r->flags; set = r->set; rule_id = r->id; - cached_id = r->cached_id; - cached_pos = r->cached_pos; + cached_id = r->cache.id; + cached_pos = r->cache.pos; refcnt = r->refcnt; }; From owner-dev-commits-src-all@freebsd.org Thu Sep 2 13:45:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B0EE667FA4A; Thu, 2 Sep 2021 13:45: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 4H0hyg4Z7Jz3Hlk; Thu, 2 Sep 2021 13:45: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 8507919E47; Thu, 2 Sep 2021 13:45: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 182Djl1F094673; Thu, 2 Sep 2021 13:45:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182DjlVL094672; Thu, 2 Sep 2021 13:45:47 GMT (envelope-from git) Date: Thu, 2 Sep 2021 13:45:47 GMT Message-Id: <202109021345.182DjlVL094672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: b3e858f7622e - main - openssh: tag generated file with @generated 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/main X-Git-Reftype: branch X-Git-Commit: b3e858f7622e7fb058c05f81abd657fc47c6f717 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 13:45:47 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b3e858f7622e7fb058c05f81abd657fc47c6f717 commit b3e858f7622e7fb058c05f81abd657fc47c6f717 Author: Ed Maste AuthorDate: 2021-09-02 01:49:44 +0000 Commit: Ed Maste CommitDate: 2021-09-02 13:44:58 +0000 openssh: tag generated file with @generated Tools like Phabricator use the @generated tag to identify files that may be excluded from review by default. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- crypto/openssh/freebsd-namespace.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/freebsd-namespace.sh b/crypto/openssh/freebsd-namespace.sh index 8cf91508ec3d..79416247aff9 100755 --- a/crypto/openssh/freebsd-namespace.sh +++ b/crypto/openssh/freebsd-namespace.sh @@ -46,9 +46,10 @@ libssh_builddir=$(realpath $(ssh_make -V.OBJDIR)) libssh=libprivatessh.a # Clear the existing header +generated="@""generated" cat >${header} < Delivered-To: dev-commits-src-all@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 EE0D167FD97; Thu, 2 Sep 2021 13:45: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 4H0hyh612Yz3Hwm; Thu, 2 Sep 2021 13:45: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 B50221A119; Thu, 2 Sep 2021 13:45: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 182Djmvq094699; Thu, 2 Sep 2021 13:45:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182DjmnA094698; Thu, 2 Sep 2021 13:45:48 GMT (envelope-from git) Date: Thu, 2 Sep 2021 13:45:48 GMT Message-Id: <202109021345.182DjmnA094698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: c7b4c21ee461 - main - openssh: regenerate freebsd-namespace.h 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/main X-Git-Reftype: branch X-Git-Commit: c7b4c21ee4615e2e418ab520abf6c026d6dae398 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 13:45:49 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c7b4c21ee4615e2e418ab520abf6c026d6dae398 commit c7b4c21ee4615e2e418ab520abf6c026d6dae398 Author: Ed Maste AuthorDate: 2021-09-02 01:54:57 +0000 Commit: Ed Maste CommitDate: 2021-09-02 13:45:14 +0000 openssh: regenerate freebsd-namespace.h For some reason poly64 was omitted when this file was last generated (perhaps it was inlined by the Clang version then in use). MFC after: 1 week Sponsored by: The FreeBSD Foundation --- crypto/openssh/ssh_namespace.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/ssh_namespace.h b/crypto/openssh/ssh_namespace.h index 57b7bb3e375c..71accdf4fb59 100644 --- a/crypto/openssh/ssh_namespace.h +++ b/crypto/openssh/ssh_namespace.h @@ -1,5 +1,5 @@ /* - * This file was machine-generated. Do not edit manually. + * This file was machine-@generated. Do not edit manually. * Run crypto/openssh/freebsd-namespace.sh to regenerate. */ #define Blowfish_decipher Fssh_Blowfish_decipher @@ -440,6 +440,7 @@ #define platform_sys_dir_uid Fssh_platform_sys_dir_uid #define pledge Fssh_pledge #define poly1305_auth Fssh_poly1305_auth +#define poly64 Fssh_poly64 #define poly_hash Fssh_poly_hash #define port_open_helper Fssh_port_open_helper #define prime_test Fssh_prime_test From owner-dev-commits-src-all@freebsd.org Thu Sep 2 14:56:34 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 14:57:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 14:57:05 -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-all@freebsd.org Thu Sep 2 18:26:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DC1C4663F01; Thu, 2 Sep 2021 18:26: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 4H0qBY5Y15z3wDV; Thu, 2 Sep 2021 18:26: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 A67591DE86; Thu, 2 Sep 2021 18:26: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 182IQTRU070055; Thu, 2 Sep 2021 18:26:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182IQTg4070054; Thu, 2 Sep 2021 18:26:29 GMT (envelope-from git) Date: Thu, 2 Sep 2021 18:26:29 GMT Message-Id: <202109021826.182IQTg4070054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bryan Drewery Subject: git: 8f8a794775bd - main - getdelim(3): Fix losing data on [EAGAIN] MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bdrewery X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f8a794775bd6da69514d008fe03edb808bbc67d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 18:26:29 -0000 The branch main has been updated by bdrewery: URL: https://cgit.FreeBSD.org/src/commit/?id=8f8a794775bd6da69514d008fe03edb808bbc67d commit 8f8a794775bd6da69514d008fe03edb808bbc67d Author: Bryan Drewery AuthorDate: 2021-08-25 18:37:11 +0000 Commit: Bryan Drewery CommitDate: 2021-09-02 18:26:26 +0000 getdelim(3): Fix losing data on [EAGAIN] Currently when an [EAGAIN] is encountered we return a partial result that does not contain the delimeter. On the next (successful) read we were returning the next part of the line without the preceding string from the first failed call. Fix this by using the same mechanism as ungetc(3) does. For the buffered case we could simply set fp->_r and fp->_p back to their values before sappend() is ran but for simplicity ungetc(3) is done in there as well. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D31687 --- lib/libc/stdio/getdelim.c | 27 ++++- lib/libc/tests/stdio/getdelim_test.c | 199 +++++++++++++++++++++++++++++++++++ 2 files changed, 223 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdio/getdelim.c b/lib/libc/stdio/getdelim.c index 8d8414266c78..ad1439ed071f 100644 --- a/lib/libc/stdio/getdelim.c +++ b/lib/libc/stdio/getdelim.c @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2009 David Schultz + * Copyright (c) 2021 Dell EMC * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -138,10 +139,30 @@ getdelim(char ** __restrict linep, size_t * __restrict linecapp, int delim, while ((endp = memchr(fp->_p, delim, fp->_r)) == NULL) { if (sappend(linep, &linelen, linecapp, fp->_p, fp->_r)) goto error; + errno = 0; if (__srefill(fp)) { - if (!__sfeof(fp)) - goto error; - goto done; /* hit EOF */ + if (__sfeof(fp)) + goto done; + if (errno == EAGAIN) { + /* + * We need to undo a partial read that has + * been placed into linep or we would otherwise + * lose it on the next read. + */ + while (linelen > 0) { + if (__ungetc((*linep)[--linelen], + fp) == EOF) + goto error; + } + /* + * This is not strictly needed but it is + * possible a consumer has worked around an + * older EAGAIN bug by buffering a partial + * return. + */ + (*linep)[0] = '\0'; + } + goto error; } } endp++; /* snarf the delimiter, too */ diff --git a/lib/libc/tests/stdio/getdelim_test.c b/lib/libc/tests/stdio/getdelim_test.c index 8dc662fcab8f..7b20b02a36f1 100644 --- a/lib/libc/tests/stdio/getdelim_test.c +++ b/lib/libc/tests/stdio/getdelim_test.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2009 David Schultz + * Copyright (c) 2021 Dell EMC * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,6 +28,12 @@ #include __FBSDID("$FreeBSD$"); +#include +#include +#include +#include + +#include #include #include #include @@ -221,6 +228,196 @@ ATF_TC_BODY(empty_NULL_buffer, tc) fclose(fp); } +static void +_ipc_read(int fd, char wait_c) +{ + char c; + ssize_t len; + + c = 0; + while (c != wait_c) { + len = read(fd, &c, 1); + ATF_CHECK_MSG(len != 0, + "EOF on IPC pipe while waiting. Did other side fail?"); + ATF_CHECK_MSG(len == 1 || errno == EINTR, + "read %zu bytes errno %d\n", len, errno); + if (len != 1 || errno != EINTR) + break; + } +} + +static void +_ipc_write(int fd, char c) +{ + + while ((write(fd, &c, 1) != 1)) + ATF_REQUIRE(errno == EINTR); +} + +static void +ipc_wait(int ipcfd[2]) +{ + + _ipc_read(ipcfd[0], '+'); + /* Send ACK. */ + _ipc_write(ipcfd[1], '-'); +} + +static void +ipc_wakeup(int ipcfd[2]) +{ + + _ipc_write(ipcfd[1], '+'); + /* Wait for ACK. */ + _ipc_read(ipcfd[0], '-'); +} + +static void +_nonblock_eagain(int buf_mode) +{ + FILE *fp; + const char delim = '!'; + const char *strs[] = { + "first line partial!", + "second line is sent in full!", + "third line is sent partially!", + "last line is sent in full!", + }; + char *line; + size_t linecap, strslen[nitems(strs)]; + ssize_t linelen; + int fd_fifo, flags, i, ipcfd[2], pipedes[2], pipedes2[2], status; + pid_t pid; + + line = NULL; + linecap = 0; + for (i = 0; i < nitems(strslen); i++) + strslen[i] = strlen(strs[i]); + ATF_REQUIRE(pipe2(pipedes, O_CLOEXEC) == 0); + ATF_REQUIRE(pipe2(pipedes2, O_CLOEXEC) == 0); + + (void)unlink("fifo"); + ATF_REQUIRE(mkfifo("fifo", 0666) == 0); + ATF_REQUIRE((pid = fork()) >= 0); + if (pid == 0) { + close(pipedes[0]); + ipcfd[1] = pipedes[1]; + ipcfd[0] = pipedes2[0]; + close(pipedes2[1]); + + ATF_REQUIRE((fd_fifo = open("fifo", O_WRONLY)) != -1); + + /* Partial write. */ + ATF_REQUIRE(write(fd_fifo, strs[0], strslen[0] - 3) == + strslen[0] - 3); + ipc_wakeup(ipcfd); + + ipc_wait(ipcfd); + /* Finish off the first line. */ + ATF_REQUIRE(write(fd_fifo, + &(strs[0][strslen[0] - 3]), 3) == 3); + /* And include the second full line and a partial 3rd line. */ + ATF_REQUIRE(write(fd_fifo, strs[1], strslen[1]) == strslen[1]); + ATF_REQUIRE(write(fd_fifo, strs[2], strslen[2] - 3) == + strslen[2] - 3); + ipc_wakeup(ipcfd); + + ipc_wait(ipcfd); + /* Finish the partial write and partially send the last. */ + ATF_REQUIRE(write(fd_fifo, + &(strs[2][strslen[2] - 3]), 3) == 3); + ATF_REQUIRE(write(fd_fifo, strs[3], strslen[3] - 3) == + strslen[3] - 3); + ipc_wakeup(ipcfd); + + ipc_wait(ipcfd); + /* Finish the write */ + ATF_REQUIRE(write(fd_fifo, + &(strs[3][strslen[3] - 3]), 3) == 3); + ipc_wakeup(ipcfd); + _exit(0); + } + ipcfd[0] = pipedes[0]; + close(pipedes[1]); + close(pipedes2[0]); + ipcfd[1] = pipedes2[1]; + + ATF_REQUIRE((fp = fopen("fifo", "r")) != NULL); + setvbuf(fp, (char *)NULL, buf_mode, 0); + ATF_REQUIRE((flags = fcntl(fileno(fp), F_GETFL, 0)) != -1); + ATF_REQUIRE(fcntl(fileno(fp), F_SETFL, flags | O_NONBLOCK) >= 0); + + /* Wait until the writer completes its partial write. */ + ipc_wait(ipcfd); + ATF_REQUIRE_ERRNO(EAGAIN, + (linelen = getdelim(&line, &linecap, delim, fp)) == -1); + ATF_REQUIRE_STREQ("", line); + ATF_REQUIRE(ferror(fp)); + ATF_REQUIRE(!feof(fp)); + clearerr(fp); + ipc_wakeup(ipcfd); + + ipc_wait(ipcfd); + /* + * Should now have the finished first line, a full second line, + * and a partial third line. + */ + ATF_CHECK(getdelim(&line, &linecap, delim, fp) == strslen[0]); + ATF_REQUIRE_STREQ(strs[0], line); + ATF_REQUIRE(getdelim(&line, &linecap, delim, fp) == strslen[1]); + ATF_REQUIRE_STREQ(strs[1], line); + + ATF_REQUIRE_ERRNO(EAGAIN, + (linelen = getdelim(&line, &linecap, delim, fp)) == -1); + ATF_REQUIRE_STREQ("", line); + ATF_REQUIRE(ferror(fp)); + ATF_REQUIRE(!feof(fp)); + clearerr(fp); + ipc_wakeup(ipcfd); + + /* Wait for the partial write to be completed and another to be done. */ + ipc_wait(ipcfd); + ATF_REQUIRE((linelen = getdelim(&line, &linecap, delim, fp)) != -1); + ATF_REQUIRE(!ferror(fp)); + ATF_REQUIRE(!feof(fp)); + ATF_REQUIRE_STREQ(strs[2], line); + ATF_REQUIRE(linelen == strslen[2]); + + ATF_REQUIRE_ERRNO(EAGAIN, + (linelen = getdelim(&line, &linecap, delim, fp)) == -1); + ATF_REQUIRE_STREQ("", line); + ATF_REQUIRE(ferror(fp)); + ATF_REQUIRE(!feof(fp)); + clearerr(fp); + ipc_wakeup(ipcfd); + + ipc_wait(ipcfd); + ATF_REQUIRE((linelen = getdelim(&line, &linecap, delim, fp)) != -1); + ATF_REQUIRE(!ferror(fp)); + ATF_REQUIRE(!feof(fp)); + ATF_REQUIRE_STREQ(strs[3], line); + ATF_REQUIRE(linelen == strslen[3]); + + ATF_REQUIRE(waitpid(pid, &status, WEXITED) != -1); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 0); +} + +ATF_TC_WITHOUT_HEAD(nonblock_eagain_buffered); +ATF_TC_BODY(nonblock_eagain_buffered, tc) +{ + + _nonblock_eagain(_IOFBF); +} + +ATF_TC_WITHOUT_HEAD(nonblock_eagain_unbuffered); +ATF_TC_BODY(nonblock_eagain_unbuffered, tc) +{ + + _nonblock_eagain(_IONBF); +} + + ATF_TP_ADD_TCS(tp) { @@ -230,6 +427,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, invalid_params); ATF_TP_ADD_TC(tp, nul); ATF_TP_ADD_TC(tp, empty_NULL_buffer); + ATF_TP_ADD_TC(tp, nonblock_eagain_unbuffered); + ATF_TP_ADD_TC(tp, nonblock_eagain_buffered); return (atf_no_error()); } From owner-dev-commits-src-all@freebsd.org Thu Sep 2 18:28:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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 ECB77663C77; Thu, 2 Sep 2021 18:28: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 4H0qFK6Qk0z4Qs4; Thu, 2 Sep 2021 18:28: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 C4C291DD88; Thu, 2 Sep 2021 18:28: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 182ISr2u070384; Thu, 2 Sep 2021 18:28:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182ISr0W070383; Thu, 2 Sep 2021 18:28:53 GMT (envelope-from git) Date: Thu, 2 Sep 2021 18:28:53 GMT Message-Id: <202109021828.182ISr0W070383@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 6352bbf7be9b - main - vmem: disable debug.vmem_check by default MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6352bbf7be9b312979a4110342ff4e18eb0fcfa4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 18:28:54 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=6352bbf7be9b312979a4110342ff4e18eb0fcfa4 commit 6352bbf7be9b312979a4110342ff4e18eb0fcfa4 Author: Mateusz Guzik AuthorDate: 2021-09-02 09:49:39 +0000 Commit: Mateusz Guzik CommitDate: 2021-09-02 18:28:45 +0000 vmem: disable debug.vmem_check by default It has a prohibitive performance impact when running real workloads. Note this only affects kernels with DIAGNOSTIC. Reviewed by: markj Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31784 --- sys/kern/subr_vmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c index dfc9c3b9bf74..74684ff1b2d5 100644 --- a/sys/kern/subr_vmem.c +++ b/sys/kern/subr_vmem.c @@ -181,7 +181,7 @@ struct vmem { #define BT_END(bt) ((bt)->bt_start + (bt)->bt_size - 1) #if defined(DIAGNOSTIC) -static int enable_vmem_check = 1; +static int enable_vmem_check = 0; SYSCTL_INT(_debug, OID_AUTO, vmem_check, CTLFLAG_RWTUN, &enable_vmem_check, 0, "Enable vmem check"); static void vmem_check(vmem_t *); From owner-dev-commits-src-all@freebsd.org Thu Sep 2 18:36:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F24FA663F5C; Thu, 2 Sep 2021 18:36: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 4H0qQZ6RgTz4Sk9; Thu, 2 Sep 2021 18:36: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 C60A51E084; Thu, 2 Sep 2021 18:36: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 182IasGM083382; Thu, 2 Sep 2021 18:36:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182IasYo083381; Thu, 2 Sep 2021 18:36:54 GMT (envelope-from git) Date: Thu, 2 Sep 2021 18:36:54 GMT Message-Id: <202109021836.182IasYo083381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5cc82c563eda - main - cluster_write(): do not access buffer after it is released 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/main X-Git-Reftype: branch X-Git-Commit: 5cc82c563eda97b70120f06e9635ab6c1c24fecd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 18:36:55 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5cc82c563eda97b70120f06e9635ab6c1c24fecd commit 5cc82c563eda97b70120f06e9635ab6c1c24fecd Author: Konstantin Belousov AuthorDate: 2021-09-02 04:04:23 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-02 18:36:33 +0000 cluster_write(): do not access buffer after it is released The issue was reported by Alexander Lochmann , who found the problem by performing lock analysis using LockDoc, see https://doi.org/10.1145/3302424.3303948. Reviewed by: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31780 --- sys/kern/vfs_cluster.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 7ca67c390b91..d3b303f28f6b 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -646,7 +646,7 @@ void cluster_write(struct vnode *vp, struct vn_clusterw *vnc, struct buf *bp, u_quad_t filesize, int seqcount, int gbflags) { - daddr_t lbn; + daddr_t lbn, pbn; int maxclen, cursize; int lblocksize; int async; @@ -753,14 +753,16 @@ cluster_write(struct vnode *vp, struct vn_clusterw *vnc, struct buf *bp, bp->b_blkno == bp->b_lblkno && (VOP_BMAP(vp, lbn, NULL, &bp->b_blkno, &maxclen, NULL) != 0 || bp->b_blkno == -1)) { + pbn = bp->b_blkno; bawrite(bp); vnc->v_clen = 0; - vnc->v_lasta = bp->b_blkno; + vnc->v_lasta = pbn; vnc->v_cstart = lbn + 1; vnc->v_lastw = lbn; return; } vnc->v_clen = maxclen; + pbn = bp->b_blkno; if (!async && maxclen == 0) { /* I/O not contiguous */ vnc->v_cstart = lbn + 1; bawrite(bp); @@ -774,6 +776,7 @@ cluster_write(struct vnode *vp, struct vn_clusterw *vnc, struct buf *bp, * are operating sequentially, otherwise let the buf or * update daemon handle it. */ + pbn = bp->b_blkno; bdwrite(bp); if (seqcount > 1) { cluster_wbuild_wb(vp, lblocksize, vnc->v_cstart, @@ -785,15 +788,17 @@ cluster_write(struct vnode *vp, struct vn_clusterw *vnc, struct buf *bp, /* * We are low on memory, get it going NOW */ + pbn = bp->b_blkno; bawrite(bp); } else { /* * In the middle of a cluster, so just delay the I/O for now. */ + pbn = bp->b_blkno; bdwrite(bp); } vnc->v_lastw = lbn; - vnc->v_lasta = bp->b_blkno; + vnc->v_lasta = pbn; } /* From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:22:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 19:23:24 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 19:23:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 19:27:12 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1DC4B665281; Thu, 2 Sep 2021 19:27: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 4H0rXc0G0Hz4hcg; Thu, 2 Sep 2021 19:27: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 E18351EA9D; Thu, 2 Sep 2021 19:27: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 182JRBDX050514; Thu, 2 Sep 2021 19:27:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182JRBPd050513; Thu, 2 Sep 2021 19:27:11 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:27:11 GMT Message-Id: <202109021927.182JRBPd050513@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 6eac665c8126 - main - openssh: diff reduction against upstream 7.9p1 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/main X-Git-Reftype: branch X-Git-Commit: 6eac665c8126af387a457ee8a08303c6607a6769 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:27:12 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6eac665c8126af387a457ee8a08303c6607a6769 commit 6eac665c8126af387a457ee8a08303c6607a6769 Author: Ed Maste AuthorDate: 2021-09-02 17:38:30 +0000 Commit: Ed Maste CommitDate: 2021-09-02 19:10:44 +0000 openssh: diff reduction against upstream 7.9p1 Clean up whitespace and nonfunctional differences, and unused functions. --- crypto/openssh/auth2.c | 1 - crypto/openssh/ssh-gss.h | 6 +++--- crypto/openssh/sshbuf-getput-basic.c | 1 - crypto/openssh/sshbuf.h | 8 -------- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/crypto/openssh/auth2.c b/crypto/openssh/auth2.c index af6fdae97193..338eb0454b93 100644 --- a/crypto/openssh/auth2.c +++ b/crypto/openssh/auth2.c @@ -313,7 +313,6 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh) "(%s,%s) -> (%s,%s)", authctxt->user, authctxt->service, user, service); } - /* reset state */ auth2_challenge_stop(ssh); diff --git a/crypto/openssh/ssh-gss.h b/crypto/openssh/ssh-gss.h index 236efa6b23c6..1e2d00e47ff1 100644 --- a/crypto/openssh/ssh-gss.h +++ b/crypto/openssh/ssh-gss.h @@ -29,10 +29,10 @@ #ifdef GSSAPI -#if defined(HAVE_GSSAPI_GSSAPI_H) -#include -#elif defined(HAVE_GSSAPI_H) +#ifdef HAVE_GSSAPI_H #include +#elif defined(HAVE_GSSAPI_GSSAPI_H) +#include #endif #ifdef KRB5 diff --git a/crypto/openssh/sshbuf-getput-basic.c b/crypto/openssh/sshbuf-getput-basic.c index 9092a7eebf97..50648258f48d 100644 --- a/crypto/openssh/sshbuf-getput-basic.c +++ b/crypto/openssh/sshbuf-getput-basic.c @@ -25,7 +25,6 @@ #include #include -#include "xmalloc.h" #include "ssherr.h" #include "sshbuf.h" diff --git a/crypto/openssh/sshbuf.h b/crypto/openssh/sshbuf.h index 87aa1560eabe..a43598cac4de 100644 --- a/crypto/openssh/sshbuf.h +++ b/crypto/openssh/sshbuf.h @@ -176,14 +176,6 @@ int sshbuf_put_u32(struct sshbuf *buf, u_int32_t val); int sshbuf_put_u16(struct sshbuf *buf, u_int16_t val); int sshbuf_put_u8(struct sshbuf *buf, u_char val); -#if defined(__FreeBSD__) && defined(__i386__) -#define sshbuf_get_time(b, vp) sshbuf_get_u32((b), (u_int32_t *)(vp)) -#define sshbuf_put_time(b, v) sshbuf_put_u32((b), (u_int32_t)(v)) -#else -#define sshbuf_get_time(b, vp) sshbuf_get_u64((b), (u_int64_t *)(vp)) -#define sshbuf_put_time(b, v) sshbuf_put_u64((b), (u_int64_t)(v)) -#endif - /* * Functions to extract or store SSH wire encoded strings (u32 len || data) * The "cstring" variants admit no \0 characters in the string contents. From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:35:51 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F3174664F70; Thu, 2 Sep 2021 19:35: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 4H0rkZ6HdXz4kTV; Thu, 2 Sep 2021 19:35: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 BF1D71E9B9; Thu, 2 Sep 2021 19:35: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 182JZoKM064062; Thu, 2 Sep 2021 19:35:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182JZogB064061; Thu, 2 Sep 2021 19:35:50 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:35:50 GMT Message-Id: <202109021935.182JZogB064061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 9d8ebe5ea1be - main - hmt(4): Adapt to recent KPI changes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d8ebe5ea1bedee50856aea7537310bc860bfede Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:35:51 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=9d8ebe5ea1bedee50856aea7537310bc860bfede commit 9d8ebe5ea1bedee50856aea7537310bc860bfede Author: Vladimir Kondratyev AuthorDate: 2021-09-02 19:25:27 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-09-02 19:35:26 +0000 hmt(4): Adapt to recent KPI changes MFC after: 2 weeks --- sys/dev/hid/hmt.c | 133 +++++++++++++++++++++++------------------------------- 1 file changed, 57 insertions(+), 76 deletions(-) diff --git a/sys/dev/hid/hmt.c b/sys/dev/hid/hmt.c index d04db6954d00..d1b36c424ba8 100644 --- a/sys/dev/hid/hmt.c +++ b/sys/dev/hid/hmt.c @@ -78,105 +78,101 @@ enum hmt_type { }; enum { - HMT_TIP_SWITCH, -#define HMT_SLOT HMT_TIP_SWITCH - HMT_WIDTH, -#define HMT_MAJOR HMT_WIDTH - HMT_HEIGHT, -#define HMT_MINOR HMT_HEIGHT - HMT_ORIENTATION, - HMT_X, - HMT_Y, - HMT_CONTACTID, - HMT_PRESSURE, - HMT_IN_RANGE, - HMT_CONFIDENCE, - HMT_TOOL_X, - HMT_TOOL_Y, - HMT_N_USAGES, + HMT_TIP_SWITCH = ABS_MT_INDEX(ABS_MT_TOOL_TYPE), + HMT_WIDTH = ABS_MT_INDEX(ABS_MT_TOUCH_MAJOR), + HMT_HEIGHT = ABS_MT_INDEX(ABS_MT_TOUCH_MINOR), + HMT_ORIENTATION = ABS_MT_INDEX(ABS_MT_ORIENTATION), + HMT_X = ABS_MT_INDEX(ABS_MT_POSITION_X), + HMT_Y = ABS_MT_INDEX(ABS_MT_POSITION_Y), + HMT_CONTACTID = ABS_MT_INDEX(ABS_MT_TRACKING_ID), + HMT_PRESSURE = ABS_MT_INDEX(ABS_MT_PRESSURE), + HMT_IN_RANGE = ABS_MT_INDEX(ABS_MT_DISTANCE), + HMT_CONFIDENCE = ABS_MT_INDEX(ABS_MT_BLOB_ID), + HMT_TOOL_X = ABS_MT_INDEX(ABS_MT_TOOL_X), + HMT_TOOL_Y = ABS_MT_INDEX(ABS_MT_TOOL_Y), }; -#define HMT_NO_CODE (ABS_MAX + 10) +#define HMT_N_USAGES MT_CNT #define HMT_NO_USAGE -1 struct hmt_hid_map_item { char name[5]; int32_t usage; /* HID usage */ - uint32_t code; /* Evdev event code */ + bool reported; /* Item value is passed to evdev */ bool required; /* Required for MT Digitizers */ }; static const struct hmt_hid_map_item hmt_hid_map[HMT_N_USAGES] = { - [HMT_TIP_SWITCH] = { /* HMT_SLOT */ + [HMT_TIP_SWITCH] = { .name = "TIP", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_TIP_SWITCH), - .code = ABS_MT_SLOT, + .reported = false, .required = true, }, - [HMT_WIDTH] = { /* HMT_MAJOR */ + [HMT_WIDTH] = { .name = "WDTH", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_WIDTH), - .code = ABS_MT_TOUCH_MAJOR, + .reported = true, .required = false, }, - [HMT_HEIGHT] = { /* HMT_MINOR */ + [HMT_HEIGHT] = { .name = "HGHT", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_HEIGHT), - .code = ABS_MT_TOUCH_MINOR, + .reported = true, .required = false, }, [HMT_ORIENTATION] = { .name = "ORIE", .usage = HMT_NO_USAGE, - .code = ABS_MT_ORIENTATION, + .reported = true, .required = false, }, [HMT_X] = { .name = "X", .usage = HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), - .code = ABS_MT_POSITION_X, + .reported = true, .required = true, }, [HMT_Y] = { .name = "Y", .usage = HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y), - .code = ABS_MT_POSITION_Y, + .reported = true, .required = true, }, [HMT_CONTACTID] = { .name = "C_ID", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_CONTACTID), - .code = ABS_MT_TRACKING_ID, + .reported = true, .required = true, }, [HMT_PRESSURE] = { .name = "PRES", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_TIP_PRESSURE), - .code = ABS_MT_PRESSURE, + .reported = true, .required = false, }, [HMT_IN_RANGE] = { .name = "RANG", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_IN_RANGE), - .code = ABS_MT_DISTANCE, + .reported = true, .required = false, }, [HMT_CONFIDENCE] = { .name = "CONF", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_CONFIDENCE), - .code = HMT_NO_CODE, + .reported = false, .required = false, }, - [HMT_TOOL_X] = { /* Shares HID usage with HMT_X */ + [HMT_TOOL_X] = { /* Shares HID usage with POS_X */ .name = "TL_X", .usage = HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), - .code = ABS_MT_TOOL_X, + .reported = true, .required = false, }, - [HMT_TOOL_Y] = { /* Shares HID usage with HMT_Y */ + [HMT_TOOL_Y] = { /* Shares HID usage with POS_Y */ .name = "TL_Y", .usage = HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y), - .code = ABS_MT_TOOL_Y, + .reported = true, .required = false, }, }; @@ -200,7 +196,7 @@ struct hmt_softc { struct evdev_dev *evdev; - uint32_t slot_data[HMT_N_USAGES]; + union evdev_mt_slot slot_data; uint8_t caps[howmany(HMT_N_USAGES, 8)]; uint8_t buttons[howmany(HMT_BTN_MAX, 8)]; uint32_t nconts_per_report; @@ -375,13 +371,6 @@ hmt_attach(device_t dev) sc->cont_count_max = MAX_MT_SLOTS; } - /* Set number of MT protocol type B slots */ - sc->ai[HMT_SLOT] = (struct hid_absinfo) { - .min = 0, - .max = sc->cont_count_max - 1, - .res = 0, - }; - if (hid_test_quirk(hw, HQ_MT_TIMESTAMP) || hmt_timestamps) sc->do_timestamps = true; #ifdef IICHID_SAMPLING @@ -434,9 +423,11 @@ hmt_attach(device_t dev) } } } + evdev_support_abs(sc->evdev, + ABS_MT_SLOT, 0, sc->cont_count_max - 1, 0, 0, 0); HMT_FOREACH_USAGE(sc->caps, i) { - if (hmt_hid_map[i].code != HMT_NO_CODE) - evdev_support_abs(sc->evdev, hmt_hid_map[i].code, + if (hmt_hid_map[i].reported) + evdev_support_abs(sc->evdev, ABS_MT_FIRST + i, sc->ai[i].min, sc->ai[i].max, 0, 0, sc->ai[i].res); } @@ -480,14 +471,14 @@ hmt_intr(void *context, void *buf, hid_size_t len) { struct hmt_softc *sc = context; size_t usage; - uint32_t *slot_data = sc->slot_data; + union evdev_mt_slot *slot_data; uint32_t cont, btn; uint32_t cont_count; uint32_t width; uint32_t height; uint32_t int_btn = 0; uint32_t left_btn = 0; - int32_t slot; + int slot; uint32_t scan_time; int32_t delta; uint8_t id; @@ -502,10 +493,7 @@ hmt_intr(void *context, void *buf, hid_size_t len) if (sc->iichid_sampling && len == 0) { sc->prev_touch = false; sc->timestamp = 0; - for (slot = 0; slot <= sc->ai[HMT_SLOT].max; slot++) { - evdev_push_abs(sc->evdev, ABS_MT_SLOT, slot); - evdev_push_abs(sc->evdev, ABS_MT_TRACKING_ID, -1); - } + /* EVDEV_FLAG_MT_AUTOREL releases all touches for us */ evdev_sync(sc->evdev); return; } @@ -567,56 +555,49 @@ hmt_intr(void *context, void *buf, hid_size_t len) /* Use protocol Type B for reporting events */ for (cont = 0; cont < cont_count; cont++) { + slot_data = &sc->slot_data; bzero(slot_data, sizeof(sc->slot_data)); HMT_FOREACH_USAGE(sc->caps, usage) { if (sc->locs[cont][usage].size > 0) - slot_data[usage] = hid_get_udata( + slot_data->val[usage] = hid_get_udata( buf, len, &sc->locs[cont][usage]); } - slot = evdev_get_mt_slot_by_tracking_id(sc->evdev, - slot_data[HMT_CONTACTID]); + slot = evdev_mt_id_to_slot(sc->evdev, slot_data->id); #ifdef HID_DEBUG DPRINTFN(6, "cont%01x: data = ", cont); if (hmt_debug >= 6) { HMT_FOREACH_USAGE(sc->caps, usage) { if (hmt_hid_map[usage].usage != HMT_NO_USAGE) - printf("%04x ", slot_data[usage]); + printf("%04x ", slot_data->val[usage]); } - printf("slot = %d\n", (int)slot); + printf("slot = %d\n", slot); } #endif if (slot == -1) { DPRINTF("Slot overflow for contact_id %u\n", - (unsigned)slot_data[HMT_CONTACTID]); + (unsigned)slot_data->id); continue; } - if (slot_data[HMT_TIP_SWITCH] != 0 && + if (slot_data->val[HMT_TIP_SWITCH] != 0 && !(isset(sc->caps, HMT_CONFIDENCE) && - slot_data[HMT_CONFIDENCE] == 0)) { + slot_data->val[HMT_CONFIDENCE] == 0)) { /* This finger is in proximity of the sensor */ sc->touch = true; - slot_data[HMT_SLOT] = slot; - slot_data[HMT_IN_RANGE] = !slot_data[HMT_IN_RANGE]; + slot_data->dist = !slot_data->val[HMT_IN_RANGE]; /* Divided by two to match visual scale of touch */ - width = slot_data[HMT_WIDTH] >> 1; - height = slot_data[HMT_HEIGHT] >> 1; - slot_data[HMT_ORIENTATION] = width > height; - slot_data[HMT_MAJOR] = MAX(width, height); - slot_data[HMT_MINOR] = MIN(width, height); - - HMT_FOREACH_USAGE(sc->caps, usage) - if (hmt_hid_map[usage].code != HMT_NO_CODE) - evdev_push_abs(sc->evdev, - hmt_hid_map[usage].code, - slot_data[usage]); - } else { - evdev_push_abs(sc->evdev, ABS_MT_SLOT, slot); - evdev_push_abs(sc->evdev, ABS_MT_TRACKING_ID, -1); - } + width = slot_data->val[HMT_WIDTH] >> 1; + height = slot_data->val[HMT_HEIGHT] >> 1; + slot_data->ori = width > height; + slot_data->maj = MAX(width, height); + slot_data->min = MIN(width, height); + } else + slot_data = NULL; + + evdev_mt_push_slot(sc->evdev, slot, slot_data); } sc->nconts_todo -= cont_count; From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:35:52 2021 Return-Path: Delivered-To: dev-commits-src-all@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 34F1C6653A4; Thu, 2 Sep 2021 19:35: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 4H0rkc0XY3z4kNd; Thu, 2 Sep 2021 19:35: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 E0E311E96A; Thu, 2 Sep 2021 19:35: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 182JZpX9064093; Thu, 2 Sep 2021 19:35:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182JZpXt064092; Thu, 2 Sep 2021 19:35:51 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:35:51 GMT Message-Id: <202109021935.182JZpXt064092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 527b6d60f869 - main - wmt(4): Adapt to recent KPI changes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 527b6d60f86953a40136abcf2f38cc4e70118954 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:35:52 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=527b6d60f86953a40136abcf2f38cc4e70118954 commit 527b6d60f86953a40136abcf2f38cc4e70118954 Author: Vladimir Kondratyev AuthorDate: 2021-09-02 19:27:02 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-09-02 19:35:26 +0000 wmt(4): Adapt to recent KPI changes MFC after: 2 weeks --- sys/dev/usb/input/wmt.c | 136 ++++++++++++++++++++++-------------------------- 1 file changed, 61 insertions(+), 75 deletions(-) diff --git a/sys/dev/usb/input/wmt.c b/sys/dev/usb/input/wmt.c index 8191c6ff9369..661fa622433f 100644 --- a/sys/dev/usb/input/wmt.c +++ b/sys/dev/usb/input/wmt.c @@ -94,105 +94,101 @@ enum wmt_input_mode { }; enum { - WMT_TIP_SWITCH, -#define WMT_SLOT WMT_TIP_SWITCH - WMT_WIDTH, -#define WMT_MAJOR WMT_WIDTH - WMT_HEIGHT, -#define WMT_MINOR WMT_HEIGHT - WMT_ORIENTATION, - WMT_X, - WMT_Y, - WMT_CONTACTID, - WMT_PRESSURE, - WMT_IN_RANGE, - WMT_CONFIDENCE, - WMT_TOOL_X, - WMT_TOOL_Y, - WMT_N_USAGES, + WMT_TIP_SWITCH = ABS_MT_INDEX(ABS_MT_TOOL_TYPE), + WMT_WIDTH = ABS_MT_INDEX(ABS_MT_TOUCH_MAJOR), + WMT_HEIGHT = ABS_MT_INDEX(ABS_MT_TOUCH_MINOR), + WMT_ORIENTATION = ABS_MT_INDEX(ABS_MT_ORIENTATION), + WMT_X = ABS_MT_INDEX(ABS_MT_POSITION_X), + WMT_Y = ABS_MT_INDEX(ABS_MT_POSITION_Y), + WMT_CONTACTID = ABS_MT_INDEX(ABS_MT_TRACKING_ID), + WMT_PRESSURE = ABS_MT_INDEX(ABS_MT_PRESSURE), + WMT_IN_RANGE = ABS_MT_INDEX(ABS_MT_DISTANCE), + WMT_CONFIDENCE = ABS_MT_INDEX(ABS_MT_BLOB_ID), + WMT_TOOL_X = ABS_MT_INDEX(ABS_MT_TOOL_X), + WMT_TOOL_Y = ABS_MT_INDEX(ABS_MT_TOOL_Y), }; -#define WMT_NO_CODE (ABS_MAX + 10) +#define WMT_N_USAGES MT_CNT #define WMT_NO_USAGE -1 struct wmt_hid_map_item { char name[5]; int32_t usage; /* HID usage */ - uint32_t code; /* Evdev event code */ + bool reported; /* Item value is passed to evdev */ bool required; /* Required for MT Digitizers */ }; static const struct wmt_hid_map_item wmt_hid_map[WMT_N_USAGES] = { - [WMT_TIP_SWITCH] = { /* WMT_SLOT */ + [WMT_TIP_SWITCH] = { .name = "TIP", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_TIP_SWITCH), - .code = ABS_MT_SLOT, + .reported = false, .required = true, }, - [WMT_WIDTH] = { /* WMT_MAJOR */ + [WMT_WIDTH] = { .name = "WDTH", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_WIDTH), - .code = ABS_MT_TOUCH_MAJOR, + .reported = true, .required = false, }, - [WMT_HEIGHT] = { /* WMT_MINOR */ + [WMT_HEIGHT] = { .name = "HGHT", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_HEIGHT), - .code = ABS_MT_TOUCH_MINOR, + .reported = true, .required = false, }, [WMT_ORIENTATION] = { .name = "ORIE", .usage = WMT_NO_USAGE, - .code = ABS_MT_ORIENTATION, + .reported = true, .required = false, }, [WMT_X] = { .name = "X", .usage = HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), - .code = ABS_MT_POSITION_X, + .reported = true, .required = true, }, [WMT_Y] = { .name = "Y", .usage = HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y), - .code = ABS_MT_POSITION_Y, + .reported = true, .required = true, }, [WMT_CONTACTID] = { .name = "C_ID", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_CONTACTID), - .code = ABS_MT_TRACKING_ID, + .reported = true, .required = true, }, [WMT_PRESSURE] = { .name = "PRES", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_TIP_PRESSURE), - .code = ABS_MT_PRESSURE, + .reported = true, .required = false, }, [WMT_IN_RANGE] = { .name = "RANG", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_IN_RANGE), - .code = ABS_MT_DISTANCE, + .reported = true, .required = false, }, [WMT_CONFIDENCE] = { .name = "CONF", .usage = HID_USAGE2(HUP_DIGITIZERS, HUD_CONFIDENCE), - .code = WMT_NO_CODE, + .reported = false, .required = false, }, [WMT_TOOL_X] = { /* Shares HID usage with WMT_X */ .name = "TL_X", .usage = HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), - .code = ABS_MT_TOOL_X, + .reported = true, .required = false, }, [WMT_TOOL_Y] = { /* Shares HID usage with WMT_Y */ .name = "TL_Y", .usage = HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y), - .code = ABS_MT_TOOL_Y, + .reported = true, .required = false, }, }; @@ -207,6 +203,7 @@ struct wmt_softc { device_t dev; enum wmt_type type; + int32_t cont_count_max; struct mtx mtx; struct wmt_absinfo ai[WMT_N_USAGES]; struct hid_location locs[MAX_MT_SLOTS][WMT_N_USAGES]; @@ -223,7 +220,7 @@ struct wmt_softc { struct usb_xfer *xfer[WMT_N_TRANSFER]; struct evdev_dev *evdev; - uint32_t slot_data[WMT_N_USAGES]; + union evdev_mt_slot slot_data; uint8_t caps[howmany(WMT_N_USAGES, 8)]; uint8_t buttons[howmany(WMT_BTN_MAX, 8)]; uint32_t isize; @@ -361,7 +358,7 @@ wmt_attach(device_t dev) * 'Contact Count Maximum' */ if (cont_count_max > 0) - sc->ai[WMT_SLOT].max = cont_count_max - 1; + sc->cont_count_max = cont_count_max; } else DPRINTF("usbd_req_get_report error=(%s)\n", usbd_errstr(err)); @@ -400,10 +397,10 @@ wmt_attach(device_t dev) } /* Cap contact count maximum to MAX_MT_SLOTS */ - if (sc->ai[WMT_SLOT].max >= MAX_MT_SLOTS) { + if (sc->cont_count_max > MAX_MT_SLOTS) { DPRINTF("Hardware reported %d contacts while only %d is " - "supported\n", (int)sc->ai[WMT_SLOT].max+1, MAX_MT_SLOTS); - sc->ai[WMT_SLOT].max = MAX_MT_SLOTS - 1; + "supported\n", (int)sc->cont_count_max, MAX_MT_SLOTS); + sc->cont_count_max = MAX_MT_SLOTS; } if (/*usb_test_quirk(hw, UQ_MT_TIMESTAMP) ||*/ wmt_timestamps) @@ -456,9 +453,11 @@ wmt_attach(device_t dev) } } } + evdev_support_abs(sc->evdev, + ABS_MT_SLOT, 0, sc->cont_count_max - 1, 0, 0, 0); WMT_FOREACH_USAGE(sc->caps, i) { - if (wmt_hid_map[i].code != WMT_NO_CODE) - evdev_support_abs(sc->evdev, wmt_hid_map[i].code, + if (wmt_hid_map[i].reported) + evdev_support_abs(sc->evdev, ABS_MT_FIRST + i, sc->ai[i].min, sc->ai[i].max, 0, 0, sc->ai[i].res); } @@ -473,7 +472,7 @@ wmt_attach(device_t dev) sc->is_clickpad ? ", click-pad" : ""); device_printf(sc->dev, "%d contacts and [%s%s%s%s%s]. Report range [%d:%d] - [%d:%d]\n", - (int)sc->ai[WMT_SLOT].max + 1, + (int)sc->cont_count_max, isset(sc->caps, WMT_IN_RANGE) ? "R" : "", isset(sc->caps, WMT_CONFIDENCE) ? "C" : "", isset(sc->caps, WMT_WIDTH) ? "W" : "", @@ -504,14 +503,14 @@ static void wmt_process_report(struct wmt_softc *sc, uint8_t *buf, int len) { size_t usage; - uint32_t *slot_data = sc->slot_data; + union evdev_mt_slot *slot_data; uint32_t cont, btn; uint32_t cont_count; uint32_t width; uint32_t height; uint32_t int_btn = 0; uint32_t left_btn = 0; - int32_t slot; + int slot; uint32_t scan_time; int32_t delta; @@ -558,56 +557,49 @@ wmt_process_report(struct wmt_softc *sc, uint8_t *buf, int len) /* Use protocol Type B for reporting events */ for (cont = 0; cont < cont_count; cont++) { + slot_data = &sc->slot_data; bzero(slot_data, sizeof(sc->slot_data)); WMT_FOREACH_USAGE(sc->caps, usage) { if (sc->locs[cont][usage].size > 0) - slot_data[usage] = hid_get_udata( + slot_data->val[usage] = hid_get_udata( buf, len, &sc->locs[cont][usage]); } - slot = evdev_get_mt_slot_by_tracking_id(sc->evdev, - slot_data[WMT_CONTACTID]); + slot = evdev_mt_id_to_slot(sc->evdev, slot_data->id); #ifdef USB_DEBUG DPRINTFN(6, "cont%01x: data = ", cont); if (wmt_debug >= 6) { WMT_FOREACH_USAGE(sc->caps, usage) { if (wmt_hid_map[usage].usage != WMT_NO_USAGE) - printf("%04x ", slot_data[usage]); + printf("%04x ", slot_data->val[usage]); } - printf("slot = %d\n", (int)slot); + printf("slot = %d\n", slot); } #endif if (slot == -1) { DPRINTF("Slot overflow for contact_id %u\n", - (unsigned)slot_data[WMT_CONTACTID]); + (unsigned)slot_data->id); continue; } - if (slot_data[WMT_TIP_SWITCH] != 0 && + if (slot_data->val[WMT_TIP_SWITCH] != 0 && !(isset(sc->caps, WMT_CONFIDENCE) && - slot_data[WMT_CONFIDENCE] == 0)) { + slot_data->val[WMT_CONFIDENCE] == 0)) { /* This finger is in proximity of the sensor */ sc->touch = true; - slot_data[WMT_SLOT] = slot; - slot_data[WMT_IN_RANGE] = !slot_data[WMT_IN_RANGE]; + slot_data->dist = !slot_data->val[WMT_IN_RANGE]; /* Divided by two to match visual scale of touch */ - width = slot_data[WMT_WIDTH] >> 1; - height = slot_data[WMT_HEIGHT] >> 1; - slot_data[WMT_ORIENTATION] = width > height; - slot_data[WMT_MAJOR] = MAX(width, height); - slot_data[WMT_MINOR] = MIN(width, height); - - WMT_FOREACH_USAGE(sc->caps, usage) - if (wmt_hid_map[usage].code != WMT_NO_CODE) - evdev_push_abs(sc->evdev, - wmt_hid_map[usage].code, - slot_data[usage]); - } else { - evdev_push_abs(sc->evdev, ABS_MT_SLOT, slot); - evdev_push_abs(sc->evdev, ABS_MT_TRACKING_ID, -1); - } + width = slot_data->val[WMT_WIDTH] >> 1; + height = slot_data->val[WMT_HEIGHT] >> 1; + slot_data->ori = width > height; + slot_data->maj = MAX(width, height); + slot_data->min = MIN(width, height); + } else + slot_data = NULL; + + evdev_mt_push_slot(sc->evdev, slot, slot_data); } sc->nconts_todo -= cont_count; @@ -948,13 +940,6 @@ wmt_hid_parse(struct wmt_softc *sc, const void *d_ptr, uint16_t d_len) if (cont_count_max < 1) cont_count_max = cont; - /* Set number of MT protocol type B slots */ - sc->ai[WMT_SLOT] = (struct wmt_absinfo) { - .min = 0, - .max = cont_count_max - 1, - .res = 0, - }; - /* Report touch orientation if both width and height are supported */ if (isset(sc->caps, WMT_WIDTH) && isset(sc->caps, WMT_HEIGHT)) { setbit(sc->caps, WMT_ORIENTATION); @@ -976,6 +961,7 @@ wmt_hid_parse(struct wmt_softc *sc, const void *d_ptr, uint16_t d_len) sc->report_id = report_id; sc->nconts_per_report = cont; sc->has_int_button = has_int_button; + sc->cont_count_max = cont_count_max; return (type); } From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:35:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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 45111665552; Thu, 2 Sep 2021 19:35: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 4H0rkd14ZFz4kFV; Thu, 2 Sep 2021 19:35: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 038521ED20; Thu, 2 Sep 2021 19:35: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 182JZqET064117; Thu, 2 Sep 2021 19:35:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182JZqjY064116; Thu, 2 Sep 2021 19:35:52 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:35:52 GMT Message-Id: <202109021935.182JZqjY064116@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 4836af0d42cf - main - cyapa(4): Adapt to recent evdev KPI changes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4836af0d42cf9d299ba9203a835bdcfa797a74c2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:35:53 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=4836af0d42cf9d299ba9203a835bdcfa797a74c2 commit 4836af0d42cf9d299ba9203a835bdcfa797a74c2 Author: Vladimir Kondratyev AuthorDate: 2021-09-02 19:28:05 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-09-02 19:35:26 +0000 cyapa(4): Adapt to recent evdev KPI changes MFC after: 2 weeks --- sys/dev/cyapa/cyapa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cyapa/cyapa.c b/sys/dev/cyapa/cyapa.c index 517ce8d1bab7..39f3349d5217 100644 --- a/sys/dev/cyapa/cyapa.c +++ b/sys/dev/cyapa/cyapa.c @@ -1377,7 +1377,7 @@ cyapa_raw_input(struct cyapa_softc *sc, struct cyapa_regs *regs, int freq) #ifdef EVDEV_SUPPORT if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { for (i = 0; i < nfingers; ++i) { - int32_t slot = evdev_get_mt_slot_by_tracking_id( + int slot = evdev_mt_id_to_slot( sc->evdev, regs->touch[i].id); if (slot == -1) { if (cyapa_debug) From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:35:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 52DCD665172; Thu, 2 Sep 2021 19:35: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 4H0rkf1W9Bz4kTd; Thu, 2 Sep 2021 19:35: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 174EF1E96B; Thu, 2 Sep 2021 19:35: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 182JZs9b064141; Thu, 2 Sep 2021 19:35:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182JZswS064140; Thu, 2 Sep 2021 19:35:54 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:35:54 GMT Message-Id: <202109021935.182JZswS064140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 35bc295b30ef - main - evdev: Do not export multitouch functions which are unused outside evdev MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35bc295b30ef91f1835a0ee0225e8d957a9ebddd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:35:54 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=35bc295b30ef91f1835a0ee0225e8d957a9ebddd commit 35bc295b30ef91f1835a0ee0225e8d957a9ebddd Author: Vladimir Kondratyev AuthorDate: 2021-09-02 19:28:34 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-09-02 19:35:26 +0000 evdev: Do not export multitouch functions which are unused outside evdev --- sys/dev/evdev/evdev.h | 9 +-------- sys/dev/evdev/evdev_mt.c | 18 +++++------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/sys/dev/evdev/evdev.h b/sys/dev/evdev/evdev.h index dde9bba9b1e2..589bd7cfe563 100644 --- a/sys/dev/evdev/evdev.h +++ b/sys/dev/evdev/evdev.h @@ -156,19 +156,12 @@ void evdev_set_flag(struct evdev_dev *, uint16_t); void *evdev_get_softc(struct evdev_dev *); /* Multitouch related functions: */ -int evdev_get_mt_slot_by_tracking_id(struct evdev_dev *, int32_t); -void evdev_support_mt_compat(struct evdev_dev *); -void evdev_push_mt_compat(struct evdev_dev *); +int evdev_mt_id_to_slot(struct evdev_dev *, int32_t); int evdev_mt_push_slot(struct evdev_dev *, int, union evdev_mt_slot *); int evdev_mt_push_frame(struct evdev_dev *, union evdev_mt_slot *, int); void evdev_mt_match_frame(struct evdev_dev *, union evdev_mt_slot *, int); union evdev_mt_slot *evdev_mt_get_match_slots(struct evdev_dev *); void evdev_mt_push_autorel(struct evdev_dev *); -static inline int -evdev_mt_id_to_slot(struct evdev_dev *evdev, int32_t id) -{ - return (evdev_get_mt_slot_by_tracking_id(evdev, id)); -} /* Utility functions: */ uint16_t evdev_hid2key(int); diff --git a/sys/dev/evdev/evdev_mt.c b/sys/dev/evdev/evdev_mt.c index 3030a60e098a..a3cb76cbbdb4 100644 --- a/sys/dev/evdev/evdev_mt.c +++ b/sys/dev/evdev/evdev_mt.c @@ -93,6 +93,7 @@ struct evdev_mt { union evdev_mt_slot slots[]; }; +static void evdev_mt_support_st_compat(struct evdev_dev *); static void evdev_mt_send_st_compat(struct evdev_dev *); static void evdev_mt_send_autorel(struct evdev_dev *); static void evdev_mt_replay_events(struct evdev_dev *); @@ -144,7 +145,7 @@ evdev_mt_init(struct evdev_dev *evdev) evdev_support_abs(evdev, ABS_MT_TRACKING_ID, -1, UINT16_MAX, 0, 0, 0); if (bit_test(evdev->ev_flags, EVDEV_FLAG_MT_STCOMPAT)) - evdev_support_mt_compat(evdev); + evdev_mt_support_st_compat(evdev); } void @@ -517,7 +518,7 @@ evdev_mt_set_value(struct evdev_dev *evdev, int slot, int16_t code, } int -evdev_get_mt_slot_by_tracking_id(struct evdev_dev *evdev, int32_t tracking_id) +evdev_mt_id_to_slot(struct evdev_dev *evdev, int32_t tracking_id) { struct evdev_mt *mt = evdev->ev_mt; int slot; @@ -579,8 +580,8 @@ evdev_mt_normalize(int32_t value, int32_t mtmin, int32_t mtmax, int32_t stmax) return (value); } -void -evdev_support_mt_compat(struct evdev_dev *evdev) +static void +evdev_mt_support_st_compat(struct evdev_dev *evdev) { struct input_absinfo *ai; int i; @@ -650,15 +651,6 @@ evdev_mt_send_st_compat(struct evdev_dev *evdev) evdev_send_event(evdev, EV_ABS, ABS_PRESSURE, 0); } -void -evdev_push_mt_compat(struct evdev_dev *evdev) -{ - - EVDEV_ENTER(evdev); - evdev_mt_send_st_compat(evdev); - EVDEV_EXIT(evdev); -} - static void evdev_mt_send_autorel(struct evdev_dev *evdev) { From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:35:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A62B9665177; Thu, 2 Sep 2021 19:35: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 4H0rkg3cMgz4kYP; Thu, 2 Sep 2021 19:35: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 46FD91ED21; Thu, 2 Sep 2021 19:35: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 182JZt5A064165; Thu, 2 Sep 2021 19:35:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182JZtU2064164; Thu, 2 Sep 2021 19:35:55 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:35:55 GMT Message-Id: <202109021935.182JZtU2064164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: c21171af687e - main - psm: Enable touch-tracking for late Synaptics PS/2 touchpads. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c21171af687e20173b6b39e33db55999ba8d715e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:35:55 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=c21171af687e20173b6b39e33db55999ba8d715e commit c21171af687e20173b6b39e33db55999ba8d715e Author: Vladimir Kondratyev AuthorDate: 2021-09-02 19:29:49 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-09-02 19:35:26 +0000 psm: Enable touch-tracking for late Synaptics PS/2 touchpads. They are true multitouch internally but Synaptics PS/2 protocol limitations do not all allow to export touch identificators. MFC after: 2 weeks --- sys/dev/atkbdc/psm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index f6276ae847aa..78955bf1b228 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -1845,6 +1845,8 @@ psm_register_synaptics(device_t dev) evdev_set_id(evdev_a, BUS_I8042, PS2_MOUSE_VENDOR, PS2_MOUSE_SYNAPTICS_PRODUCT, 0); evdev_set_methods(evdev_a, sc, &psm_ev_methods_a); + if (sc->synhw.capReportsV) + evdev_set_flag(evdev_a, EVDEV_FLAG_MT_TRACK); evdev_support_event(evdev_a, EV_SYN); evdev_support_event(evdev_a, EV_KEY); From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:35:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 203EF6654A3; Thu, 2 Sep 2021 19:35: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 4H0rkh4qYWz4kWl; Thu, 2 Sep 2021 19:35: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 6FBDC1EABF; Thu, 2 Sep 2021 19:35: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 182JZugF064189; Thu, 2 Sep 2021 19:35:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182JZuZv064188; Thu, 2 Sep 2021 19:35:56 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:35:56 GMT Message-Id: <202109021935.182JZuZv064188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 744fcd5ad2a3 - main - psm: Use evdev autorelease feature for Synaptics and Elantech drivers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 744fcd5ad2a3e572585615df259eb3e2f0b624ef Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:35:57 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=744fcd5ad2a3e572585615df259eb3e2f0b624ef commit 744fcd5ad2a3e572585615df259eb3e2f0b624ef Author: Vladimir Kondratyev AuthorDate: 2021-09-02 19:30:29 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-09-02 19:35:26 +0000 psm: Use evdev autorelease feature for Synaptics and Elantech drivers MFC after: 2 weeks --- sys/dev/atkbdc/psm.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 78955bf1b228..f27a49f82a71 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -1730,14 +1730,6 @@ psm_push_st_finger(struct psm_softc *sc, const finger_t *f) evdev_push_abs(sc->evdev_a, ABS_TOOL_WIDTH, f->w); } -static void -psm_release_mt_slot(struct evdev_dev *evdev, int32_t slot) -{ - - evdev_push_abs(evdev, ABS_MT_SLOT, slot); - evdev_push_abs(evdev, ABS_MT_TRACKING_ID, -1); -} - static int psm_register(device_t dev, int model_code) { @@ -1845,6 +1837,8 @@ psm_register_synaptics(device_t dev) evdev_set_id(evdev_a, BUS_I8042, PS2_MOUSE_VENDOR, PS2_MOUSE_SYNAPTICS_PRODUCT, 0); evdev_set_methods(evdev_a, sc, &psm_ev_methods_a); + if (sc->synhw.capAdvancedGestures || sc->synhw.capReportsV) + evdev_set_flag(evdev_a, EVDEV_FLAG_MT_AUTOREL); if (sc->synhw.capReportsV) evdev_set_flag(evdev_a, EVDEV_FLAG_MT_TRACK); @@ -1923,6 +1917,7 @@ psm_register_elantech(device_t dev) evdev_set_id(evdev_a, BUS_I8042, PS2_MOUSE_VENDOR, PS2_MOUSE_ELANTECH_PRODUCT, 0); evdev_set_methods(evdev_a, sc, &psm_ev_methods_a); + evdev_set_flag(evdev_a, EVDEV_FLAG_MT_AUTOREL); evdev_support_event(evdev_a, EV_SYN); evdev_support_event(evdev_a, EV_KEY); @@ -3597,12 +3592,9 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, #ifdef EVDEV_SUPPORT if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { - for (id = 0; id < PSM_FINGERS; id++) { + for (id = 0; id < PSM_FINGERS; id++) if (PSM_FINGER_IS_SET(f[id])) psm_push_mt_finger(sc, id, &f[id]); - else - psm_release_mt_slot(sc->evdev_a, id); - } evdev_push_key(sc->evdev_a, BTN_TOUCH, nfingers > 0); evdev_push_nfingers(sc->evdev_a, nfingers); if (nfingers > 0) @@ -4772,9 +4764,6 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, evdev_push_abs(sc->evdev_a, ABS_MT_TOUCH_MAJOR, f[id].w * sc->elanhw.dptracex); } - if (sc->elanaction.mask & (1 << id) && - !(mask & (1 << id))) - psm_release_mt_slot(sc->evdev_a, id); } evdev_push_key(sc->evdev_a, BTN_TOUCH, nfingers > 0); evdev_push_nfingers(sc->evdev_a, nfingers); From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:35:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D8484665591; Thu, 2 Sep 2021 19:35: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 4H0rkj4nJ1z4kNw; Thu, 2 Sep 2021 19:35: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 88D7D1EAC0; Thu, 2 Sep 2021 19:35: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 182JZvHN064219; Thu, 2 Sep 2021 19:35:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182JZvRx064218; Thu, 2 Sep 2021 19:35:57 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:35:57 GMT Message-Id: <202109021935.182JZvRx064218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 0075742d1834 - main - hmt(4): Add support for serial packet reporting mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0075742d1834d52b5e24a606aca63ad7e67e81f3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:35:58 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=0075742d1834d52b5e24a606aca63ad7e67e81f3 commit 0075742d1834d52b5e24a606aca63ad7e67e81f3 Author: Vladimir Kondratyev AuthorDate: 2021-09-02 19:31:17 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-09-02 19:35:27 +0000 hmt(4): Add support for serial packet reporting mode In Serial mode, each packet contains information that describes a single physical contact point. Multiple contacts are streamed serially. In this mode, devices report all contact information in a series of packets. The device sends a separate packet for each concurrent contact. Serial packet reporting mode is used by post-2014 eGalax touchscreens. Tested by: Mark Kane MFC after: 2 weeks --- sys/dev/hid/hmt.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/sys/dev/hid/hmt.c b/sys/dev/hid/hmt.c index d1b36c424ba8..cb7afe7290d0 100644 --- a/sys/dev/hid/hmt.c +++ b/sys/dev/hid/hmt.c @@ -204,6 +204,8 @@ struct hmt_softc { uint8_t report_id; uint32_t max_button; bool has_int_button; + bool has_cont_count; + bool has_scan_time; bool is_clickpad; bool do_timestamps; #ifdef IICHID_SAMPLING @@ -371,7 +373,8 @@ hmt_attach(device_t dev) sc->cont_count_max = MAX_MT_SLOTS; } - if (hid_test_quirk(hw, HQ_MT_TIMESTAMP) || hmt_timestamps) + if (sc->has_scan_time && + (hid_test_quirk(hw, HQ_MT_TIMESTAMP) || hmt_timestamps)) sc->do_timestamps = true; #ifdef IICHID_SAMPLING if (hid_test_quirk(hw, HQ_IICHID_SAMPLING)) @@ -438,13 +441,14 @@ hmt_attach(device_t dev) } /* Announce information about the touch device */ - device_printf(sc->dev, "Multitouch %s with %d external button%s%s\n", + device_printf(sc->dev, "%s %s with %d external button%s%s\n", + sc->cont_count_max > 1 ? "Multitouch" : "Singletouch", sc->type == HMT_TYPE_TOUCHSCREEN ? "touchscreen" : "touchpad", nbuttons, nbuttons != 1 ? "s" : "", sc->is_clickpad ? ", click-pad" : ""); device_printf(sc->dev, - "%d contacts with [%s%s%s%s%s] properties. Report range [%d:%d] - [%d:%d]\n", - (int)sc->cont_count_max, + "%d contact%s with [%s%s%s%s%s] properties. Report range [%d:%d] - [%d:%d]\n", + (int)sc->cont_count_max, sc->cont_count_max != 1 ? "s" : "", isset(sc->caps, HMT_IN_RANGE) ? "R" : "", isset(sc->caps, HMT_CONFIDENCE) ? "C" : "", isset(sc->caps, HMT_WIDTH) ? "W" : "", @@ -513,6 +517,12 @@ hmt_intr(void *context, void *buf, hid_size_t len) } /* + * "In Serial mode, each packet contains information that describes a + * single physical contact point. Multiple contacts are streamed + * serially. In this mode, devices report all contact information in a + * series of packets. The device sends a separate packet for each + * concurrent contact." + * * "In Parallel mode, devices report all contact information in a * single packet. Each physical contact is represented by a logical * collection that is embedded in the top-level collection." @@ -521,7 +531,10 @@ hmt_intr(void *context, void *buf, hid_size_t len) * report with contactid=0 but contactids are zero-based, find * contactcount first. */ - cont_count = hid_get_udata(buf, len, &sc->cont_count_loc); + if (sc->has_cont_count) + cont_count = hid_get_udata(buf, len, &sc->cont_count_loc); + else + cont_count = 1; /* * "In Hybrid mode, the number of contacts that can be reported in one * report is less than the maximum number of contacts that the device @@ -753,7 +766,6 @@ hmt_hid_parse(struct hmt_softc *sc, const void *d_ptr, hid_size_t d_len, sc->cont_count_loc = hi.loc; break; } - /* Scan time is required but clobbered by evdev */ if (hi.collevel == 1 && hi.usage == HID_USAGE2(HUP_DIGITIZERS, HUD_SCAN_TIME)) { scan_time_found = true; @@ -804,7 +816,7 @@ hmt_hid_parse(struct hmt_softc *sc, const void *d_ptr, hid_size_t d_len, hid_end_parse(hd); /* Check for required HID Usages */ - if (!cont_count_found || !scan_time_found || cont == 0) + if ((!cont_count_found && cont != 1) || cont == 0) return (HMT_TYPE_UNSUPPORTED); for (i = 0; i < HMT_N_USAGES; i++) { if (hmt_hid_map[i].required && isclr(sc->caps, i)) @@ -842,6 +854,8 @@ hmt_hid_parse(struct hmt_softc *sc, const void *d_ptr, hid_size_t d_len, sc->cont_count_max = cont_count_max; sc->nconts_per_report = cont; sc->has_int_button = has_int_button; + sc->has_cont_count = cont_count_found; + sc->has_scan_time = scan_time_found; return (type); } From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:35:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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 480676654B9; Thu, 2 Sep 2021 19: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 4H0rkk5y9Pz4kP4; Thu, 2 Sep 2021 19: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 AF45F1EAC1; Thu, 2 Sep 2021 19: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 182JZwWN064243; Thu, 2 Sep 2021 19: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 182JZwXb064242; Thu, 2 Sep 2021 19:35:58 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:35:58 GMT Message-Id: <202109021935.182JZwXb064242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: cded1fdb3763 - main - hidmap: Implement forbidden flag for hidmap item. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cded1fdb3763ba1f0f3663e605a5e63089dc8e22 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:35:59 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=cded1fdb3763ba1f0f3663e605a5e63089dc8e22 commit cded1fdb3763ba1f0f3663e605a5e63089dc8e22 Author: Vladimir Kondratyev AuthorDate: 2021-09-02 19:31:51 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-09-02 19:35:27 +0000 hidmap: Implement forbidden flag for hidmap item. If HID usage is mapped to evdev event by hidmap item marked with this flag than entire driver attachment is blocked. MFC after: 2 week --- sys/dev/hid/hidmap.c | 5 ++++- sys/dev/hid/hidmap.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/hid/hidmap.c b/sys/dev/hid/hidmap.c index 46e789fa7cec..c46930214323 100644 --- a/sys/dev/hid/hidmap.c +++ b/sys/dev/hid/hidmap.c @@ -481,7 +481,10 @@ hidmap_probe_hid_descr(void *d_ptr, hid_size_t d_len, uint8_t tlc_index, /* Check that all mandatory usages are present in report descriptor */ if (items != 0) { for (i = 0; i < nitems_map; i++) { - if (map[i].required && isclr(caps, i)) { + KASSERT(!(map[i].required && map[i].forbidden), + ("both required & forbidden item flags are set")); + if ((map[i].required && isclr(caps, i)) || + (map[i].forbidden && isset(caps, i))) { items = 0; break; } diff --git a/sys/dev/hid/hidmap.h b/sys/dev/hid/hidmap.h index 6ac23b3dc4ee..f5ce10069e1a 100644 --- a/sys/dev/hid/hidmap.h +++ b/sys/dev/hid/hidmap.h @@ -98,7 +98,8 @@ struct hidmap_item { bool has_cb:1; bool final_cb:1; bool invert_value:1; - u_int reserved:10; + bool forbidden:1; /* Forbidden by driver */ + u_int reserved:9; }; #define HIDMAP_ANY(_page, _usage, _type, _code) \ From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:36:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 32D166652C1; Thu, 2 Sep 2021 19:36: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 4H0rkm08QJz4kbk; Thu, 2 Sep 2021 19: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 D298B1E96C; Thu, 2 Sep 2021 19: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 182JZxBm064267; Thu, 2 Sep 2021 19: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 182JZx4u064266; Thu, 2 Sep 2021 19:35:59 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:35:59 GMT Message-Id: <202109021935.182JZx4u064266@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: bbed4b41c9f1 - main - hidmap: Do not forget to initialize bitmap items to unset state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbed4b41c9f193996f704b3262126e59810b30c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:36:00 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=bbed4b41c9f193996f704b3262126e59810b30c9 commit bbed4b41c9f193996f704b3262126e59810b30c9 Author: Vladimir Kondratyev AuthorDate: 2021-09-02 19:32:14 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-09-02 19:35:27 +0000 hidmap: Do not forget to initialize bitmap items to unset state MFC after: 2 week --- sys/dev/hid/hidmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/hid/hidmap.c b/sys/dev/hid/hidmap.c index c46930214323..d787b298b41d 100644 --- a/sys/dev/hid/hidmap.c +++ b/sys/dev/hid/hidmap.c @@ -451,7 +451,8 @@ hidmap_probe_hid_descr(void *d_ptr, hid_size_t d_len, uint8_t tlc_index, bool do_free = false; if (caps == NULL) { - caps = malloc(HIDMAP_CAPS_SZ(nitems_map), M_DEVBUF, M_WAITOK); + caps = malloc(HIDMAP_CAPS_SZ(nitems_map), M_DEVBUF, + M_WAITOK | M_ZERO); do_free = true; } else bzero (caps, HIDMAP_CAPS_SZ(nitems_map)); From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:36:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8DDDF665611; Thu, 2 Sep 2021 19:36: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 4H0rkn2XqQz4kPG; Thu, 2 Sep 2021 19:36: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 076E11E74A; Thu, 2 Sep 2021 19:36: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 182Ja0ir064291; Thu, 2 Sep 2021 19:36:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Ja0a8064290; Thu, 2 Sep 2021 19:36:00 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:36:00 GMT Message-Id: <202109021936.182Ja0a8064290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: d51e437669e4 - main - hidbus(4): Add routine to check presence of collection of given usage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d51e437669e4ac35ac4be366241ae6ba4a16c378 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:36:01 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=d51e437669e4ac35ac4be366241ae6ba4a16c378 commit d51e437669e4ac35ac4be366241ae6ba4a16c378 Author: Vladimir Kondratyev AuthorDate: 2021-09-02 19:32:57 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-09-02 19:35:27 +0000 hidbus(4): Add routine to check presence of collection of given usage MFC after: 2 week --- sys/dev/hid/hidbus.c | 19 +++++++++++++++++++ sys/dev/hid/hidbus.h | 1 + 2 files changed, 20 insertions(+) diff --git a/sys/dev/hid/hidbus.c b/sys/dev/hid/hidbus.c index 58d19a2a4d74..69f3d3911631 100644 --- a/sys/dev/hid/hidbus.c +++ b/sys/dev/hid/hidbus.c @@ -172,6 +172,25 @@ hidbus_locate(const void *desc, hid_size_t size, int32_t u, enum hid_kind k, return (0); } +bool +hidbus_is_collection(const void *desc, hid_size_t size, int32_t usage, + uint8_t tlc_index) +{ + struct hid_data *d; + struct hid_item h; + bool ret = false; + + d = hid_start_parse(desc, size, 0); + HIDBUS_FOREACH_ITEM(d, &h, tlc_index) { + if (h.kind == hid_collection && h.usage == usage) { + ret = true; + break; + } + } + hid_end_parse(d); + return (ret); +} + static device_t hidbus_add_child(device_t dev, u_int order, const char *name, int unit) { diff --git a/sys/dev/hid/hidbus.h b/sys/dev/hid/hidbus.h index 05911fff5732..d4324a2dc394 100644 --- a/sys/dev/hid/hidbus.h +++ b/sys/dev/hid/hidbus.h @@ -152,6 +152,7 @@ int hidbus_locate(const void *desc, hid_size_t size, int32_t u, enum hid_kind k, uint8_t tlc_index, uint8_t index, struct hid_location *loc, uint32_t *flags, uint8_t *id, struct hid_absinfo *ai); +bool hidbus_is_collection(const void *, hid_size_t, int32_t, uint8_t); const struct hid_device_id *hidbus_lookup_id(device_t, const struct hid_device_id *, int); From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:36:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D05A46653DD; Thu, 2 Sep 2021 19:36: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 4H0rkp2qRhz4khM; Thu, 2 Sep 2021 19:36: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 3B2081ED90; Thu, 2 Sep 2021 19:36: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 182Ja2ZJ064315; Thu, 2 Sep 2021 19:36:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Ja2NT064314; Thu, 2 Sep 2021 19:36:02 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:36:02 GMT Message-Id: <202109021936.182Ja2NT064314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: a36bdfc2b652 - main - hpen(4): Add support for legacy MS-compatible single touch protocol MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a36bdfc2b6525e814388f38c6862cf4b24dc6bee Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:36:02 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=a36bdfc2b6525e814388f38c6862cf4b24dc6bee commit a36bdfc2b6525e814388f38c6862cf4b24dc6bee Author: Vladimir Kondratyev AuthorDate: 2021-09-02 19:33:24 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-09-02 19:35:27 +0000 hpen(4): Add support for legacy MS-compatible single touch protocol It is used by many pre- and post- 2014 eGalax touchscreens. Tested by: Mark Kane MFC after: 2 week --- sys/dev/hid/hidmap.h | 2 ++ sys/dev/hid/hpen.c | 89 ++++++++++++++++++++++++++++------------------------ 2 files changed, 50 insertions(+), 41 deletions(-) diff --git a/sys/dev/hid/hidmap.h b/sys/dev/hid/hidmap.h index f5ce10069e1a..628881092639 100644 --- a/sys/dev/hid/hidmap.h +++ b/sys/dev/hid/hidmap.h @@ -62,6 +62,8 @@ typedef int hidmap_cb_t(HIDMAP_CB_ARGS); /* These helpers can be used at any stage of any callbacks */ #define HIDMAP_CB_GET_STATE(...) \ ((hm == NULL) ? HIDMAP_CB_IS_PROBING : hm->cb_state) +#define HIDMAP_CB_GET_DEV(...) \ + (hm == NULL ? NULL : hm->dev) #define HIDMAP_CB_GET_SOFTC(...) \ (hm == NULL ? NULL : device_get_softc(hm->dev)) #define HIDMAP_CB_GET_EVDEV(...) \ diff --git a/sys/dev/hid/hpen.c b/sys/dev/hid/hpen.c index 1d505e14089f..8a86b95b1020 100644 --- a/sys/dev/hid/hpen.c +++ b/sys/dev/hid/hpen.c @@ -72,44 +72,43 @@ static hidmap_cb_t hpen_final_pen_cb; HIDMAP_ABS_CB(HUP_DIGITIZERS, HUD_##usage, &cb) /* Generic map digitizer page map according to hut1_12v2.pdf */ -static const struct hidmap_item hpen_map_digi[] = { +static const struct hidmap_item hpen_map_pen[] = { { HPEN_MAP_ABS_GD(X, ABS_X), .required = true }, { HPEN_MAP_ABS_GD(Y, ABS_Y), .required = true }, { HPEN_MAP_ABS( TIP_PRESSURE, ABS_PRESSURE) }, { HPEN_MAP_ABS( X_TILT, ABS_TILT_X) }, { HPEN_MAP_ABS( Y_TILT, ABS_TILT_Y) }, + { HPEN_MAP_ABS( CONTACTID, 0), .forbidden = true }, + { HPEN_MAP_ABS( CONTACTCOUNT, 0), .forbidden = true }, { HPEN_MAP_ABS_CB(BATTERY_STRENGTH, hpen_battery_strenght_cb) }, { HPEN_MAP_BUT( TOUCH, BTN_TOUCH) }, { HPEN_MAP_BUT( TIP_SWITCH, BTN_TOUCH) }, { HPEN_MAP_BUT( SEC_TIP_SWITCH, BTN_TOUCH) }, - { HPEN_MAP_BUT( IN_RANGE, BTN_TOOL_PEN) }, { HPEN_MAP_BUT( BARREL_SWITCH, BTN_STYLUS) }, { HPEN_MAP_BUT( INVERT, BTN_TOOL_RUBBER) }, { HPEN_MAP_BUT( ERASER, BTN_TOUCH) }, { HPEN_MAP_BUT( TABLET_PICK, BTN_STYLUS2) }, { HPEN_MAP_BUT( SEC_BARREL_SWITCH,BTN_STYLUS2) }, - { HIDMAP_FINAL_CB( &hpen_final_digi_cb) }, + { HIDMAP_FINAL_CB( &hpen_final_pen_cb) }, }; -/* Microsoft-standardized pen support */ -static const struct hidmap_item hpen_map_pen[] = { - { HPEN_MAP_ABS_GD(X, ABS_X), .required = true }, - { HPEN_MAP_ABS_GD(Y, ABS_Y), .required = true }, - { HPEN_MAP_ABS( TIP_PRESSURE, ABS_PRESSURE), .required = true }, - { HPEN_MAP_ABS( X_TILT, ABS_TILT_X) }, - { HPEN_MAP_ABS( Y_TILT, ABS_TILT_Y) }, - { HPEN_MAP_ABS_CB(BATTERY_STRENGTH, hpen_battery_strenght_cb) }, - { HPEN_MAP_BUT( TIP_SWITCH, BTN_TOUCH), .required = true }, - { HPEN_MAP_BUT( IN_RANGE, BTN_TOOL_PEN), .required = true }, - { HPEN_MAP_BUT( BARREL_SWITCH, BTN_STYLUS) }, - { HPEN_MAP_BUT( INVERT, BTN_TOOL_RUBBER), .required = true }, - { HPEN_MAP_BUT( ERASER, BTN_TOUCH), .required = true }, - { HIDMAP_FINAL_CB( &hpen_final_pen_cb) }, +static const struct hidmap_item hpen_map_stylus[] = { + { HPEN_MAP_BUT( IN_RANGE, BTN_TOOL_PEN) }, +}; +static const struct hidmap_item hpen_map_finger[] = { + { HPEN_MAP_BUT( IN_RANGE, BTN_TOOL_FINGER) }, }; static const struct hid_device_id hpen_devs[] = { { HID_TLC(HUP_DIGITIZERS, HUD_DIGITIZER) }, { HID_TLC(HUP_DIGITIZERS, HUD_PEN) }, + { HID_TLC(HUP_DIGITIZERS, HUD_TOUCHSCREEN), + HID_BVP(BUS_USB, USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL) }, +}; + +/* Do not autoload legacy pen driver for all touchscreen */ +static const struct hid_device_id hpen_devs_no_load[] = { + { HID_TLC(HUP_DIGITIZERS, HUD_TOUCHSCREEN) }, }; static int @@ -134,25 +133,18 @@ hpen_battery_strenght_cb(HIDMAP_CB_ARGS) return (0); } -static int -hpen_final_digi_cb(HIDMAP_CB_ARGS) -{ - struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); - - if (HIDMAP_CB_GET_STATE() == HIDMAP_CB_IS_ATTACHING) - evdev_support_prop(evdev, INPUT_PROP_POINTER); - - /* Do not execute callback at interrupt handler and detach */ - return (ENOSYS); -} - static int hpen_final_pen_cb(HIDMAP_CB_ARGS) { struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); - if (HIDMAP_CB_GET_STATE() == HIDMAP_CB_IS_ATTACHING) - evdev_support_prop(evdev, INPUT_PROP_DIRECT); + if (HIDMAP_CB_GET_STATE() == HIDMAP_CB_IS_ATTACHING) { + if (hidbus_get_usage(HIDMAP_CB_GET_DEV()) == + HID_USAGE2(HUP_DIGITIZERS, HUD_DIGITIZER)) + evdev_support_prop(evdev, INPUT_PROP_POINTER); + else + evdev_support_prop(evdev, INPUT_PROP_DIRECT); + } /* Do not execute callback at interrupt handler and detach */ return (ENOSYS); @@ -185,24 +177,39 @@ static int hpen_probe(device_t dev) { struct hidmap *hm = device_get_softc(dev); + const char *desc; + void *d_ptr; + hid_size_t d_len; int error; - bool is_pen; - error = HIDBUS_LOOKUP_DRIVER_INFO(dev, hpen_devs); - if (error != 0) - return (error); + if (HIDBUS_LOOKUP_DRIVER_INFO(dev, hpen_devs_no_load) != 0) { + error = HIDBUS_LOOKUP_DRIVER_INFO(dev, hpen_devs); + if (error != 0) + return (error); + } hidmap_set_dev(hm, dev); - /* Check if report descriptor belongs to a HID tablet device */ - is_pen = hidbus_get_usage(dev) == HID_USAGE2(HUP_DIGITIZERS, HUD_PEN); - error = is_pen - ? HIDMAP_ADD_MAP(hm, hpen_map_pen, NULL) - : HIDMAP_ADD_MAP(hm, hpen_map_digi, NULL); + /* Check if report descriptor belongs to a HID pen device */ + error = HIDMAP_ADD_MAP(hm, hpen_map_pen, NULL); if (error != 0) return (error); - hidbus_set_desc(dev, is_pen ? "Pen" : "Digitizer"); + if (hid_get_report_descr(dev, &d_ptr, &d_len) != 0) + return (ENXIO); + + if (hidbus_is_collection(d_ptr, d_len, + HID_USAGE2(HUP_DIGITIZERS, HUD_FINGER), hidbus_get_index(dev))) { + HIDMAP_ADD_MAP(hm, hpen_map_finger, NULL); + desc = "TouchScreen"; + } else { + HIDMAP_ADD_MAP(hm, hpen_map_stylus, NULL); + desc = "Pen"; + } + if (hidbus_get_usage(dev) == HID_USAGE2(HUP_DIGITIZERS, HUD_DIGITIZER)) + desc = "Digitizer"; + + hidbus_set_desc(dev, desc); return (BUS_PROBE_DEFAULT); } From owner-dev-commits-src-all@freebsd.org Thu Sep 2 19:36:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9A033665614; Thu, 2 Sep 2021 19:36: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 4H0rkq3gGbz4kkv; Thu, 2 Sep 2021 19:36: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 5E5FE1EAC2; Thu, 2 Sep 2021 19:36: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 182Ja3Vu064345; Thu, 2 Sep 2021 19:36:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Ja3Zt064344; Thu, 2 Sep 2021 19:36:03 GMT (envelope-from git) Date: Thu, 2 Sep 2021 19:36:03 GMT Message-Id: <202109021936.182Ja3Zt064344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 9d04336b615d - main - hmt(4): Add support for touchpads with no "button type" or MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d04336b615d16faa631da2824ee719683540276 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 19:36:03 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=9d04336b615d16faa631da2824ee719683540276 commit 9d04336b615d16faa631da2824ee719683540276 Author: Vladimir Kondratyev AuthorDate: 2021-09-02 19:33:51 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-09-02 19:35:27 +0000 hmt(4): Add support for touchpads with no "button type" or "maximum number of contacts" usages. Assume touchpad to be a clickpad if it has only internal button. Set number of contacts to 5 for touchpads and to 10 for touchscreens. Check for fetched report length to avoid reading of stalled data. Fixes Dell Precision 7550 laptop. Tested by: Shawn Webb PR: 257992 MFC after: 2 week --- sys/dev/hid/hmt.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/sys/dev/hid/hmt.c b/sys/dev/hid/hmt.c index cb7afe7290d0..dcf360bcffba 100644 --- a/sys/dev/hid/hmt.c +++ b/sys/dev/hid/hmt.c @@ -300,7 +300,7 @@ hmt_attach(device_t dev) const struct hid_device_info *hw = hid_get_device_info(dev); void *d_ptr; uint8_t *fbuf = NULL; - hid_size_t d_len, fsize; + hid_size_t d_len, fsize, rsize; uint32_t cont_count_max; int nbuttons, btn; size_t i; @@ -321,9 +321,10 @@ hmt_attach(device_t dev) /* Fetch and parse "Contact count maximum" feature report */ if (sc->cont_max_rlen > 1) { - err = hid_get_report(dev, fbuf, sc->cont_max_rlen, NULL, + err = hid_get_report(dev, fbuf, sc->cont_max_rlen, &rsize, HID_FEATURE_REPORT, sc->cont_max_rid); - if (err == 0) { + if (err == 0 && (rsize - 1) * 8 >= + sc->cont_max_loc.pos + sc->cont_max_loc.size) { cont_count_max = hid_get_udata(fbuf + 1, sc->cont_max_rlen - 1, &sc->cont_max_loc); /* @@ -334,23 +335,24 @@ hmt_attach(device_t dev) sc->cont_count_max = cont_count_max; } else DPRINTF("hid_get_report error=%d\n", err); - } else - DPRINTF("Feature report %hhu size invalid: %u\n", - sc->cont_max_rid, sc->cont_max_rlen); + } + if (sc->cont_count_max == 0) + sc->cont_count_max = sc->type == HMT_TYPE_TOUCHSCREEN ? 10 : 5; /* Fetch and parse "Button type" feature report */ if (sc->btn_type_rlen > 1 && sc->btn_type_rid != sc->cont_max_rid) { bzero(fbuf, fsize); - err = hid_get_report(dev, fbuf, sc->btn_type_rlen, NULL, + err = hid_get_report(dev, fbuf, sc->btn_type_rlen, &rsize, HID_FEATURE_REPORT, sc->btn_type_rid); - } - if (sc->btn_type_rlen > 1) { - if (err == 0) - sc->is_clickpad = hid_get_udata(fbuf + 1, - sc->btn_type_rlen - 1, &sc->btn_type_loc) == 0; - else + if (err != 0) DPRINTF("hid_get_report error=%d\n", err); } + if (sc->btn_type_rlen > 1 && err == 0 && (rsize - 1) * 8 >= + sc->btn_type_loc.pos + sc->btn_type_loc.size) + sc->is_clickpad = hid_get_udata(fbuf + 1, sc->btn_type_rlen - 1, + &sc->btn_type_loc) == 0; + else + sc->is_clickpad = sc->max_button == 0 && sc->has_int_button; /* Fetch THQA certificate to enable some devices like WaveShare */ if (sc->thqa_cert_rlen > 1 && sc->thqa_cert_rid != sc->cont_max_rid) From owner-dev-commits-src-all@freebsd.org Thu Sep 2 20:00:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 ECBFA665BF5; Thu, 2 Sep 2021 20:00:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.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 mx1.freebsd.org (Postfix) with ESMTPS id 4H0sGS3qbYz4rrc; Thu, 2 Sep 2021 20:00:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 182Jxrw1090712 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 2 Sep 2021 22:59:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 182Jxrw1090712 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 182Jxrfw090711; Thu, 2 Sep 2021 22:59:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 2 Sep 2021 22:59:53 +0300 From: Konstantin Belousov To: Kristof Provost Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 795d78a46713 - main - pfctl: Don't use PRIu64 Message-ID: References: <202109020738.1827cRDE000749@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202109020738.1827cRDE000749@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4H0sGS3qbYz4rrc X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 20:00:01 -0000 On Thu, Sep 02, 2021 at 07:38:27AM +0000, Kristof Provost wrote: > The branch main has been updated by kp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=795d78a46713fc16153966e77f20da2f40aac2a3 > > commit 795d78a46713fc16153966e77f20da2f40aac2a3 > Author: Kristof Provost > AuthorDate: 2021-09-01 16:18:26 +0000 > Commit: Kristof Provost > CommitDate: 2021-09-02 07:35:36 +0000 > > pfctl: Don't use PRIu64 > > Rather than PRIu64 we can just treat the data as uintmax_t, and use %jx > instead. > > MFC after: 1 week > Suggested by: kib > Sponsored by: Rubicon Communications, LLC ("Netgate") Thank you. From owner-dev-commits-src-all@freebsd.org Thu Sep 2 20:39:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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 12475666B41; Thu, 2 Sep 2021 20:39: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 4H0t824v8bz3KHX; Thu, 2 Sep 2021 20:39: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 77B061F1F1; Thu, 2 Sep 2021 20:39: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 182KdUbG044018; Thu, 2 Sep 2021 20:39:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182KdUPB044017; Thu, 2 Sep 2021 20:39:30 GMT (envelope-from git) Date: Thu, 2 Sep 2021 20:39:30 GMT Message-Id: <202109022039.182KdUPB044017@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 1fb52e4373e7 - main - ses: Correct spelling of "Temperature Sensor" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fb52e4373e7f645d71059a6a403469f059044c8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 20:39:31 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=1fb52e4373e7f645d71059a6a403469f059044c8 commit 1fb52e4373e7f645d71059a6a403469f059044c8 Author: Alan Somers AuthorDate: 2021-08-30 19:59:32 +0000 Commit: Alan Somers CommitDate: 2021-09-02 20:38:06 +0000 ses: Correct spelling of "Temperature Sensor" According to SES 4 revision 2 table 71, it should be singular. MFC after: 2 weeks Sponsored by: Axcient --- share/examples/ses/srcs/eltsub.c | 2 +- sys/cam/scsi/scsi_enc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/examples/ses/srcs/eltsub.c b/share/examples/ses/srcs/eltsub.c index c664895b054c..0dfded94a583 100644 --- a/share/examples/ses/srcs/eltsub.c +++ b/share/examples/ses/srcs/eltsub.c @@ -62,7 +62,7 @@ geteltnm(int type) sprintf(rbuf, "Cooling"); break; case ELMTYP_THERM: - sprintf(rbuf, "Temperature Sensors"); + sprintf(rbuf, "Temperature Sensor"); break; case ELMTYP_DOORLOCK: sprintf(rbuf, "Door Lock"); diff --git a/sys/cam/scsi/scsi_enc.h b/sys/cam/scsi/scsi_enc.h index f9abe099e337..cafec644bde4 100644 --- a/sys/cam/scsi/scsi_enc.h +++ b/sys/cam/scsi/scsi_enc.h @@ -130,7 +130,7 @@ typedef enum { "Device Slot", \ "Power Supply", \ "Cooling", \ - "Temperature Sensors", \ + "Temperature Sensor", \ "Door", \ "Audible alarm", \ "Enclosure Services Controller Electronics", \ From owner-dev-commits-src-all@freebsd.org Thu Sep 2 20:48:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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 CCB38666D4A; Thu, 2 Sep 2021 20:48: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 4H0tKv5KJCz3MXC; Thu, 2 Sep 2021 20:48: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 9B2D71F84C; Thu, 2 Sep 2021 20:48: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 182Km3sX057767; Thu, 2 Sep 2021 20:48:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Km3er057766; Thu, 2 Sep 2021 20:48:03 GMT (envelope-from git) Date: Thu, 2 Sep 2021 20:48:03 GMT Message-Id: <202109022048.182Km3er057766@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: cc2d08d3880c - main - ses: Guard the elm_type_names declaration by _KERNEL MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc2d08d3880c2e726849ab2aa23b3d15f8aa3938 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 20:48:03 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=cc2d08d3880c2e726849ab2aa23b3d15f8aa3938 commit cc2d08d3880c2e726849ab2aa23b3d15f8aa3938 Author: Alan Somers AuthorDate: 2021-08-30 20:45:13 +0000 Commit: Alan Somers CommitDate: 2021-09-02 20:47:18 +0000 ses: Guard the elm_type_names declaration by _KERNEL MFC after: 2 weeks Sponsored by: Axcient --- sys/cam/scsi/scsi_enc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cam/scsi/scsi_enc.h b/sys/cam/scsi/scsi_enc.h index cafec644bde4..b816a6a5d4cd 100644 --- a/sys/cam/scsi/scsi_enc.h +++ b/sys/cam/scsi/scsi_enc.h @@ -154,7 +154,9 @@ typedef enum { "SAS Connector" \ } +#ifdef _KERNEL extern const char *elm_type_names[]; +#endif typedef struct encioc_element { /* Element Index */ From owner-dev-commits-src-all@freebsd.org Thu Sep 2 21:50:34 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B375066815F; Thu, 2 Sep 2021 21:50: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 4H0vk24MVWz4R3T; Thu, 2 Sep 2021 21:50: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 7D80B2083F; Thu, 2 Sep 2021 21:50: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 182LoYqI046221; Thu, 2 Sep 2021 21:50:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182LoYDP046220; Thu, 2 Sep 2021 21:50:34 GMT (envelope-from git) Date: Thu, 2 Sep 2021 21:50:34 GMT Message-Id: <202109022150.182LoYDP046220@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 4c7a3a70e047 - main - loader.efi: fix console output after BS off 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/main X-Git-Reftype: branch X-Git-Commit: 4c7a3a70e047fbba2a3ce4a0168eaf2baddca76b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 21:50:34 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=4c7a3a70e047fbba2a3ce4a0168eaf2baddca76b commit 4c7a3a70e047fbba2a3ce4a0168eaf2baddca76b Author: Toomas Soome AuthorDate: 2021-09-02 21:17:32 +0000 Commit: Toomas Soome CommitDate: 2021-09-02 21:48:56 +0000 loader.efi: fix console output after BS off When Boot Services (BS) are switched off, we can not use BS functions any more. Since drawn console does implement our own Blt(), we can use it to draw the console. However, SimpleTextOutput protocol based console output must be blocked. Tested by inserting printf() after ExitBootServices() call. MFC after: 1 week --- stand/common/gfx_fb.c | 14 +++++--------- stand/efi/libefi/efi_console.c | 22 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 45d0072bd858..99968e10d8fe 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -751,12 +751,15 @@ gfxfb_blt(void *BltBuffer, GFXFB_BLT_OPERATION BltOperation, #if defined(EFI) EFI_STATUS status; EFI_GRAPHICS_OUTPUT *gop = gfx_state.tg_private; + extern int boot_services_gone; + EFI_TPL tpl; /* * We assume Blt() does work, if not, we will need to build * exception list case by case. */ - if (gop != NULL) { + if (gop != NULL && boot_services_gone == 0) { + tpl = BS->RaiseTPL(TPL_NOTIFY); switch (BltOperation) { case GfxFbBltVideoFill: status = gop->Blt(gop, BltBuffer, EfiBltVideoFill, @@ -803,6 +806,7 @@ gfxfb_blt(void *BltBuffer, GFXFB_BLT_OPERATION BltOperation, break; } + BS->RestoreTPL(tpl); return (rv); } #endif @@ -1040,20 +1044,12 @@ void gfx_fb_cursor(void *arg, const teken_pos_t *p) { teken_gfx_t *state = arg; -#if defined(EFI) - EFI_TPL tpl; - - tpl = BS->RaiseTPL(TPL_NOTIFY); -#endif /* Switch cursor off in old location and back on in new. */ if (state->tg_cursor_visible) { gfx_fb_cursor_draw(state, &state->tg_cursor, false); gfx_fb_cursor_draw(state, p, true); } -#if defined(EFI) - BS->RestoreTPL(tpl); -#endif } void diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 0c40b362f276..bacc2546e070 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include "bootstrap.h" +extern int boot_services_gone; extern EFI_GUID gop_guid; static EFI_GUID simple_input_ex_guid = EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID; static SIMPLE_TEXT_OUTPUT_INTERFACE *conout; @@ -176,6 +177,9 @@ efi_text_cursor(void *arg, const teken_pos_t *p) teken_gfx_t *state = arg; UINTN col, row; + if (boot_services_gone) + return; + row = p->tp_row; if (p->tp_row >= state->tg_tp.tp_row) row = state->tg_tp.tp_row - 1; @@ -234,6 +238,9 @@ efi_text_putchar(void *s, const teken_pos_t *p, teken_char_t c, EFI_STATUS status; int idx; + if (boot_services_gone) + return; + idx = p->tp_col + p->tp_row * state->tg_tp.tp_col; if (idx >= state->tg_tp.tp_col * state->tg_tp.tp_row) return; @@ -251,6 +258,9 @@ efi_text_fill(void *arg, const teken_rect_t *r, teken_char_t c, teken_gfx_t *state = arg; teken_pos_t p; + if (boot_services_gone) + return; + if (state->tg_cursor_visible) conout->EnableCursor(conout, FALSE); for (p.tp_row = r->tr_begin.tp_row; p.tp_row < r->tr_end.tp_row; @@ -303,6 +313,9 @@ efi_text_copy(void *arg, const teken_rect_t *r, const teken_pos_t *p) int nrow, ncol, x, y; /* Has to be signed - >= 0 comparison */ bool scroll = false; + if (boot_services_gone) + return; + /* * Copying is a little tricky. We must make sure we do it in * correct order, to make sure we don't overwrite our own data. @@ -356,6 +369,9 @@ efi_text_param(void *arg, int cmd, unsigned int value) { teken_gfx_t *state = arg; + if (boot_services_gone) + return; + switch (cmd) { case TP_SETLOCALCURSOR: /* @@ -730,6 +746,9 @@ efi_term_emu(int c) int t, i; EFI_STATUS status; + if (boot_services_gone) + return; + switch (esc) { case 0: switch (c) { @@ -839,7 +858,8 @@ efi_term_emu(int c) break; } #else - efi_cons_rawputchar(c); + if (!boot_services_gone) + efi_cons_rawputchar(c); #endif } From owner-dev-commits-src-all@freebsd.org Thu Sep 2 21:53:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 21:53:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 21:53:44 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 21:53:45 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 22:23:14 2021 Return-Path: Delivered-To: dev-commits-src-all@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 39A58668E3C; Thu, 2 Sep 2021 22:23: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 4H0wRk1B2zz4c5C; Thu, 2 Sep 2021 22:23: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 104D92129B; Thu, 2 Sep 2021 22:23: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 182MNDaq091046; Thu, 2 Sep 2021 22:23:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182MNDN7091045; Thu, 2 Sep 2021 22:23:13 GMT (envelope-from git) Date: Thu, 2 Sep 2021 22:23:13 GMT Message-Id: <202109022223.182MNDN7091045@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 8c14d7da5b9b - main - bnxt(4): Fix bugs in WOL support. 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/main X-Git-Reftype: branch X-Git-Commit: 8c14d7da5b9be78f71b1aa803e93ae7de973dd42 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 22:23:14 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=8c14d7da5b9be78f71b1aa803e93ae7de973dd42 commit 8c14d7da5b9be78f71b1aa803e93ae7de973dd42 Author: Alexander Motin AuthorDate: 2021-09-02 22:11:58 +0000 Commit: Alexander Motin CommitDate: 2021-09-02 22:23:05 +0000 bnxt(4): Fix bugs in WOL support. Before this change driver reported IFCAP_WOL_MAGIC enabled, but not supported. It caused errors on some SIOCSIFCAP calls. Instead report the support if hardware supports WOL, and enabled status if it has such filter installed on boot. Also bnxt_wol_config() should check WOL status in if_getcapenable(), not in if_getcapabilities() to get current one. MFC after: 2 weeks Sponsored by: iXsystems, Inc. --- sys/dev/bnxt/if_bnxt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/bnxt/if_bnxt.c b/sys/dev/bnxt/if_bnxt.c index 9990e26263b3..52d989a88392 100644 --- a/sys/dev/bnxt/if_bnxt.c +++ b/sys/dev/bnxt/if_bnxt.c @@ -796,6 +796,9 @@ bnxt_attach_pre(if_ctx_t ctx) IFCAP_VLAN_HWCSUM | IFCAP_JUMBO_MTU; if (bnxt_wol_supported(softc)) + scctx->isc_capabilities |= IFCAP_WOL_MAGIC; + bnxt_get_wol_settings(softc); + if (softc->wol) scctx->isc_capenable |= IFCAP_WOL_MAGIC; /* Get the queue config */ @@ -805,8 +808,6 @@ bnxt_attach_pre(if_ctx_t ctx) goto failed; } - bnxt_get_wol_settings(softc); - /* Now perform a function reset */ rc = bnxt_hwrm_func_reset(softc); bnxt_clear_ids(softc); @@ -1600,7 +1601,7 @@ bnxt_wol_config(if_ctx_t ctx) if (!bnxt_wol_supported(softc)) return -ENOTSUP; - if (if_getcapabilities(ifp) & IFCAP_WOL_MAGIC) { + if (if_getcapenable(ifp) & IFCAP_WOL_MAGIC) { if (!softc->wol) { if (bnxt_hwrm_alloc_wol_fltr(softc)) return -EBUSY; From owner-dev-commits-src-all@freebsd.org Thu Sep 2 23:58:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:43 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:45 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:48 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:50 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:52 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:56 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:58:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:59 -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-all@freebsd.org Thu Sep 2 23:58:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 23:58:59 -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-all@freebsd.org Thu Sep 2 23:59:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Thu Sep 2 23:59:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 00:43:12 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 00:43:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 00:43:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 00:43:15 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 01:08:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 01:08:56 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 01:08:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 01:08:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 01:09:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 01:09:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 01:09:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 01:09:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 01:09:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 01:09:06 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 01:09:06 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 01:14:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 26D4766C7AE; Fri, 3 Sep 2021 01:14:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.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 mx1.freebsd.org (Postfix) with ESMTPS id 4H10F95wJXz4cHb; Fri, 3 Sep 2021 01:14:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1831EDKf070630 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 3 Sep 2021 04:14:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1831EDKf070630 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1831EDkT070629; Fri, 3 Sep 2021 04:14:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 3 Sep 2021 04:14:13 +0300 From: Konstantin Belousov To: Toomas Soome Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4c7a3a70e047 - main - loader.efi: fix console output after BS off Message-ID: References: <202109022150.182LoYDP046220@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202109022150.182LoYDP046220@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4H10F95wJXz4cHb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:14:22 -0000 On Thu, Sep 02, 2021 at 09:50:34PM +0000, Toomas Soome wrote: > The branch main has been updated by tsoome: > > URL: https://cgit.FreeBSD.org/src/commit/?id=4c7a3a70e047fbba2a3ce4a0168eaf2baddca76b > > commit 4c7a3a70e047fbba2a3ce4a0168eaf2baddca76b > Author: Toomas Soome > AuthorDate: 2021-09-02 21:17:32 +0000 > Commit: Toomas Soome > CommitDate: 2021-09-02 21:48:56 +0000 > > loader.efi: fix console output after BS off > > When Boot Services (BS) are switched off, we can not use BS > functions any more. Since drawn console does implement our own > Blt(), we can use it to draw the console. > > However, SimpleTextOutput protocol based console output must be > blocked. > > Tested by inserting printf() after ExitBootServices() call. > > MFC after: 1 week > --- > stand/common/gfx_fb.c | 14 +++++--------- > stand/efi/libefi/efi_console.c | 22 +++++++++++++++++++++- > 2 files changed, 26 insertions(+), 10 deletions(-) > > diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c > index 45d0072bd858..99968e10d8fe 100644 > --- a/stand/common/gfx_fb.c > +++ b/stand/common/gfx_fb.c > @@ -751,12 +751,15 @@ gfxfb_blt(void *BltBuffer, GFXFB_BLT_OPERATION BltOperation, > #if defined(EFI) > EFI_STATUS status; > EFI_GRAPHICS_OUTPUT *gop = gfx_state.tg_private; > + extern int boot_services_gone; I suspect the time come to move boot_services_done declaration into some common header for UEFI loader. > + EFI_TPL tpl; From owner-dev-commits-src-all@freebsd.org Fri Sep 3 01:16:05 2021 Return-Path: Delivered-To: dev-commits-src-all@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 41FAA66CA4B; Fri, 3 Sep 2021 01: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 4H10H91KY0z4cf4; Fri, 3 Sep 2021 01: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 157DD2362E; Fri, 3 Sep 2021 01: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 1831G5JH018398; Fri, 3 Sep 2021 01: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 1831G5YL018397; Fri, 3 Sep 2021 01:16:05 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:16:05 GMT Message-Id: <202109030116.1831G5YL018397@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 7af4475a6e31 - main - vmd(4): Major driver refactoring 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/main X-Git-Reftype: branch X-Git-Commit: 7af4475a6e31202a865b1dd3727018659b44470f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:16:05 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=7af4475a6e31202a865b1dd3727018659b44470f commit 7af4475a6e31202a865b1dd3727018659b44470f Author: Alexander Motin AuthorDate: 2021-09-03 00:58:02 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 00:58:02 +0000 vmd(4): Major driver refactoring - Re-implement pcib interface to use standard pci bus driver on top of vmd(4) instead of custom one. - Re-implement memory/bus resource allocation to properly handle even complicated configurations. - Re-implement interrupt handling to evenly distribute children's MSI/ MSI-X interrupts between available vmd(4) MSI-X vectors and setup them to be handled by standard OS mechanisms with minimal overhead, except sharing when unavoidable. Successfully tested on Dell XPS 13 laptop with Core i7-1185G7 CPU (VMD device ID 0x9a0b) and single NVMe SSD, dual-booting with Windows 10. Successfully tested on Supermicro X11DPI-NT motherboard with Xeon(R) Gold 6242R CPUs (VMD device ID 0x201d), simultaneously handling NVMe SSD on one PCIe port and PLX bridge with 3 NVMe and 1 AHCI SSDs on another. Handles SSD hot-plug (except Optane 905p for some reason, which are not detected until manual bus rescan) and enabled IOMMU (directly connected SSDs work, but ones connected to the PLX fail without errors from IOMMU). MFC after: 2 weeks Sponsored by: iXsystems, Inc. Differential revision: https://reviews.freebsd.org/D31762 --- share/man/man4/Makefile | 2 +- share/man/man4/vmd.4 | 35 ++- sys/amd64/conf/GENERIC | 3 +- sys/amd64/conf/NOTES | 3 +- sys/conf/files.amd64 | 3 +- sys/conf/files.i386 | 1 + sys/dev/vmd/vmd.c | 690 ++++++++++++++++++++++------------------------- sys/dev/vmd/vmd.h | 72 ++--- sys/dev/vmd/vmd_bus.c | 220 --------------- sys/i386/conf/NOTES | 4 + sys/modules/Makefile | 2 +- sys/modules/vmd/Makefile | 1 - 12 files changed, 381 insertions(+), 655 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 7177ca1c0b36..7146cfe7ac8f 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -842,6 +842,7 @@ _tpm.4= tpm.4 _urtw.4= urtw.4 _viawd.4= viawd.4 _vmci.4= vmci.4 +_vmd.4= vmd.4 _vmx.4= vmx.4 _wbwd.4= wbwd.4 _wpi.4= wpi.4 @@ -860,7 +861,6 @@ _qlnxe.4= qlnxe.4 _sfxge.4= sfxge.4 _smartpqi.4= smartpqi.4 _sume.4= sume.4 -_vmd.4= vmd.4 MLINKS+=qlxge.4 if_qlxge.4 MLINKS+=qlxgb.4 if_qlxgb.4 diff --git a/share/man/man4/vmd.4 b/share/man/man4/vmd.4 index eb72a653adfb..74419fd87ffe 100644 --- a/share/man/man4/vmd.4 +++ b/share/man/man4/vmd.4 @@ -1,6 +1,7 @@ .\"- .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD .\" +.\" Copyright (c) 2021 Alexander Motin .\" Copyright 2019 Cisco Systems, Inc. .\" .\" Redistribution and use in source and binary forms, with or without @@ -26,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 9, 2019 +.Dd August 31, 2021 .Dt VMD 4 .Os .Sh NAME @@ -37,7 +38,6 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset -indent .Cd "device vmd" -.Cd "device vmd_bus" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following @@ -47,10 +47,30 @@ line in vmd_load="YES" .Ed .Sh DESCRIPTION -This driver attaches to Intel VMD devices as a new PCI domain and then -triggers a probe of PCI devices. -Intel VMD is used with Intel's VROC (Virtual RAID on chip) used with -NVME drives on Skylake SP servers. +This driver attaches to Intel VMD devices, representing them as PCI-to-PCI +bridges and providing access to children PCI devices via new PCI domains. +Intel VMD is used by Intel's VROC (Virtual RAID on chip) to manage NVMe +drives. +.Sh LOADER TUNABLES +The following tunables are settable via +.Xr loader 8 +or +.Xr sysctl 8 : +.Bl -tag -width indent +.It Va hw.vmd.max_msi +Limits number of Message Signaled Interrupt (MSI) vectors allowed to each +child device. +VMD can't distinguish MSI vectors of the same device, so there are no +benefits to have more than one, unless it is required by specific device +driver. +Defaults to 1. +.It Va hw.vmd.max_msix +Limits number of Extended Message Signaled Interrupt (MSI-X) vectors +allowed to each child device. +VMD has limited number of interrupt vectors to map children interrupts into, +so to avoid/reduce sharing children devices/drivers need to be constrained. +Defaults to 3. +.El .Sh SEE ALSO .Xr graid 8 .Sh HISTORY @@ -58,6 +78,3 @@ The .Nm driver first appeared in .Fx 13.0 . -.Sh BUGS -.Nm -is currently only available on amd64. diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 78b5e0e299f6..40c14e90aef0 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -201,8 +201,7 @@ device nvme # base NVMe driver device nvd # expose NVMe namespaces as disks, depends on nvme # Intel Volume Management Device (VMD) support -device vmd # base VMD device -device vmd_bus # bus for VMD children +device vmd # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES index c1db8ef7512f..ce0a5ed3c975 100644 --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -461,8 +461,7 @@ device nvd # expose NVMe namespaces as disks, depends on nvme # # Intel Volume Management Device (VMD) support -device vmd # base VMD device -device vmd_bus # bus for VMD children +device vmd # # PMC-Sierra SAS/SATA controller diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 1bcfaa05d0ba..564e40564677 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -360,8 +360,7 @@ dev/tpm/tpm_acpi.c optional tpm acpi dev/tpm/tpm_isa.c optional tpm isa dev/uart/uart_cpu_x86.c optional uart dev/viawd/viawd.c optional viawd -dev/vmd/vmd.c optional vmd -dev/vmd/vmd_bus.c optional vmd_bus +dev/vmd/vmd.c optional vmd | vmd_bus dev/wbwd/wbwd.c optional wbwd dev/p2sb/p2sb.c optional p2sb pci dev/p2sb/lewisburg_gpiocm.c optional lbggpiocm p2sb diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 4f5c1c3cc5d4..f8320e710e98 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -79,6 +79,7 @@ dev/tpm/tpm_acpi.c optional tpm acpi dev/tpm/tpm_isa.c optional tpm isa dev/uart/uart_cpu_x86.c optional uart dev/viawd/viawd.c optional viawd +dev/vmd/vmd.c optional vmd dev/acpi_support/acpi_wmi_if.m standard dev/wbwd/wbwd.c optional wbwd i386/acpica/acpi_machdep.c optional acpi diff --git a/sys/dev/vmd/vmd.c b/sys/dev/vmd/vmd.c index 80eeda4639fa..72146a7d16df 100644 --- a/sys/dev/vmd/vmd.c +++ b/sys/dev/vmd/vmd.c @@ -1,6 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * + * Copyright (c) 2021 Alexander Motin * Copyright 2019 Cisco Systems, Inc. * All rights reserved. * @@ -34,16 +35,18 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include #include +#include #include #include #include -#include #include #include @@ -51,27 +54,19 @@ __FBSDID("$FreeBSD$"); #include #include -#define TASK_QUEUE_INTR 1 #include #include "pcib_if.h" -#include "pci_if.h" struct vmd_type { u_int16_t vmd_vid; u_int16_t vmd_did; char *vmd_name; int flags; -#define BUS_RESTRICT 1 +#define BUS_RESTRICT 1 +#define VECTOR_OFFSET 2 }; -#define INTEL_VENDOR_ID 0x8086 -#define INTEL_DEVICE_ID_201d 0x201d -#define INTEL_DEVICE_ID_28c0 0x28c0 -#define INTEL_DEVICE_ID_467f 0x467f -#define INTEL_DEVICE_ID_4c3d 0x4c3d -#define INTEL_DEVICE_ID_9a0b 0x9a0b - #define VMD_CAP 0x40 #define VMD_BUS_RESTRICT 0x1 @@ -80,12 +75,32 @@ struct vmd_type { #define VMD_LOCK 0x70 +SYSCTL_NODE(_hw, OID_AUTO, vmd, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "Intel Volume Management Device tuning parameters"); + +/* + * All MSIs within a group share address, so VMD can't distinguish them. + * It makes no sense to use more than one per device, only if required by + * some specific device drivers. + */ +static int vmd_max_msi = 1; +SYSCTL_INT(_hw_vmd, OID_AUTO, max_msi, CTLFLAG_RWTUN, &vmd_max_msi, 0, + "Maximum number of MSI vectors per device"); + +/* + * MSI-X can use different addresses, but we have limited number of MSI-X + * we can route to, so use conservative default to try to avoid sharing. + */ +static int vmd_max_msix = 3; +SYSCTL_INT(_hw_vmd, OID_AUTO, max_msix, CTLFLAG_RWTUN, &vmd_max_msix, 0, + "Maximum number of MSI-X vectors per device"); + static struct vmd_type vmd_devs[] = { - { INTEL_VENDOR_ID, INTEL_DEVICE_ID_201d, "Intel Volume Management Device", 0 }, - { INTEL_VENDOR_ID, INTEL_DEVICE_ID_28c0, "Intel Volume Management Device", BUS_RESTRICT }, - { INTEL_VENDOR_ID, INTEL_DEVICE_ID_467f, "Intel Volume Management Device", BUS_RESTRICT }, - { INTEL_VENDOR_ID, INTEL_DEVICE_ID_4c3d, "Intel Volume Management Device", BUS_RESTRICT }, - { INTEL_VENDOR_ID, INTEL_DEVICE_ID_9a0b, "Intel Volume Management Device", BUS_RESTRICT }, + { 0x8086, 0x201d, "Intel Volume Management Device", 0 }, + { 0x8086, 0x28c0, "Intel Volume Management Device", BUS_RESTRICT }, + { 0x8086, 0x467f, "Intel Volume Management Device", BUS_RESTRICT | VECTOR_OFFSET }, + { 0x8086, 0x4c3d, "Intel Volume Management Device", BUS_RESTRICT | VECTOR_OFFSET }, + { 0x8086, 0x9a0b, "Intel Volume Management Device", BUS_RESTRICT | VECTOR_OFFSET }, { 0, 0, NULL, 0 } }; @@ -95,73 +110,51 @@ vmd_probe(device_t dev) struct vmd_type *t; uint16_t vid, did; - t = vmd_devs; vid = pci_get_vendor(dev); did = pci_get_device(dev); - - while (t->vmd_name != NULL) { - if (vid == t->vmd_vid && - did == t->vmd_did) { + for (t = vmd_devs; t->vmd_name != NULL; t++) { + if (vid == t->vmd_vid && did == t->vmd_did) { device_set_desc(dev, t->vmd_name); return (BUS_PROBE_DEFAULT); } - t++; } - return (ENXIO); } static void vmd_free(struct vmd_softc *sc) { + struct vmd_irq *vi; + struct vmd_irq_user *u; int i; - struct vmd_irq_handler *elm, *tmp; - if (sc->vmd_bus.rman.rm_end != 0) - rman_fini(&sc->vmd_bus.rman); - -#ifdef TASK_QUEUE_INTR - if (sc->vmd_irq_tq != NULL) { - taskqueue_drain(sc->vmd_irq_tq, &sc->vmd_irq_task); - taskqueue_free(sc->vmd_irq_tq); - sc->vmd_irq_tq = NULL; + if (sc->psc.bus.rman.rm_end != 0) + rman_fini(&sc->psc.bus.rman); + if (sc->psc.mem.rman.rm_end != 0) + rman_fini(&sc->psc.mem.rman); + while ((u = LIST_FIRST(&sc->vmd_users)) != NULL) { + LIST_REMOVE(u, viu_link); + free(u, M_DEVBUF); } -#endif if (sc->vmd_irq != NULL) { for (i = 0; i < sc->vmd_msix_count; i++) { - if (sc->vmd_irq[i].vmd_res != NULL) { - bus_teardown_intr(sc->vmd_dev, - sc->vmd_irq[i].vmd_res, - sc->vmd_irq[i].vmd_handle); - bus_release_resource(sc->vmd_dev, SYS_RES_IRQ, - sc->vmd_irq[i].vmd_rid, - sc->vmd_irq[i].vmd_res); - } - } - TAILQ_FOREACH_SAFE(elm, &sc->vmd_irq[0].vmd_list ,vmd_link, - tmp) { - TAILQ_REMOVE(&sc->vmd_irq[0].vmd_list, elm, vmd_link); - free(elm, M_DEVBUF); + vi = &sc->vmd_irq[i]; + if (vi->vi_res == NULL) + continue; + bus_teardown_intr(sc->psc.dev, vi->vi_res, + vi->vi_handle); + bus_release_resource(sc->psc.dev, SYS_RES_IRQ, + vi->vi_rid, vi->vi_res); } } free(sc->vmd_irq, M_DEVBUF); sc->vmd_irq = NULL; - pci_release_msi(sc->vmd_dev); + pci_release_msi(sc->psc.dev); for (i = 0; i < VMD_MAX_BAR; i++) { - if (sc->vmd_regs_resource[i] != NULL) - bus_release_resource(sc->vmd_dev, SYS_RES_MEMORY, - sc->vmd_regs_rid[i], - sc->vmd_regs_resource[i]); - } - if (sc->vmd_io_resource) - bus_release_resource(device_get_parent(sc->vmd_dev), - SYS_RES_IOPORT, sc->vmd_io_rid, sc->vmd_io_resource); - -#ifndef TASK_QUEUE_INTR - if (mtx_initialized(&sc->vmd_irq_lock)) { - mtx_destroy(&sc->vmd_irq_lock); + if (sc->vmd_regs_res[i] != NULL) + bus_release_resource(sc->psc.dev, SYS_RES_MEMORY, + sc->vmd_regs_rid[i], sc->vmd_regs_res[i]); } -#endif } /* Hidden PCI Roots are hidden in BAR(0). */ @@ -169,17 +162,16 @@ vmd_free(struct vmd_softc *sc) static uint32_t vmd_read_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, int width) { - struct vmd_softc *sc; bus_addr_t offset; sc = device_get_softc(dev); - if (b < sc->vmd_bus_start) + if (b < sc->vmd_bus_start || b > sc->vmd_bus_end) return (0xffffffff); offset = ((b - sc->vmd_bus_start) << 20) + (s << 15) + (f << 12) + reg; - switch(width) { + switch (width) { case 4: return (bus_space_read_4(sc->vmd_btag, sc->vmd_bhandle, offset)); @@ -190,7 +182,7 @@ vmd_read_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, int width) return (bus_space_read_1(sc->vmd_btag, sc->vmd_bhandle, offset)); default: - KASSERT(1, ("Invalid width requested")); + __assert_unreachable(); return (0xffffffff); } } @@ -199,17 +191,16 @@ static void vmd_write_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, uint32_t val, int width) { - struct vmd_softc *sc; bus_addr_t offset; sc = device_get_softc(dev); - if (b < sc->vmd_bus_start) + if (b < sc->vmd_bus_start || b > sc->vmd_bus_end) return; offset = ((b - sc->vmd_bus_start) << 20) + (s << 15) + (f << 12) + reg; - switch(width) { + switch (width) { case 4: return (bus_space_write_4(sc->vmd_btag, sc->vmd_bhandle, offset, val)); @@ -220,269 +211,162 @@ vmd_write_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, return (bus_space_write_1(sc->vmd_btag, sc->vmd_bhandle, offset, val)); default: - panic("Failed to specific width"); + __assert_unreachable(); } } -static uint32_t -vmd_pci_read_config(device_t dev, device_t child, int reg, int width) -{ - struct pci_devinfo *dinfo = device_get_ivars(child); - pcicfgregs *cfg = &dinfo->cfg; - - return vmd_read_config(dev, cfg->bus, cfg->slot, cfg->func, reg, width); -} - -static void -vmd_pci_write_config(device_t dev, device_t child, int reg, uint32_t val, - int width) -{ - struct pci_devinfo *dinfo = device_get_ivars(child); - pcicfgregs *cfg = &dinfo->cfg; - - vmd_write_config(dev, cfg->bus, cfg->slot, cfg->func, reg, val, width); -} - -static struct pci_devinfo * -vmd_alloc_devinfo(device_t dev) -{ - struct pci_devinfo *dinfo; - - dinfo = malloc(sizeof(*dinfo), M_DEVBUF, M_WAITOK | M_ZERO); - return (dinfo); -} - -static void +static int vmd_intr(void *arg) { - struct vmd_irq *irq; - struct vmd_softc *sc; -#ifndef TASK_QUEUE_INTR - struct vmd_irq_handler *elm, *tmp_elm; -#endif - - irq = (struct vmd_irq *)arg; - sc = irq->vmd_sc; -#ifdef TASK_QUEUE_INTR - taskqueue_enqueue(sc->vmd_irq_tq, &sc->vmd_irq_task); -#else - mtx_lock(&sc->vmd_irq_lock); - TAILQ_FOREACH_SAFE(elm, &sc->vmd_irq[0].vmd_list, vmd_link, tmp_elm) { - (elm->vmd_intr)(elm->vmd_arg); - } - mtx_unlock(&sc->vmd_irq_lock); -#endif -} - -#ifdef TASK_QUEUE_INTR -static void -vmd_handle_irq(void *context, int pending) -{ - struct vmd_irq_handler *elm, *tmp_elm; - struct vmd_softc *sc; - - sc = context; - - TAILQ_FOREACH_SAFE(elm, &sc->vmd_irq[0].vmd_list, vmd_link, tmp_elm) { - (elm->vmd_intr)(elm->vmd_arg); - } + /* + * We have nothing to do here, but we have to register some interrupt + * handler to make PCI code setup and enable the MSI-X vector. + */ + return (FILTER_STRAY); } -#endif static int vmd_attach(device_t dev) { struct vmd_softc *sc; struct pcib_secbus *bus; + struct pcib_window *w; struct vmd_type *t; + struct vmd_irq *vi; uint16_t vid, did; uint32_t bar; int i, j, error; - int rid, sec_reg; - static int b; - static int s; - static int f; - int min_count = 1; char buf[64]; sc = device_get_softc(dev); bzero(sc, sizeof(*sc)); - sc->vmd_dev = dev; - b = s = f = 0; + sc->psc.dev = dev; + sc->psc.domain = PCI_DOMAINMAX - device_get_unit(dev); pci_enable_busmaster(dev); -#ifdef TASK_QUEUE_INTR - sc->vmd_irq_tq = taskqueue_create_fast("vmd_taskq", M_NOWAIT, - taskqueue_thread_enqueue, &sc->vmd_irq_tq); - taskqueue_start_threads(&sc->vmd_irq_tq, 1, PI_DISK, "%s taskq", - device_get_nameunit(sc->vmd_dev)); - TASK_INIT(&sc->vmd_irq_task, 0, vmd_handle_irq, sc); -#else - mtx_init(&sc->vmd_irq_lock, "VMD IRQ lock", NULL, MTX_DEF); -#endif - for (i = 0, j = 0; i < VMD_MAX_BAR; i++, j++ ) { + for (i = 0, j = 0; i < VMD_MAX_BAR; i++, j++) { sc->vmd_regs_rid[i] = PCIR_BAR(j); bar = pci_read_config(dev, PCIR_BAR(0), 4); if (PCI_BAR_MEM(bar) && (bar & PCIM_BAR_MEM_TYPE) == PCIM_BAR_MEM_64) j++; - if ((sc->vmd_regs_resource[i] = bus_alloc_resource_any( - sc->vmd_dev, SYS_RES_MEMORY, &sc->vmd_regs_rid[i], - RF_ACTIVE)) == NULL) { + if ((sc->vmd_regs_res[i] = bus_alloc_resource_any(dev, + SYS_RES_MEMORY, &sc->vmd_regs_rid[i], RF_ACTIVE)) == NULL) { device_printf(dev, "Cannot allocate resources\n"); goto fail; } } - sc->vmd_io_rid = PCIR_IOBASEL_1; - sc->vmd_io_resource = bus_alloc_resource_any( - device_get_parent(sc->vmd_dev), SYS_RES_IOPORT, &sc->vmd_io_rid, - RF_ACTIVE); - if (sc->vmd_io_resource == NULL) { - device_printf(dev, "Cannot allocate IO\n"); - goto fail; - } - - sc->vmd_btag = rman_get_bustag(sc->vmd_regs_resource[0]); - sc->vmd_bhandle = rman_get_bushandle(sc->vmd_regs_resource[0]); + sc->vmd_btag = rman_get_bustag(sc->vmd_regs_res[0]); + sc->vmd_bhandle = rman_get_bushandle(sc->vmd_regs_res[0]); - pci_write_config(dev, PCIR_PRIBUS_2, - pcib_get_bus(device_get_parent(dev)), 1); - - t = vmd_devs; vid = pci_get_vendor(dev); did = pci_get_device(dev); + for (t = vmd_devs; t->vmd_name != NULL; t++) { + if (vid == t->vmd_vid && did == t->vmd_did) + break; + } sc->vmd_bus_start = 0; - while (t->vmd_name != NULL) { - if (vid == t->vmd_vid && - did == t->vmd_did) { - if (t->flags == BUS_RESTRICT) { - if (pci_read_config(dev, VMD_CAP, 2) & - VMD_BUS_RESTRICT) - switch (VMD_BUS_START(pci_read_config( - dev, VMD_CONFIG, 2))) { - case 1: - sc->vmd_bus_start = 128; - break; - case 2: - sc->vmd_bus_start = 224; - break; - case 3: - device_printf(dev, - "Unknown bug offset\n"); - goto fail; - break; - } - } + if ((t->flags & BUS_RESTRICT) && + (pci_read_config(dev, VMD_CAP, 2) & VMD_BUS_RESTRICT)) { + switch (VMD_BUS_START(pci_read_config(dev, VMD_CONFIG, 2))) { + case 0: + sc->vmd_bus_start = 0; + break; + case 1: + sc->vmd_bus_start = 128; + break; + case 2: + sc->vmd_bus_start = 224; + break; + default: + device_printf(dev, "Unknown bus offset\n"); + goto fail; } - t++; } + sc->vmd_bus_end = MIN(PCI_BUSMAX, sc->vmd_bus_start + + (rman_get_size(sc->vmd_regs_res[0]) >> 20) - 1); - device_printf(dev, "VMD bus starts at %d\n", sc->vmd_bus_start); - - sec_reg = PCIR_SECBUS_1; - bus = &sc->vmd_bus; - bus->sub_reg = PCIR_SUBBUS_1; - bus->sec = vmd_read_config(dev, b, s, f, sec_reg, 1); - bus->sub = vmd_read_config(dev, b, s, f, bus->sub_reg, 1); + bus = &sc->psc.bus; + bus->sec = sc->vmd_bus_start; + bus->sub = sc->vmd_bus_end; bus->dev = dev; - bus->rman.rm_start = sc->vmd_bus_start; + bus->rman.rm_start = 0; bus->rman.rm_end = PCI_BUSMAX; bus->rman.rm_type = RMAN_ARRAY; snprintf(buf, sizeof(buf), "%s bus numbers", device_get_nameunit(dev)); bus->rman.rm_descr = strdup(buf, M_DEVBUF); error = rman_init(&bus->rman); if (error) { - device_printf(dev, "Failed to initialize %s bus number rman\n", - device_get_nameunit(dev)); + device_printf(dev, "Failed to initialize bus rman\n"); bus->rman.rm_end = 0; goto fail; } - - /* - * Allocate a bus range. This will return an existing bus range - * if one exists, or a new bus range if one does not. - */ - rid = 0; - bus->res = bus_alloc_resource_anywhere(dev, PCI_RES_BUS, &rid, - min_count, 0); - if (bus->res == NULL) { - /* - * Fall back to just allocating a range of a single bus - * number. - */ - bus->res = bus_alloc_resource_anywhere(dev, PCI_RES_BUS, &rid, - 1, 0); - } else if (rman_get_size(bus->res) < min_count) { - /* - * Attempt to grow the existing range to satisfy the - * minimum desired count. - */ - (void)bus_adjust_resource(dev, PCI_RES_BUS, bus->res, - rman_get_start(bus->res), rman_get_start(bus->res) + - min_count - 1); + error = rman_manage_region(&bus->rman, sc->vmd_bus_start, + sc->vmd_bus_end); + if (error) { + device_printf(dev, "Failed to add resource to bus rman\n"); + goto fail; } - /* - * Add the initial resource to the rman. - */ - if (bus->res != NULL) { - error = rman_manage_region(&bus->rman, rman_get_start(bus->res), - rman_get_end(bus->res)); - if (error) { - device_printf(dev, "Failed to add resource to rman\n"); - goto fail; - } - bus->sec = rman_get_start(bus->res); - bus->sub = rman_get_end(bus->res); + w = &sc->psc.mem; + w->rman.rm_type = RMAN_ARRAY; + snprintf(buf, sizeof(buf), "%s memory window", device_get_nameunit(dev)); + w->rman.rm_descr = strdup(buf, M_DEVBUF); + error = rman_init(&w->rman); + if (error) { + device_printf(dev, "Failed to initialize memory rman\n"); + w->rman.rm_end = 0; + goto fail; + } + error = rman_manage_region(&w->rman, + rman_get_start(sc->vmd_regs_res[1]), + rman_get_end(sc->vmd_regs_res[1])); + if (error) { + device_printf(dev, "Failed to add resource to memory rman\n"); + goto fail; + } + error = rman_manage_region(&w->rman, + rman_get_start(sc->vmd_regs_res[2]) + 0x2000, + rman_get_end(sc->vmd_regs_res[2])); + if (error) { + device_printf(dev, "Failed to add resource to memory rman\n"); + goto fail; } + LIST_INIT(&sc->vmd_users); + sc->vmd_fist_vector = (t->flags & VECTOR_OFFSET) ? 1 : 0; sc->vmd_msix_count = pci_msix_count(dev); if (pci_alloc_msix(dev, &sc->vmd_msix_count) == 0) { sc->vmd_irq = malloc(sizeof(struct vmd_irq) * - sc->vmd_msix_count, - M_DEVBUF, M_WAITOK | M_ZERO); - + sc->vmd_msix_count, M_DEVBUF, M_WAITOK | M_ZERO); for (i = 0; i < sc->vmd_msix_count; i++) { - sc->vmd_irq[i].vmd_rid = i + 1; - sc->vmd_irq[i].vmd_sc = sc; - sc->vmd_irq[i].vmd_instance = i; - sc->vmd_irq[i].vmd_res = bus_alloc_resource_any(dev, - SYS_RES_IRQ, &sc->vmd_irq[i].vmd_rid, - RF_ACTIVE); - if (sc->vmd_irq[i].vmd_res == NULL) { - device_printf(dev,"Failed to alloc irq\n"); + vi = &sc->vmd_irq[i]; + vi->vi_rid = i + 1; + vi->vi_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &vi->vi_rid, RF_ACTIVE | RF_SHAREABLE); + if (vi->vi_res == NULL) { + device_printf(dev, "Failed to allocate irq\n"); goto fail; } - - TAILQ_INIT(&sc->vmd_irq[i].vmd_list); - if (bus_setup_intr(dev, sc->vmd_irq[i].vmd_res, - INTR_TYPE_MISC | INTR_MPSAFE, NULL, vmd_intr, - &sc->vmd_irq[i], &sc->vmd_irq[i].vmd_handle)) { - device_printf(sc->vmd_dev, - "Cannot set up interrupt\n"); - sc->vmd_irq[i].vmd_res = NULL; + vi->vi_irq = rman_get_start(vi->vi_res); + if (bus_setup_intr(dev, vi->vi_res, INTR_TYPE_MISC | + INTR_MPSAFE, vmd_intr, NULL, vi, &vi->vi_handle)) { + device_printf(dev, "Can't set up interrupt\n"); + bus_release_resource(dev, SYS_RES_IRQ, + vi->vi_rid, vi->vi_res); + vi->vi_res = NULL; goto fail; } } } - sc->vmd_child = device_add_child(dev, NULL, -1); - if (sc->vmd_child == NULL) { - device_printf(dev, "Failed to attach child\n"); - goto fail; - } - - error = device_probe_and_attach(sc->vmd_child); - if (error) { - device_printf(dev, "Failed to add probe child: %d\n", error); - (void)device_delete_child(dev, sc->vmd_child); - goto fail; - } + sc->vmd_dma_tag = bus_get_dma_tag(dev); - return (0); + sc->psc.child = device_add_child(dev, "pci", -1); + return (bus_generic_attach(dev)); fail: vmd_free(sc); @@ -492,150 +376,218 @@ fail: static int vmd_detach(device_t dev) { - struct vmd_softc *sc; - int err; - - sc = device_get_softc(dev); - if (sc->vmd_child != NULL) { - err = bus_generic_detach(sc->vmd_child); - if (err) - return (err); - err = device_delete_child(dev, sc->vmd_child); - if (err) - return (err); - } + struct vmd_softc *sc = device_get_softc(dev); + int error; + + error = bus_generic_detach(dev); + if (error) + return (error); + error = device_delete_children(dev); + if (error) + return (error); vmd_free(sc); return (0); } -/* Pass request to alloc an MSI-X message up to the parent bridge. */ -static int -vmd_alloc_msix(device_t pcib, device_t dev, int *irq) +static bus_dma_tag_t +vmd_get_dma_tag(device_t dev, device_t child) { - struct vmd_softc *sc = device_get_softc(pcib); - device_t bus; - int ret; - - if (sc->vmd_flags & PCIB_DISABLE_MSIX) - return (ENXIO); - bus = device_get_parent(pcib); - ret = PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq); - return (ret); + struct vmd_softc *sc = device_get_softc(dev); + + return (sc->vmd_dma_tag); } static struct resource * vmd_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { - /* Start at max PCI vmd_domain and work down */ - if (type == PCI_RES_BUS) { - return (pci_domain_alloc_bus(PCI_DOMAINMAX - - device_get_unit(dev), child, rid, start, end, - count, flags)); + struct vmd_softc *sc = device_get_softc(dev); + struct resource *res; + + switch (type) { + case SYS_RES_IRQ: + /* VMD harwdare does not support legacy interrupts. */ + if (*rid == 0) + return (NULL); + return (bus_generic_alloc_resource(dev, child, type, rid, + start, end, count, flags | RF_SHAREABLE)); + case SYS_RES_MEMORY: + res = rman_reserve_resource(&sc->psc.mem.rman, start, end, + count, flags, child); + if (res == NULL) + return (NULL); + if (bootverbose) + device_printf(dev, + "allocated memory range (%#jx-%#jx) for rid %d of %s\n", + rman_get_start(res), rman_get_end(res), *rid, + pcib_child_name(child)); + break; + case PCI_RES_BUS: + res = rman_reserve_resource(&sc->psc.bus.rman, start, end, + count, flags, child); + if (res == NULL) + return (NULL); + if (bootverbose) + device_printf(dev, + "allocated bus range (%ju-%ju) for rid %d of %s\n", + rman_get_start(res), rman_get_end(res), *rid, + pcib_child_name(child)); + break; + default: + /* VMD harwdare does not support I/O ports. */ + return (NULL); } - - return (pcib_alloc_resource(dev, child, type, rid, start, end, - count, flags)); + rman_set_rid(res, *rid); + return (res); } static int vmd_adjust_resource(device_t dev, device_t child, int type, struct resource *r, rman_res_t start, rman_res_t end) { - struct resource *res = r; - if (type == PCI_RES_BUS) - return (pci_domain_adjust_bus(PCI_DOMAINMAX - - device_get_unit(dev), child, res, start, end)); - return (pcib_adjust_resource(dev, child, type, res, start, end)); + if (type == SYS_RES_IRQ) { + return (bus_generic_adjust_resource(dev, child, type, r, + start, end)); + } + return (rman_adjust_resource(r, start, end)); } static int vmd_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { - if (type == PCI_RES_BUS) - return (pci_domain_release_bus(PCI_DOMAINMAX - - device_get_unit(dev), child, rid, r)); - return (pcib_release_resource(dev, child, type, rid, r)); -} -static int -vmd_shutdown(device_t dev) -{ - return (0); + if (type == SYS_RES_IRQ) { + return (bus_generic_release_resource(dev, child, type, rid, + r)); + } + return (rman_release_resource(r)); } static int -vmd_pcib_route_interrupt(device_t pcib, device_t dev, int pin) +vmd_route_interrupt(device_t dev, device_t child, int pin) { - return (pcib_route_interrupt(pcib, dev, pin)); + + /* VMD harwdare does not support legacy interrupts. */ + return (PCI_INVALID_IRQ); } static int -vmd_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, +vmd_alloc_msi(device_t dev, device_t child, int count, int maxcount, int *irqs) { - return (pcib_alloc_msi(pcib, dev, count, maxcount, irqs)); -} + struct vmd_softc *sc = device_get_softc(dev); + struct vmd_irq_user *u; + int i, ibest = 0, best = INT_MAX; + + if (count > vmd_max_msi) + return (ENOSPC); + LIST_FOREACH(u, &sc->vmd_users, viu_link) { + if (u->viu_child == child) + return (EBUSY); + } -static int -vmd_pcib_release_msi(device_t pcib, device_t dev, int count, int *irqs) -{ + for (i = sc->vmd_fist_vector; i < sc->vmd_msix_count; i++) { + if (best > sc->vmd_irq[i].vi_nusers) { + best = sc->vmd_irq[i].vi_nusers; + ibest = i; + } + } + + u = malloc(sizeof(*u), M_DEVBUF, M_WAITOK | M_ZERO); + u->viu_child = child; + u->viu_vector = ibest; + LIST_INSERT_HEAD(&sc->vmd_users, u, viu_link); + sc->vmd_irq[ibest].vi_nusers += count; - return (pcib_release_msi(pcib, dev, count, irqs)); + for (i = 0; i < count; i++) + irqs[i] = sc->vmd_irq[ibest].vi_irq; + return (0); } *** 548 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Fri Sep 3 01:26:51 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AE5E266CE07; Fri, 3 Sep 2021 01:26: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 4H10Wb4LgSz4gG5; Fri, 3 Sep 2021 01:26: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 78EFF23658; Fri, 3 Sep 2021 01:26: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 1831QpQ8031415; Fri, 3 Sep 2021 01:26:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1831QppZ031414; Fri, 3 Sep 2021 01:26:51 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:26:51 GMT Message-Id: <202109030126.1831QppZ031414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 4730a8972b1f - main - callout(9): Allow spin locks use with callout_init_mtx(). 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/main X-Git-Reftype: branch X-Git-Commit: 4730a8972b1f4b67bf9ffde8e63ca906ef4c9563 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:26:51 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=4730a8972b1f4b67bf9ffde8e63ca906ef4c9563 commit 4730a8972b1f4b67bf9ffde8e63ca906ef4c9563 Author: Alexander Motin AuthorDate: 2021-09-03 01:16:46 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 01:16:46 +0000 callout(9): Allow spin locks use with callout_init_mtx(). Implement lock_spin()/unlock_spin() lock class methods, moving the assertion to _sleep() instead. Change assertions in callout(9) to allow spin locks for both regular and C_DIRECT_EXEC cases. In case of C_DIRECT_EXEC callouts spin locks are the only locks allowed actually. As the first use case allow taskqueue_enqueue_timeout() use on fast task queues. It actually becomes more efficient due to avoided extra context switches in callout(9) thanks to C_DIRECT_EXEC. MFC after: 2 weeks Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D31778 --- share/man/man9/callout.9 | 5 +---- share/man/man9/taskqueue.9 | 5 +---- sys/kern/kern_mutex.c | 8 ++++++-- sys/kern/kern_synch.c | 2 ++ sys/kern/kern_timeout.c | 10 +++++----- sys/kern/subr_taskqueue.c | 3 ++- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/share/man/man9/callout.9 b/share/man/man9/callout.9 index 9e0cf5e6dc5e..5c011a20d338 100644 --- a/share/man/man9/callout.9 +++ b/share/man/man9/callout.9 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 13, 2019 +.Dd September 1, 2021 .Dt CALLOUT 9 .Os .Sh NAME @@ -241,9 +241,6 @@ and the associated lock is released. This ensures that stopping or rescheduling the callout will abort any previously scheduled invocation. .Pp -Only regular mutexes may be used with -.Fn callout_init_mtx ; -spin mutexes are not supported. A sleepable read-mostly lock .Po one initialized with the diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9 index 2ede90458629..58eb6b7c5571 100644 --- a/share/man/man9/taskqueue.9 +++ b/share/man/man9/taskqueue.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 6, 2020 +.Dd September 1, 2021 .Dt TASKQUEUE 9 .Os .Sh NAME @@ -237,9 +237,6 @@ and .Va flags , as detailed in .Xr callout 9 . -Only non-fast task queues can be used for -.Va timeout_task -scheduling. If the .Va ticks argument is negative, the already scheduled enqueueing is not re-scheduled. diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index a85420e62c7a..6343ad445623 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -215,7 +215,7 @@ void lock_spin(struct lock_object *lock, uintptr_t how) { - panic("spin locks can only use msleep_spin"); + mtx_lock_spin((struct mtx *)lock); } uintptr_t @@ -232,8 +232,12 @@ unlock_mtx(struct lock_object *lock) uintptr_t unlock_spin(struct lock_object *lock) { + struct mtx *m; - panic("spin locks can only use msleep_spin"); + m = (struct mtx *)lock; + mtx_assert(m, MA_OWNED | MA_NOTRECURSED); + mtx_unlock_spin(m); + return (0); } #ifdef KDTRACE_HOOKS diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 7bf5193fb7b1..89b937315907 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -188,6 +188,8 @@ _sleep(const void *ident, struct lock_object *lock, int priority, DROP_GIANT(); if (lock != NULL && lock != &Giant.lock_object && !(class->lc_flags & LC_SLEEPABLE)) { + KASSERT(!(class->lc_flags & LC_SPINLOCK), + ("spin locks can only use msleep_spin")); WITNESS_SAVE(lock, lock_witness); lock_state = class->lc_unlock(lock); } else diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index d9cf2784f642..992a093d30ab 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -919,8 +919,9 @@ callout_reset_sbt_on(struct callout *c, sbintime_t sbt, sbintime_t prec, } else { direct = 0; } - KASSERT(!direct || c->c_lock == NULL, - ("%s: direct callout %p has lock", __func__, c)); + KASSERT(!direct || c->c_lock == NULL || + (LOCK_CLASS(c->c_lock)->lc_flags & LC_SPINLOCK), + ("%s: direct callout %p has non-spin lock", __func__, c)); cc = callout_lock(c); /* * Don't allow migration if the user does not care. @@ -1332,9 +1333,8 @@ _callout_init_lock(struct callout *c, struct lock_object *lock, int flags) ("callout_init_lock: bad flags %d", flags)); KASSERT(lock != NULL || (flags & CALLOUT_RETURNUNLOCKED) == 0, ("callout_init_lock: CALLOUT_RETURNUNLOCKED with no lock")); - KASSERT(lock == NULL || !(LOCK_CLASS(lock)->lc_flags & - (LC_SPINLOCK | LC_SLEEPABLE)), ("%s: invalid lock class", - __func__)); + KASSERT(lock == NULL || !(LOCK_CLASS(lock)->lc_flags & LC_SLEEPABLE), + ("%s: callout %p has sleepable lock", __func__, c)); c->c_iflags = flags & (CALLOUT_RETURNUNLOCKED | CALLOUT_SHAREDLOCK); c->c_cpu = cc_default_cpu; } diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c index 061361cc06d7..e43b09010761 100644 --- a/sys/kern/subr_taskqueue.c +++ b/sys/kern/subr_taskqueue.c @@ -309,7 +309,6 @@ taskqueue_enqueue_timeout_sbt(struct taskqueue *queue, TQ_LOCK(queue); KASSERT(timeout_task->q == NULL || timeout_task->q == queue, ("Migrated queue")); - KASSERT(!queue->tq_spin, ("Timeout for spin-queue")); timeout_task->q = queue; res = timeout_task->t.ta_pending; if (timeout_task->f & DT_DRAIN_IN_PROGRESS) { @@ -329,6 +328,8 @@ taskqueue_enqueue_timeout_sbt(struct taskqueue *queue, sbt = -sbt; /* Ignore overflow. */ } if (sbt > 0) { + if (queue->tq_spin) + flags |= C_DIRECT_EXEC; callout_reset_sbt(&timeout_task->c, sbt, pr, taskqueue_timeout_func, timeout_task, flags); } From owner-dev-commits-src-all@freebsd.org Fri Sep 3 02:25:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1CA8666D431; Fri, 3 Sep 2021 02:25: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 4H11qc5d1Dz4xbY; Fri, 3 Sep 2021 02:25: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 891382433D; Fri, 3 Sep 2021 02:25: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 1832PmSd011426; Fri, 3 Sep 2021 02:25:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1832Pm2S011425; Fri, 3 Sep 2021 02:25:48 GMT (envelope-from git) Date: Fri, 3 Sep 2021 02:25:48 GMT Message-Id: <202109030225.1832Pm2S011425@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 5d9e5a7edfb5 - main - Missed line from 7af4475a6e31. 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/main X-Git-Reftype: branch X-Git-Commit: 5d9e5a7edfb5a2256be1c6433aaef32433cdd14e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 02:25:49 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=5d9e5a7edfb5a2256be1c6433aaef32433cdd14e commit 5d9e5a7edfb5a2256be1c6433aaef32433cdd14e Author: Alexander Motin AuthorDate: 2021-09-03 02:25:16 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 02:25:16 +0000 Missed line from 7af4475a6e31. MFC after: 2 weeks --- sys/dev/vmd/vmd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/vmd/vmd.h b/sys/dev/vmd/vmd.h index 13e6cc213655..c9f9a87368f0 100644 --- a/sys/dev/vmd/vmd.h +++ b/sys/dev/vmd/vmd.h @@ -63,6 +63,7 @@ struct vmd_softc { int vmd_msix_count; uint8_t vmd_bus_start; uint8_t vmd_bus_end; + bus_dma_tag_t vmd_dma_tag; }; #endif From owner-dev-commits-src-all@freebsd.org Fri Sep 3 02:34:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BD8DC66DB9B; Fri, 3 Sep 2021 02:34: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 4H121r4YhSz51R5; Fri, 3 Sep 2021 02:34: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 853C22463E; Fri, 3 Sep 2021 02:34: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 1832Yel5024443; Fri, 3 Sep 2021 02:34:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1832YeC5024442; Fri, 3 Sep 2021 02:34:40 GMT (envelope-from git) Date: Fri, 3 Sep 2021 02:34:40 GMT Message-Id: <202109030234.1832YeC5024442@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Philip Paeps Subject: git: 71611b0c6885 - main - tcp: document TCP Fast Open (RFC 7413) in tcp(4) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 71611b0c688568d513c665e1af3d95fcd50605fa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 02:34:40 -0000 The branch main has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=71611b0c688568d513c665e1af3d95fcd50605fa commit 71611b0c688568d513c665e1af3d95fcd50605fa Author: Philip Paeps AuthorDate: 2021-09-03 02:33:12 +0000 Commit: Philip Paeps CommitDate: 2021-09-03 02:33:12 +0000 tcp: document TCP Fast Open (RFC 7413) in tcp(4) Adds documentation for the TCP_FASTOPEN socket option and related MIB variables to the tcp(4) manual page. PR: 257907 Reviewed by: gbe MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D31764 --- share/man/man4/tcp.4 | 134 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 1ff1ee28420f..17138fa224ba 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -148,6 +148,54 @@ connection. See .Xr mod_cc 4 for details. +.It Dv TCP_FASTOPEN +Enable or disable TCP Fast Open (TFO). +To use this option, the kernel must be built with the +.Dv TCP_RFC7413 +option. +.Pp +This option can be set on the socket either before or after the +.Xr listen 2 +is invoked. +Clearing this option on a listen socket after it has been set has no effect on +existing TFO connections or TFO connections in progress; it only prevents new +TFO connections from being established. +.Pp +For passively-created sockets, the +.Dv TCP_FASTOPEN +socket option can be queried to determine whether the connection was established +using TFO. +Note that connections that are established via a TFO +.Tn SYN , +but that fall back to using a non-TFO +.Tn SYN|ACK +will have the +.Dv TCP_FASTOPEN +socket option set. +.Pp +In addition to the facilities defined in RFC7413, this implementation supports a +pre-shared key (PSK) mode of operation in which the TFO server requires the +client to be in posession of a shared secret in order for the client to be able +to successfully open TFO connections with the server. +This is useful, for example, in environments where TFO servers are exposed to +both internal and external clients and only wish to allow TFO connections from +internal clients. +.Pp +In the PSK mode of operation, the server generates and sends TFO cookies to +requesting clients as usual. +However, when validating cookies received in TFO SYNs from clients, the server +requires the client-supplied cookie to equal +.Bd -literal -offset left +SipHash24(key=\fI16-byte-psk\fP, msg=\fIcookie-sent-to-client\fP) +.Ed +.Pp +Multiple concurrent valid pre-shared keys are supported so that time-based +rolling PSK invalidation policies can be implemented in the system. +The default number of concurrent pre-shared keys is 2. +.Pp +This can be adjusted with the +.Dv TCP_RFC7413_MAX_PSKS +kernel option. .It Dv TCP_FUNCTION_BLK Select or query the set of functions that TCP will use for this connection. This allows a user to select an alternate TCP stack. @@ -689,6 +737,92 @@ Enable path MTU blackhole detection only for IPv6. MSS to try for IPv4 if PMTU blackhole detection is turned on. .It Va v6pmtud_blackhole_mss MSS to try for IPv6 if PMTU blackhole detection is turned on. +.It Va fastopen.acceptany +When non-zero, all client-supplied TFO cookies will be considered to be valid. +The default is 0. +.It Va fastopen.autokey +When this and +.Va net.inet.tcp.fastopen.server_enable +are non-zero, a new key will be automatically generated after this specified +seconds. +The default is 120. +.It Va fastopen.ccache_bucket_limit +The maximum number of entries in a client cookie cache bucket. +The default value can be tuned with the +.Dv TCP_FASTOPEN_CCACHE_BUCKET_LIMIT_DEFAULT +kernel option or by setting +.Va net.inet.tcp.fastopen_ccache_bucket_limit +in the +.Xr loader 8 . +.It Va fastopen.ccache_buckets +The number of client cookie cache buckets. +Read-only. +The value can be tuned with the +.Dv TCP_FASTOPEN_CCACHE_BUCKETS_DEFAULT +kernel option or by setting +.Va fastopen.ccache_buckets +in the +.Xr loader 8 . +.It Va fastopen.ccache_list +Print the client cookie cache. +Read-only. +.It Va fastopen.client_enable +When zero, no new active (i.e., client) TFO connections can be created. +On the transition from enabled to disabled, the client cookie cache is cleared +and disabled. +The transition from enabled to disabled does not affect any active TFO +connections in progress; it only prevents new ones from being established. +The default is 0. +.It Va fastopen.keylen +The key length in bytes. +Read-only. +.It Va fastopen.maxkeys +The maximum number of keys supported. +Read-only, +.It Va fastopen.maxpsks +The maximum number of pre-shared keys supported. +Read-only. +.It Va fastopen.numkeys +The current number of keys installed. +Read-only. +.It Va fastopen.numpsks +The current number of pre-shared keys installed. +Read-only. +.It Va fastopen.path_disable_time +When a failure occurs while trying to create a new active (i.e., client) TFO +connection, new active connections on the same path, as determined by the tuple +.Brq client_ip, server_ip, server_port , +will be forced to be non-TFO for this many seconds. +Note that the path disable mechanism relies on state stored in client cookie +cache entries, so it is possible for the disable time for a given path to be +reduced if the corresponding client cookie cache entry is reused due to resource +pressure before the disable period has elapsed. +The default is +.Dv TCP_FASTOPEN_PATH_DISABLE_TIME_DEFAULT . +.It Va fastopen.psk_enable +When non-zero, pre-shared key (PSK) mode is enabled for all TFO servers. +On the transition from enabled to disabled, all installed pre-shared keys are +removed. +The default is 0. +.It Va fastopen.server_enable +When zero, no new passive (i.e., server) TFO connections can be created. +On the transition from enabled to disabled, all installed keys and pre-shared +keys are removed. +On the transition from disabled to enabled, if +.Va fastopen.autokey +is non-zero and there are no keys installed, a new key will be generated +immediately. +The transition from enabled to disabled does not affect any passive TFO +connections in progress; it only prevents new ones from being established. +The default is 0. +.It Va fastopen.setkey +Install a new key by writing +.Va net.inet.tcp.fastopen.keylen +bytes to this sysctl. +.It Va fastopen.setpsk +Install a new pre-shared key by writing +.Va net.inet.tcp.fastopen.keylen +bytes to this sysctl. .It Va hostcache.enable The TCP host cache is used to cache connection details and metrics to improve future performance of connections between the same hosts. From owner-dev-commits-src-all@freebsd.org Fri Sep 3 06:39:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 08:23:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B52B2671843; Fri, 3 Sep 2021 08:23: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 4H19mj4Wv5z3s9W; Fri, 3 Sep 2021 08:23: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 84479291C6; Fri, 3 Sep 2021 08:23: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 1838Nnrs092706; Fri, 3 Sep 2021 08:23:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1838NnGc092705; Fri, 3 Sep 2021 08:23:49 GMT (envelope-from git) Date: Fri, 3 Sep 2021 08:23:49 GMT Message-Id: <202109030823.1838NnGc092705@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a0c64a443e4c - main - pf: ensure states passed to pf_free_state() are always unlinked 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/main X-Git-Reftype: branch X-Git-Commit: a0c64a443e4cae67a5eea3a61a47d746866de3ee Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 08:23:49 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a0c64a443e4cae67a5eea3a61a47d746866de3ee commit a0c64a443e4cae67a5eea3a61a47d746866de3ee Author: Kristof Provost AuthorDate: 2021-09-03 07:36:19 +0000 Commit: Kristof Provost CommitDate: 2021-09-03 07:36:19 +0000 pf: ensure states passed to pf_free_state() are always unlinked In pf_create_state() we can end up deleting the state immediately. This can happen if we fail to map the relevant addresses or fail normalization or fail to insert it into the state table. If that happens we delete the state again with pf_free_state(). However, this asserts that the state must be unlinked. It's correct to simply set the state to PFTM_UNLINKED because we've not yet linked it. Submitted by: Mateusz Guzik Reviewed by: scottl MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31752 --- sys/netpfil/pf/pf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index c4b29249ca6a..8a81aeb1c010 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -3980,6 +3980,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, if (pf_map_addr(pd->af, r, pd->src, &s->rt_addr, NULL, &sn)) { REASON_SET(&reason, PFRES_MAPFAILED); pf_src_tree_remove_state(s); + s->timeout = PFTM_UNLINKED; STATE_DEC_COUNTERS(s); pf_free_state(s); goto csfailed; @@ -4002,6 +4003,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, off, pd, th, &s->src, &s->dst)) { REASON_SET(&reason, PFRES_MEMORY); pf_src_tree_remove_state(s); + s->timeout = PFTM_UNLINKED; STATE_DEC_COUNTERS(s); pf_free_state(s); return (PF_DROP); @@ -4014,6 +4016,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, ("pf_normalize_tcp_stateful failed on first " "pkt\n")); pf_src_tree_remove_state(s); + s->timeout = PFTM_UNLINKED; STATE_DEC_COUNTERS(s); pf_free_state(s); return (PF_DROP); @@ -4041,6 +4044,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, (pd->dir == PF_IN) ? nk : sk, s)) { REASON_SET(&reason, PFRES_STATEINS); pf_src_tree_remove_state(s); + s->timeout = PFTM_UNLINKED; STATE_DEC_COUNTERS(s); pf_free_state(s); return (PF_DROP); From owner-dev-commits-src-all@freebsd.org Fri Sep 3 13:18:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8A396675A9D; Fri, 3 Sep 2021 13:18: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 4H1JKG31Ptz3J71; Fri, 3 Sep 2021 13:18: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 5053B2D08A; Fri, 3 Sep 2021 13:18: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 183DIwOa082078; Fri, 3 Sep 2021 13:18:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183DIvOr082077; Fri, 3 Sep 2021 13:18:57 GMT (envelope-from git) Date: Fri, 3 Sep 2021 13:18:57 GMT Message-Id: <202109031318.183DIvOr082077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: c1d255d3ffdb - main - wpa: Import wpa_supplicant/hostapd commits up to b4f7506ff 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/main X-Git-Reftype: branch X-Git-Commit: c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 13:18:58 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5 commit c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5 Merge: a0c64a443e4c 2f6c3ea9600b Author: Cy Schubert AuthorDate: 2021-09-03 13:07:19 +0000 Commit: Cy Schubert CommitDate: 2021-09-03 13:08:41 +0000 wpa: Import wpa_supplicant/hostapd commits up to b4f7506ff Merge vendor commits 40c7ff83e74eabba5a7e2caefeea12372b2d3f9a, efec8223892b3e677acb46eae84ec3534989971f, and 2f6c3ea9600b494d24cac5a38c1cea0ac192245e. Tested by: philip MFC after: 2 months contrib/wpa/CONTRIBUTIONS | 5 +- contrib/wpa/hostapd/Android.mk | 1152 ++ contrib/wpa/hostapd/ChangeLog | 4 +- contrib/wpa/hostapd/Makefile | 1375 +++ contrib/wpa/hostapd/android.config | 214 + contrib/wpa/hostapd/config_file.c | 453 +- contrib/wpa/hostapd/ctrl_iface.c | 908 +- contrib/wpa/hostapd/defconfig | 35 +- contrib/wpa/hostapd/hostapd.android.rc | 19 + contrib/wpa/hostapd/hostapd.conf | 367 +- contrib/wpa/hostapd/hostapd.wpa_psk | 6 + contrib/wpa/hostapd/hostapd_cli.c | 128 +- contrib/wpa/hostapd/main.c | 22 +- contrib/wpa/hostapd/sae_pk_gen.c | 196 + contrib/wpa/hs20/client/Makefile | 55 +- contrib/wpa/hs20/client/est.c | 7 +- contrib/wpa/hs20/client/oma_dm_client.c | 2 +- contrib/wpa/hs20/client/osu_client.c | 27 +- contrib/wpa/hs20/client/osu_client.h | 2 + contrib/wpa/hs20/client/spp_client.c | 2 +- contrib/wpa/hs20/server/Makefile | 42 + contrib/wpa/hs20/server/ca/clean.sh | 13 + contrib/wpa/hs20/server/ca/est-csrattrs.cnf | 17 + contrib/wpa/hs20/server/ca/est-csrattrs.sh | 4 + contrib/wpa/hs20/server/ca/hs20.oid | 7 + contrib/wpa/hs20/server/ca/ocsp-req.sh | 11 + contrib/wpa/hs20/server/ca/ocsp-responder-ica.sh | 3 + contrib/wpa/hs20/server/ca/ocsp-responder.sh | 3 + contrib/wpa/hs20/server/ca/ocsp-update-cache.sh | 11 + contrib/wpa/hs20/server/ca/openssl-root.cnf | 125 + contrib/wpa/hs20/server/ca/openssl.cnf | 200 + contrib/wpa/hs20/server/ca/setup.sh | 209 + contrib/wpa/hs20/server/ca/w1fi_logo.png | Bin 0 -> 7549 bytes contrib/wpa/hs20/server/hs20-osu-server.txt | 262 + contrib/wpa/hs20/server/hs20_spp_server.c | 207 + contrib/wpa/hs20/server/spp_server.c | 2933 +++++ contrib/wpa/hs20/server/spp_server.h | 36 + contrib/wpa/hs20/server/sql-example.txt | 17 + contrib/wpa/hs20/server/sql.txt | 108 + contrib/wpa/hs20/server/www/add-free.php | 50 + contrib/wpa/hs20/server/www/add-mo.php | 56 + contrib/wpa/hs20/server/www/cert-enroll.php | 39 + contrib/wpa/hs20/server/www/config.php | 7 + contrib/wpa/hs20/server/www/est.php | 232 + contrib/wpa/hs20/server/www/free-remediation.php | 19 + contrib/wpa/hs20/server/www/free.php | 23 + contrib/wpa/hs20/server/www/redirect.php | 32 + contrib/wpa/hs20/server/www/remediation-pw.php | 41 + contrib/wpa/hs20/server/www/remediation.php | 55 + contrib/wpa/hs20/server/www/signup.php | 59 + contrib/wpa/hs20/server/www/spp.php | 168 + contrib/wpa/hs20/server/www/terms.php | 87 + contrib/wpa/hs20/server/www/users.php | 377 + contrib/wpa/src/Makefile | 12 + contrib/wpa/src/ap/Makefile | 60 + contrib/wpa/src/ap/acs.c | 357 +- contrib/wpa/src/ap/airtime_policy.c | 12 +- contrib/wpa/src/ap/ap_config.c | 298 +- contrib/wpa/src/ap/ap_config.h | 135 +- contrib/wpa/src/ap/ap_drv_ops.c | 158 +- contrib/wpa/src/ap/ap_drv_ops.h | 51 +- contrib/wpa/src/ap/ap_list.c | 4 - contrib/wpa/src/ap/authsrv.c | 87 +- contrib/wpa/src/ap/beacon.c | 609 +- contrib/wpa/src/ap/beacon.h | 2 + contrib/wpa/src/ap/ctrl_iface_ap.c | 85 +- contrib/wpa/src/ap/dfs.c | 330 +- contrib/wpa/src/ap/dfs.h | 3 + contrib/wpa/src/ap/dhcp_snoop.c | 8 +- contrib/wpa/src/ap/dpp_hostapd.c | 1025 +- contrib/wpa/src/ap/dpp_hostapd.h | 11 + contrib/wpa/src/ap/drv_callbacks.c | 362 +- contrib/wpa/src/ap/fils_hlp.c | 36 +- contrib/wpa/src/ap/gas_serv.c | 10 +- contrib/wpa/src/ap/hostapd.c | 282 +- contrib/wpa/src/ap/hostapd.h | 59 +- contrib/wpa/src/ap/hs20.c | 6 +- contrib/wpa/src/ap/hw_features.c | 373 +- contrib/wpa/src/ap/hw_features.h | 22 +- contrib/wpa/src/ap/ieee802_11.c | 2516 +++- contrib/wpa/src/ap/ieee802_11.h | 24 +- contrib/wpa/src/ap/ieee802_11_auth.c | 172 +- contrib/wpa/src/ap/ieee802_11_auth.h | 17 +- contrib/wpa/src/ap/ieee802_11_he.c | 189 +- contrib/wpa/src/ap/ieee802_11_ht.c | 30 +- contrib/wpa/src/ap/ieee802_11_shared.c | 189 +- contrib/wpa/src/ap/ieee802_11_vht.c | 176 +- contrib/wpa/src/ap/ieee802_1x.c | 482 +- contrib/wpa/src/ap/ieee802_1x.h | 7 +- contrib/wpa/src/ap/neighbor_db.c | 58 +- contrib/wpa/src/ap/neighbor_db.h | 1 + contrib/wpa/src/ap/pmksa_cache_auth.c | 6 + contrib/wpa/src/ap/preauth_auth.c | 2 +- contrib/wpa/src/ap/sta_info.c | 111 +- contrib/wpa/src/ap/sta_info.h | 54 +- contrib/wpa/src/ap/utils.c | 4 + contrib/wpa/src/ap/vlan_init.c | 5 +- contrib/wpa/src/ap/wmm.c | 14 +- contrib/wpa/src/ap/wnm_ap.c | 83 +- contrib/wpa/src/ap/wpa_auth.c | 1415 ++- contrib/wpa/src/ap/wpa_auth.h | 103 +- contrib/wpa/src/ap/wpa_auth_ft.c | 385 +- contrib/wpa/src/ap/wpa_auth_glue.c | 343 +- contrib/wpa/src/ap/wpa_auth_i.h | 71 +- contrib/wpa/src/ap/wpa_auth_ie.c | 444 +- contrib/wpa/src/ap/wpa_auth_ie.h | 35 - contrib/wpa/src/ap/wpa_auth_kay.c | 12 +- contrib/wpa/src/ap/wps_hostapd.c | 237 +- contrib/wpa/src/build.rules | 109 + contrib/wpa/src/common/Makefile | 16 + contrib/wpa/src/common/brcm_vendor.h | 156 + contrib/wpa/src/common/common_module_tests.c | 513 +- contrib/wpa/src/common/defs.h | 86 +- contrib/wpa/src/common/dhcp.h | 2 +- contrib/wpa/src/common/dpp.c | 11695 +++++------------- contrib/wpa/src/common/dpp.h | 248 +- contrib/wpa/src/common/dpp_auth.c | 1977 +++ contrib/wpa/src/common/dpp_backup.c | 1265 ++ contrib/wpa/src/common/dpp_crypto.c | 3329 +++++ contrib/wpa/src/common/dpp_i.h | 160 + contrib/wpa/src/common/dpp_pkex.c | 1324 ++ contrib/wpa/src/common/dpp_reconfig.c | 958 ++ contrib/wpa/src/common/dpp_tcp.c | 1824 +++ contrib/wpa/src/common/gas_server.c | 140 +- contrib/wpa/src/common/gas_server.h | 9 +- contrib/wpa/src/common/hw_features_common.c | 427 +- contrib/wpa/src/common/hw_features_common.h | 26 +- contrib/wpa/src/common/ieee802_11_common.c | 789 +- contrib/wpa/src/common/ieee802_11_common.h | 70 +- contrib/wpa/src/common/ieee802_11_defs.h | 249 +- contrib/wpa/src/common/linux_bridge.h | 39 + contrib/wpa/src/common/linux_vlan.h | 52 + contrib/wpa/src/common/ocv.c | 39 +- contrib/wpa/src/common/ocv.h | 13 +- contrib/wpa/src/common/privsep_commands.h | 1 + contrib/wpa/src/common/ptksa_cache.c | 321 + contrib/wpa/src/common/ptksa_cache.h | 79 + contrib/wpa/src/common/qca-vendor.h | 4187 ++++++- contrib/wpa/src/common/sae.c | 1387 ++- contrib/wpa/src/common/sae.h | 109 +- contrib/wpa/src/common/sae_pk.c | 884 ++ contrib/wpa/src/common/version.h | 2 +- contrib/wpa/src/common/wpa_common.c | 1240 +- contrib/wpa/src/common/wpa_common.h | 207 +- contrib/wpa/src/common/wpa_ctrl.c | 5 +- contrib/wpa/src/common/wpa_ctrl.h | 41 +- contrib/wpa/src/crypto/Makefile | 60 + contrib/wpa/src/crypto/crypto.h | 49 +- contrib/wpa/src/crypto/crypto_module_tests.c | 150 + contrib/wpa/src/crypto/crypto_openssl.c | 250 + contrib/wpa/src/crypto/crypto_wolfssl.c | 77 +- contrib/wpa/src/crypto/sha256.c | 6 +- contrib/wpa/src/crypto/sha384-tlsprf.c | 71 + contrib/wpa/src/crypto/sha384.c | 6 +- contrib/wpa/src/crypto/sha384.h | 3 + contrib/wpa/src/crypto/sha512.c | 6 +- contrib/wpa/src/crypto/tls.h | 14 + contrib/wpa/src/crypto/tls_openssl.c | 304 +- contrib/wpa/src/crypto/tls_wolfssl.c | 65 +- contrib/wpa/src/drivers/Makefile | 9 + contrib/wpa/src/drivers/android_drv.h | 56 + contrib/wpa/src/drivers/driver.h | 716 +- contrib/wpa/src/drivers/driver_atheros.c | 41 +- contrib/wpa/src/drivers/driver_bsd.c | 659 +- contrib/wpa/src/drivers/driver_common.c | 21 + contrib/wpa/src/drivers/driver_hostap.c | 24 +- contrib/wpa/src/drivers/driver_hostap.h | 210 + contrib/wpa/src/drivers/driver_macsec_linux.c | 87 +- contrib/wpa/src/drivers/driver_macsec_qca.c | 34 +- contrib/wpa/src/drivers/driver_ndis.c | 47 +- contrib/wpa/src/drivers/driver_nl80211.c | 12229 +++++++++++++++++++ contrib/wpa/src/drivers/driver_nl80211.h | 65 +- contrib/wpa/src/drivers/driver_nl80211_android.c | 4 +- contrib/wpa/src/drivers/driver_nl80211_capa.c | 579 +- contrib/wpa/src/drivers/driver_nl80211_event.c | 580 +- contrib/wpa/src/drivers/driver_nl80211_monitor.c | 3 + contrib/wpa/src/drivers/driver_nl80211_scan.c | 51 +- contrib/wpa/src/drivers/driver_none.c | 77 + contrib/wpa/src/drivers/driver_openbsd.c | 10 +- contrib/wpa/src/drivers/driver_privsep.c | 18 +- contrib/wpa/src/drivers/driver_roboswitch.c | 487 + contrib/wpa/src/drivers/driver_wext.c | 2499 ++++ contrib/wpa/src/drivers/driver_wext.h | 77 + contrib/wpa/src/drivers/drivers.mak | 220 + contrib/wpa/src/drivers/drivers.mk | 196 + contrib/wpa/src/drivers/linux_ioctl.c | 237 + contrib/wpa/src/drivers/linux_ioctl.h | 23 + contrib/wpa/src/drivers/linux_wext.h | 45 + contrib/wpa/src/drivers/netlink.c | 226 + contrib/wpa/src/drivers/netlink.h | 28 + contrib/wpa/src/drivers/nl80211_copy.h | 973 +- contrib/wpa/src/drivers/priv_netlink.h | 109 + contrib/wpa/src/drivers/rfkill.c | 224 + contrib/wpa/src/drivers/rfkill.h | 25 + contrib/wpa/src/eap_common/Makefile | 18 + contrib/wpa/src/eap_common/eap_common.c | 8 +- contrib/wpa/src/eap_common/eap_common.h | 8 +- contrib/wpa/src/eap_common/eap_defs.h | 4 +- contrib/wpa/src/eap_common/eap_sim_common.c | 28 + contrib/wpa/src/eap_common/eap_teap_common.c | 72 +- contrib/wpa/src/eap_common/eap_teap_common.h | 22 +- contrib/wpa/src/eap_peer/Makefile | 7 + contrib/wpa/src/eap_peer/eap.c | 220 +- contrib/wpa/src/eap_peer/eap.h | 13 +- contrib/wpa/src/eap_peer/eap_aka.c | 48 +- contrib/wpa/src/eap_peer/eap_config.h | 408 +- contrib/wpa/src/eap_peer/eap_eke.c | 16 +- contrib/wpa/src/eap_peer/eap_fast.c | 54 +- contrib/wpa/src/eap_peer/eap_gpsk.c | 14 +- contrib/wpa/src/eap_peer/eap_gtc.c | 8 +- contrib/wpa/src/eap_peer/eap_i.h | 42 +- contrib/wpa/src/eap_peer/eap_ikev2.c | 28 +- contrib/wpa/src/eap_peer/eap_leap.c | 44 +- contrib/wpa/src/eap_peer/eap_md5.c | 12 +- contrib/wpa/src/eap_peer/eap_methods.c | 12 +- contrib/wpa/src/eap_peer/eap_methods.h | 14 +- contrib/wpa/src/eap_peer/eap_mschapv2.c | 32 +- contrib/wpa/src/eap_peer/eap_otp.c | 8 +- contrib/wpa/src/eap_peer/eap_pax.c | 50 +- contrib/wpa/src/eap_peer/eap_peap.c | 71 +- contrib/wpa/src/eap_peer/eap_psk.c | 22 +- contrib/wpa/src/eap_peer/eap_pwd.c | 22 +- contrib/wpa/src/eap_peer/eap_sake.c | 26 +- contrib/wpa/src/eap_peer/eap_sim.c | 44 +- contrib/wpa/src/eap_peer/eap_teap.c | 201 +- contrib/wpa/src/eap_peer/eap_tls.c | 42 +- contrib/wpa/src/eap_peer/eap_tls_common.c | 103 +- contrib/wpa/src/eap_peer/eap_tls_common.h | 10 +- contrib/wpa/src/eap_peer/eap_tnc.c | 32 +- contrib/wpa/src/eap_peer/eap_ttls.c | 88 +- contrib/wpa/src/eap_peer/eap_vendor_test.c | 16 +- contrib/wpa/src/eap_peer/eap_wsc.c | 24 +- contrib/wpa/src/eap_peer/ikev2.c | 10 +- contrib/wpa/src/eap_peer/tncc.c | 5 +- contrib/wpa/src/eap_server/Makefile | 8 + contrib/wpa/src/eap_server/eap.h | 172 +- contrib/wpa/src/eap_server/eap_i.h | 67 +- contrib/wpa/src/eap_server/eap_methods.h | 9 +- contrib/wpa/src/eap_server/eap_server.c | 291 +- contrib/wpa/src/eap_server/eap_server_aka.c | 74 +- contrib/wpa/src/eap_server/eap_server_eke.c | 39 +- contrib/wpa/src/eap_server/eap_server_fast.c | 106 +- contrib/wpa/src/eap_server/eap_server_gpsk.c | 37 +- contrib/wpa/src/eap_server/eap_server_gtc.c | 12 +- contrib/wpa/src/eap_server/eap_server_identity.c | 14 +- contrib/wpa/src/eap_server/eap_server_ikev2.c | 22 +- contrib/wpa/src/eap_server/eap_server_md5.c | 14 +- contrib/wpa/src/eap_server/eap_server_methods.c | 10 +- contrib/wpa/src/eap_server/eap_server_mschapv2.c | 22 +- contrib/wpa/src/eap_server/eap_server_pax.c | 32 +- contrib/wpa/src/eap_server/eap_server_peap.c | 103 +- contrib/wpa/src/eap_server/eap_server_psk.c | 34 +- contrib/wpa/src/eap_server/eap_server_pwd.c | 22 +- contrib/wpa/src/eap_server/eap_server_sake.c | 38 +- contrib/wpa/src/eap_server/eap_server_sim.c | 66 +- contrib/wpa/src/eap_server/eap_server_teap.c | 309 +- contrib/wpa/src/eap_server/eap_server_tls.c | 54 +- contrib/wpa/src/eap_server/eap_server_tls_common.c | 93 +- contrib/wpa/src/eap_server/eap_server_tnc.c | 26 +- contrib/wpa/src/eap_server/eap_server_ttls.c | 96 +- .../wpa/src/eap_server/eap_server_vendor_test.c | 12 +- contrib/wpa/src/eap_server/eap_server_wsc.c | 32 +- contrib/wpa/src/eap_server/eap_tls_common.h | 2 +- contrib/wpa/src/eap_server/tncs.c | 5 +- contrib/wpa/src/eapol_auth/Makefile | 2 + contrib/wpa/src/eapol_auth/eapol_auth_sm.c | 206 +- contrib/wpa/src/eapol_auth/eapol_auth_sm.h | 26 +- contrib/wpa/src/eapol_auth/eapol_auth_sm_i.h | 40 +- contrib/wpa/src/eapol_supp/Makefile | 5 + contrib/wpa/src/eapol_supp/eapol_supp_sm.c | 218 +- contrib/wpa/src/eapol_supp/eapol_supp_sm.h | 29 +- contrib/wpa/src/fst/fst.c | 25 +- contrib/wpa/src/fst/fst.h | 23 +- contrib/wpa/src/fst/fst_ctrl_aux.h | 4 +- contrib/wpa/src/fst/fst_ctrl_iface.c | 48 +- contrib/wpa/src/fst/fst_ctrl_iface.h | 2 +- contrib/wpa/src/fst/fst_group.c | 10 +- contrib/wpa/src/fst/fst_group.h | 4 +- contrib/wpa/src/fst/fst_iface.c | 8 +- contrib/wpa/src/fst/fst_iface.h | 8 +- contrib/wpa/src/fst/fst_session.c | 96 +- contrib/wpa/src/fst/fst_session.h | 12 +- contrib/wpa/src/l2_packet/Makefile | 3 + contrib/wpa/src/l2_packet/l2_packet.h | 4 + contrib/wpa/src/l2_packet/l2_packet_freebsd.c | 5 +- contrib/wpa/src/l2_packet/l2_packet_linux.c | 515 + contrib/wpa/src/l2_packet/l2_packet_ndis.c | 3 +- contrib/wpa/src/l2_packet/l2_packet_none.c | 4 +- contrib/wpa/src/l2_packet/l2_packet_pcap.c | 400 + contrib/wpa/src/l2_packet/l2_packet_privsep.c | 3 +- contrib/wpa/src/l2_packet/l2_packet_winpcap.c | 350 + contrib/wpa/src/lib.rules | 29 + contrib/wpa/src/objs.mk | 3 + contrib/wpa/src/p2p/Makefile | 16 + contrib/wpa/src/p2p/p2p.c | 147 +- contrib/wpa/src/p2p/p2p.h | 31 +- contrib/wpa/src/p2p/p2p_go_neg.c | 9 + contrib/wpa/src/p2p/p2p_i.h | 5 + contrib/wpa/src/p2p/p2p_invitation.c | 5 +- contrib/wpa/src/p2p/p2p_utils.c | 39 + contrib/wpa/src/pae/ieee802_1x_cp.c | 177 +- contrib/wpa/src/pae/ieee802_1x_cp.h | 10 +- contrib/wpa/src/pae/ieee802_1x_kay.c | 608 +- contrib/wpa/src/pae/ieee802_1x_kay.h | 68 +- contrib/wpa/src/pae/ieee802_1x_kay_i.h | 40 +- contrib/wpa/src/pae/ieee802_1x_secy_ops.c | 22 +- contrib/wpa/src/pae/ieee802_1x_secy_ops.h | 8 +- contrib/wpa/src/radius/Makefile | 9 + contrib/wpa/src/radius/radius.c | 2 +- contrib/wpa/src/radius/radius.h | 3 + contrib/wpa/src/radius/radius_client.c | 55 +- contrib/wpa/src/radius/radius_client.h | 5 + contrib/wpa/src/radius/radius_server.c | 283 +- contrib/wpa/src/radius/radius_server.h | 142 +- contrib/wpa/src/rsn_supp/Makefile | 14 + contrib/wpa/src/rsn_supp/pmksa_cache.c | 54 +- contrib/wpa/src/rsn_supp/pmksa_cache.h | 7 +- contrib/wpa/src/rsn_supp/preauth.c | 24 +- contrib/wpa/src/rsn_supp/tdls.c | 71 +- contrib/wpa/src/rsn_supp/wpa.c | 759 +- contrib/wpa/src/rsn_supp/wpa.h | 93 +- contrib/wpa/src/rsn_supp/wpa_ft.c | 399 +- contrib/wpa/src/rsn_supp/wpa_i.h | 88 +- contrib/wpa/src/rsn_supp/wpa_ie.c | 317 +- contrib/wpa/src/rsn_supp/wpa_ie.h | 52 +- contrib/wpa/src/tls/Makefile | 25 + contrib/wpa/src/tls/asn1.c | 396 +- contrib/wpa/src/tls/asn1.h | 146 +- contrib/wpa/src/tls/pkcs1.c | 55 +- contrib/wpa/src/tls/pkcs5.c | 78 +- contrib/wpa/src/tls/pkcs8.c | 59 +- contrib/wpa/src/tls/rsa.c | 23 +- contrib/wpa/src/tls/tlsv1_client.c | 29 +- contrib/wpa/src/tls/tlsv1_client_i.h | 4 +- contrib/wpa/src/tls/tlsv1_client_ocsp.c | 180 +- contrib/wpa/src/tls/tlsv1_client_read.c | 10 +- contrib/wpa/src/tls/tlsv1_client_write.c | 18 +- contrib/wpa/src/tls/tlsv1_cred.c | 247 +- contrib/wpa/src/tls/x509v3.c | 419 +- contrib/wpa/src/tls/x509v3.h | 7 + contrib/wpa/src/utils/Makefile | 30 + contrib/wpa/src/utils/base64.c | 59 +- contrib/wpa/src/utils/base64.h | 13 +- contrib/wpa/src/utils/browser-android.c | 2 +- contrib/wpa/src/utils/browser-system.c | 2 +- contrib/wpa/src/utils/browser-wpadebug.c | 2 +- contrib/wpa/src/utils/browser.c | 210 +- contrib/wpa/src/utils/browser.h | 4 +- contrib/wpa/src/utils/build_config.h | 4 +- contrib/wpa/src/utils/common.c | 38 +- contrib/wpa/src/utils/common.h | 8 +- contrib/wpa/src/utils/config.c | 97 + contrib/wpa/src/utils/config.h | 29 + contrib/wpa/src/utils/eloop.c | 47 +- contrib/wpa/src/utils/eloop_win.c | 8 +- contrib/wpa/src/utils/ext_password.c | 3 + contrib/wpa/src/utils/ext_password_file.c | 136 + contrib/wpa/src/utils/ext_password_i.h | 4 + contrib/wpa/src/utils/http-utils.h | 6 +- contrib/wpa/src/utils/includes.h | 1 + contrib/wpa/src/utils/json.c | 122 +- contrib/wpa/src/utils/json.h | 15 + contrib/wpa/src/utils/list.h | 8 +- contrib/wpa/src/utils/os_internal.c | 6 + contrib/wpa/src/utils/os_unix.c | 46 +- contrib/wpa/src/utils/platform.h | 23 +- contrib/wpa/src/utils/radiotap.c | 12 +- contrib/wpa/src/utils/radiotap.h | 407 +- contrib/wpa/src/utils/state_machine.h | 8 +- contrib/wpa/src/utils/trace.c | 11 + contrib/wpa/src/utils/utils_module_tests.c | 39 +- contrib/wpa/src/utils/wpa_debug.c | 147 +- contrib/wpa/src/utils/wpa_debug.h | 3 - contrib/wpa/src/utils/wpabuf.h | 27 + contrib/wpa/src/utils/xml_libxml2.c | 2 +- contrib/wpa/src/wps/Makefile | 28 + contrib/wpa/src/wps/upnp_xml.c | 2 +- contrib/wpa/src/wps/wps.h | 23 +- contrib/wpa/src/wps/wps_attr_build.c | 15 +- contrib/wpa/src/wps/wps_attr_process.c | 9 +- contrib/wpa/src/wps/wps_dev_attr.c | 17 + contrib/wpa/src/wps/wps_dev_attr.h | 1 + contrib/wpa/src/wps/wps_enrollee.c | 11 + contrib/wpa/src/wps/wps_er.c | 4 +- contrib/wpa/src/wps/wps_registrar.c | 139 +- contrib/wpa/src/wps/wps_upnp.c | 28 +- contrib/wpa/src/wps/wps_upnp_ap.c | 4 +- contrib/wpa/src/wps/wps_upnp_event.c | 27 +- contrib/wpa/src/wps/wps_upnp_i.h | 9 +- contrib/wpa/src/wps/wps_upnp_web.c | 4 +- contrib/wpa/wpa_supplicant/Android.mk | 114 +- contrib/wpa/wpa_supplicant/ChangeLog | 10 +- contrib/wpa/wpa_supplicant/Makefile | 2073 ++++ contrib/wpa/wpa_supplicant/README | 4 +- contrib/wpa/wpa_supplicant/README-DPP | 71 +- contrib/wpa/wpa_supplicant/README-HS20 | 2 +- contrib/wpa/wpa_supplicant/android.config | 16 +- contrib/wpa/wpa_supplicant/ap.c | 257 +- contrib/wpa/wpa_supplicant/binder/binder.h | 2 +- contrib/wpa/wpa_supplicant/bss.c | 145 +- contrib/wpa/wpa_supplicant/bss.h | 25 +- contrib/wpa/wpa_supplicant/bssid_ignore.c | 221 + contrib/wpa/wpa_supplicant/bssid_ignore.h | 33 + contrib/wpa/wpa_supplicant/config.c | 644 +- contrib/wpa/wpa_supplicant/config.h | 129 +- contrib/wpa/wpa_supplicant/config_file.c | 243 +- contrib/wpa/wpa_supplicant/config_ssid.h | 155 +- contrib/wpa/wpa_supplicant/config_winreg.c | 1061 ++ contrib/wpa/wpa_supplicant/ctrl_iface.c | 1375 ++- contrib/wpa/wpa_supplicant/ctrl_iface.h | 16 +- contrib/wpa/wpa_supplicant/ctrl_iface_named_pipe.c | 7 +- contrib/wpa/wpa_supplicant/ctrl_iface_udp.c | 63 +- contrib/wpa/wpa_supplicant/ctrl_iface_unix.c | 73 +- contrib/wpa/wpa_supplicant/dbus/dbus_common.c | 23 +- contrib/wpa/wpa_supplicant/dbus/dbus_new.c | 76 +- .../wpa/wpa_supplicant/dbus/dbus_new_handlers.c | 424 +- .../wpa/wpa_supplicant/dbus/dbus_new_handlers.h | 6 + .../wpa_supplicant/dbus/dbus_new_handlers_p2p.c | 84 +- .../wpa/wpa_supplicant/dbus/dbus_new_introspect.c | 2 +- contrib/wpa/wpa_supplicant/defconfig | 45 +- contrib/wpa/wpa_supplicant/doc/docbook/Makefile | 28 + .../wpa/wpa_supplicant/doc/docbook/eapol_test.sgml | 209 + .../wpa_supplicant/doc/docbook/wpa_background.sgml | 105 + .../wpa/wpa_supplicant/doc/docbook/wpa_cli.sgml | 360 + .../wpa/wpa_supplicant/doc/docbook/wpa_gui.sgml | 106 + .../wpa_supplicant/doc/docbook/wpa_passphrase.sgml | 77 + .../wpa/wpa_supplicant/doc/docbook/wpa_priv.sgml | 152 + .../doc/docbook/wpa_supplicant.conf.sgml | 243 + .../wpa_supplicant/doc/docbook/wpa_supplicant.sgml | 764 ++ contrib/wpa/wpa_supplicant/dpp_supplicant.c | 1808 ++- contrib/wpa/wpa_supplicant/dpp_supplicant.h | 15 + contrib/wpa/wpa_supplicant/driver_i.h | 109 +- contrib/wpa/wpa_supplicant/eapol_test.c | 15 +- contrib/wpa/wpa_supplicant/events.c | 1537 ++- contrib/wpa/wpa_supplicant/examples/dpp-nfc.py | 1186 ++ .../wpa_supplicant/examples/p2p-action-udhcp.sh | 4 +- contrib/wpa/wpa_supplicant/examples/p2p-action.sh | 4 +- .../wpa/wpa_supplicant/examples/p2p/p2p_connect.py | 18 +- .../wpa_supplicant/examples/p2p/p2p_disconnect.py | 2 +- .../wpa/wpa_supplicant/examples/p2p/p2p_find.py | 2 +- .../wpa/wpa_supplicant/examples/p2p/p2p_flush.py | 2 +- .../wpa_supplicant/examples/p2p/p2p_group_add.py | 14 +- .../wpa/wpa_supplicant/examples/p2p/p2p_invite.py | 10 +- .../wpa/wpa_supplicant/examples/p2p/p2p_listen.py | 2 +- .../wpa_supplicant/examples/p2p/p2p_stop_find.py | 2 +- .../wpa/wpa_supplicant/examples/udhcpd-p2p.conf | 12 +- contrib/wpa/wpa_supplicant/gas_query.c | 62 +- contrib/wpa/wpa_supplicant/gas_query.h | 2 +- contrib/wpa/wpa_supplicant/hs20_supplicant.c | 30 +- contrib/wpa/wpa_supplicant/ibss_rsn.c | 45 +- contrib/wpa/wpa_supplicant/interworking.c | 66 +- contrib/wpa/wpa_supplicant/interworking.h | 2 +- contrib/wpa/wpa_supplicant/main.c | 10 +- contrib/wpa/wpa_supplicant/main_winmain.c | 78 + contrib/wpa/wpa_supplicant/main_winsvc.c | 458 + contrib/wpa/wpa_supplicant/mbo.c | 30 + contrib/wpa/wpa_supplicant/mesh.c | 243 +- contrib/wpa/wpa_supplicant/mesh.h | 6 +- contrib/wpa/wpa_supplicant/mesh_mpm.c | 49 +- contrib/wpa/wpa_supplicant/mesh_rsn.c | 27 +- contrib/wpa/wpa_supplicant/nmake.mak | 2 +- contrib/wpa/wpa_supplicant/notify.c | 10 +- contrib/wpa/wpa_supplicant/offchannel.c | 6 +- contrib/wpa/wpa_supplicant/op_classes.c | 239 +- contrib/wpa/wpa_supplicant/p2p_supplicant.c | 667 +- contrib/wpa/wpa_supplicant/p2p_supplicant.h | 32 +- contrib/wpa/wpa_supplicant/pasn_supplicant.c | 1714 +++ contrib/wpa/wpa_supplicant/preauth_test.c | 20 +- contrib/wpa/wpa_supplicant/robust_av.c | 155 + contrib/wpa/wpa_supplicant/rrm.c | 91 +- contrib/wpa/wpa_supplicant/scan.c | 703 +- contrib/wpa/wpa_supplicant/scan.h | 33 + contrib/wpa/wpa_supplicant/sme.c | 531 +- contrib/wpa/wpa_supplicant/sme.h | 8 +- .../systemd/wpa_supplicant-nl80211.service.arg.in | 2 +- .../systemd/wpa_supplicant-wired.service.arg.in | 2 +- .../systemd/wpa_supplicant.service.arg.in | 2 +- contrib/wpa/wpa_supplicant/twt.c | 142 + .../vs2005/eapol_test/eapol_test.vcproj | 6 +- .../vs2005/wpa_supplicant/wpa_supplicant.vcproj | 6 +- .../wpa/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj | 6 +- contrib/wpa/wpa_supplicant/wmm_ac.c | 2 +- contrib/wpa/wpa_supplicant/wnm_sta.c | 33 +- contrib/wpa/wpa_supplicant/wpa_cli.c | 339 +- contrib/wpa/wpa_supplicant/wpa_passphrase.c | 8 +- contrib/wpa/wpa_supplicant/wpa_priv.c | 32 +- contrib/wpa/wpa_supplicant/wpa_supplicant.c | 1283 +- contrib/wpa/wpa_supplicant/wpa_supplicant.conf | 196 +- contrib/wpa/wpa_supplicant/wpa_supplicant_i.h | 249 +- contrib/wpa/wpa_supplicant/wpas_glue.c | 222 +- contrib/wpa/wpa_supplicant/wpas_glue.h | 2 + contrib/wpa/wpa_supplicant/wpas_kay.c | 12 +- contrib/wpa/wpa_supplicant/wpas_module_tests.c | 85 +- contrib/wpa/wpa_supplicant/wps_supplicant.c | 85 +- contrib/wpa/wpa_supplicant/wps_supplicant.h | 5 + usr.sbin/wpa/Makefile.crypto | 1 + usr.sbin/wpa/Makefile.inc | 5 +- usr.sbin/wpa/hostapd/Makefile | 2 - usr.sbin/wpa/src/ap/Makefile | 9 +- usr.sbin/wpa/src/common/Makefile | 3 + usr.sbin/wpa/src/crypto/Makefile | 5 +- usr.sbin/wpa/src/rsn_supp/Makefile | 4 - usr.sbin/wpa/src/utils/Makefile | 2 + usr.sbin/wpa/wpa_supplicant/Makefile | 7 +- 504 files changed, 92633 insertions(+), 20540 deletions(-) diff --cc contrib/wpa/hostapd/Android.mk index 000000000000,dd8aa2450d7e..dd8aa2450d7e mode 000000,100644..100644 --- a/contrib/wpa/hostapd/Android.mk +++ b/contrib/wpa/hostapd/Android.mk diff --cc contrib/wpa/hostapd/Makefile index 000000000000,ac085fd10520..ac085fd10520 mode 000000,100644..100644 --- a/contrib/wpa/hostapd/Makefile +++ b/contrib/wpa/hostapd/Makefile diff --cc contrib/wpa/hostapd/android.config index 000000000000,c8b3afabef8d..c8b3afabef8d mode 000000,100644..100644 --- a/contrib/wpa/hostapd/android.config +++ b/contrib/wpa/hostapd/android.config diff --cc contrib/wpa/hostapd/hostapd.android.rc index 000000000000,26a87b808914..26a87b808914 mode 000000,100644..100644 --- a/contrib/wpa/hostapd/hostapd.android.rc +++ b/contrib/wpa/hostapd/hostapd.android.rc diff --cc contrib/wpa/hostapd/sae_pk_gen.c index 000000000000,c31eff75b538..c31eff75b538 mode 000000,100644..100644 --- a/contrib/wpa/hostapd/sae_pk_gen.c +++ b/contrib/wpa/hostapd/sae_pk_gen.c diff --cc contrib/wpa/hs20/server/Makefile index 000000000000,0cab6d6b010a..0cab6d6b010a mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/Makefile +++ b/contrib/wpa/hs20/server/Makefile diff --cc contrib/wpa/hs20/server/ca/clean.sh index 000000000000,c72dcbda45e9..c72dcbda45e9 mode 000000,100755..100755 --- a/contrib/wpa/hs20/server/ca/clean.sh +++ b/contrib/wpa/hs20/server/ca/clean.sh diff --cc contrib/wpa/hs20/server/ca/est-csrattrs.cnf index 000000000000,b50ea00d0b77..b50ea00d0b77 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/ca/est-csrattrs.cnf +++ b/contrib/wpa/hs20/server/ca/est-csrattrs.cnf diff --cc contrib/wpa/hs20/server/ca/est-csrattrs.sh index 000000000000,0b73a0408284..0b73a0408284 mode 000000,100755..100755 --- a/contrib/wpa/hs20/server/ca/est-csrattrs.sh +++ b/contrib/wpa/hs20/server/ca/est-csrattrs.sh diff --cc contrib/wpa/hs20/server/ca/hs20.oid index 000000000000,a829ff29bf44..a829ff29bf44 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/ca/hs20.oid +++ b/contrib/wpa/hs20/server/ca/hs20.oid diff --cc contrib/wpa/hs20/server/ca/ocsp-req.sh index 000000000000,931a20696d02..931a20696d02 mode 000000,100755..100755 --- a/contrib/wpa/hs20/server/ca/ocsp-req.sh +++ b/contrib/wpa/hs20/server/ca/ocsp-req.sh diff --cc contrib/wpa/hs20/server/ca/ocsp-responder-ica.sh index 000000000000,116c6e1c3d01..116c6e1c3d01 mode 000000,100755..100755 --- a/contrib/wpa/hs20/server/ca/ocsp-responder-ica.sh +++ b/contrib/wpa/hs20/server/ca/ocsp-responder-ica.sh diff --cc contrib/wpa/hs20/server/ca/ocsp-responder.sh index 000000000000,620947d01af0..620947d01af0 mode 000000,100755..100755 --- a/contrib/wpa/hs20/server/ca/ocsp-responder.sh +++ b/contrib/wpa/hs20/server/ca/ocsp-responder.sh diff --cc contrib/wpa/hs20/server/ca/ocsp-update-cache.sh index 000000000000,f2b23250cadd..f2b23250cadd mode 000000,100755..100755 --- a/contrib/wpa/hs20/server/ca/ocsp-update-cache.sh +++ b/contrib/wpa/hs20/server/ca/ocsp-update-cache.sh diff --cc contrib/wpa/hs20/server/ca/openssl-root.cnf index 000000000000,5bc50be1dbc9..5bc50be1dbc9 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/ca/openssl-root.cnf +++ b/contrib/wpa/hs20/server/ca/openssl-root.cnf diff --cc contrib/wpa/hs20/server/ca/openssl.cnf index 000000000000,61410138340f..61410138340f mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/ca/openssl.cnf +++ b/contrib/wpa/hs20/server/ca/openssl.cnf diff --cc contrib/wpa/hs20/server/ca/setup.sh index 000000000000,78abcccff455..78abcccff455 mode 000000,100755..100755 --- a/contrib/wpa/hs20/server/ca/setup.sh +++ b/contrib/wpa/hs20/server/ca/setup.sh diff --cc contrib/wpa/hs20/server/ca/w1fi_logo.png index 000000000000,ac7c259fff2e..ac7c259fff2e mode 000000,100644..100644 Binary files differ diff --cc contrib/wpa/hs20/server/hs20-osu-server.txt index 000000000000,22478ad9d2cb..22478ad9d2cb mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/hs20-osu-server.txt +++ b/contrib/wpa/hs20/server/hs20-osu-server.txt diff --cc contrib/wpa/hs20/server/hs20_spp_server.c index 000000000000,347c40a73d6a..347c40a73d6a mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/hs20_spp_server.c +++ b/contrib/wpa/hs20/server/hs20_spp_server.c diff --cc contrib/wpa/hs20/server/spp_server.c index 000000000000,a50e9074f7b4..a50e9074f7b4 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/spp_server.c +++ b/contrib/wpa/hs20/server/spp_server.c diff --cc contrib/wpa/hs20/server/spp_server.h index 000000000000,421974c607b8..421974c607b8 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/spp_server.h +++ b/contrib/wpa/hs20/server/spp_server.h diff --cc contrib/wpa/hs20/server/sql-example.txt index 000000000000,20dcf2f5c688..20dcf2f5c688 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/sql-example.txt +++ b/contrib/wpa/hs20/server/sql-example.txt diff --cc contrib/wpa/hs20/server/sql.txt index 000000000000,2cc6edea4063..2cc6edea4063 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/sql.txt +++ b/contrib/wpa/hs20/server/sql.txt diff --cc contrib/wpa/hs20/server/www/add-free.php index 000000000000,1efc65563274..1efc65563274 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/add-free.php +++ b/contrib/wpa/hs20/server/www/add-free.php diff --cc contrib/wpa/hs20/server/www/add-mo.php index 000000000000,a3b4513531f8..a3b4513531f8 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/add-mo.php +++ b/contrib/wpa/hs20/server/www/add-mo.php diff --cc contrib/wpa/hs20/server/www/cert-enroll.php index 000000000000,f023ca5a5b03..f023ca5a5b03 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/cert-enroll.php +++ b/contrib/wpa/hs20/server/www/cert-enroll.php diff --cc contrib/wpa/hs20/server/www/config.php index 000000000000,4272b102a88c..4272b102a88c mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/config.php +++ b/contrib/wpa/hs20/server/www/config.php diff --cc contrib/wpa/hs20/server/www/est.php index 000000000000,b7fb260d56c4..b7fb260d56c4 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/est.php +++ b/contrib/wpa/hs20/server/www/est.php diff --cc contrib/wpa/hs20/server/www/free-remediation.php index 000000000000,5648b30e8d6b..5648b30e8d6b mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/free-remediation.php +++ b/contrib/wpa/hs20/server/www/free-remediation.php diff --cc contrib/wpa/hs20/server/www/free.php index 000000000000,8195069ed8ff..8195069ed8ff mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/free.php +++ b/contrib/wpa/hs20/server/www/free.php diff --cc contrib/wpa/hs20/server/www/redirect.php index 000000000000,8fc9cd644273..8fc9cd644273 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/redirect.php +++ b/contrib/wpa/hs20/server/www/redirect.php diff --cc contrib/wpa/hs20/server/www/remediation-pw.php index 000000000000,76fdccbdf9f7..76fdccbdf9f7 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/remediation-pw.php +++ b/contrib/wpa/hs20/server/www/remediation-pw.php diff --cc contrib/wpa/hs20/server/www/remediation.php index 000000000000,3628065ac225..3628065ac225 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/remediation.php +++ b/contrib/wpa/hs20/server/www/remediation.php diff --cc contrib/wpa/hs20/server/www/signup.php index 000000000000,80a9d403e8fc..80a9d403e8fc mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/signup.php +++ b/contrib/wpa/hs20/server/www/signup.php diff --cc contrib/wpa/hs20/server/www/spp.php index 000000000000,c56d3d69e0ed..c56d3d69e0ed mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/spp.php +++ b/contrib/wpa/hs20/server/www/spp.php diff --cc contrib/wpa/hs20/server/www/terms.php index 000000000000,acba23ef1ad7..acba23ef1ad7 mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/terms.php +++ b/contrib/wpa/hs20/server/www/terms.php diff --cc contrib/wpa/hs20/server/www/users.php index 000000000000,2bd555275dda..2bd555275dda mode 000000,100644..100644 --- a/contrib/wpa/hs20/server/www/users.php +++ b/contrib/wpa/hs20/server/www/users.php diff --cc contrib/wpa/src/Makefile index 000000000000,6eb7f2acb5a1..6eb7f2acb5a1 mode 000000,100644..100644 --- a/contrib/wpa/src/Makefile +++ b/contrib/wpa/src/Makefile diff --cc contrib/wpa/src/ap/Makefile index 000000000000,a1e9b7c44d2f..a1e9b7c44d2f mode 000000,100644..100644 --- a/contrib/wpa/src/ap/Makefile +++ b/contrib/wpa/src/ap/Makefile diff --cc contrib/wpa/src/build.rules index 000000000000,acda8847284d..acda8847284d mode 000000,100644..100644 --- a/contrib/wpa/src/build.rules +++ b/contrib/wpa/src/build.rules diff --cc contrib/wpa/src/common/Makefile index 000000000000,e2c5f03c2c3b..e2c5f03c2c3b mode 000000,100644..100644 --- a/contrib/wpa/src/common/Makefile +++ b/contrib/wpa/src/common/Makefile diff --cc contrib/wpa/src/common/brcm_vendor.h index 000000000000,f163dea73768..f163dea73768 mode 000000,100644..100644 --- a/contrib/wpa/src/common/brcm_vendor.h +++ b/contrib/wpa/src/common/brcm_vendor.h diff --cc contrib/wpa/src/common/dhcp.h index ff52483b12eb,000000000000..c7f0617dd928 mode 100644,000000..100644 --- a/contrib/wpa/src/common/dhcp.h +++ b/contrib/wpa/src/common/dhcp.h @@@ -1,281 -1,0 +1,281 @@@ +/* + * DHCP definitions + * Copyright (c) 2014-2017, Qualcomm Atheros, Inc. + * + * This software may be distributed under the terms of the BSD license. + * See README for more details. + */ + +#ifndef DHCP_H +#define DHCP_H + +#if defined(__FreeBSD__) +/* + * Translate Linux to FreeBSD + */ +#define iphdr ip +#define ihl ip_hl +#define verson ip_v +#define tos ip_tos +#define tot_len ip_len +#define id ip_id +#define frag_off ip_off +#define ttl ip_ttl +#define protocol ip_p +#define check ip_sum +#define saddr ip_src +#define daddr ip_dst +#endif + +#include +#if __FAVOR_BSD +#include +#else +#define __FAVOR_BSD 1 +#include +#undef __FAVOR_BSD +#endif + +#define DHCP_SERVER_PORT 67 +#define DHCP_CLIENT_PORT 68 + +struct dhcp_data { + u8 op; + u8 htype; + u8 hlen; + u8 hops; + be32 xid; + be16 secs; + be16 flags; + be32 client_ip; + be32 your_ip; + be32 server_ip; + be32 relay_ip; + u8 hw_addr[16]; + u8 serv_name[64]; + u8 boot_file[128]; +} STRUCT_PACKED; + +struct bootp_pkt { - struct iphdr iph; ++ struct ip iph; + struct udphdr udph; + u8 op; + u8 htype; + u8 hlen; + u8 hops; + be32 xid; + be16 secs; + be16 flags; + be32 client_ip; + be32 your_ip; + be32 server_ip; + be32 relay_ip; + u8 hw_addr[16]; + u8 serv_name[64]; + u8 boot_file[128]; + u8 exten[312]; +} STRUCT_PACKED; + +#define DHCP_MAGIC 0x63825363 + +/* + * IANA DHCP/BOOTP registry + * http://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml +*/ +enum dhcp_options { + DHCP_OPT_PAD = 0, + DHCP_OPT_SUBNET_MASK = 1, + DHCP_OPT_TIME_OFFSET = 2, + DHCP_OPT_ROUTER = 3, + DHCP_OPT_TIME_SERVER = 4, + DHCP_OPT_NAME_SERVER = 5, + DHCP_OPT_DOMAIN_NAME_SERVER = 6, + DHCP_OPT_LOG_SERVER = 7, + DHCP_OPT_QUOTES_SERVER = 8, + DHCP_OPT_LPR_SERVER = 9, + DHCP_OPT_IMPRESS_SERVER = 10, + DHCP_OPT_RLP_SERVER = 11, + DHCP_OPT_HOSTNAME = 12, + DHCP_OPT_BOOT_FILE_SIZE = 13, + DHCP_OPT_MERIT_DUMP_FILE = 14, + DHCP_OPT_DOMAIN_NAME = 15, + DHCP_OPT_SWAP_SERVER = 16, + DHCP_OPT_ROOT_PATH = 17, + DHCP_OPT_EXTENSION_PATH = 18, + DHCP_OPT_FORWARD = 19, + DHCP_OPT_SRC_RTE = 20, + DHCP_OPT_POLICY_FILTER = 21, + DHCP_OPT_MAX_DG_ASSEMBLY = 22, + DHCP_OPT_DEFAULT_IP_TTL = 23, + DHCP_OPT_MTU_TIMEOUT = 24, + DHCP_OPT_MTU_PLATEAU = 25, + DHCP_OPT_MTU_INTERFACE = 26, + DHCP_OPT_ALL_SUBNETS_LOCAL = 27, + DHCP_OPT_BROADCAST_ADDRESS = 28, + DHCP_OPT_MASK_DISCOVERY = 29, + DHCP_OPT_MASK_SUPPLIER = 30, + DHCP_OPT_ROUTER_DISCOVERY = 31, + DHCP_OPT_ROUTER_SOLICITATION_ADDRESS = 32, + DHCP_OPT_STATIC_ROUTE = 33, + DHCP_OPT_TRAILERS = 34, + DHCP_OPT_ARP_TIMEOUT = 35, + DHCP_OPT_ETHERNET = 36, + DHCP_OPT_TCP_DEFAULT_TTL = 37, + DHCP_OPT_TCP_KEEPALIVE_INTERVAL = 38, + DHCP_OPT_TCP_KEEPALIVE_GARBAGE = 39, + DHCP_OPT_NIS_DOMAIN = 40, + DHCP_OPT_NIS_SERVERS = 41, + DHCP_OPT_NTP_SERVERS = 42, + DHCP_OPT_VENDOR_SPECIFIC = 43, + DHCP_OPT_NETBIOS_NAME_SERVER = 44, + DHCP_OPT_NETBIOS_DISTRIBUTION_SERVER = 45, + DHCP_OPT_NETBIOS_NODE_TYPE = 46, + DHCP_OPT_NETBIOS_SCOPE = 47, + DHCP_OPT_FONT_SERVER = 48, + DHCP_OPT_DISPLAY_MANAGER = 49, + DHCP_OPT_REQUESTED_IP_ADDRESS = 50, + DHCP_OPT_IP_ADDRESS_LEASE_TIME = 51, + DHCP_OPT_OVERLOAD = 52, + DHCP_OPT_MSG_TYPE = 53, + DHCP_OPT_SERVER_ID = 54, + DHCP_OPT_PARAMETER_REQ_LIST = 55, + DHCP_OPT_MESSAGE = 56, + DHCP_OPT_MAX_MESSAGE_SIZE = 57, + DHCP_OPT_RENEWAL_TIME = 58, + DHCP_OPT_REBINDING_TIME = 59, + DHCP_OPT_VENDOR_CLASS_ID = 60, + DHCP_OPT_CLIENT_ID = 61, + DHCP_OPT_NETWARE_IP_DOMAIN = 62, + DHCP_OPT_NETWARE_IP_OPTION = 63, + DHCP_OPT_NIS_V3_DOMAIN = 64, + DHCP_OPT_NIS_V3_SERVERS = 65, + DHCP_OPT_TFTP_SERVER_NAME = 66, + DHCP_OPT_BOOT_FILE_NAME = 67, + DHCP_OPT_HOME_AGENT_ADDRESSES = 68, + DHCP_OPT_SMTP_SERVER = 69, + DHCP_OPT_POP3_SERVER = 70, + DHCP_OPT_NNTP_SERVER = 71, + DHCP_OPT_WWW_SERVER = 72, + DHCP_OPT_FINGER_SERVER = 73, + DHCP_OPT_IRC_SERVER = 74, + DHCP_OPT_STREETTALK_SERVER = 75, + DHCP_OPT_STDA_SERVER = 76, + DHCP_OPT_USER_CLASS = 77, + DHCP_OPT_DIRECTORY_AGENT = 78, + DHCP_OPT_SERVICE_SCOPE = 79, + DHCP_OPT_RAPID_COMMIT = 80, + DHCP_OPT_CLIENT_FQDN = 81, + DHCP_OPT_RELAY_AGENT_INFO = 82, + DHCP_OPT_ISNS = 83, + DHCP_OPT_NDS_SERVERS = 85, + DHCP_OPT_NDS_TREE_NAME = 86, + DHCP_OPT_NDS_CONTEXT = 87, + DHCP_OPT_BCMCS_CONTROLLER_DOMAIN_NAME_LIST = 88, + DHCP_OPT_BCMCS_CONTROLLER_IPV4_ADDRESS = 89, + DHCP_OPT_AUTHENTICATION = 90, + DHCP_OPT_CLIENT_LAST_TRANSACTION_TIME = 91, + DHCP_OPT_ASSOCIATED_IP = 92, + DHCP_OPT_CLIENT_SYSYEM = 93, + DHCP_OPT_CLIENT_NDI = 94, + DHCP_OPT_LDAP = 95, + DHCP_OPT_UUID_GUID = 97, + DHCP_OPT_USER_AUTH = 98, + DHCP_OPT_GEOCONF_CIVIC = 99, + DHCP_OPT_PCODE = 100, + DHCP_OPT_TCODE = 101, + DHCP_OPT_NETINFO_ADDRESS = 112, + DHCP_OPT_NETINFO_TAG = 113, + DHCP_OPT_URL = 114, + DHCP_OPT_AUTO_CONFIG = 116, + DHCP_OPT_NAME_SERVICE_SEARCH = 117, + DHCP_OPT_SUBNET_SELECTION = 118, + DHCP_OPT_DOMAIN_SEARCH = 119, + DHCP_OPT_SIP_SERVERS_DCP = 120, + DHCP_OPT_CLASSLESS_STATIC_ROUTE = 121, + DHCP_OPT_CCC = 122, + DHCP_OPT_GEOCONF = 123, + DHCP_OPT_V_I_VENDOR_CLASS = 124, + DHCP_OPT_V_I_VENDOR_SPECIFIC_INFO = 125, + DHCP_OPT_PANA_AGENT = 136, + DHCP_OPT_V4_LOST = 137, + DHCP_OPT_CAPWAP_AC_V4 = 138, + DHCP_OPT_IPV4_ADDRESS_MOS = 139, + DHCP_OPT_IPV4_FQDN_MOS = 140, + DHCP_OPT_SIP_UA_CONF = 141, + DHCP_OPT_IPV4_ADDRESS_ANDSF = 142, + DHCP_OPT_GEOLOC = 144, + DHCP_OPT_FORCERENEW_NONCE_CAPABLE = 145, + DHCP_OPT_RDNSS_SELECTION = 146, + DHCP_OPT_TFTP_SERVER_ADDRESS = 150, + DHCP_OPT_STATUS_CODE = 151, + DHCP_OPT_BASE_TIME = 152, + DHCP_OPT_START_TIME_OF_STATE = 153, + DHCP_OPT_QUERY_START_TIME = 154, + DHCP_OPT_QUERY_END_TIME = 155, + DHCP_OPT_STATE = 156, + DHCP_OPT_DATA_SOURCE = 157, + DHCP_OPT_V4_PCP_SERVER = 158, + DHCP_OPT_V4_PORTPARAMS = 159, + DHCP_OPT_CAPTIVE_PORTAL = 160, + DHCP_OPT_CONF_FILE = 209, + DHCP_OPT_PATH_PREFIX = 210, + DHCP_OPT_REBOOT_TIME = 211, + DHCP_OPT_6RD = 212, + DHCP_OPT_V4_ACCESS_DOMAIN = 213, + DHCP_OPT_SUBNET_ALLOCATION = 220, + DHCP_OPT_VSS = 221, + DHCP_OPT_END = 255 +}; + +enum dhcp_message_types { + DHCPDISCOVER = 1, + DHCPOFFER = 2, + DHCPREQUEST = 3, + DHCPDECLINE = 4, + DHCPACK = 5, + DHCPNAK = 6, + DHCPRELEASE = 7, + DHCPINFORM = 8, + DHCPFORCERENEW = 9, + DHCPLEASEQUERY = 10, *** 3725 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Fri Sep 3 13:19:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 CD97C675C85; Fri, 3 Sep 2021 13:18: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 4H1JKH45Knz3JQq; Fri, 3 Sep 2021 13:18: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 73AA02CF1C; Fri, 3 Sep 2021 13:18: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 183DIxkA082108; Fri, 3 Sep 2021 13:18:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183DIxKm082107; Fri, 3 Sep 2021 13:18:59 GMT (envelope-from git) Date: Fri, 3 Sep 2021 13:18:59 GMT Message-Id: <202109031318.183DIxKm082107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 3968b47cd974 - main - wpa: Enable MBO 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/main X-Git-Reftype: branch X-Git-Commit: 3968b47cd974e503df303265f3be9ba5865499ab Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 13:19:00 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3968b47cd974e503df303265f3be9ba5865499ab commit 3968b47cd974e503df303265f3be9ba5865499ab Author: Cy Schubert AuthorDate: 2021-09-03 13:14:01 +0000 Commit: Cy Schubert CommitDate: 2021-09-03 13:14:01 +0000 wpa: Enable MBO Enable WiFi 6 MBO (Multi Band Operation). MBO is a prereq to 802.11ax. MBO allows the efficient use of multiple frequency bands (channels). To facilitate MBO, WNM (Wireless Network Monitoring) is a prerequisite. It is required to build. Tested by: philip MFC after: 2 months --- usr.sbin/wpa/Makefile.inc | 3 +++ usr.sbin/wpa/src/ap/Makefile | 2 ++ usr.sbin/wpa/wpa_supplicant/Makefile | 2 ++ 3 files changed, 7 insertions(+) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index 49c7344e8957..a43792d97403 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -68,6 +68,9 @@ CFLAGS+=-DEAP_SERVER_TLS CFLAGS+=-DEAP_SERVER_TTLS CFLAGS+=-DEAP_SERVER_WSC CFLAGS+=-DEAP_TLS_FUNCS +CFLAGS+=-DCONFIG_WNM +CFLAGS+=-DCONFIG_WNM_AP +CFLAGS+=-DCONFIG_MBO .if ${MK_WPA_SUPPLICANT_EAPOL} != "no" CFLAGS+=-DCONFIG_HS20 \ diff --git a/usr.sbin/wpa/src/ap/Makefile b/usr.sbin/wpa/src/ap/Makefile index b6d53b0d5dbb..162b8b5444aa 100644 --- a/usr.sbin/wpa/src/ap/Makefile +++ b/usr.sbin/wpa/src/ap/Makefile @@ -28,6 +28,7 @@ SRCS= accounting.c \ ieee802_11_shared.c \ ieee802_11_vht.c \ ieee802_1x.c \ + mbo_ap.c \ neighbor_db.c \ pmksa_cache_auth.c \ preauth_auth.c \ @@ -39,6 +40,7 @@ SRCS= accounting.c \ vlan_ifconfig.c \ vlan_init.c \ wmm.c \ + wnm_ap.c \ wpa_auth.c \ wpa_auth_glue.c \ wpa_auth_ie.c \ diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index b437d2991360..8e7edfcf7720 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -23,6 +23,7 @@ SRCS= bss.c \ events.c \ gas_query.c \ main.c \ + mbo.c \ notify.c \ op_classes.c \ offchannel.c \ @@ -32,6 +33,7 @@ SRCS= bss.c \ scan.c \ twt.c \ wmm_ac.c \ + wnm_sta.c \ wpa_supplicant.c \ wpas_glue.c From owner-dev-commits-src-all@freebsd.org Fri Sep 3 13:19:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 28475675C8B; Fri, 3 Sep 2021 13:19: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 4H1JKJ5wd8z3JPC; Fri, 3 Sep 2021 13:19: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 8D41B2CE93; Fri, 3 Sep 2021 13:19: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 183DJ0Fx082133; Fri, 3 Sep 2021 13:19:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183DJ0Wg082132; Fri, 3 Sep 2021 13:19:00 GMT (envelope-from git) Date: Fri, 3 Sep 2021 13:19:00 GMT Message-Id: <202109031319.183DJ0Wg082132@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: bd452dcbede6 - main - wpa: Enable RSN Preauthentication 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/main X-Git-Reftype: branch X-Git-Commit: bd452dcbede69b1862c769f244948f94b86448b5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 13:19:01 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=bd452dcbede69b1862c769f244948f94b86448b5 commit bd452dcbede69b1862c769f244948f94b86448b5 Author: Cy Schubert AuthorDate: 2021-09-03 13:14:59 +0000 Commit: Cy Schubert CommitDate: 2021-09-03 13:14:59 +0000 wpa: Enable RSN Preauthentication RSN Preauthentication allows a station autnetnicate to an AP that it is not associated with yet while associated with a different AP. This allows athentication to multiple APs simulteneously. Tested by: philip MFC after: 2 months --- usr.sbin/wpa/Makefile.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index a43792d97403..915b5312f02f 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -71,6 +71,7 @@ CFLAGS+=-DEAP_TLS_FUNCS CFLAGS+=-DCONFIG_WNM CFLAGS+=-DCONFIG_WNM_AP CFLAGS+=-DCONFIG_MBO +CFLAGS+=-DCONFIG_RSN_PREAUTH .if ${MK_WPA_SUPPLICANT_EAPOL} != "no" CFLAGS+=-DCONFIG_HS20 \ From owner-dev-commits-src-all@freebsd.org Fri Sep 3 13:35:27 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E4E93676117; Fri, 3 Sep 2021 13:35: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 4H1JhH64HHz3N7Q; Fri, 3 Sep 2021 13:35: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 AC96F2D361; Fri, 3 Sep 2021 13:35: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 183DZRJh008401; Fri, 3 Sep 2021 13:35:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183DZRAV008399; Fri, 3 Sep 2021 13:35:27 GMT (envelope-from git) Date: Fri, 3 Sep 2021 13:35:27 GMT Message-Id: <202109031335.183DZRAV008399@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: f21fcae48702 - main - llvm: Revert "[HardwareLoops] Change order of SCEV expression construction for InitLoopCount." 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/main X-Git-Reftype: branch X-Git-Commit: f21fcae487026987f44154de981c03b69efbc945 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 13:35:28 -0000 The branch main has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=f21fcae487026987f44154de981c03b69efbc945 commit f21fcae487026987f44154de981c03b69efbc945 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-09-02 17:54:31 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-09-03 16:31:54 +0000 llvm: Revert "[HardwareLoops] Change order of SCEV expression construction for InitLoopCount." Reverts llvm commit 42eaf4fe0adef3344adfd9fbccd49f325cb549ef, pointed from bisect as source of regression that causes liblzma to compress/ uncompress incorrectly. It's know to affect powerpc64 BE only. The patch unbreaks FreeBSD powerpc64 installation media, since bsdinstall can't uncompress the *.txz produced by FreeBSD CI. It's probably miscompiling other software bas well. Upstream PR: https://bugs.llvm.org/show_bug.cgi?id=51714 Reviewed by: dim MFC after: 2 days Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D31804 --- .../include/llvm/Analysis/TargetTransformInfo.h | 1 + .../llvm/lib/Analysis/TargetTransformInfo.cpp | 5 +---- .../llvm/lib/CodeGen/HardwareLoops.cpp | 26 +++++++++++++--------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/contrib/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfo.h b/contrib/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfo.h index cdfb04424e56..4dc442e1ed56 100644 --- a/contrib/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfo.h +++ b/contrib/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfo.h @@ -94,6 +94,7 @@ struct HardwareLoopInfo { Loop *L = nullptr; BasicBlock *ExitBlock = nullptr; BranchInst *ExitBranch = nullptr; + const SCEV *ExitCount = nullptr; const SCEV *TripCount = nullptr; IntegerType *CountType = nullptr; Value *LoopDecrement = nullptr; // Decrement the loop counter by this diff --git a/contrib/llvm-project/llvm/lib/Analysis/TargetTransformInfo.cpp b/contrib/llvm-project/llvm/lib/Analysis/TargetTransformInfo.cpp index e498401eb8b5..43cc90aedbc9 100644 --- a/contrib/llvm-project/llvm/lib/Analysis/TargetTransformInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Analysis/TargetTransformInfo.cpp @@ -217,10 +217,7 @@ bool HardwareLoopInfo::isHardwareLoopCandidate(ScalarEvolution &SE, // Note that this block may not be the loop latch block, even if the loop // has a latch block. ExitBlock = BB; - TripCount = SE.getAddExpr(EC, SE.getOne(EC->getType())); - - if (!EC->getType()->isPointerTy() && EC->getType() != CountType) - TripCount = SE.getZeroExtendExpr(TripCount, CountType); + ExitCount = EC; break; } diff --git a/contrib/llvm-project/llvm/lib/CodeGen/HardwareLoops.cpp b/contrib/llvm-project/llvm/lib/CodeGen/HardwareLoops.cpp index 810b10c9c82a..354e50b4844d 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/HardwareLoops.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/HardwareLoops.cpp @@ -187,7 +187,7 @@ namespace { const DataLayout &DL, OptimizationRemarkEmitter *ORE) : SE(SE), DL(DL), ORE(ORE), L(Info.L), M(L->getHeader()->getModule()), - TripCount(Info.TripCount), + ExitCount(Info.ExitCount), CountType(Info.CountType), ExitBranch(Info.ExitBranch), LoopDecrement(Info.LoopDecrement), @@ -202,7 +202,7 @@ namespace { OptimizationRemarkEmitter *ORE = nullptr; Loop *L = nullptr; Module *M = nullptr; - const SCEV *TripCount = nullptr; + const SCEV *ExitCount = nullptr; Type *CountType = nullptr; BranchInst *ExitBranch = nullptr; Value *LoopDecrement = nullptr; @@ -298,7 +298,7 @@ bool HardwareLoops::TryConvertLoop(HardwareLoopInfo &HWLoopInfo) { } assert( - (HWLoopInfo.ExitBlock && HWLoopInfo.ExitBranch && HWLoopInfo.TripCount) && + (HWLoopInfo.ExitBlock && HWLoopInfo.ExitBranch && HWLoopInfo.ExitCount) && "Hardware Loop must have set exit info."); BasicBlock *Preheader = L->getLoopPreheader(); @@ -384,12 +384,18 @@ Value *HardwareLoop::InitLoopCount() { SCEVExpander SCEVE(SE, DL, "loopcnt"); + if (!ExitCount->getType()->isPointerTy() && + ExitCount->getType() != CountType) + ExitCount = SE.getZeroExtendExpr(ExitCount, CountType); + + ExitCount = SE.getAddExpr(ExitCount, SE.getOne(CountType)); + // If we're trying to use the 'test and set' form of the intrinsic, we need // to replace a conditional branch that is controlling entry to the loop. It // is likely (guaranteed?) that the preheader has an unconditional branch to // the loop header, so also check if it has a single predecessor. - if (SE.isLoopEntryGuardedByCond(L, ICmpInst::ICMP_NE, TripCount, - SE.getZero(TripCount->getType()))) { + if (SE.isLoopEntryGuardedByCond(L, ICmpInst::ICMP_NE, ExitCount, + SE.getZero(ExitCount->getType()))) { LLVM_DEBUG(dbgs() << " - Attempting to use test.set counter.\n"); UseLoopGuard |= ForceGuardLoopEntry; } else @@ -401,19 +407,19 @@ Value *HardwareLoop::InitLoopCount() { BasicBlock *Predecessor = BB->getSinglePredecessor(); // If it's not safe to create a while loop then don't force it and create a // do-while loop instead - if (!isSafeToExpandAt(TripCount, Predecessor->getTerminator(), SE)) + if (!isSafeToExpandAt(ExitCount, Predecessor->getTerminator(), SE)) UseLoopGuard = false; else BB = Predecessor; } - if (!isSafeToExpandAt(TripCount, BB->getTerminator(), SE)) { - LLVM_DEBUG(dbgs() << "- Bailing, unsafe to expand TripCount " - << *TripCount << "\n"); + if (!isSafeToExpandAt(ExitCount, BB->getTerminator(), SE)) { + LLVM_DEBUG(dbgs() << "- Bailing, unsafe to expand ExitCount " + << *ExitCount << "\n"); return nullptr; } - Value *Count = SCEVE.expandCodeFor(TripCount, CountType, + Value *Count = SCEVE.expandCodeFor(ExitCount, CountType, BB->getTerminator()); // FIXME: We've expanded Count where we hope to insert the counter setting From owner-dev-commits-src-all@freebsd.org Fri Sep 3 16:15:45 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8E6E2677849; Fri, 3 Sep 2021 16:15: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 4H1NFF3L6Hz3Fdd; Fri, 3 Sep 2021 16:15: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 5A06A2F3E2; Fri, 3 Sep 2021 16:15: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 183GFjGR021592; Fri, 3 Sep 2021 16:15:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183GFjXZ021591; Fri, 3 Sep 2021 16:15:45 GMT (envelope-from git) Date: Fri, 3 Sep 2021 16:15:45 GMT Message-Id: <202109031615.183GFjXZ021591@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 6b2ff27cb952 - main - mge(4): Mark sysctls and callout MP-safe. 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/main X-Git-Reftype: branch X-Git-Commit: 6b2ff27cb952048527ba13023a8354112fe1d410 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 16:15:45 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=6b2ff27cb952048527ba13023a8354112fe1d410 commit 6b2ff27cb952048527ba13023a8354112fe1d410 Author: Alexander Motin AuthorDate: 2021-09-03 16:13:56 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 16:15:39 +0000 mge(4): Mark sysctls and callout MP-safe. MFC after: 1 month --- sys/dev/mge/if_mge.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/mge/if_mge.c b/sys/dev/mge/if_mge.c index 16deb330c06c..c43163afe3a7 100644 --- a/sys/dev/mge/if_mge.c +++ b/sys/dev/mge/if_mge.c @@ -883,7 +883,7 @@ mge_attach(device_t dev) mge_get_mac_address(sc, hwaddr); ether_ifattach(ifp, hwaddr); - callout_init(&sc->wd_callout, 0); + callout_init(&sc->wd_callout, 1); /* Attach PHY(s) */ if (sc->phy_attached) { @@ -2147,10 +2147,10 @@ mge_add_sysctls(struct mge_softc *sc) children = SYSCTL_CHILDREN(tree); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rx_time", - CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, MGE_IC_RX, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, MGE_IC_RX, mge_sysctl_ic, "I", "IC RX time threshold"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tx_time", - CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, MGE_IC_TX, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, MGE_IC_TX, mge_sysctl_ic, "I", "IC TX time threshold"); } From owner-dev-commits-src-all@freebsd.org Fri Sep 3 16:26:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0B761678383; Fri, 3 Sep 2021 16: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 4H1NTT6yVGz3JRj; Fri, 3 Sep 2021 16: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 D3E052F379; Fri, 3 Sep 2021 16: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 183GQLcg035215; Fri, 3 Sep 2021 16: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 183GQLl6035214; Fri, 3 Sep 2021 16:26:21 GMT (envelope-from git) Date: Fri, 3 Sep 2021 16:26:21 GMT Message-Id: <202109031626.183GQLl6035214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 4081c895e5ce - main - bxe(4): Mark sysctls and callout MP-safe. 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/main X-Git-Reftype: branch X-Git-Commit: 4081c895e5ce28d3b0e672055271c8d7cc31cc1f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 16:26:22 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=4081c895e5ce28d3b0e672055271c8d7cc31cc1f commit 4081c895e5ce28d3b0e672055271c8d7cc31cc1f Author: Alexander Motin AuthorDate: 2021-09-03 16:25:32 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 16:25:32 +0000 bxe(4): Mark sysctls and callout MP-safe. MFC after: 1 month --- sys/dev/bxe/bxe.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index bf6904b26b55..920a5a9bcbcb 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -16088,19 +16088,19 @@ bxe_add_sysctls(struct bxe_softc *sc) "rx processing budget"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "pause_param", - CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, bxe_sysctl_pauseparam, "IU", "need pause frames- DEF:0/TX:1/RX:2/BOTH:3/AUTO:4/AUTOTX:5/AUTORX:6/AUTORXTX:7/NONE:8"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "state", - CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, bxe_sysctl_state, "IU", "dump driver state"); for (i = 0; i < BXE_NUM_ETH_STATS; i++) { SYSCTL_ADD_PROC(ctx, children, OID_AUTO, bxe_eth_stats_arr[i].string, - CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, i, + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, i, bxe_sysctl_eth_stat, "LU", bxe_eth_stats_arr[i].string); } @@ -16120,7 +16120,7 @@ bxe_add_sysctls(struct bxe_softc *sc) q_stat = ((i << 16) | j); SYSCTL_ADD_PROC(ctx, queue_children, OID_AUTO, bxe_eth_q_stats_arr[j].string, - CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, q_stat, + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, q_stat, bxe_sysctl_eth_q_stat, "LU", bxe_eth_q_stats_arr[j].string); } } @@ -16245,7 +16245,7 @@ bxe_attach(device_t dev) bxe_init_mutexes(sc); /* prepare the periodic callout */ - callout_init(&sc->periodic_callout, 0); + callout_init(&sc->periodic_callout, 1); /* prepare the chip taskqueue */ sc->chip_tq_flags = CHIP_TQ_NONE; From owner-dev-commits-src-all@freebsd.org Fri Sep 3 17:05:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 17:11:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 17:11:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 17:11:38 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 17:24:25 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 17:24:26 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 17:24:28 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 17:30:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 17:52:14 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DF3BB679D0F; Fri, 3 Sep 2021 17:52: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 4H1QNZ5qqDz4RZ4; Fri, 3 Sep 2021 17:52: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 A7BC46F9; Fri, 3 Sep 2021 17:52: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 183HqEjK055070; Fri, 3 Sep 2021 17:52:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183HqEMC055069; Fri, 3 Sep 2021 17:52:14 GMT (envelope-from git) Date: Fri, 3 Sep 2021 17:52:14 GMT Message-Id: <202109031752.183HqEMC055069@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 9895a2073f98 - main - bnxt(4): Mark sysctls MP-safe. 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/main X-Git-Reftype: branch X-Git-Commit: 9895a2073f98be927041f5a73d0d3ff5e8844bfb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 17:52:15 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=9895a2073f98be927041f5a73d0d3ff5e8844bfb commit 9895a2073f98be927041f5a73d0d3ff5e8844bfb Author: Alexander Motin AuthorDate: 2021-09-03 17:51:08 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 17:51:08 +0000 bnxt(4): Mark sysctls MP-safe. MFC after: 1 month --- sys/dev/bnxt/bnxt_sysctl.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/sys/dev/bnxt/bnxt_sysctl.c b/sys/dev/bnxt/bnxt_sysctl.c index 49147ae9926e..ef624d487953 100644 --- a/sys/dev/bnxt/bnxt_sysctl.c +++ b/sys/dev/bnxt/bnxt_sysctl.c @@ -861,11 +861,11 @@ bnxt_create_ver_sysctls(struct bnxt_softc *softc) bnxt_chip_type[MAX_CHIP_TYPE] : bnxt_chip_type[vi->chip_type], 0, "RoCE firmware name"); SYSCTL_ADD_PROC(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "package_ver", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + "package_ver", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, softc, 0, bnxt_package_ver_sysctl, "A", "currently installed package version"); SYSCTL_ADD_PROC(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "hwrm_min_ver", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, + "hwrm_min_ver", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_hwrm_min_ver_sysctl, "A", "minimum hwrm API vesion to support"); @@ -1205,47 +1205,47 @@ bnxt_create_config_sysctls_pre(struct bnxt_softc *softc) children = SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev)); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rss_key", - CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_rss_key_sysctl, "A", "RSS key"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rss_type", - CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_rss_type_sysctl, "A", "RSS type bits"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rx_stall", - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_rx_stall_sysctl, "I", "buffer rx packets in hardware until the host posts new buffers"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "vlan_strip", - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_vlan_strip_sysctl, "I", "strip VLAN tag in the RX path"); SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "if_name", CTLFLAG_RD, iflib_get_ifp(softc->ctx)->if_xname, 0, "interface name"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "intr_coal_rx_usecs", - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_set_coal_rx_usecs, "I", "interrupt coalescing Rx Usecs"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "intr_coal_rx_frames", - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_set_coal_rx_frames, "I", "interrupt coalescing Rx Frames"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "intr_coal_rx_usecs_irq", - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_set_coal_rx_usecs_irq, "I", "interrupt coalescing Rx Usecs IRQ"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "intr_coal_rx_frames_irq", - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_set_coal_rx_frames_irq, "I", "interrupt coalescing Rx Frames IRQ"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "intr_coal_tx_usecs", - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_set_coal_tx_usecs, "I", "interrupt coalescing Tx Usces"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "intr_coal_tx_frames", - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_set_coal_tx_frames, "I", "interrupt coalescing Tx Frames"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "intr_coal_tx_usecs_irq", - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_set_coal_tx_usecs_irq, "I", "interrupt coalescing Tx Usecs IRQ"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "intr_coal_tx_frames_irq", - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_set_coal_tx_frames_irq, "I", "interrupt coalescing Tx Frames IRQ"); @@ -1322,15 +1322,15 @@ bnxt_create_pause_fc_sysctls(struct bnxt_softc *softc) return ENOMEM; SYSCTL_ADD_PROC(&softc->flow_ctrl_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "tx", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + "tx", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_flow_ctrl_tx, "A", "Enable or Disable Tx Flow Ctrl: 0 / 1"); SYSCTL_ADD_PROC(&softc->flow_ctrl_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "rx", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + "rx", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_flow_ctrl_rx, "A", "Enable or Disable Tx Flow Ctrl: 0 / 1"); SYSCTL_ADD_PROC(&softc->flow_ctrl_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "autoneg", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, + "autoneg", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_flow_ctrl_autoneg, "A", "Enable or Disable Autoneg Flow Ctrl: 0 / 1"); @@ -1346,29 +1346,29 @@ bnxt_create_hw_lro_sysctls(struct bnxt_softc *softc) return ENOMEM; SYSCTL_ADD_PROC(&softc->hw_lro_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "enable", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, + "enable", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_hw_lro_enable_disable, "A", "Enable or Disable HW LRO: 0 / 1"); SYSCTL_ADD_PROC(&softc->hw_lro_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "gro_mode", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, + "gro_mode", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_hw_lro_set_mode, "A", "Set mode: 1 = GRO mode, 0 = RSC mode"); SYSCTL_ADD_PROC(&softc->hw_lro_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "max_agg_segs", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, + "max_agg_segs", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_hw_lro_set_max_agg_segs, "A", "Set Max Agg Seg Value (unit is Log2): " "0 (= 1 seg) / 1 (= 2 segs) / ... / 31 (= 2^31 segs)"); SYSCTL_ADD_PROC(&softc->hw_lro_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "max_aggs", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, + "max_aggs", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_hw_lro_set_max_aggs, "A", "Set Max Aggs Value (unit is Log2): " "0 (= 1 agg) / 1 (= 2 aggs) / ... / 7 (= 2^7 segs)"); SYSCTL_ADD_PROC(&softc->hw_lro_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "min_agg_len", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, + "min_agg_len", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_hw_lro_set_min_agg_len, "A", "Min Agg Len: 1 to 9000"); @@ -1410,7 +1410,7 @@ bnxt_create_config_sysctls_post(struct bnxt_softc *softc) children = SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev)); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "vlan_only", - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, softc, 0, bnxt_vlan_only_sysctl, "I", "require vlan tag on received packets when vlan is enabled"); From owner-dev-commits-src-all@freebsd.org Fri Sep 3 18:13:23 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 18:13:24 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 18:16:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 18:31:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2B75567A822; Fri, 3 Sep 2021 18:31: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 4H1RG00p2sz4crN; Fri, 3 Sep 2021 18:31: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 F082B11AC; Fri, 3 Sep 2021 18:31: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 183IVZmI004963; Fri, 3 Sep 2021 18:31:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183IVZwc004962; Fri, 3 Sep 2021 18:31:35 GMT (envelope-from git) Date: Fri, 3 Sep 2021 18:31:35 GMT Message-Id: <202109031831.183IVZwc004962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e51b29b5a931 - main - mprotect.2: Remove legacy BSD text MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e51b29b5a931a8020de3c9de8f400b5bfa802eff Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 18:31:36 -0000 The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e51b29b5a931a8020de3c9de8f400b5bfa802eff commit e51b29b5a931a8020de3c9de8f400b5bfa802eff Author: Brooks Davis AuthorDate: 2021-09-03 18:30:23 +0000 Commit: Brooks Davis CommitDate: 2021-09-03 18:30:23 +0000 mprotect.2: Remove legacy BSD text This text dates to the BSD 4.4 import and is misleading. The mprotect syscall acts on page granularity and breaks up mappings as required to do so. Note that with the addition of non-transparent superpages (aka largepages) the size of a page at a given address may vary. This commit does not attempt to address the lack of documentation of this feature. Sponsored by: DARPA Reviewed by: alc, mckusick, imp, kib, markj Differential Revision: https://reviews.freebsd.org/D31776 --- lib/libc/sys/mprotect.2 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/libc/sys/mprotect.2 b/lib/libc/sys/mprotect.2 index 0568343232b7..5c024dd24d56 100644 --- a/lib/libc/sys/mprotect.2 +++ b/lib/libc/sys/mprotect.2 @@ -28,7 +28,7 @@ .\" @(#)mprotect.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd February 26, 2020 +.Dd September 3, 2021 .Dt MPROTECT 2 .Os .Sh NAME @@ -46,11 +46,6 @@ The system call changes the specified pages to have protection .Fa prot . -Not all implementations will guarantee protection on a page basis; -the granularity of protection changes may be as large as an entire region. -A region is the virtual address space defined by the start -and end addresses of a -.Vt "struct vm_map_entry" . .Pp Currently these protection bits are known, which can be combined, OR'd together: From owner-dev-commits-src-all@freebsd.org Fri Sep 3 18:46:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 18:46:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 18:47:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 18:47:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 19:03:48 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3DA0567AD7C; Fri, 3 Sep 2021 19:03: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 4H1Rz81Fyzz4mW2; Fri, 3 Sep 2021 19:03: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 0AF1E12D4; Fri, 3 Sep 2021 19:03: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 183J3lCh050216; Fri, 3 Sep 2021 19:03:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183J3lnb050215; Fri, 3 Sep 2021 19:03:47 GMT (envelope-from git) Date: Fri, 3 Sep 2021 19:03:47 GMT Message-Id: <202109031903.183J3lnb050215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: fa3b03d37854 - main - pcib(4): Switch from callout to timeout_task. 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/main X-Git-Reftype: branch X-Git-Commit: fa3b03d378546b74582613431bab537d3488d81f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 19:03:48 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=fa3b03d378546b74582613431bab537d3488d81f commit fa3b03d378546b74582613431bab537d3488d81f Author: Alexander Motin AuthorDate: 2021-09-03 19:00:21 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 19:03:44 +0000 pcib(4): Switch from callout to timeout_task. This allows to avoid blocking on Giant in callout context, moving to already existing dedicated taskqueue_pci_hp thread. MFC after: 1 month --- sys/dev/pci/pci_pci.c | 77 ++++++++++++++++++++++++---------------------- sys/dev/pci/pcib_private.h | 9 +++--- 2 files changed, 45 insertions(+), 41 deletions(-) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 33e277ed01ae..2b86f2f50e11 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -77,9 +77,9 @@ static int pcib_ari_enabled(device_t pcib); static void pcib_ari_decode_rid(device_t pcib, uint16_t rid, int *bus, int *slot, int *func); #ifdef PCI_HP -static void pcib_pcie_ab_timeout(void *arg); -static void pcib_pcie_cc_timeout(void *arg); -static void pcib_pcie_dll_timeout(void *arg); +static void pcib_pcie_ab_timeout(void *arg, int pending); +static void pcib_pcie_cc_timeout(void *arg, int pending); +static void pcib_pcie_dll_timeout(void *arg, int pending); #endif static int pcib_request_feature_default(device_t pcib, device_t dev, enum pci_feature feature); @@ -1027,8 +1027,8 @@ pcib_pcie_hotplug_command(struct pcib_softc *sc, uint16_t val, uint16_t mask) (ctl & new) & PCIEM_SLOT_CTL_CCIE) { sc->flags |= PCIB_HOTPLUG_CMD_PENDING; if (!cold) - callout_reset(&sc->pcie_cc_timer, hz, - pcib_pcie_cc_timeout, sc); + taskqueue_enqueue_timeout(taskqueue_pci_hp, + &sc->pcie_cc_task, hz); } } @@ -1043,7 +1043,7 @@ pcib_pcie_hotplug_command_completed(struct pcib_softc *sc) device_printf(dev, "Command Completed\n"); if (!(sc->flags & PCIB_HOTPLUG_CMD_PENDING)) return; - callout_stop(&sc->pcie_cc_timer); + taskqueue_cancel_timeout(taskqueue_pci_hp, &sc->pcie_cc_task, NULL); sc->flags &= ~PCIB_HOTPLUG_CMD_PENDING; wakeup(sc); } @@ -1156,10 +1156,11 @@ pcib_pcie_hotplug_update(struct pcib_softc *sc, uint16_t val, uint16_t mask, device_printf(sc->dev, "Data Link Layer inactive\n"); else - callout_reset(&sc->pcie_dll_timer, hz, - pcib_pcie_dll_timeout, sc); + taskqueue_enqueue_timeout(taskqueue_pci_hp, + &sc->pcie_dll_task, hz); } else if (sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE) - callout_stop(&sc->pcie_dll_timer); + taskqueue_cancel_timeout(taskqueue_pci_hp, &sc->pcie_dll_task, + NULL); pcib_pcie_hotplug_command(sc, val, mask); @@ -1198,14 +1199,15 @@ pcib_pcie_intr_hotplug(void *arg) device_printf(dev, "Attention Button Pressed: Detach Cancelled\n"); sc->flags &= ~PCIB_DETACH_PENDING; - callout_stop(&sc->pcie_ab_timer); + taskqueue_cancel_timeout(taskqueue_pci_hp, + &sc->pcie_ab_task, NULL); } else if (old_slot_sta & PCIEM_SLOT_STA_PDS) { /* Only initiate detach sequence if device present. */ device_printf(dev, "Attention Button Pressed: Detaching in 5 seconds\n"); sc->flags |= PCIB_DETACH_PENDING; - callout_reset(&sc->pcie_ab_timer, 5 * hz, - pcib_pcie_ab_timeout, sc); + taskqueue_enqueue_timeout(taskqueue_pci_hp, + &sc->pcie_ab_task, 5 * hz); } } if (sc->pcie_slot_sta & PCIEM_SLOT_STA_PFD) @@ -1257,29 +1259,27 @@ pcib_pcie_hotplug_task(void *context, int pending) } static void -pcib_pcie_ab_timeout(void *arg) +pcib_pcie_ab_timeout(void *arg, int pending) { - struct pcib_softc *sc; + struct pcib_softc *sc = arg; - sc = arg; - PCIB_HP_LOCK_ASSERT(sc); + PCIB_HP_LOCK(sc); if (sc->flags & PCIB_DETACH_PENDING) { sc->flags |= PCIB_DETACHING; sc->flags &= ~PCIB_DETACH_PENDING; pcib_pcie_hotplug_update(sc, 0, 0, true); } + PCIB_HP_UNLOCK(sc); } static void -pcib_pcie_cc_timeout(void *arg) +pcib_pcie_cc_timeout(void *arg, int pending) { - struct pcib_softc *sc; - device_t dev; + struct pcib_softc *sc = arg; + device_t dev = sc->dev; uint16_t sta; - sc = arg; - dev = sc->dev; - PCIB_HP_LOCK_ASSERT(sc); + PCIB_HP_LOCK(sc); sta = pcie_read_config(dev, PCIER_SLOT_STA, 2); if (!(sta & PCIEM_SLOT_STA_CC)) { device_printf(dev, "HotPlug Command Timed Out\n"); @@ -1289,18 +1289,17 @@ pcib_pcie_cc_timeout(void *arg) "Missed HotPlug interrupt waiting for Command Completion\n"); pcib_pcie_intr_hotplug(sc); } + PCIB_HP_UNLOCK(sc); } static void -pcib_pcie_dll_timeout(void *arg) +pcib_pcie_dll_timeout(void *arg, int pending) { - struct pcib_softc *sc; - device_t dev; + struct pcib_softc *sc = arg; + device_t dev = sc->dev; uint16_t sta; - sc = arg; - dev = sc->dev; - PCIB_HP_LOCK_ASSERT(sc); + PCIB_HP_LOCK(sc); sta = pcie_read_config(dev, PCIER_LINK_STA, 2); if (!(sta & PCIEM_LINK_STA_DL_ACTIVE)) { device_printf(dev, @@ -1312,6 +1311,7 @@ pcib_pcie_dll_timeout(void *arg) "Missed HotPlug interrupt waiting for DLL Active\n"); pcib_pcie_intr_hotplug(sc); } + PCIB_HP_UNLOCK(sc); } static int @@ -1390,10 +1390,13 @@ pcib_setup_hotplug(struct pcib_softc *sc) uint16_t mask, val; dev = sc->dev; - callout_init(&sc->pcie_ab_timer, 0); - callout_init(&sc->pcie_cc_timer, 0); - callout_init(&sc->pcie_dll_timer, 0); TASK_INIT(&sc->pcie_hp_task, 0, pcib_pcie_hotplug_task, sc); + TIMEOUT_TASK_INIT(taskqueue_pci_hp, &sc->pcie_ab_task, 0, + pcib_pcie_ab_timeout, sc); + TIMEOUT_TASK_INIT(taskqueue_pci_hp, &sc->pcie_cc_task, 0, + pcib_pcie_cc_timeout, sc); + TIMEOUT_TASK_INIT(taskqueue_pci_hp, &sc->pcie_dll_task, 0, + pcib_pcie_dll_timeout, sc); sc->pcie_hp_lock = &Giant; /* Allocate IRQ. */ @@ -1438,12 +1441,14 @@ pcib_detach_hotplug(struct pcib_softc *sc) /* Disable the card in the slot and force it to detach. */ if (sc->flags & PCIB_DETACH_PENDING) { sc->flags &= ~PCIB_DETACH_PENDING; - callout_stop(&sc->pcie_ab_timer); + taskqueue_cancel_timeout(taskqueue_pci_hp, &sc->pcie_ab_task, + NULL); } sc->flags |= PCIB_DETACHING; if (sc->flags & PCIB_HOTPLUG_CMD_PENDING) { - callout_stop(&sc->pcie_cc_timer); + taskqueue_cancel_timeout(taskqueue_pci_hp, &sc->pcie_cc_task, + NULL); tsleep(sc, 0, "hpcmd", hz); sc->flags &= ~PCIB_HOTPLUG_CMD_PENDING; } @@ -1466,9 +1471,9 @@ pcib_detach_hotplug(struct pcib_softc *sc) if (error) return (error); taskqueue_drain(taskqueue_pci_hp, &sc->pcie_hp_task); - callout_drain(&sc->pcie_ab_timer); - callout_drain(&sc->pcie_cc_timer); - callout_drain(&sc->pcie_dll_timer); + taskqueue_drain_timeout(taskqueue_pci_hp, &sc->pcie_ab_task); + taskqueue_drain_timeout(taskqueue_pci_hp, &sc->pcie_cc_task); + taskqueue_drain_timeout(taskqueue_pci_hp, &sc->pcie_dll_task); return (0); } #endif diff --git a/sys/dev/pci/pcib_private.h b/sys/dev/pci/pcib_private.h index 8be7b2123174..af0b70a7add3 100644 --- a/sys/dev/pci/pcib_private.h +++ b/sys/dev/pci/pcib_private.h @@ -35,8 +35,7 @@ #ifndef __PCIB_PRIVATE_H__ #define __PCIB_PRIVATE_H__ -#include -#include +#include #ifdef NEW_PCIB /* @@ -138,9 +137,9 @@ struct pcib_softc struct resource *pcie_irq; void *pcie_ihand; struct task pcie_hp_task; - struct callout pcie_ab_timer; - struct callout pcie_cc_timer; - struct callout pcie_dll_timer; + struct timeout_task pcie_ab_task; + struct timeout_task pcie_cc_task; + struct timeout_task pcie_dll_task; struct mtx *pcie_hp_lock; }; From owner-dev-commits-src-all@freebsd.org Fri Sep 3 19:05:56 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 19:05:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 19:05:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 19:06:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 19:06:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 19:06:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 19:06:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 19:06:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 19:06:05 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 19:06:07 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 20:03:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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 462A767CB3C; Fri, 3 Sep 2021 20:03: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 4H1THX0Mn0z3KZt; Fri, 3 Sep 2021 20:03: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 D68A2279F; Fri, 3 Sep 2021 20:03: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 183K330w030633; Fri, 3 Sep 2021 20:03:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183K338V030632; Fri, 3 Sep 2021 20:03:03 GMT (envelope-from git) Date: Fri, 3 Sep 2021 20:03:03 GMT Message-Id: <202109032003.183K338V030632@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: da69c6752674 - main - vt(4): Mark callouts MP-safe. 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/main X-Git-Reftype: branch X-Git-Commit: da69c6752674e29eb5d8f82161ca7bc6d1866051 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 20:03:04 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=da69c6752674e29eb5d8f82161ca7bc6d1866051 commit da69c6752674e29eb5d8f82161ca7bc6d1866051 Author: Alexander Motin AuthorDate: 2021-09-03 19:42:46 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 19:42:46 +0000 vt(4): Mark callouts MP-safe. The code explicitly takes Giant when it accesses keyboard, and I see no reason to take it globally by callout(9). MFC after: 1 month --- sys/dev/vt/vt_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index a8a1bfa2a8e5..2693c32d45be 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -2889,7 +2889,7 @@ vt_allocate_window(struct vt_device *vd, unsigned int window) terminal_set_winsize(tm, &wsz); vd->vd_windows[window] = vw; - callout_init(&vw->vw_proc_dead_timer, 0); + callout_init(&vw->vw_proc_dead_timer, 1); return (vw); } @@ -2913,7 +2913,7 @@ vt_upgrade(struct vt_device *vd) vw = vt_allocate_window(vd, i); } if (!(vw->vw_flags & VWF_READY)) { - callout_init(&vw->vw_proc_dead_timer, 0); + callout_init(&vw->vw_proc_dead_timer, 1); terminal_maketty(vw->vw_terminal, "v%r", VT_UNIT(vw)); vw->vw_flags |= VWF_READY; if (vw->vw_flags & VWF_CONSOLE) { From owner-dev-commits-src-all@freebsd.org Fri Sep 3 20:08:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B70A167CC16; Fri, 3 Sep 2021 20: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 4H1TPF4k2Wz3LLs; Fri, 3 Sep 2021 20: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 7F5BB236D; Fri, 3 Sep 2021 20: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 183K81Wn031218; Fri, 3 Sep 2021 20: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 183K81kK031217; Fri, 3 Sep 2021 20:08:01 GMT (envelope-from git) Date: Fri, 3 Sep 2021 20:08:01 GMT Message-Id: <202109032008.183K81kK031217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 258f5f79bb36 - main - openssh: restore local change to gssapi include logic 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/main X-Git-Reftype: branch X-Git-Commit: 258f5f79bb36e3e6955e7fb149cd2f50265a9ea5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 20:08:01 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=258f5f79bb36e3e6955e7fb149cd2f50265a9ea5 commit 258f5f79bb36e3e6955e7fb149cd2f50265a9ea5 Author: Ed Maste AuthorDate: 2021-09-02 20:43:59 +0000 Commit: Ed Maste CommitDate: 2021-09-03 20:07:47 +0000 openssh: restore local change to gssapi include logic /usr/include/gssapi.h claims that it is deprecated, and gssapi/gssapi.h should be used instead. So, test HAVE_GSSAPI_GSSAPI_H first falling back to HAVE_GSSAPI_H. This will be submitted upstream. Fixes: 6eac665c8126 ("openssh: diff reduction against...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31810 --- crypto/openssh/ssh-gss.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/openssh/ssh-gss.h b/crypto/openssh/ssh-gss.h index 1e2d00e47ff1..887399b6b00a 100644 --- a/crypto/openssh/ssh-gss.h +++ b/crypto/openssh/ssh-gss.h @@ -29,10 +29,10 @@ #ifdef GSSAPI -#ifdef HAVE_GSSAPI_H -#include -#elif defined(HAVE_GSSAPI_GSSAPI_H) +#ifdef HAVE_GSSAPI_GSSAPI_H #include +#elif defined(HAVE_GSSAPI_H) +#include #endif #ifdef KRB5 From owner-dev-commits-src-all@freebsd.org Fri Sep 3 20:08:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E018267C7E8; Fri, 3 Sep 2021 20:08: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 4H1TPr60Bcz3L7n; Fri, 3 Sep 2021 20:08: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 AE9AC236E; Fri, 3 Sep 2021 20:08: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 183K8WP4031374; Fri, 3 Sep 2021 20:08:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183K8W3f031373; Fri, 3 Sep 2021 20:08:32 GMT (envelope-from git) Date: Fri, 3 Sep 2021 20:08:32 GMT Message-Id: <202109032008.183K8W3f031373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: ba91e31f478a - main - openssh: remove login class restrictions leftovers 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/main X-Git-Reftype: branch X-Git-Commit: ba91e31f478aaade96bbdbf01560e8b7cbe41b56 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 20:08:32 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ba91e31f478aaade96bbdbf01560e8b7cbe41b56 commit ba91e31f478aaade96bbdbf01560e8b7cbe41b56 Author: Ed Maste AuthorDate: 2021-09-02 21:13:29 +0000 Commit: Ed Maste CommitDate: 2021-09-03 20:07:47 +0000 openssh: remove login class restrictions leftovers MFC after: 2 weeks Fixes: 27ceebbc2402 ("openssh: simplify login class...") Sponsored by: The FreeBSD Foundation --- crypto/openssh/auth2.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/crypto/openssh/auth2.c b/crypto/openssh/auth2.c index 338eb0454b93..d6eb067245b7 100644 --- a/crypto/openssh/auth2.c +++ b/crypto/openssh/auth2.c @@ -260,10 +260,6 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh) char *user, *service, *method, *style = NULL; int authenticated = 0; double tstart = monotime_double(); -#ifdef HAVE_LOGIN_CAP - login_cap_t *lc; - const char *from_host, *from_ip; -#endif if (authctxt == NULL) fatal("input_userauth_request: no authctxt"); From owner-dev-commits-src-all@freebsd.org Fri Sep 3 20:47:08 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Fri Sep 3 22:10:14 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2E28767E83E; Fri, 3 Sep 2021 22:10: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 4H1X6G0S2sz4fdP; Fri, 3 Sep 2021 22:10: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 E40F943A3; Fri, 3 Sep 2021 22:10: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 183MADVg095153; Fri, 3 Sep 2021 22:10:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 183MADNU095147; Fri, 3 Sep 2021 22:10:13 GMT (envelope-from git) Date: Fri, 3 Sep 2021 22:10:13 GMT Message-Id: <202109032210.183MADNU095147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: cd85b97e0e70 - main - rt(4): Replace Giant callout+task with timeout_task. 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/main X-Git-Reftype: branch X-Git-Commit: cd85b97e0e701bc87cc5bdb9844168a1f5c204e1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 22:10:14 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=cd85b97e0e701bc87cc5bdb9844168a1f5c204e1 commit cd85b97e0e701bc87cc5bdb9844168a1f5c204e1 Author: Alexander Motin AuthorDate: 2021-09-03 22:08:29 +0000 Commit: Alexander Motin CommitDate: 2021-09-03 22:10:06 +0000 rt(4): Replace Giant callout+task with timeout_task. --- sys/dev/rt/if_rt.c | 40 +++++++++++++--------------------------- sys/dev/rt/if_rtvar.h | 3 +-- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/sys/dev/rt/if_rt.c b/sys/dev/rt/if_rt.c index 91fa165bab69..87f0bce6c425 100644 --- a/sys/dev/rt/if_rt.c +++ b/sys/dev/rt/if_rt.c @@ -139,7 +139,6 @@ static void rt_stop_locked(void *priv); static void rt_stop(void *priv); static void rt_start(struct ifnet *ifp); static int rt_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); -static void rt_periodic(void *arg); static void rt_tx_watchdog(void *arg); static void rt_intr(void *arg); static void rt_rt5350_intr(void *arg); @@ -288,7 +287,7 @@ generate_mac(uint8_t *mac) static int ether_request_mac(device_t dev, uint8_t *mac) { - char *var; + const char *var; /* * "ethaddr" is passed via envp on RedBoot platforms @@ -312,7 +311,7 @@ ether_request_mac(device_t dev, uint8_t *mac) * hint.[dev].[unit].macaddr */ if (!resource_string_value(device_get_name(dev), - device_get_unit(dev), "macaddr", (const char **)&var)) { + device_get_unit(dev), "macaddr", &var)) { if(!macaddr_atoi(var, mac)) { printf("%s: use %s macaddr from hints\n", device_get_nameunit(dev), var); @@ -518,7 +517,6 @@ rt_attach(device_t dev) } } - callout_init(&sc->periodic_ch, 0); callout_init_mtx(&sc->tx_watchdog_ch, &sc->lock, 0); ifp = sc->ifp = if_alloc(IFT_ETHER); @@ -571,7 +569,6 @@ rt_attach(device_t dev) /* init task queue */ NET_TASK_INIT(&sc->rx_done_task, 0, rt_rx_done_task, sc); TASK_INIT(&sc->tx_done_task, 0, rt_tx_done_task, sc); - TASK_INIT(&sc->periodic_task, 0, rt_periodic_task, sc); sc->rx_process_limit = 100; @@ -581,6 +578,9 @@ rt_attach(device_t dev) taskqueue_start_threads(&sc->taskqueue, 1, PI_NET, "%s taskq", device_get_nameunit(sc->dev)); + TIMEOUT_TASK_INIT(sc->taskqueue, &sc->periodic_task, 0, + rt_periodic_task, sc); + rt_sysctl_attach(sc); /* set up interrupt */ @@ -709,22 +709,20 @@ rt_detach(device_t dev) RT_DPRINTF(sc, RT_DEBUG_ANY, "detaching\n"); RT_SOFTC_LOCK(sc); - ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - - callout_stop(&sc->periodic_ch); callout_stop(&sc->tx_watchdog_ch); + RT_SOFTC_UNLOCK(sc); taskqueue_drain(sc->taskqueue, &sc->rx_done_task); taskqueue_drain(sc->taskqueue, &sc->tx_done_task); - taskqueue_drain(sc->taskqueue, &sc->periodic_task); + taskqueue_drain_timeout(sc->taskqueue, &sc->periodic_task); /* free Tx and Rx rings */ + RT_SOFTC_LOCK(sc); for (i = 0; i < RT_SOFTC_TX_RING_COUNT; i++) rt_free_tx_ring(sc, &sc->tx_ring[i]); for (i = 0; i < sc->rx_ring_count; i++) rt_free_rx_ring(sc, &sc->rx_ring[i]); - RT_SOFTC_UNLOCK(sc); #ifdef IF_RT_PHY_SUPPORT @@ -942,7 +940,7 @@ rt_init_locked(void *priv) sc->periodic_round = 0; - callout_reset(&sc->periodic_ch, hz / 10, rt_periodic, sc); + taskqueue_enqueue_timeout(sc->taskqueue, &sc->periodic_task, hz / 10); return; @@ -981,7 +979,6 @@ rt_stop_locked(void *priv) RT_SOFTC_ASSERT_LOCKED(sc); sc->tx_timer = 0; ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - callout_stop(&sc->periodic_ch); callout_stop(&sc->tx_watchdog_ch); RT_SOFTC_UNLOCK(sc); taskqueue_block(sc->taskqueue); @@ -993,7 +990,9 @@ rt_stop_locked(void *priv) #ifdef notyet taskqueue_drain(sc->taskqueue, &sc->rx_done_task); taskqueue_drain(sc->taskqueue, &sc->tx_done_task); - taskqueue_drain(sc->taskqueue, &sc->periodic_task); + taskqueue_drain_timeout(sc->taskqueue, &sc->periodic_task); +#else + taskqueue_cancel_timeout(sc->taskqueue, &sc->periodic_task, NULL); #endif RT_SOFTC_LOCK(sc); @@ -1308,19 +1307,6 @@ rt_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) return (error); } -/* - * rt_periodic - Handler of PERIODIC interrupt - */ -static void -rt_periodic(void *arg) -{ - struct rt_softc *sc; - - sc = arg; - RT_DPRINTF(sc, RT_DEBUG_PERIODIC, "periodic\n"); - taskqueue_enqueue(sc->taskqueue, &sc->periodic_task); -} - /* * rt_tx_watchdog - Handler of TX Watchdog */ @@ -1836,7 +1822,7 @@ rt_periodic_task(void *context, int pending) } RT_SOFTC_UNLOCK(sc); - callout_reset(&sc->periodic_ch, hz / 10, rt_periodic, sc); + taskqueue_enqueue_timeout(sc->taskqueue, &sc->periodic_task, hz / 10); } /* diff --git a/sys/dev/rt/if_rtvar.h b/sys/dev/rt/if_rtvar.h index aa1fd8da00d6..216e9cb74bca 100644 --- a/sys/dev/rt/if_rtvar.h +++ b/sys/dev/rt/if_rtvar.h @@ -226,8 +226,7 @@ struct rt_softc struct task rx_done_task; int rx_process_limit; struct task tx_done_task; - struct task periodic_task; - struct callout periodic_ch; + struct timeout_task periodic_task; unsigned long periodic_round; struct taskqueue *taskqueue; From owner-dev-commits-src-all@freebsd.org Sat Sep 4 02:21:12 2021 Return-Path: Delivered-To: dev-commits-src-all@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 23E386A99E6; Sat, 4 Sep 2021 02:21: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 4H1dgr0ZYcz3C0m; Sat, 4 Sep 2021 02:21: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 E815A77AD; Sat, 4 Sep 2021 02:21: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 1842LB5h030089; Sat, 4 Sep 2021 02:21:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1842LBsq030088; Sat, 4 Sep 2021 02:21:11 GMT (envelope-from git) Date: Sat, 4 Sep 2021 02:21:11 GMT Message-Id: <202109040221.1842LBsq030088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: bd6085c6ae28 - main - Re-implement virtual console (constty). 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/main X-Git-Reftype: branch X-Git-Commit: bd6085c6ae28fb1cc81cca325656332fbd2cebd8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 02:21:12 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=bd6085c6ae28fb1cc81cca325656332fbd2cebd8 commit bd6085c6ae28fb1cc81cca325656332fbd2cebd8 Author: Alexander Motin AuthorDate: 2021-09-04 02:18:51 +0000 Commit: Alexander Motin CommitDate: 2021-09-04 02:18:51 +0000 Re-implement virtual console (constty). Protect conscallout with tty lock instead of Giant. In addition to Giant removal it also closes race on console unset. Introduce additional lock to protect against concurrent console sets. Remove consbuf free on console unset as unsafe, making impossible to change buffer size after first allocation. Instead increase default buffer size from 8KB to 64KB and processing rate from 5Hz to 10-15Hz to make the output more smooth. MFC after: 1 month --- sys/kern/kern_cons.c | 105 +++++++++++++++++++++++++++------------------------ sys/kern/tty.c | 24 +++--------- sys/sys/cons.h | 4 +- 3 files changed, 62 insertions(+), 71 deletions(-) diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c index 5f4bf63bed0f..780fce00387d 100644 --- a/sys/kern/kern_cons.c +++ b/sys/kern/kern_cons.c @@ -105,8 +105,10 @@ static u_char console_pausing; /* pause after each line during probe */ static const char console_pausestr[] = ""; struct tty *constty; /* pointer to console "window" tty */ +static struct mtx constty_mtx; /* Mutex for constty assignment. */ +MTX_SYSINIT(constty_mtx, &constty_mtx, "constty_mtx", MTX_DEF); static struct mtx cnputs_mtx; /* Mutex for cnputs(). */ -static int use_cnputs_mtx = 0; /* != 0 if cnputs_mtx locking reqd. */ +MTX_SYSINIT(cnputs_mtx, &cnputs_mtx, "cnputs_mtx", MTX_SPIN | MTX_NOWITNESS); static void constty_timeout(void *arg); @@ -538,8 +540,8 @@ cnputsn(const char *p, size_t n) size_t i; int unlock_reqd = 0; - if (use_cnputs_mtx) { - /* + if (mtx_initialized(&cnputs_mtx)) { + /* * NOTE: Debug prints and/or witness printouts in * console driver clients can cause the "cnputs_mtx" * mutex to recurse. Simply return if that happens. @@ -563,49 +565,72 @@ cnputs(const char *p) cnputsn(p, strlen(p)); } -static int consmsgbuf_size = 8192; -SYSCTL_INT(_kern, OID_AUTO, consmsgbuf_size, CTLFLAG_RW, &consmsgbuf_size, 0, - "Console tty buffer size"); +static unsigned int consmsgbuf_size = 65536; +SYSCTL_UINT(_kern, OID_AUTO, consmsgbuf_size, CTLFLAG_RWTUN, &consmsgbuf_size, + 0, "Console tty buffer size"); /* * Redirect console output to a tty. */ -void +int constty_set(struct tty *tp) { - int size; + int size = consmsgbuf_size; + void *buf = NULL; + + tty_assert_locked(tp); + if (constty == tp) + return (0); + if (constty != NULL) + return (EBUSY); - KASSERT(tp != NULL, ("constty_set: NULL tp")); if (consbuf == NULL) { - size = consmsgbuf_size; - consbuf = malloc(size, M_TTYCONS, M_WAITOK); - msgbuf_init(&consmsgbuf, consbuf, size); - callout_init(&conscallout, 0); + tty_unlock(tp); + buf = malloc(size, M_TTYCONS, M_WAITOK); + tty_lock(tp); } + mtx_lock(&constty_mtx); + if (constty != NULL) { + mtx_unlock(&constty_mtx); + free(buf, M_TTYCONS); + return (EBUSY); + } + if (consbuf == NULL) { + consbuf = buf; + msgbuf_init(&consmsgbuf, buf, size); + } else + free(buf, M_TTYCONS); constty = tp; - constty_timeout(NULL); + mtx_unlock(&constty_mtx); + + callout_init_mtx(&conscallout, tty_getlock(tp), 0); + constty_timeout(tp); + return (0); } /* * Disable console redirection to a tty. */ -void -constty_clear(void) +int +constty_clear(struct tty *tp) { int c; - constty = NULL; - if (consbuf == NULL) - return; + tty_assert_locked(tp); + if (constty != tp) + return (ENXIO); callout_stop(&conscallout); + mtx_lock(&constty_mtx); + constty = NULL; + mtx_unlock(&constty_mtx); while ((c = msgbuf_getchar(&consmsgbuf)) != -1) cnputc(c); - free(consbuf, M_TTYCONS); - consbuf = NULL; + /* We never free consbuf because it can still be in use. */ + return (0); } /* Times per second to check for pending console tty messages. */ -static int constty_wakeups_per_second = 5; +static int constty_wakeups_per_second = 15; SYSCTL_INT(_kern, OID_AUTO, constty_wakeups_per_second, CTLFLAG_RW, &constty_wakeups_per_second, 0, "Times per second to check for pending console tty messages"); @@ -613,40 +638,20 @@ SYSCTL_INT(_kern, OID_AUTO, constty_wakeups_per_second, CTLFLAG_RW, static void constty_timeout(void *arg) { + struct tty *tp = arg; int c; - if (constty != NULL) { - tty_lock(constty); - while ((c = msgbuf_getchar(&consmsgbuf)) != -1) { - if (tty_putchar(constty, c) < 0) { - tty_unlock(constty); - constty = NULL; - break; - } + tty_assert_locked(tp); + while ((c = msgbuf_getchar(&consmsgbuf)) != -1) { + if (tty_putchar(tp, c) < 0) { + constty_clear(tp); + return; } - - if (constty != NULL) - tty_unlock(constty); - } - if (constty != NULL) { - callout_reset(&conscallout, hz / constty_wakeups_per_second, - constty_timeout, NULL); - } else { - /* Deallocate the constty buffer memory. */ - constty_clear(); } + callout_reset_sbt(&conscallout, SBT_1S / constty_wakeups_per_second, + 0, constty_timeout, tp, C_PREL(1)); } -static void -cn_drvinit(void *unused) -{ - - mtx_init(&cnputs_mtx, "cnputs_mtx", NULL, MTX_SPIN | MTX_NOWITNESS); - use_cnputs_mtx = 1; -} - -SYSINIT(cndev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, cn_drvinit, NULL); - /* * Sysbeep(), if we have hardware for it */ diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 8700eb8f9ef1..8dfe5e93780f 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -241,8 +241,7 @@ ttydev_leave(struct tty *tp) tp->t_flags |= TF_OPENCLOSE; /* Remove console TTY. */ - if (constty == tp) - constty_clear(); + constty_clear(tp); /* Drain any output. */ if (!tty_gone(tp)) @@ -1920,24 +1919,11 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, error = priv_check(td, PRIV_TTY_CONSOLE); if (error) return (error); - - /* - * XXX: constty should really need to be locked! - * XXX: allow disconnected constty's to be stolen! - */ - - if (constty == tp) - return (0); - if (constty != NULL) - return (EBUSY); - - tty_unlock(tp); - constty_set(tp); - tty_lock(tp); - } else if (constty == tp) { - constty_clear(); + error = constty_set(tp); + } else { + error = constty_clear(tp); } - return (0); + return (error); case TIOCGWINSZ: /* Obtain window size. */ *(struct winsize*)data = tp->t_winsize; diff --git a/sys/sys/cons.h b/sys/sys/cons.h index 779f365f6e99..ad73b258df6d 100644 --- a/sys/sys/cons.h +++ b/sys/sys/cons.h @@ -139,8 +139,8 @@ void cnputc(int); void cnputs(const char *); void cnputsn(const char *, size_t); int cnunavailable(void); -void constty_set(struct tty *tp); -void constty_clear(void); +int constty_set(struct tty *tp); +int constty_clear(struct tty *tp); /* sc(4) / vt(4) coexistence shim */ #define VTY_SC 0x01 From owner-dev-commits-src-all@freebsd.org Sat Sep 4 03:19:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9AD466AAB34; Sat, 4 Sep 2021 03:19: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 4H1fyb3llsz3jyg; Sat, 4 Sep 2021 03:19: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 622FD1093B; Sat, 4 Sep 2021 03:19: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 1843J3KL002543; Sat, 4 Sep 2021 03:19:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1843J37M002542; Sat, 4 Sep 2021 03:19:03 GMT (envelope-from git) Date: Sat, 4 Sep 2021 03:19:03 GMT Message-Id: <202109040319.1843J37M002542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: a264594d4ff1 - main - Unify console output. 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/main X-Git-Reftype: branch X-Git-Commit: a264594d4ff19fd13f7c39a56c8d131296db480d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 03:19:03 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=a264594d4ff19fd13f7c39a56c8d131296db480d commit a264594d4ff19fd13f7c39a56c8d131296db480d Author: Alexander Motin AuthorDate: 2021-09-04 03:13:42 +0000 Commit: Alexander Motin CommitDate: 2021-09-04 03:13:42 +0000 Unify console output. Without this change when virtual console enabled depending on buffer presence and state different parts of output go to different consoles. MFC after: 1 month --- sys/kern/subr_prf.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index bbe95653919f..1106587ebbe7 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -118,6 +118,7 @@ extern int log_open; static void msglogchar(int c, int pri); static void msglogstr(char *str, int pri, int filter_cr); +static void prf_putbuf(char *bufr, int flags, int pri); static void putchar(int ch, void *arg); static char *ksprintn(char *nbuf, uintmax_t num, int base, int *len, int upper); static void snprintf_func(int ch, void *arg); @@ -296,13 +297,8 @@ _vprintf(int level, int flags, const char *fmt, va_list ap) #ifdef PRINTF_BUFR_SIZE /* Write any buffered console/log output: */ - if (*pca.p_bufr != '\0') { - if (pca.flags & TOLOG) - msglogstr(pca.p_bufr, level, /*filter_cr*/1); - - if (pca.flags & TOCONS) - cnputs(pca.p_bufr); - } + if (*pca.p_bufr != '\0') + prf_putbuf(pca.p_bufr, flags, level); #endif TSEXIT(); @@ -423,6 +419,22 @@ vprintf(const char *fmt, va_list ap) return (retval); } +static void +prf_putchar(int c, int flags, int pri) +{ + + if (flags & TOLOG) + msglogchar(c, pri); + + if (flags & TOCONS) { + if ((!KERNEL_PANICKED()) && (constty != NULL)) + msgbuf_addchar(&consmsgbuf, c); + + if ((constty == NULL) || always_console_output) + cnputc(c); + } +} + static void prf_putbuf(char *bufr, int flags, int pri) { @@ -435,7 +447,7 @@ prf_putbuf(char *bufr, int flags, int pri) msgbuf_addstr(&consmsgbuf, -1, bufr, /*filter_cr*/ 0); - if ((constty == NULL) ||(always_console_output)) + if ((constty == NULL) || always_console_output) cnputs(bufr); } } @@ -445,12 +457,7 @@ putbuf(int c, struct putchar_arg *ap) { /* Check if no console output buffer was provided. */ if (ap->p_bufr == NULL) { - /* Output direct to the console. */ - if (ap->flags & TOCONS) - cnputc(c); - - if (ap->flags & TOLOG) - msglogchar(c, ap->pri); + prf_putchar(c, ap->flags, ap->pri); } else { /* Buffer the character: */ *ap->p_next++ = c; From owner-dev-commits-src-all@freebsd.org Sat Sep 4 03:25:30 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 03:28:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 07:32:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BB0DE6AD6B9; Sat, 4 Sep 2021 07:32: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 4H1mbT4kqyz3qfG; Sat, 4 Sep 2021 07:32: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 8235013F98; Sat, 4 Sep 2021 07:32: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 1847WrZ9048656; Sat, 4 Sep 2021 07:32:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1847WrhC048655; Sat, 4 Sep 2021 07:32:53 GMT (envelope-from git) Date: Sat, 4 Sep 2021 07:32:53 GMT Message-Id: <202109040732.1847WrhC048655@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 76461921dac1 - main - caroot: update root store 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/main X-Git-Reftype: branch X-Git-Commit: 76461921dac18b300489e326ba3df61d2809f364 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 07:32:53 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=76461921dac18b300489e326ba3df61d2809f364 commit 76461921dac18b300489e326ba3df61d2809f364 Author: Kyle Evans AuthorDate: 2021-09-04 07:26:32 +0000 Commit: Kyle Evans CommitDate: 2021-09-04 07:32:20 +0000 caroot: update root store - Four (4) added - Two (2) removed --- .../caroot/trusted/ANF_Secure_Server_Root_CA.pem | 139 +++++++++++++++++++++ secure/caroot/trusted/Certum_EC-384_CA.pem | 68 ++++++++++ secure/caroot/trusted/Certum_Trusted_Root_CA.pem | 136 ++++++++++++++++++++ secure/caroot/trusted/GLOBALTRUST_2020.pem | 138 ++++++++++++++++++++ .../{trusted => untrusted}/QuoVadis_Root_CA.pem | 0 .../Sonera_Class_2_Root_CA.pem | 0 6 files changed, 481 insertions(+) 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/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_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: + 0c:e1:20:c7:da:b7:3e:c3:3f:bf:2f:dc:34:a4:fb:2b:21:cd: + 67:8f:4b:f4:e3:ea:d4:3f:e7:4f:ba:b9:a5:93:45:1c:66:1f: + 21:fa:64:5e:6f:e0:76:94:32:cb:75:f5:6e:e5:f6:8f:c7:b8: + a4:cc:a8:96:7d:64:fb:24:5a:4a:03:6c:6b:38:c6:e8:03:43: + 9a:f7:57:b9:b3:29:69:93:38:f4:03:f2:bb:fb:82:6b:07:20: + d1:52:1f:9a:64:02:7b:98:66:db:5c:4d:5a:0f:d0:84:95:a0: + 3c:14:43:06:ca:ca:db:b8:41:36:da:6a:44:67:87:af:af:e3: + 45:11:15:69:08:b2:be:16:39:97:24:6f:12:45:d1:67:5d:09: + a8:c9:15:da:fa:d2:a6:5f:13:61:1f:bf:85:ac:b4:ad:ad:05: + 94:08:83:1e:75:17:d3:71:3b:93:50:23:59:a0:ed:3c:91:54: + 9d:76:00:c5:c3:b8:38:db +SHA1 Fingerprint=C8:83:44:C0:18:AE:9F:CC:F1:87:B7:8F:22:D1:C5:D7:45:84:BA:E5 +-----BEGIN CERTIFICATE----- +MIIFwDCCA6igAwIBAgIQHr9ZULjJgDdMBvfrVU+17TANBgkqhkiG9w0BAQ0FADB6 +MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEu +MScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxHzAdBgNV +BAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0EwHhcNMTgwMzE2MTIxMDEzWhcNNDMw +MzE2MTIxMDEzWjB6MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEg +U3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0EwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQDRLY67tzbqbTeRn06TpwXkKQMlzhyC93yZ +n0EGze2jusDbCSzBfN8pfktlL5On1AFrAygYo9idBcEq2EXxkd7fO9CAAozPOA/q +p1x4EaTByIVcJdPTsuclzxFUl6s1wB52HO8AU5853BSlLCIls3Jy/I2z5T4IHhQq +NwuIPMqw9MjCoa68wb4pZ1Xi/K1ZXP69VyywkI3C7Te2fJmItdUDmj0VDT06qKhF +8JVOJVkdzZhpu9PMMsmN74H+rX2Ju7pgE8pllWeg8xn2A1bUatMn4qGtg/BKEiJ3 +HAVz4hlxQsDsdUaakFjgao4rpUYwBI4Zshfjvqm6f1bxJAPXsiEodg42MEx51UGa +mqi4NboMOvJEGyCI98Ul1z3G4z5D3Yf+xOr1Uz5MZf87Sst4WmsXXw3Hw09Omiqi +7VdNIuJGmj8PkTQkfVXjjJU30xrwCSss0smNtA0Aq2cpKNgB9RkEth2+dv5yXMSF +ytKAQd8FqKPVhJBPC/PgP5sZ0jeJP/J7UhyM9uH3PAeXjA6iWYEMspA90+NZRu0P +qafegGtaqge2Gcu8V/OXIXoMsSt0Puvap2ctTMSYnjYJdmZm/Bo/6khUHL4wvYBQ +v3y1zgD2DGHZ5yQD4OMBgQ692IU0iL2yNqh7XAjlRICMb/gv1SHKHRzQ+8S1h9E6 +Tsd2tTVItQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSM+xx1 +vALTn04uSNn5YFSqxLNP+jAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQAD +ggIBAEii1QALLtA/vBzVtVRJHlpr9OTy4EA34MwUe7nJ+jW1dReTagVphZzNTxl4 +WxmB82M+w85bj/UvXgF2Ez8sALnNllI5SW0ETsXpD4YN4fqzX4IS8TrOZgYkNCvo +zMrnadyHncI013nR03e4qllY/p0m+jiGPp2Kh2RX5Rc64vmNueMzeMGQ2Ljdt4NR +5MTMI9UGfOZR0800McD2RrsLrfw9EAUqO0qRJe6M1ISHgCq8CYyqOhNf6DR5UMEQ +GfnTKB7U0VEwKbOukGfWHwpjscWpxkIxYxeU72nLL/qMFH3EQxiJ2fAyQOaA4kZf +5ePBAFmo+eggvIksDkc0C+pXwlM2/KfUrzHN/gLldfq5Jwn58/U7yn2fqSLLiMmq +0Uc9NneoWWRrJ8/vJ8HjJLWG965+Mk2weWjROeiQWMODvA8s1pfrzgzhIMfatz7D +P78v3DSk+yshzWePS/Tj6tQ/50+6uaWTRRxmHyH6ZF5v4HaUMst19W7l9o/HuKTM +qJZ9ZPskWkoDbGs4xugDQ5r3V7mzKWmTOPQD8rv7gmsHINFSH5pkAnuYZttcTVoP +0ISVoDwUQwbKytu4QTbaakRnh6+v40URFWkIsr4WOZckbxJF0WddCajJFdr60qZf +E2Efv4WstK2tBZQIgx51F9NxO5NQI1mg7TyRVJ12AMXDuDjb +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/GLOBALTRUST_2020.pem b/secure/caroot/trusted/GLOBALTRUST_2020.pem new file mode 100644 index 000000000000..2b9f9fc388f8 --- /dev/null +++ b/secure/caroot/trusted/GLOBALTRUST_2020.pem @@ -0,0 +1,138 @@ +## +## GLOBALTRUST 2020 +## +## 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: + 5a:4b:bd:5a:fb:4f:8a:5b:fa:65:e5 + Signature Algorithm: sha256WithRSAEncryption + Issuer: C = AT, O = e-commerce monitoring GmbH, CN = GLOBALTRUST 2020 + Validity + Not Before: Feb 10 00:00:00 2020 GMT + Not After : Jun 10 00:00:00 2040 GMT + Subject: C = AT, O = e-commerce monitoring GmbH, CN = GLOBALTRUST 2020 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:ae:2e:56:ad:1b:1c:ef:f6:95:8f:a0:77:1b:2b: + d3:63:8f:84:4d:45:a2:0f:9f:5b:45:ab:59:7b:51: + 34:f9:ec:8b:8a:78:c5:dd:6b:af:bd:c4:df:93:45: + 1e:bf:91:38:0b:ae:0e:16:e7:41:73:f8:db:bb:d1: + b8:51:e0:cb:83:3b:73:38:6e:77:8a:0f:59:63:26: + cd:a7:2a:ce:54:fb:b8:e2:c0:7c:47:ce:60:7c:3f: + b2:73:f2:c0:19:b6:8a:92:87:35:0d:90:28:a2:e4: + 15:04:63:3e:ba:af:ee:7c:5e:cc:a6:8b:50:b2:38: + f7:41:63:ca:ce:ff:69:8f:68:0e:95:36:e5:cc:b9: + 8c:09:ca:4b:dd:31:90:96:c8:cc:1f:fd:56:96:34: + db:8e:1c:ea:2c:be:85:2e:63:dd:aa:a9:95:d3:fd: + 29:95:13:f0:c8:98:93:d9:2d:16:47:90:11:83:a2: + 3a:22:a2:28:57:a2:eb:fe:c0:8c:28:a0:a6:7d:e7: + 2a:42:3b:82:80:63:a5:63:1f:19:cc:7c:b2:66:a8: + c2:d3:6d:37:6f:e2:7e:06:51:d9:45:84:1f:12:ce: + 24:52:64:85:0b:48:80:4e:87:b1:22:22:30:aa:eb: + ae:be:e0:02:e0:40:e8:b0:42:80:03:51:aa:b4:7e: + aa:44:d7:43:61:f3:a2:6b:16:89:49:a4:a3:a4:2b: + 8a:02:c4:78:f4:68:8a:c1:e4:7a:36:b1:6f:1b:96: + 1b:77:49:8d:d4:c9:06:72:8f:cf:53:e3:dc:17:85: + 20:4a:dc:98:27:d3:91:26:2b:47:1e:69:07:af:de: + a2:e4:e4:d4:6b:0b:b3:5e:7c:d4:24:80:47:29:69: + 3b:6e:e8:ac:fd:40:eb:d8:ed:71:71:2b:f2:e8:58: + 1d:eb:41:97:22:c5:1f:d4:39:d0:27:8f:87:e3:18: + f4:e0:a9:46:0d:f5:74:3a:82:2e:d0:6e:2c:91:a3: + 31:5c:3b:46:ea:7b:04:10:56:5e:80:1d:f5:a5:65: + e8:82:fc:e2:07:8c:62:45:f5:20:de:46:70:86:a1: + bc:93:d3:1e:74:a6:6c:b0:2c:f7:03:0c:88:0c:cb: + d4:72:53:86:bc:60:46:f3:98:6a:c2:f1:bf:43:f9: + 70:20:77:ca:37:41:79:55:52:63:8d:5b:12:9f:c5: + 68:c4:88:9d:ac:f2:30:ab:b7:a3:31:97:67:ad:8f: + 17:0f:6c:c7:73:ed:24:94:6b:c8:83:9a:d0:9a:37: + 49:04:ab:b1:16:c8:6c:49:49:2d:ab:a1:d0:8c:92: + f2:41:4a:79:21:25:db:63:d7:b6:9c:a7:7e:42:69: + fb:3a:63 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + DC:2E:1F:D1:61:37:79:E4:AB:D5:D5:B3:12:71:68:3D:6A:68:9C:22 + X509v3 Authority Key Identifier: + keyid:DC:2E:1F:D1:61:37:79:E4:AB:D5:D5:B3:12:71:68:3D:6A:68:9C:22 + + Signature Algorithm: sha256WithRSAEncryption + 91:f0:42:02:68:40:ee:c3:68:c0:54:2f:df:ec:62:c3:c3:9e: + 8a:a0:31:28:aa:83:8e:a4:56:96:12:10:86:56:ba:97:72:d2: + 54:30:7c:ad:19:d5:1d:68:6f:fb:14:42:d8:8d:0e:f3:b5:d1: + a5:e3:02:42:5e:dc:e8:46:58:07:35:02:30:e0:bc:74:4a:c1: + 43:2a:ff:db:1a:d0:b0:af:6c:c3:fd:cb:b3:f5:7f:6d:03:2e: + 59:56:9d:2d:2d:35:8c:b2:d6:43:17:2c:92:0a:cb:5d:e8:8c: + 0f:4b:70:43:d0:82:ff:a8:cc:bf:a4:94:c0:be:87:bd:8a:e3: + 93:7b:c6:8f:9b:16:9d:27:65:bc:7a:c5:42:82:6c:5c:07:d0: + a9:c1:88:60:44:e9:98:85:16:5f:f8:8f:ca:01:10:ce:25:c3: + f9:60:1b:a0:c5:97:c3:d3:2c:88:31:a2:bd:30:ec:d0:d0:c0: + 12:f1:c1:39:e3:e5:f5:f8:d6:4a:dd:34:cd:fb:6f:c1:4f:e3: + 00:8b:56:e2:92:f7:28:b2:42:77:72:23:67:c7:3f:11:15:b2: + c4:03:05:be:bb:11:7b:0a:bf:a8:6e:e7:ff:58:43:cf:9b:67: + a0:80:07:b6:1d:ca:ad:6d:ea:41:11:7e:2d:74:93:fb:c2:bc: + be:51:44:c5:ef:68:25:27:80:e3:c8:a0:d4:12:ec:d9:a5:37: + 1d:37:7c:b4:91:ca:da:d4:b1:96:81:ef:68:5c:76:10:49:af: + 7e:a5:37:80:b1:1c:52:bd:33:81:4c:8f:f9:dd:65:d9:14:cd: + 8a:25:58:f4:e2:c5:83:a5:09:90:d4:6c:14:63:b5:40:df:eb: + c0:fc:c4:58:7e:0d:14:16:87:54:27:6e:56:e4:70:84:b8:6c: + 32:12:7e:82:31:43:be:d7:dd:7c:a1:ad:ae:d6:ab:20:12:ef: + 0a:c3:10:8c:49:96:35:dc:0b:75:5e:b1:4f:d5:4f:34:0e:11: + 20:07:75:43:45:e9:a3:11:da:ac:a3:99:c2:b6:79:27:e2:b9: + ef:c8:e2:f6:35:29:7a:74:fa:c5:7f:82:05:62:a6:0a:ea:68: + b2:79:47:06:6e:f2:57:a8:15:33:c6:f7:78:4a:3d:42:7b:6b: + 7e:fe:f7:46:ea:d1:eb:8e:ef:88:68:5b:e8:c1:d9:71:7e:fd: + 64:ef:ff:67:47:88:58:25:2f:3e:86:07:bd:fb:a8:e5:82:a8: + ac:a5:d3:69:43:cd:31:88:49:84:53:92:c0:b1:39:1b:39:83: + 01:30:c4:f2:a9:fa:d0:03:bd:72:37:60:56:1f:36:7c:bd:39: + 91:f5:6d:0d:bf:7b:d7:92 +SHA1 Fingerprint=D0:67:C1:13:51:01:0C:AA:D0:C7:6A:65:37:31:16:26:4F:53:71:A2 +-----BEGIN CERTIFICATE----- +MIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkG +A1UEBhMCQVQxIzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkw +FwYDVQQDExBHTE9CQUxUUlVTVCAyMDIwMB4XDTIwMDIxMDAwMDAwMFoXDTQwMDYx +MDAwMDAwMFowTTELMAkGA1UEBhMCQVQxIzAhBgNVBAoTGmUtY29tbWVyY2UgbW9u +aXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVTVCAyMDIwMIICIjANBgkq +hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAri5WrRsc7/aVj6B3GyvTY4+ETUWiD59b +RatZe1E0+eyLinjF3WuvvcTfk0Uev5E4C64OFudBc/jbu9G4UeDLgztzOG53ig9Z +YybNpyrOVPu44sB8R85gfD+yc/LAGbaKkoc1DZAoouQVBGM+uq/ufF7MpotQsjj3 +QWPKzv9pj2gOlTblzLmMCcpL3TGQlsjMH/1WljTbjhzqLL6FLmPdqqmV0/0plRPw +yJiT2S0WR5ARg6I6IqIoV6Lr/sCMKKCmfecqQjuCgGOlYx8ZzHyyZqjC0203b+J+ +BlHZRYQfEs4kUmSFC0iAToexIiIwquuuvuAC4EDosEKAA1GqtH6qRNdDYfOiaxaJ +SaSjpCuKAsR49GiKweR6NrFvG5Ybd0mN1MkGco/PU+PcF4UgStyYJ9ORJitHHmkH +r96i5OTUawuzXnzUJIBHKWk7buis/UDr2O1xcSvy6Fgd60GXIsUf1DnQJ4+H4xj0 +4KlGDfV0OoIu0G4skaMxXDtG6nsEEFZegB31pWXogvziB4xiRfUg3kZwhqG8k9Me +dKZssCz3AwyIDMvUclOGvGBG85hqwvG/Q/lwIHfKN0F5VVJjjVsSn8VoxIidrPIw +q7ejMZdnrY8XD2zHc+0klGvIg5rQmjdJBKuxFshsSUktq6HQjJLyQUp5ISXbY9e2 +nKd+Qmn7OmMCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwHQYDVR0OBBYEFNwuH9FhN3nkq9XVsxJxaD1qaJwiMB8GA1UdIwQYMBaAFNwu +H9FhN3nkq9XVsxJxaD1qaJwiMA0GCSqGSIb3DQEBCwUAA4ICAQCR8EICaEDuw2jA +VC/f7GLDw56KoDEoqoOOpFaWEhCGVrqXctJUMHytGdUdaG/7FELYjQ7ztdGl4wJC +XtzoRlgHNQIw4Lx0SsFDKv/bGtCwr2zD/cuz9X9tAy5ZVp0tLTWMstZDFyySCstd +6IwPS3BD0IL/qMy/pJTAvoe9iuOTe8aPmxadJ2W8esVCgmxcB9CpwYhgROmYhRZf ++I/KARDOJcP5YBugxZfD0yyIMaK9MOzQ0MAS8cE54+X1+NZK3TTN+2/BT+MAi1bi +kvcoskJ3ciNnxz8RFbLEAwW+uxF7Cr+obuf/WEPPm2eggAe2HcqtbepBEX4tdJP7 +wry+UUTF72glJ4DjyKDUEuzZpTcdN3y0kcra1LGWge9oXHYQSa9+pTeAsRxSvTOB +TI/53WXZFM2KJVj04sWDpQmQ1GwUY7VA3+vA/MRYfg0UFodUJ25W5HCEuGwyEn6C +MUO+1918oa2u1qsgEu8KwxCMSZY13At1XrFP1U80DhEgB3VDRemjEdqso5nCtnkn +4rnvyOL2NSl6dPrFf4IFYqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+I +aFvowdlxfv1k7/9nR4hYJS8+hge9+6jlgqispdNpQ80xiEmEU5LAsTkbOYMBMMTy +qfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg== +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/QuoVadis_Root_CA.pem b/secure/caroot/untrusted/QuoVadis_Root_CA.pem similarity index 100% rename from secure/caroot/trusted/QuoVadis_Root_CA.pem rename to secure/caroot/untrusted/QuoVadis_Root_CA.pem diff --git a/secure/caroot/trusted/Sonera_Class_2_Root_CA.pem b/secure/caroot/untrusted/Sonera_Class_2_Root_CA.pem similarity index 100% rename from secure/caroot/trusted/Sonera_Class_2_Root_CA.pem rename to secure/caroot/untrusted/Sonera_Class_2_Root_CA.pem From owner-dev-commits-src-all@freebsd.org Sat Sep 4 07:39:24 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 07:39:25 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 07:39:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 07:39:33 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 07:43:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 07:43:33 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 07:44:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 07:45:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 07:45:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 09:20:48 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DFB7C6AEEA7; Sat, 4 Sep 2021 09:20: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 4H1q005n31z4pmq; Sat, 4 Sep 2021 09:20: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 A68BF1542E; Sat, 4 Sep 2021 09:20: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 1849Km5v092371; Sat, 4 Sep 2021 09:20:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1849KmBc092370; Sat, 4 Sep 2021 09:20:48 GMT (envelope-from git) Date: Sat, 4 Sep 2021 09:20:48 GMT Message-Id: <202109040920.1849KmBc092370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 49c220b021d5 - main - net80211: comments and whitespace MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49c220b021d5855652ecb2803c969dfa47bdd306 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 09:20:48 -0000 The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=49c220b021d5855652ecb2803c969dfa47bdd306 commit 49c220b021d5855652ecb2803c969dfa47bdd306 Author: Bjoern A. Zeeb AuthorDate: 2021-09-04 09:16:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-09-04 09:16:25 +0000 net80211: comments and whitespace Add a missing '.', fix spelling of "failed" and unwrap a closing ); No functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/net80211/ieee80211_input.h | 2 +- sys/net80211/ieee80211_output.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/net80211/ieee80211_input.h b/sys/net80211/ieee80211_input.h index 810dcbde7978..7456fc68b365 100644 --- a/sys/net80211/ieee80211_input.h +++ b/sys/net80211/ieee80211_input.h @@ -178,7 +178,7 @@ ieee80211_check_rxseq_amsdu_more(const struct ieee80211_rx_stats *rxs) * * The routine only eliminates packets whose sequence/fragment * match or are less than the last seen sequence/fragment number - * AND are retransmits It doesn't try to eliminate out of order packets. + * AND are retransmits. It doesn't try to eliminate out of order packets. * * Since all frames after sequence number 4095 will be less than 4095 * (as the seqnum wraps), handle that special case so packets aren't diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index ab3e3142ad2c..4f9e9614f732 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -2590,7 +2590,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni, ret = ieee80211_probereq_ie(vap, ic, &frm, &frmlen, ssid, ssidlen, false); KASSERT(ret == 0, - ("%s: ieee80211_probereq_ie railed: %d\n", __func__, ret)); + ("%s: ieee80211_probereq_ie failed: %d\n", __func__, ret)); m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); KASSERT(M_LEADINGSPACE(m) >= sizeof(struct ieee80211_frame), @@ -2725,8 +2725,7 @@ ieee80211_send_mgmt(struct ieee80211_node *ni, int type, int arg) ic->ic_headroom + sizeof(struct ieee80211_frame), 3 * sizeof(uint16_t) + (has_challenge && status == IEEE80211_STATUS_SUCCESS ? - sizeof(uint16_t)+IEEE80211_CHALLENGE_LEN : 0) - ); + sizeof(uint16_t)+IEEE80211_CHALLENGE_LEN : 0)); if (m == NULL) senderr(ENOMEM, is_tx_nobuf); From owner-dev-commits-src-all@freebsd.org Sat Sep 4 09:30:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C791E6AE9D5; Sat, 4 Sep 2021 09:30: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 4H1qCC5D1nz4s18; Sat, 4 Sep 2021 09:30: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 94CE615443; Sat, 4 Sep 2021 09:30: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 1849UVgj005544; Sat, 4 Sep 2021 09:30:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1849UVv5005542; Sat, 4 Sep 2021 09:30:31 GMT (envelope-from git) Date: Sat, 4 Sep 2021 09:30:31 GMT Message-Id: <202109040930.1849UVv5005542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: cb5c07649aa0 - main - net80211: add func/line information to IEEE80211_DISCARD* macros MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb5c07649aa005abb1e847c2cd5f816d762efb93 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 09:30:31 -0000 The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=cb5c07649aa005abb1e847c2cd5f816d762efb93 commit cb5c07649aa005abb1e847c2cd5f816d762efb93 Author: Bjoern A. Zeeb AuthorDate: 2021-09-04 09:24:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-09-04 09:24:51 +0000 net80211: add func/line information to IEEE80211_DISCARD* macros While debugging is very good in net80211, some log messages are repeated in multiple places 1:1. In order to distinguish where the discard happened and to speed up analysis, add __func__:__LINE__ information to all these messages. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/net80211/ieee80211_var.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 350c9b98441d..e70b7f8e2bb6 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -1067,15 +1067,18 @@ void ieee80211_note_frame(const struct ieee80211vap *, */ #define IEEE80211_DISCARD(_vap, _m, _wh, _type, _fmt, ...) do { \ if ((_vap)->iv_debug & (_m)) \ - ieee80211_discard_frame(_vap, _wh, _type, _fmt, __VA_ARGS__);\ + ieee80211_discard_frame(_vap, _wh, _type, \ + "%s:%d: " _fmt, __func__, __LINE__, __VA_ARGS__); \ } while (0) #define IEEE80211_DISCARD_IE(_vap, _m, _wh, _type, _fmt, ...) do { \ if ((_vap)->iv_debug & (_m)) \ - ieee80211_discard_ie(_vap, _wh, _type, _fmt, __VA_ARGS__);\ + ieee80211_discard_ie(_vap, _wh, _type, \ + "%s:%d: " _fmt, __func__, __LINE__, __VA_ARGS__); \ } while (0) #define IEEE80211_DISCARD_MAC(_vap, _m, _mac, _type, _fmt, ...) do { \ if ((_vap)->iv_debug & (_m)) \ - ieee80211_discard_mac(_vap, _mac, _type, _fmt, __VA_ARGS__);\ + ieee80211_discard_mac(_vap, _mac, _type, \ + "%s:%d: " _fmt, __func__, __LINE__, __VA_ARGS__); \ } while (0) void ieee80211_discard_frame(const struct ieee80211vap *, From owner-dev-commits-src-all@freebsd.org Sat Sep 4 10:57:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F28BB660107; Sat, 4 Sep 2021 10:57: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 4H1s7Y6Gzyz3FnW; Sat, 4 Sep 2021 10:57: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 B83091692D; Sat, 4 Sep 2021 10:57: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 184AvTGR016845; Sat, 4 Sep 2021 10:57:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184AvTor016844; Sat, 4 Sep 2021 10:57:29 GMT (envelope-from git) Date: Sat, 4 Sep 2021 10:57:29 GMT Message-Id: <202109041057.184AvTor016844@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 631504fb3468 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 631504fb346800f95fc581c15eb88b01c1b66fcf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 10:57:30 -0000 The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=631504fb346800f95fc581c15eb88b01c1b66fcf commit 631504fb346800f95fc581c15eb88b01c1b66fcf Author: Gordon Bergling AuthorDate: 2021-09-04 10:56:57 +0000 Commit: Gordon Bergling CommitDate: 2021-09-04 10:56:57 +0000 Fix a common typo in source code comments - s/existant/existent/ MFC after: 3 days --- sys/dev/sfxge/common/efx_vpd.c | 2 +- sys/mips/cavium/octe/ethernet-util.h | 2 +- sys/netinet/sctp_output.c | 4 ++-- sys/rpc/svc.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/sfxge/common/efx_vpd.c b/sys/dev/sfxge/common/efx_vpd.c index 55ad2fde136e..daebf40d8c89 100644 --- a/sys/dev/sfxge/common/efx_vpd.c +++ b/sys/dev/sfxge/common/efx_vpd.c @@ -901,7 +901,7 @@ efx_vpd_hunk_set( /* * The keyword doesn't already exist. If the - * user deleting a non-existant keyword then + * user deleting a non-existent keyword then * this is a no-op. */ if (evvp->evv_length == 0) diff --git a/sys/mips/cavium/octe/ethernet-util.h b/sys/mips/cavium/octe/ethernet-util.h index 2c6c280a15ba..1a4144233c75 100644 --- a/sys/mips/cavium/octe/ethernet-util.h +++ b/sys/mips/cavium/octe/ethernet-util.h @@ -59,7 +59,7 @@ static inline int INTERFACE(int ipd_port) return 2; else if (ipd_port < 40) /* Interface 3 for loopback */ return 3; - else if (ipd_port == 40) /* Non existant interface for POW0 */ + else if (ipd_port == 40) /* Non existent interface for POW0 */ return 4; else panic("Illegal ipd_port %d passed to INTERFACE\n", ipd_port); diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 07635851c62d..be91084f1287 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -12693,8 +12693,8 @@ sctp_lower_sosend(struct socket *so, if ((sinfo_flags & SCTP_ABORT) || ((sinfo_flags & SCTP_EOF) && (sndlen == 0))) { /*- - * User asks to abort a non-existant assoc, - * or EOF a non-existant assoc with no data + * User asks to abort a non-existent assoc, + * or EOF a non-existent assoc with no data */ SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, ENOENT); error = ENOENT; diff --git a/sys/rpc/svc.h b/sys/rpc/svc.h index d92fa6953891..9a6efdef78a9 100644 --- a/sys/rpc/svc.h +++ b/sys/rpc/svc.h @@ -669,7 +669,7 @@ __END_DECLS * Somebody has to wait for incoming requests and then call the correct * service routine. The routine svc_run does infinite waiting; i.e., * svc_run never returns. - * Since another (co-existant) package may wish to selectively wait for + * Since another (co-existent) package may wish to selectively wait for * incoming calls or other events outside of the rpc architecture, the * routine svc_getreq is provided. It must be passed readfds, the * "in-place" results of a select system call (see select, section 2). From owner-dev-commits-src-all@freebsd.org Sat Sep 4 11:04:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7C0046AFD4D; Sat, 4 Sep 2021 11:04: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 4H1sH533X7z3HkP; Sat, 4 Sep 2021 11:04: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 49B5F16B5F; Sat, 4 Sep 2021 11:04: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 184B41Fr031075; Sat, 4 Sep 2021 11:04:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184B41xa031074; Sat, 4 Sep 2021 11:04:01 GMT (envelope-from git) Date: Sat, 4 Sep 2021 11:04:01 GMT Message-Id: <202109041104.184B41xa031074@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 88a3af4da1aa - main - crypto(4): Fix a few typos in camellia.c 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/main X-Git-Reftype: branch X-Git-Commit: 88a3af4da1aad5cf319c4c465baebc24b4e98fd8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 11:04:01 -0000 The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=88a3af4da1aad5cf319c4c465baebc24b4e98fd8 commit 88a3af4da1aad5cf319c4c465baebc24b4e98fd8 Author: Gordon Bergling AuthorDate: 2021-09-04 11:02:11 +0000 Commit: Gordon Bergling CommitDate: 2021-09-04 11:02:11 +0000 crypto(4): Fix a few typos in camellia.c - s/valiables/variables/ Obtained from: NetBSD MFC after: 3 days --- sys/crypto/camellia/camellia.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/crypto/camellia/camellia.c b/sys/crypto/camellia/camellia.c index a48c83f73a80..3a42d1dcec67 100644 --- a/sys/crypto/camellia/camellia.c +++ b/sys/crypto/camellia/camellia.c @@ -1012,7 +1012,7 @@ camellia_encrypt128(const uint32_t *subkey, uint32_t *io) void camellia_decrypt128(const uint32_t *subkey, uint32_t *io) { - uint32_t il,ir,t0,t1; /* temporary valiables */ + uint32_t il,ir,t0,t1; /* temporary variables */ /* pre whitening but absorb kw2*/ io[0] ^= SUBL(24); @@ -1082,7 +1082,7 @@ camellia_decrypt128(const uint32_t *subkey, uint32_t *io) void camellia_encrypt256(const uint32_t *subkey, uint32_t *io) { - uint32_t il,ir,t0,t1; /* temporary valiables */ + uint32_t il,ir,t0,t1; /* temporary variables */ /* pre whitening but absorb kw2*/ io[0] ^= SUBL(0); @@ -1165,7 +1165,7 @@ camellia_encrypt256(const uint32_t *subkey, uint32_t *io) void camellia_decrypt256(const uint32_t *subkey, uint32_t *io) { - uint32_t il,ir,t0,t1; /* temporary valiables */ + uint32_t il,ir,t0,t1; /* temporary variables */ /* pre whitening but absorb kw2*/ io[0] ^= SUBL(32); From owner-dev-commits-src-all@freebsd.org Sat Sep 4 12:26:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 12:28:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sat Sep 4 14:42:39 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0AFA1665B88; Sat, 4 Sep 2021 14:42: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 4H1y7L6sp0z3LGZ; Sat, 4 Sep 2021 14:42: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 C224719AB0; Sat, 4 Sep 2021 14:42: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 184EgcYG025642; Sat, 4 Sep 2021 14:42:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184Egc1e025641; Sat, 4 Sep 2021 14:42:38 GMT (envelope-from git) Date: Sat, 4 Sep 2021 14:42:38 GMT Message-Id: <202109041442.184Egc1e025641@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 846a6e8f9ab2 - main - pfctl: print counters in decimal 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/main X-Git-Reftype: branch X-Git-Commit: 846a6e8f9ab25df4e06d28c05fb66060d803c9ba Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 14:42:39 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=846a6e8f9ab25df4e06d28c05fb66060d803c9ba commit 846a6e8f9ab25df4e06d28c05fb66060d803c9ba Author: Kristof Provost AuthorDate: 2021-09-04 14:07:59 +0000 Commit: Kristof Provost CommitDate: 2021-09-04 14:07:59 +0000 pfctl: print counters in decimal 795d78a46713 pfctl: Don't use PRIu64 mistakenly changed these to be printed as hexadecimal numbers. Reported by: Florian Smeets MFC after: 4 days Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl_parser.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 04c3bf76bfd8..89c9bc349ca3 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -575,9 +575,9 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) (unsigned long long)s->pcounters[1][1][PF_DROP]); } printf("%-27s %14s %16s\n", "State Table", "Total", "Rate"); - printf(" %-25s %14jx %14s\n", "current entries", s->states, ""); + printf(" %-25s %14ju %14s\n", "current entries", s->states, ""); TAILQ_FOREACH(c, &s->fcounters, entry) { - printf(" %-25s %14jx ", c->name, c->counter); + printf(" %-25s %14ju ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime); @@ -586,10 +586,10 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) } if (opts & PF_OPT_VERBOSE) { printf("Source Tracking Table\n"); - printf(" %-25s %14jx %14s\n", "current entries", + printf(" %-25s %14ju %14s\n", "current entries", s->src_nodes, ""); TAILQ_FOREACH(c, &s->scounters, entry) { - printf(" %-25s %14jx ", c->name, c->counter); + printf(" %-25s %14ju ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime); @@ -599,7 +599,7 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) } printf("Counters\n"); TAILQ_FOREACH(c, &s->counters, entry) { - printf(" %-25s %14jx ", c->name, c->counter); + printf(" %-25s %14ju ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime); @@ -609,7 +609,7 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) if (opts & PF_OPT_VERBOSE) { printf("Limit Counters\n"); TAILQ_FOREACH(c, &s->lcounters, entry) { - printf(" %-25s %14jx ", c->name, c->counter); + printf(" %-25s %14ju ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime); From owner-dev-commits-src-all@freebsd.org Sat Sep 4 15:34:52 2021 Return-Path: Delivered-To: dev-commits-src-all@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 CDA9B6663A8; Sat, 4 Sep 2021 15:34: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 4H1zHc5SYYz3pY1; Sat, 4 Sep 2021 15:34: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 9BB2D1A374; Sat, 4 Sep 2021 15:34: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 184FYqw8093347; Sat, 4 Sep 2021 15:34:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184FYq6n093346; Sat, 4 Sep 2021 15:34:52 GMT (envelope-from git) Date: Sat, 4 Sep 2021 15:34:52 GMT Message-Id: <202109041534.184FYq6n093346@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: b0025f9b7ff0 - main - openssh: update default version addendum in man pages 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/main X-Git-Reftype: branch X-Git-Commit: b0025f9b7ff04ed623e9e5d8f9eaf172d5ff23f0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 15:34:52 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b0025f9b7ff04ed623e9e5d8f9eaf172d5ff23f0 commit b0025f9b7ff04ed623e9e5d8f9eaf172d5ff23f0 Author: Ed Maste AuthorDate: 2021-09-04 15:33:13 +0000 Commit: Ed Maste CommitDate: 2021-09-04 15:33:13 +0000 openssh: update default version addendum in man pages Fixes: 2f513db72b03 ("Upgrade to OpenSSH 7.9p1.") MFC after: 3 days Sponsored by: The FreeBSD Foundation --- crypto/openssh/ssh_config.5 | 2 +- crypto/openssh/sshd_config.5 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/openssh/ssh_config.5 b/crypto/openssh/ssh_config.5 index 468b5025ae14..e8b52f309b50 100644 --- a/crypto/openssh/ssh_config.5 +++ b/crypto/openssh/ssh_config.5 @@ -1658,7 +1658,7 @@ in Specifies a string to append to the regular version string to identify OS- or site-specific modifications. The default is -.Dq FreeBSD-20180909 . +.Dq FreeBSD-20200214 . The value .Cm none may be used to disable this. diff --git a/crypto/openssh/sshd_config.5 b/crypto/openssh/sshd_config.5 index d28622d984a1..0ae5e665af3d 100644 --- a/crypto/openssh/sshd_config.5 +++ b/crypto/openssh/sshd_config.5 @@ -1654,7 +1654,7 @@ The default is Optionally specifies additional text to append to the SSH protocol banner sent by the server upon connection. The default is -.Qq FreeBSD-20180909 . +.Qq FreeBSD-20200214 . The value .Cm none may be used to disable this. From owner-dev-commits-src-all@freebsd.org Sat Sep 4 16:34:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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 91278668348; Sat, 4 Sep 2021 16:34: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 4H20cW3SNnz4cRv; Sat, 4 Sep 2021 16: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 573791B0F8; Sat, 4 Sep 2021 16: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 184GYZTR074778; Sat, 4 Sep 2021 16: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 184GYZVa074777; Sat, 4 Sep 2021 16:34:35 GMT (envelope-from git) Date: Sat, 4 Sep 2021 16:34:35 GMT Message-Id: <202109041634.184GYZVa074777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 35a1aa5f9c20 - main - [PowerPC] Fix outdated FP regs on fork(2) and friends MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35a1aa5f9c20a4c5ca881095972c0b71a032052f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 16:34:35 -0000 The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=35a1aa5f9c20a4c5ca881095972c0b71a032052f commit 35a1aa5f9c20a4c5ca881095972c0b71a032052f Author: Brandon Bergren AuthorDate: 2021-05-03 02:12:18 +0000 Commit: Justin Hibbits CommitDate: 2021-09-04 16:33:03 +0000 [PowerPC] Fix outdated FP regs on fork(2) and friends Summary: Failure to update the FP / vector state was causing daemon(3) to violate C ABI by failing to preserve nonvolatile registers. This was causing a weird issue where moused was not working on PowerBook G4s when daemonizing, but was working fine when running it foreground. Force saving off the same state that cpu_switch() does in cases where we are about to copy a thread. MFC after: 1 week Sponsored by: Tag1 Consulting, Inc. Test Plan: ``` /* * Test for ABI violation due to side effects of daemon(3). * * NOTE: Compile with -O2 to see the effect. */ /* Allow compiling for Linux too. */ static double test = 1234.56f; /* * This contrivance coerces clang to not bounce the double * off of memory again in main. */ void __attribute__((noinline)) print_double(int j1, int j2, double d) { printf("%f\n", d); } int main(int argc, char *argv[]) { print_double(0, 0, test); if (daemon(0, 1)) { } /* Compiler assumes nonvolatile regs are intact... */ print_double(0, 0, test); return(0); } ``` Working output: ``` 1234.560059 1234.560059 ``` Output in broken case: ``` 1234.560059 0.0 ``` Reviewers: #powerpc Subscribers: jhibbits, luporl, alfredo Tags: #powerpc Differential Revision: https://reviews.freebsd.org/D29851 --- sys/powerpc/include/reg.h | 5 +++ sys/powerpc/powerpc/exec_machdep.c | 72 ++++++++++++++++++++++++++++++++++++++ sys/powerpc/powerpc/swtch32.S | 2 ++ sys/powerpc/powerpc/swtch64.S | 2 ++ sys/powerpc/powerpc/vm_machdep.c | 5 +++ 5 files changed, 86 insertions(+) diff --git a/sys/powerpc/include/reg.h b/sys/powerpc/include/reg.h index a824792b0f12..c0bf807ac75e 100644 --- a/sys/powerpc/include/reg.h +++ b/sys/powerpc/include/reg.h @@ -68,6 +68,11 @@ int set_fpregs(struct thread *, struct fpreg *); int fill_dbregs(struct thread *, struct dbreg *); int set_dbregs(struct thread *, struct dbreg *); +/* + * MD interfaces. + */ +void cpu_save_thread_regs(struct thread *); + #ifdef COMPAT_FREEBSD32 struct image_params; diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index d90071f13650..7be7aa3ed241 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -570,6 +570,74 @@ cleanup_power_extras(struct thread *td) cleanup_fpscr(); } +/* + * Ensure the PCB has been updated in preparation for copying a thread. + * + * This is needed because normally this only happens during switching tasks, + * but when we are cloning a thread, we need the updated state before doing + * the actual copy, so the new thread inherits the current state instead of + * the state at the last task switch. + * + * Keep this in sync with the assembly code in cpu_switch()! + */ +void +cpu_save_thread_regs(struct thread *td) +{ + uint32_t pcb_flags; + struct pcb *pcb; + + KASSERT(td == curthread, + ("cpu_save_thread_regs: td is not curthread")); + + pcb = td->td_pcb; + + pcb_flags = pcb->pcb_flags; + +#if defined(__powerpc64__) + /* Are *any* FSCR flags in use? */ + if (pcb_flags & PCB_CFSCR) { + pcb->pcb_fscr = mfspr(SPR_FSCR); + + if (pcb->pcb_fscr & FSCR_EBB) { + pcb->pcb_ebb.ebbhr = mfspr(SPR_EBBHR); + pcb->pcb_ebb.ebbrr = mfspr(SPR_EBBRR); + pcb->pcb_ebb.bescr = mfspr(SPR_BESCR); + } + if (pcb->pcb_fscr & FSCR_LM) { + pcb->pcb_lm.lmrr = mfspr(SPR_LMRR); + pcb->pcb_lm.lmser = mfspr(SPR_LMSER); + } + if (pcb->pcb_fscr & FSCR_TAR) + pcb->pcb_tar = mfspr(SPR_TAR); + } + + /* + * This is outside of the PCB_CFSCR check because it can be set + * independently when running on POWER7/POWER8. + */ + if (pcb_flags & PCB_CDSCR) + pcb->pcb_dscr = mfspr(SPR_DSCRP); +#endif + +#if defined(__SPE__) + /* + * On E500v2, single-precision scalar instructions and access to + * SPEFSCR may be used without PSL_VEC turned on, as long as they + * limit themselves to the low word of the registers. + * + * As such, we need to unconditionally save SPEFSCR, even though + * it is also updated in save_vec_nodrop(). + */ + pcb->pcb_vec.vscr = mfspr(SPR_SPEFSCR); +#endif + + if (pcb_flags & PCB_FPU) + save_fpu_nodrop(td); + + if (pcb_flags & PCB_VEC) + save_vec_nodrop(td); +} + /* * Set set up registers on exec. */ @@ -1028,6 +1096,10 @@ cpu_copy_thread(struct thread *td, struct thread *td0) struct trapframe *tf; struct callframe *cf; + /* Ensure td0 pcb is up to date. */ + if (td == curthread) + cpu_save_thread_regs(td0); + pcb2 = td->td_pcb; /* Copy the upcall pcb */ diff --git a/sys/powerpc/powerpc/swtch32.S b/sys/powerpc/powerpc/swtch32.S index dba0171577a4..76bdd0b9af87 100644 --- a/sys/powerpc/powerpc/swtch32.S +++ b/sys/powerpc/powerpc/swtch32.S @@ -104,6 +104,8 @@ ENTRY(cpu_switch) mr %r16,%r5 /* and the new lock */ mr %r17,%r6 /* and the PCB */ + /* Keep this next section in sync with cpu_save_thread_regs()! */ + lwz %r18,PCB_FLAGS(%r17) /* Save FPU context if needed */ andi. %r7, %r18, PCB_FPU diff --git a/sys/powerpc/powerpc/swtch64.S b/sys/powerpc/powerpc/swtch64.S index fe59a166f3cb..49d50ad70f7a 100644 --- a/sys/powerpc/powerpc/swtch64.S +++ b/sys/powerpc/powerpc/swtch64.S @@ -131,6 +131,8 @@ ENTRY(cpu_switch) stdu %r1,-48(%r1) + /* Keep this next section in sync with cpu_save_thread_regs()! */ + lwz %r18, PCB_FLAGS(%r17) andi. %r7, %r18, PCB_CFSCR beq 1f diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index 4aab71ec036c..a7de9f0f6a1f 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -91,6 +91,7 @@ #include #include #include +#include #include @@ -121,6 +122,10 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) if ((flags & RFPROC) == 0) return; + /* Ensure td1 is up to date before copy. */ + if (td1 == curthread) + cpu_save_thread_regs(td1); + pcb = (struct pcb *)((td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb)) & ~0x2fUL); td2->td_pcb = pcb; From owner-dev-commits-src-all@freebsd.org Sat Sep 4 16:44:39 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6A1FD668AB2; Sat, 4 Sep 2021 16:44: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 4H20r72H0Zz4ft4; Sat, 4 Sep 2021 16:44:39 +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 2BC721B3C1; Sat, 4 Sep 2021 16:44:39 +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 184GidmC087805; Sat, 4 Sep 2021 16:44:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184GidGY087804; Sat, 4 Sep 2021 16:44:39 GMT (envelope-from git) Date: Sat, 4 Sep 2021 16:44:39 GMT Message-Id: <202109041644.184GidGY087804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: eb937f67f837 - main - powerpc: Fix typo in thread register copy MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb937f67f8378adf650e43cadd87ddb9afdea5dd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 16:44:39 -0000 The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=eb937f67f8378adf650e43cadd87ddb9afdea5dd commit eb937f67f8378adf650e43cadd87ddb9afdea5dd Author: Justin Hibbits AuthorDate: 2021-09-04 16:43:17 +0000 Commit: Justin Hibbits CommitDate: 2021-09-04 16:44:02 +0000 powerpc: Fix typo in thread register copy Should be saving off td0's register's, not td's. --- sys/powerpc/powerpc/exec_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 7be7aa3ed241..66bc951fc545 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -1097,7 +1097,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) struct callframe *cf; /* Ensure td0 pcb is up to date. */ - if (td == curthread) + if (td0 == curthread) cpu_save_thread_regs(td0); pcb2 = td->td_pcb; From owner-dev-commits-src-all@freebsd.org Sat Sep 4 16:48:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B6942668A49; Sat, 4 Sep 2021 16:48: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 4H20wt4ZcCz4g7x; Sat, 4 Sep 2021 16:48: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 79C161B06F; Sat, 4 Sep 2021 16:48: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 184Gmkhj088188; Sat, 4 Sep 2021 16:48:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184Gmkma088187; Sat, 4 Sep 2021 16:48:46 GMT (envelope-from git) Date: Sat, 4 Sep 2021 16:48:46 GMT Message-Id: <202109041648.184Gmkma088187@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 7b81e6c7caf2 - main - Support bootstrapping from Linux/ppc* MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b81e6c7caf23adca6a2cabdfdf29985eab9865d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 16:48:46 -0000 The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=7b81e6c7caf23adca6a2cabdfdf29985eab9865d commit 7b81e6c7caf23adca6a2cabdfdf29985eab9865d Author: Justin Hibbits AuthorDate: 2021-09-04 16:45:56 +0000 Commit: Justin Hibbits CommitDate: 2021-09-04 16:47:30 +0000 Support bootstrapping from Linux/ppc* --- tools/build/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build/Makefile b/tools/build/Makefile index 3b49eb44475e..742432872c49 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -125,6 +125,8 @@ _host_arch=${MACHINE} .if ${_host_arch} == "x86_64" # bmake on Linux/mac often prints that instead of amd64 _host_arch=amd64 +.elif ${_host_arch:Mppc*} +_host_arch=powerpc .endif .if ${_host_arch} == "unknown" # HACK: If MACHINE is unknown, assume we are building on x86 From owner-dev-commits-src-all@freebsd.org Sat Sep 4 18:46:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 28A9166A289; Sat, 4 Sep 2021 18:46: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 4H23XP0kpYz3k8N; Sat, 4 Sep 2021 18:46: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 ED3B41CF23; Sat, 4 Sep 2021 18:46: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 184IkCl0047994; Sat, 4 Sep 2021 18:46:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184IkCHw047993; Sat, 4 Sep 2021 18:46:12 GMT (envelope-from git) Date: Sat, 4 Sep 2021 18:46:12 GMT Message-Id: <202109041846.184IkCHw047993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 312f5f8a4fb9 - main - altq: mark callouts as mpsafe 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/main X-Git-Reftype: branch X-Git-Commit: 312f5f8a4fb92c46b5499139b48cf525a4049243 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 18:46:13 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=312f5f8a4fb92c46b5499139b48cf525a4049243 commit 312f5f8a4fb92c46b5499139b48cf525a4049243 Author: Kristof Provost AuthorDate: 2021-09-04 12:18:45 +0000 Commit: Kristof Provost CommitDate: 2021-09-04 15:26:10 +0000 altq: mark callouts as mpsafe There's no reason to acquire the Giant lock while executing the ALTQ callouts. While here also remove a few backwards compatibility defines for long obsolete FreeBSD versions. Reviewed by: mav Suggested by: mav Differential Revision: https://reviews.freebsd.org/D31835 --- sys/net/altq/altq_subr.c | 4 +--- sys/net/altq/altq_var.h | 9 +-------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c index 39f91c4daf63..32999b694bcb 100644 --- a/sys/net/altq/altq_subr.c +++ b/sys/net/altq/altq_subr.c @@ -908,9 +908,7 @@ EVENTHANDLER_DEFINE(cpufreq_post_change, tsc_freq_changed, NULL, static void init_machclk_setup(void) { -#if (__FreeBSD_version >= 600000) - callout_init(&tbr_callout, 0); -#endif + callout_init(&tbr_callout, 1); machclk_usepcc = 1; diff --git a/sys/net/altq/altq_var.h b/sys/net/altq/altq_var.h index f711e09334cb..6763fd972d7d 100644 --- a/sys/net/altq/altq_var.h +++ b/sys/net/altq/altq_var.h @@ -164,16 +164,9 @@ typedef u_long ioctlcmd_t; /* use callout */ #include -#if (__FreeBSD_version > 500000) -#define CALLOUT_INIT(c) callout_init((c), 0) -#else -#define CALLOUT_INIT(c) callout_init((c)) -#endif +#define CALLOUT_INIT(c) callout_init((c), 1) #define CALLOUT_RESET(c,t,f,a) callout_reset((c),(t),(f),(a)) #define CALLOUT_STOP(c) callout_stop((c)) -#if !defined(CALLOUT_INITIALIZER) && (__FreeBSD_version < 600000) -#define CALLOUT_INITIALIZER { { { NULL } }, 0, NULL, NULL, 0 } -#endif #define m_pktlen(m) ((m)->m_pkthdr.len) From owner-dev-commits-src-all@freebsd.org Sat Sep 4 19:54:27 2021 Return-Path: Delivered-To: dev-commits-src-all@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 EFEFB66B055; Sat, 4 Sep 2021 19:54: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 4H253769smz4WGt; Sat, 4 Sep 2021 19:54: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 B43F11D9FD; Sat, 4 Sep 2021 19:54: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 184JsRML041823; Sat, 4 Sep 2021 19:54:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184JsRSB041822; Sat, 4 Sep 2021 19:54:27 GMT (envelope-from git) Date: Sat, 4 Sep 2021 19:54:27 GMT Message-Id: <202109041954.184JsRSB041822@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 71bf3900b782 - main - ioat(4): Remove Giant from ioat_test enable/disable. 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/main X-Git-Reftype: branch X-Git-Commit: 71bf3900b7827643830dfd9aa1db81bc2926eadb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 19:54:28 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=71bf3900b7827643830dfd9aa1db81bc2926eadb commit 71bf3900b7827643830dfd9aa1db81bc2926eadb Author: Alexander Motin AuthorDate: 2021-09-04 19:53:28 +0000 Commit: Alexander Motin CommitDate: 2021-09-04 19:54:17 +0000 ioat(4): Remove Giant from ioat_test enable/disable. MFC after: 1 month --- sys/dev/ioat/ioat.c | 25 +++++++++++++++++++++++-- sys/dev/ioat/ioat_test.c | 26 ++++++++++++-------------- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/sys/dev/ioat/ioat.c b/sys/dev/ioat/ioat.c index 45a6c273822d..2badfedb7488 100644 --- a/sys/dev/ioat/ioat.c +++ b/sys/dev/ioat/ioat.c @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #define BUS_SPACE_MAXADDR_46BIT MIN(BUS_SPACE_MAXADDR, 0x3FFFFFFFFFFFULL) #endif +static int ioat_modevent(module_t mod, int type, void *data); static int ioat_probe(device_t device); static int ioat_attach(device_t device); static int ioat_detach(device_t device); @@ -147,7 +148,7 @@ static driver_t ioat_pci_driver = { }; static devclass_t ioat_devclass; -DRIVER_MODULE(ioat, pci, ioat_pci_driver, ioat_devclass, 0, 0); +DRIVER_MODULE(ioat, pci, ioat_pci_driver, ioat_devclass, ioat_modevent, NULL); MODULE_VERSION(ioat, 1); /* @@ -248,6 +249,27 @@ MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ioat, pci_ids, /* * OS <-> Driver linkage functions */ +static int +ioat_modevent(module_t mod __unused, int type, void *data __unused) +{ + switch(type) { + case MOD_LOAD: + break; + + case MOD_UNLOAD: + ioat_test_detach(); + break; + + case MOD_SHUTDOWN: + break; + + default: + return (EOPNOTSUPP); + } + + return (0); +} + static int ioat_probe(device_t device) { @@ -362,7 +384,6 @@ ioat_detach(device_t device) ioat_channel_index--; mtx_unlock(&ioat_list_mtx); - ioat_test_detach(); taskqueue_drain(taskqueue_thread, &ioat->reset_task); mtx_lock(&ioat->submit_lock); diff --git a/sys/dev/ioat/ioat_test.c b/sys/dev/ioat/ioat_test.c index 0bd6a3377bea..3a42ba5fb54c 100644 --- a/sys/dev/ioat/ioat_test.c +++ b/sys/dev/ioat/ioat_test.c @@ -550,17 +550,21 @@ static struct cdevsw ioat_cdevsw = { static int enable_ioat_test(bool enable) { - - mtx_assert(&Giant, MA_OWNED); + struct make_dev_args devargs; + int error = 0; if (enable && g_ioat_cdev == NULL) { - g_ioat_cdev = make_dev(&ioat_cdevsw, 0, UID_ROOT, GID_WHEEL, - 0600, "ioat_test"); + make_dev_args_init(&devargs); + devargs.mda_devsw = &ioat_cdevsw; + devargs.mda_uid = UID_ROOT; + devargs.mda_gid = GID_WHEEL; + devargs.mda_mode = 0600; + error = make_dev_s(&devargs, &g_ioat_cdev, "ioat_test"); } else if (!enable && g_ioat_cdev != NULL) { destroy_dev(g_ioat_cdev); g_ioat_cdev = NULL; } - return (0); + return (error); } static int @@ -573,11 +577,10 @@ sysctl_enable_ioat_test(SYSCTL_HANDLER_ARGS) if (error != 0 || req->newptr == NULL) return (error); - enable_ioat_test(enabled); - return (0); + return (enable_ioat_test(enabled)); } SYSCTL_PROC(_hw_ioat, OID_AUTO, enable_ioat_test, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, 0, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, sysctl_enable_ioat_test, "I", "Non-zero: Enable the /dev/ioat_test device"); @@ -587,11 +590,8 @@ ioat_test_attach(void) char *val; val = kern_getenv("hw.ioat.enable_ioat_test"); - if (val != NULL && strcmp(val, "0") != 0) { - mtx_lock(&Giant); + if (val != NULL && strcmp(val, "0") != 0) enable_ioat_test(true); - mtx_unlock(&Giant); - } freeenv(val); } @@ -599,9 +599,7 @@ void ioat_test_detach(void) { - mtx_lock(&Giant); enable_ioat_test(false); - mtx_unlock(&Giant); } static void From owner-dev-commits-src-all@freebsd.org Sat Sep 4 20:13:07 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DC94366B4A0; Sat, 4 Sep 2021 20:13: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 4H25Sg5WSjz4f0m; Sat, 4 Sep 2021 20:13:07 +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 4890B1E23A; Sat, 4 Sep 2021 20:13:07 +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 184KD7Zo068680; Sat, 4 Sep 2021 20:13:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184KD7dY068679; Sat, 4 Sep 2021 20:13:07 GMT (envelope-from git) Date: Sat, 4 Sep 2021 20:13:07 GMT Message-Id: <202109042013.184KD7dY068679@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 541699f6f69c - main - Remove impossible checks. 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/main X-Git-Reftype: branch X-Git-Commit: 541699f6f69c2ba196386c31107b0159457013c2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 20:13:08 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=541699f6f69c2ba196386c31107b0159457013c2 commit 541699f6f69c2ba196386c31107b0159457013c2 Author: Alexander Motin AuthorDate: 2021-09-04 20:10:50 +0000 Commit: Alexander Motin CommitDate: 2021-09-04 20:10:50 +0000 Remove impossible checks. --- sys/dev/sound/pci/maestro.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/dev/sound/pci/maestro.c b/sys/dev/sound/pci/maestro.c index 0d55e1227b9a..ed1c9ef1cad6 100644 --- a/sys/dev/sound/pci/maestro.c +++ b/sys/dev/sound/pci/maestro.c @@ -1776,11 +1776,6 @@ agg_attach(device_t dev) mtx_init(&ess->lock, device_get_desc(dev), "snd_maestro softc", MTX_DEF | MTX_RECURSE); - if (!mtx_initialized(&ess->lock)) { - device_printf(dev, "failed to create a mutex.\n"); - ret = ENOMEM; - goto bad; - } if (resource_int_value(device_get_name(dev), device_get_unit(dev), "dac", &dacn) == 0) { @@ -1929,8 +1924,7 @@ agg_attach(device_t dev) bus_dma_tag_destroy(ess->stat_dmat); if (ess->buf_dmat != NULL) bus_dma_tag_destroy(ess->buf_dmat); - if (mtx_initialized(&ess->lock)) - mtx_destroy(&ess->lock); + mtx_destroy(&ess->lock); free(ess, M_DEVBUF); } From owner-dev-commits-src-all@freebsd.org Sat Sep 4 20:31:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 49A8E66C1B2; Sat, 4 Sep 2021 20:31: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 4H25ss1Zrcz4jxb; Sat, 4 Sep 2021 20:31: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 17E0A1E262; Sat, 4 Sep 2021 20:31: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 184KVS2U092150; Sat, 4 Sep 2021 20:31:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184KVS7w092149; Sat, 4 Sep 2021 20:31:28 GMT (envelope-from git) Date: Sat, 4 Sep 2021 20:31:28 GMT Message-Id: <202109042031.184KVS7w092149@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 440320b620a2 - main - ffs: remove unused thread argument from ffs_reload() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 440320b620a29fdc4033a2b9b67eb4401cb903bb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 20:31:29 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=440320b620a29fdc4033a2b9b67eb4401cb903bb commit 440320b620a29fdc4033a2b9b67eb4401cb903bb Author: Robert Wing AuthorDate: 2021-09-04 20:25:10 +0000 Commit: Robert Wing CommitDate: 2021-09-04 20:25:10 +0000 ffs: remove unused thread argument from ffs_reload() MFC After: 1 week Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D31127 --- sys/ufs/ffs/ffs_extern.h | 2 +- sys/ufs/ffs/ffs_suspend.c | 2 +- sys/ufs/ffs/ffs_vfsops.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h index 2ea828861b42..c835239986ba 100644 --- a/sys/ufs/ffs/ffs_extern.h +++ b/sys/ufs/ffs/ffs_extern.h @@ -89,7 +89,7 @@ int ffs_own_mount(const struct mount *mp); int ffs_reallocblks(struct vop_reallocblks_args *); int ffs_realloccg(struct inode *, ufs2_daddr_t, ufs2_daddr_t, ufs2_daddr_t, int, int, int, struct ucred *, struct buf **); -int ffs_reload(struct mount *, struct thread *, int); +int ffs_reload(struct mount *, int); int ffs_sbget(void *, struct fs **, off_t, struct malloc_type *, int (*)(void *, off_t, void **, int)); int ffs_sbput(void *, struct fs *, off_t, int (*)(void *, off_t, void *, diff --git a/sys/ufs/ffs/ffs_suspend.c b/sys/ufs/ffs/ffs_suspend.c index a7fef099cd70..d13097109758 100644 --- a/sys/ufs/ffs/ffs_suspend.c +++ b/sys/ufs/ffs/ffs_suspend.c @@ -265,7 +265,7 @@ ffs_susp_dtor(void *data) KASSERT((mp->mnt_kern_flag & MNTK_SUSPEND) != 0, ("MNTK_SUSPEND not set")); - error = ffs_reload(mp, curthread, FFSR_FORCE | FFSR_UNSUSPEND); + error = ffs_reload(mp, FFSR_FORCE | FFSR_UNSUSPEND); if (error != 0) panic("failed to unsuspend writes on %s", fs->fs_fsmnt); diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index aad7b4f2decd..fd3b2689c2ee 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -538,7 +538,7 @@ ffs_mount(struct mount *mp) vfs_write_resume(mp, 0); } if ((mp->mnt_flag & MNT_RELOAD) && - (error = ffs_reload(mp, td, 0)) != 0) + (error = ffs_reload(mp, 0)) != 0) return (error); if (fs->fs_ronly && !vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0)) { @@ -849,7 +849,7 @@ ffs_cmount(struct mntarg *ma, void *data, uint64_t flags) * 7) re-read inode data for all active vnodes. */ int -ffs_reload(struct mount *mp, struct thread *td, int flags) +ffs_reload(struct mount *mp, int flags) { struct vnode *vp, *mvp, *devvp; struct inode *ip; From owner-dev-commits-src-all@freebsd.org Sat Sep 4 22:30:43 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F34EA66E0E9; Sat, 4 Sep 2021 22:30: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 4H28WQ6NJPz3mrv; Sat, 4 Sep 2021 22:30: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 BB0541FE48; Sat, 4 Sep 2021 22:30: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 184MUg9Q050851; Sat, 4 Sep 2021 22:30:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184MUgYb050850; Sat, 4 Sep 2021 22:30:42 GMT (envelope-from git) Date: Sat, 4 Sep 2021 22:30:42 GMT Message-Id: <202109042230.184MUgYb050850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 1f7a6325fe1b - main - sound(4): Remove pointless Giant from bus_dma_tag_create(). 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/main X-Git-Reftype: branch X-Git-Commit: 1f7a6325fe1b628c18b51d94eeec879c38c650b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 22:30:43 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=1f7a6325fe1b628c18b51d94eeec879c38c650b8 commit 1f7a6325fe1b628c18b51d94eeec879c38c650b8 Author: Alexander Motin AuthorDate: 2021-09-04 22:22:53 +0000 Commit: Alexander Motin CommitDate: 2021-09-04 22:30:36 +0000 sound(4): Remove pointless Giant from bus_dma_tag_create(). None of the drivers really implement asynchronous buffer loading, so they don't need lock there. The only question is which of them have BUS_DMA_NOWAIT flag there already, and to which it should be added. --- sys/dev/sound/isa/ad1816.c | 4 ++-- sys/dev/sound/isa/ess.c | 4 ++-- sys/dev/sound/isa/mss.c | 2 +- sys/dev/sound/isa/sb16.c | 2 +- sys/dev/sound/isa/sb8.c | 2 +- sys/dev/sound/pci/aureal.c | 4 ++-- sys/dev/sound/pci/cs4281.c | 4 ++-- sys/dev/sound/pci/csapcm.c | 4 ++-- sys/dev/sound/pci/emu10k1.c | 8 ++++---- sys/dev/sound/pci/emu10kx.c | 4 ++-- sys/dev/sound/pci/envy24.c | 10 ++++++---- sys/dev/sound/pci/fm801.c | 4 ++-- sys/dev/sound/pci/hdspe.c | 16 ++++++++-------- sys/dev/sound/pci/maestro.c | 8 ++++---- sys/dev/sound/pci/solo.c | 29 +---------------------------- sys/dev/sound/pci/t4dwave.c | 4 ++-- sys/dev/sound/pci/vibes.c | 4 ++-- sys/dev/sound/pcm/buffer.c | 2 +- 18 files changed, 45 insertions(+), 70 deletions(-) diff --git a/sys/dev/sound/isa/ad1816.c b/sys/dev/sound/isa/ad1816.c index e8d7ac7cf62f..97da82c21ff5 100644 --- a/sys/dev/sound/isa/ad1816.c +++ b/sys/dev/sound/isa/ad1816.c @@ -620,8 +620,8 @@ ad1816_attach(device_t dev) /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/ad1816->bufsize, /*nsegments*/1, /*maxsegz*/0x3ffff, - /*flags*/0, /*lockfunc*/busdma_lock_mutex, - /*lockarg*/ &Giant, &ad1816->parent_dmat) != 0) { + /*flags*/0, /*lockfunc*/NULL, /*lockarg*/NULL, + &ad1816->parent_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); goto no; } diff --git a/sys/dev/sound/isa/ess.c b/sys/dev/sound/isa/ess.c index 424e757a4b00..46405ec48aac 100644 --- a/sys/dev/sound/isa/ess.c +++ b/sys/dev/sound/isa/ess.c @@ -859,8 +859,8 @@ ess_attach(device_t dev) /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/sc->bufsize, /*nsegments*/1, /*maxsegz*/0x3ffff, - /*flags*/0, /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&Giant, &sc->parent_dmat) != 0) { + /*flags*/0, /*lockfunc*/NULL, /*lockarg*/NULL, + &sc->parent_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); goto no; } diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c index eacbbf85849c..745a20dbf1f0 100644 --- a/sys/dev/sound/isa/mss.c +++ b/sys/dev/sound/isa/mss.c @@ -1732,7 +1732,7 @@ mss_doattach(device_t dev, struct mss_info *mss) /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/mss->bufsize, /*nsegments*/1, /*maxsegz*/0x3ffff, /*flags*/0, - /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, + /*lockfunc*/NULL, /*lockarg*/NULL, &mss->parent_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); goto no; diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c index 73ec7c56245e..38e15a427d50 100644 --- a/sys/dev/sound/isa/sb16.c +++ b/sys/dev/sound/isa/sb16.c @@ -846,7 +846,7 @@ sb16_attach(device_t dev) /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/sb->bufsize, /*nsegments*/1, /*maxsegz*/0x3ffff, /*flags*/0, - /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, + /*lockfunc*/NULL, /*lockarg*/NULL, &sb->parent_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); goto no; diff --git a/sys/dev/sound/isa/sb8.c b/sys/dev/sound/isa/sb8.c index 779c6631b264..3fcc1770e136 100644 --- a/sys/dev/sound/isa/sb8.c +++ b/sys/dev/sound/isa/sb8.c @@ -743,7 +743,7 @@ sb_attach(device_t dev) /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/sb->bufsize, /*nsegments*/1, /*maxsegz*/0x3ffff, /*flags*/0, - /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, + /*lockfunc*/NULL, /*lockarg*/NULL, &sb->parent_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); goto no; diff --git a/sys/dev/sound/pci/aureal.c b/sys/dev/sound/pci/aureal.c index f4b9906e20e0..820e603192af 100644 --- a/sys/dev/sound/pci/aureal.c +++ b/sys/dev/sound/pci/aureal.c @@ -642,8 +642,8 @@ au_pci_attach(device_t dev) /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/AU_BUFFSIZE, /*nsegments*/1, /*maxsegz*/0x3ffff, - /*flags*/0, /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&Giant, &au->parent_dmat) != 0) { + /*flags*/0, /*lockfunc*/NULL, /*lockarg*/NULL, + &au->parent_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); goto bad; } diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c index fe73e14edb29..b955a6284800 100644 --- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -823,8 +823,8 @@ cs4281_pci_attach(device_t dev) /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/sc->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff, - /*flags*/0, /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&Giant, &sc->parent_dmat) != 0) { + /*flags*/0, /*lockfunc*/NULL, /*lockarg*/NULL, + &sc->parent_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); goto bad; } diff --git a/sys/dev/sound/pci/csapcm.c b/sys/dev/sound/pci/csapcm.c index a0b35c909931..7fd55291d876 100644 --- a/sys/dev/sound/pci/csapcm.c +++ b/sys/dev/sound/pci/csapcm.c @@ -716,8 +716,8 @@ csa_allocres(struct csa_info *csa, device_t dev) /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/CS461x_BUFFSIZE, /*nsegments*/1, /*maxsegz*/0x3ffff, - /*flags*/0, /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&Giant, &csa->parent_dmat) != 0) + /*flags*/0, /*lockfunc*/NULL, /*lockarg*/NULL, + &csa->parent_dmat) != 0) return (1); return (0); diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index 9ee71ed96847..c8829a4017e3 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -1328,8 +1328,8 @@ emu_malloc(struct sc_info *sc, u_int32_t sz, bus_addr_t *addr, *addr = 0; if (bus_dmamem_alloc(sc->parent_dmat, &buf, BUS_DMA_NOWAIT, map)) return NULL; - if (bus_dmamap_load(sc->parent_dmat, *map, buf, sz, emu_setmap, addr, 0) - || !*addr) { + if (bus_dmamap_load(sc->parent_dmat, *map, buf, sz, emu_setmap, addr, + BUS_DMA_NOWAIT) || !*addr) { bus_dmamem_free(sc->parent_dmat, buf, *map); return NULL; } @@ -2107,8 +2107,8 @@ emu_pci_attach(device_t dev) /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/sc->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff, - /*flags*/0, /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&Giant, &sc->parent_dmat) != 0) { + /*flags*/0, /*lockfunc*/NULL, /*lockarg*/NULL, + &sc->parent_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); goto bad; } diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c index 5ae760845008..611af91de4d4 100644 --- a/sys/dev/sound/pci/emu10kx.c +++ b/sys/dev/sound/pci/emu10kx.c @@ -2700,8 +2700,8 @@ emu_init(struct emu_sc_info *sc) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, /* maxsize */ EMU_MAX_BUFSZ, /* nsegments */ 1, /* maxsegz */ 0x3ffff, - /* flags */ 0, /* lockfunc */ busdma_lock_mutex, - /* lockarg */ &Giant, &(sc->mem.dmat)) != 0) { + /* flags */ 0, /* lockfunc */NULL, /* lockarg */NULL, + &sc->mem.dmat) != 0) { device_printf(sc->dev, "unable to create dma tag\n"); bus_dma_tag_destroy(sc->mem.dmat); return (ENOMEM); diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c index a6cb28ab6040..36f453bd9252 100644 --- a/sys/dev/sound/pci/envy24.c +++ b/sys/dev/sound/pci/envy24.c @@ -2264,12 +2264,14 @@ envy24_dmainit(struct sc_info *sc) #if(0) device_printf(sc->dev, "envy24_dmainit(): bus_dmamem_load(): sc->pmap\n"); #endif - if (bus_dmamap_load(sc->dmat, sc->pmap, sc->pbuf, sc->psize, envy24_dmapsetmap, sc, 0)) + if (bus_dmamap_load(sc->dmat, sc->pmap, sc->pbuf, sc->psize, + envy24_dmapsetmap, sc, BUS_DMA_NOWAIT)) goto bad; #if(0) device_printf(sc->dev, "envy24_dmainit(): bus_dmamem_load(): sc->rmap\n"); #endif - if (bus_dmamap_load(sc->dmat, sc->rmap, sc->rbuf, sc->rsize, envy24_dmarsetmap, sc, 0)) + if (bus_dmamap_load(sc->dmat, sc->rmap, sc->rbuf, sc->rsize, + envy24_dmarsetmap, sc, BUS_DMA_NOWAIT)) goto bad; bzero(sc->pbuf, sc->psize); bzero(sc->rbuf, sc->rsize); @@ -2534,8 +2536,8 @@ envy24_alloc_resource(struct sc_info *sc) /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/BUS_SPACE_MAXSIZE_ENVY24, /*nsegments*/1, /*maxsegsz*/0x3ffff, - /*flags*/0, /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&Giant, &sc->dmat) != 0) { + /*flags*/0, /*lockfunc*/NULL, /*lockarg*/NULL, + &sc->dmat) != 0) { device_printf(sc->dev, "unable to create dma tag\n"); return ENXIO; } diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c index 886d50f27fe7..3a7e0877ae7a 100644 --- a/sys/dev/sound/pci/fm801.c +++ b/sys/dev/sound/pci/fm801.c @@ -632,8 +632,8 @@ fm801_pci_attach(device_t dev) /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/fm801->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff, - /*flags*/0, /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&Giant, &fm801->parent_dmat) != 0) { + /*flags*/0, /*lockfunc*/NULL, /*lockarg*/NULL, + &fm801->parent_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); goto oops; } diff --git a/sys/dev/sound/pci/hdspe.c b/sys/dev/sound/pci/hdspe.c index 6eb0436816a6..f91e6f6d4931 100644 --- a/sys/dev/sound/pci/hdspe.c +++ b/sys/dev/sound/pci/hdspe.c @@ -172,8 +172,8 @@ hdspe_alloc_resources(struct sc_info *sc) /*nsegments*/2, /*maxsegsz*/HDSPE_DMASEGSIZE, /*flags*/0, - /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&Giant, + /*lockfunc*/NULL, + /*lockarg*/NULL, /*dmatag*/&sc->dmat) != 0) { device_printf(sc->dev, "Unable to create dma tag.\n"); return (ENXIO); @@ -182,27 +182,27 @@ hdspe_alloc_resources(struct sc_info *sc) sc->bufsize = HDSPE_DMASEGSIZE; /* pbuf (play buffer). */ - if (bus_dmamem_alloc(sc->dmat, (void **)&sc->pbuf, - BUS_DMA_NOWAIT, &sc->pmap)) { + if (bus_dmamem_alloc(sc->dmat, (void **)&sc->pbuf, BUS_DMA_WAITOK, + &sc->pmap)) { device_printf(sc->dev, "Can't alloc pbuf.\n"); return (ENXIO); } if (bus_dmamap_load(sc->dmat, sc->pmap, sc->pbuf, sc->bufsize, - hdspe_dmapsetmap, sc, 0)) { + hdspe_dmapsetmap, sc, BUS_DMA_NOWAIT)) { device_printf(sc->dev, "Can't load pbuf.\n"); return (ENXIO); } /* rbuf (rec buffer). */ - if (bus_dmamem_alloc(sc->dmat, (void **)&sc->rbuf, - BUS_DMA_NOWAIT, &sc->rmap)) { + if (bus_dmamem_alloc(sc->dmat, (void **)&sc->rbuf, BUS_DMA_WAITOK, + &sc->rmap)) { device_printf(sc->dev, "Can't alloc rbuf.\n"); return (ENXIO); } if (bus_dmamap_load(sc->dmat, sc->rmap, sc->rbuf, sc->bufsize, - hdspe_dmapsetmap, sc, 0)) { + hdspe_dmapsetmap, sc, BUS_DMA_NOWAIT)) { device_printf(sc->dev, "Can't load rbuf.\n"); return (ENXIO); } diff --git a/sys/dev/sound/pci/maestro.c b/sys/dev/sound/pci/maestro.c index ed1c9ef1cad6..3caccdb12fe9 100644 --- a/sys/dev/sound/pci/maestro.c +++ b/sys/dev/sound/pci/maestro.c @@ -1716,8 +1716,8 @@ dma_malloc(bus_dma_tag_t dmat, u_int32_t sz, bus_addr_t *phys, if (bus_dmamem_alloc(dmat, &buf, BUS_DMA_NOWAIT, map)) return NULL; - if (bus_dmamap_load(dmat, *map, buf, sz, setmap, phys, 0) != 0 || - *phys == 0) { + if (bus_dmamap_load(dmat, *map, buf, sz, setmap, phys, + BUS_DMA_NOWAIT) != 0 || *phys == 0) { bus_dmamem_free(dmat, buf, *map); return NULL; } @@ -1793,7 +1793,7 @@ agg_attach(device_t dev) /*filter*/ NULL, NULL, /*size */ ess->bufsz, 1, 0x3ffff, /*flags */ 0, - /*lock */ busdma_lock_mutex, &Giant, + /*lock */ NULL, NULL, &ess->buf_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); ret = ENOMEM; @@ -1807,7 +1807,7 @@ agg_attach(device_t dev) /*filter*/ NULL, NULL, /*size */ 3*ess->bufsz, 1, 0x3ffff, /*flags */ 0, - /*lock */ busdma_lock_mutex, &Giant, + /*lock */ NULL, NULL, &ess->stat_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); ret = ENOMEM; diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c index 6d5b833264d6..7132a7f34dee 100644 --- a/sys/dev/sound/pci/solo.c +++ b/sys/dev/sound/pci/solo.c @@ -50,9 +50,6 @@ SND_DECLARE_FILE("$FreeBSD$"); /* more accurate clocks and split audio1/audio2 rates */ #define ESS18XX_NEWSPEED -/* 1 = INTR_MPSAFE, 0 = GIANT */ -#define ESS18XX_MPSAFE 1 - static u_int32_t ess_playfmt[] = { SND_FORMAT(AFMT_U8, 1, 0), SND_FORMAT(AFMT_U8, 2, 0), @@ -103,20 +100,12 @@ struct ess_info { unsigned int bufsz; struct ess_chinfo pch, rch; -#if ESS18XX_MPSAFE == 1 struct mtx *lock; -#endif }; -#if ESS18XX_MPSAFE == 1 #define ess_lock(_ess) snd_mtxlock((_ess)->lock) #define ess_unlock(_ess) snd_mtxunlock((_ess)->lock) #define ess_lock_assert(_ess) snd_mtxassert((_ess)->lock) -#else -#define ess_lock(_ess) -#define ess_unlock(_ess) -#define ess_lock_assert(_ess) -#endif static int ess_rd(struct ess_info *sc, int reg); static void ess_wr(struct ess_info *sc, int reg, u_int8_t val); @@ -868,12 +857,10 @@ ess_release_resources(struct ess_info *sc, device_t dev) sc->parent_dmat = 0; } -#if ESS18XX_MPSAFE == 1 if (sc->lock) { snd_mtxfree(sc->lock); sc->lock = NULL; } -#endif free(sc, M_DEVBUF); } @@ -902,14 +889,10 @@ ess_alloc_resources(struct ess_info *sc, device_t dev) sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | RF_SHAREABLE); -#if ESS18XX_MPSAFE == 1 sc->lock = snd_mtxcreate(device_get_nameunit(dev), "snd_solo softc"); return (sc->irq && sc->io && sc->sb && sc->vc && sc->mpu && sc->gp && sc->lock)? 0 : ENXIO; -#else - return (sc->irq && sc->io && sc->sb && sc->vc && sc->mpu && sc->gp)? 0 : ENXIO; -#endif } static int @@ -1008,13 +991,7 @@ ess_attach(device_t dev) #else sc->newspeed = 0; #endif - if (snd_setup_intr(dev, sc->irq, -#if ESS18XX_MPSAFE == 1 - INTR_MPSAFE -#else - 0 -#endif - , ess_intr, sc, &sc->ih)) { + if (snd_setup_intr(dev, sc->irq, INTR_MPSAFE, ess_intr, sc, &sc->ih)) { device_printf(dev, "unable to map interrupt\n"); goto no; } @@ -1032,11 +1009,7 @@ ess_attach(device_t dev) /*maxsize*/sc->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff, /*flags*/0, -#if ESS18XX_MPSAFE == 1 /*lockfunc*/NULL, /*lockarg*/NULL, -#else - /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, -#endif &sc->parent_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); goto no; diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c index 08edb53b11a0..b30d269f5eef 100644 --- a/sys/dev/sound/pci/t4dwave.c +++ b/sys/dev/sound/pci/t4dwave.c @@ -913,8 +913,8 @@ tr_pci_attach(device_t dev) /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/tr->bufsz, /*nsegments*/1, /*maxsegz*/tr->bufsz, - /*flags*/0, /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&Giant, &tr->parent_dmat) != 0) { + /*flags*/0, /*lockfunc*/NULL, /*lockarg*/NULL, + &tr->parent_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); goto bad; } diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c index a46efb061a8f..931de7300a3b 100644 --- a/sys/dev/sound/pci/vibes.c +++ b/sys/dev/sound/pci/vibes.c @@ -776,8 +776,8 @@ sv_attach(device_t dev) { /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/sc->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff, /*flags*/0, - /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&Giant, &sc->parent_dmat) != 0) { + /*lockfunc*/NULL, /*lockarg*/NULL, + &sc->parent_dmat) != 0) { device_printf(dev, "sv_attach: Unable to create dma tag\n"); goto fail; } diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index b86b67e44344..14fc098d6b33 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -107,7 +107,7 @@ sndbuf_alloc(struct snd_dbuf *b, bus_dma_tag_t dmatag, int dmaflags, return (ENOMEM); } if (bus_dmamap_load(b->dmatag, b->dmamap, b->buf, b->maxsize, - sndbuf_setmap, b, 0) != 0 || b->buf_addr == 0) { + sndbuf_setmap, b, BUS_DMA_NOWAIT) != 0 || b->buf_addr == 0) { sndbuf_free(b); return (ENOMEM); } From owner-dev-commits-src-all@freebsd.org Sun Sep 5 07:02:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1F65D67507F; Sun, 5 Sep 2021 07:02: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 4H2MtS70PLz4gl3; Sun, 5 Sep 2021 07:02: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 CFEB426C2A; Sun, 5 Sep 2021 07:02: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 18572uCo033199; Sun, 5 Sep 2021 07:02:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18572uso033198; Sun, 5 Sep 2021 07:02:56 GMT (envelope-from git) Date: Sun, 5 Sep 2021 07:02:56 GMT Message-Id: <202109050702.18572uso033198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: bb61ccd530b7 - main - stress2: Added missing ktrace() cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb61ccd530b76ab8a3945b1eccf7fa3c38647312 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2021 07:02:57 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=bb61ccd530b76ab8a3945b1eccf7fa3c38647312 commit bb61ccd530b76ab8a3945b1eccf7fa3c38647312 Author: Peter Holm AuthorDate: 2021-09-05 07:01:20 +0000 Commit: Peter Holm CommitDate: 2021-09-05 07:01:20 +0000 stress2: Added missing ktrace() cleanup --- tools/test/stress2/misc/kevent10.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/test/stress2/misc/kevent10.sh b/tools/test/stress2/misc/kevent10.sh index d746897cddcf..6efdedfc28cd 100755 --- a/tools/test/stress2/misc/kevent10.sh +++ b/tools/test/stress2/misc/kevent10.sh @@ -81,6 +81,8 @@ main(void) if (kevent(0, &changes, -1, &events, 1, 0) == -1) if (errno != EBADF) err(1, "kevent"); + if (ktrace(fn, KTROP_CLEARFILE, KTRFAC_GENIO, 0) == -1) + err(1, "ktrace clear"); return (0); } From owner-dev-commits-src-all@freebsd.org Sun Sep 5 15:24:20 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sun Sep 5 15:24:21 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sun Sep 5 15:24:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sun Sep 5 16:26:07 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A0B5E67D5F6; Sun, 5 Sep 2021 16:26:07 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4H2cNG2mxMz3qSM; Sun, 5 Sep 2021 16:26:06 +0000 (UTC) (envelope-from ronald-lists@klop.ws) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=klop.ws; s=mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version: Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=UNskmMTCyHTgJRU5LYrCwRFiA+XrqaCaf6B1WMqmhYI=; b=untBz4Dh1EX9cjhbngH6rcK+yF XkTJFdsL43sB3Vd/5KKkWPKadpZzDSjWRgWzGuHhJHOp8AVkS7ppxzdWOAb0UseQklZsYoZi6LATp 6/nNbV3D/XY5R6xtfsK5oa6fT1Oy1wepBiTKEjt2DdcQ2TP/TNhsIGVzYk9FWfjy9QQA=; Subject: Re: git: b0025f9b7ff0 - main - openssh: update default version addendum in man pages To: Ed Maste , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202109041534.184FYq6n093346@gitrepo.freebsd.org> From: Ronald Klop Message-ID: Date: Sun, 5 Sep 2021 18:25:54 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <202109041534.184FYq6n093346@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.greenhost.nl X-Spam-Level: ---- X-Spam-Score: -4.2 X-Spam-Status: No, score=-4.2 required=5.0 tests=ALL_TRUSTED, BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A autolearn=disabled version=3.4.2 X-Scan-Signature: 4b8baa00aa45d625c6ee6c23f4cb0de1 X-Rspamd-Queue-Id: 4H2cNG2mxMz3qSM X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=mail header.b=untBz4Dh; dmarc=pass (policy=none) header.from=klop.ws; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 195.190.28.88 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-2.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[klop.ws:s=mail]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:195.190.28.64/27]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_SHORT(1.00)[1.000]; DKIM_TRACE(0.00)[klop.ws:+]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,none]; RCVD_IN_DNSWL_NONE(0.00)[195.190.28.88:from]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:47172, ipnet:195.190.28.0/24, country:NL]; MID_RHS_MATCH_FROM(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-main,dev-commits-src-all]; RWL_MAILSPIKE_POSSIBLE(0.00)[195.190.28.88:from] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2021 16:26:07 -0000 On 9/4/21 5:34 PM, Ed Maste wrote: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b0025f9b7ff04ed623e9e5d8f9eaf172d5ff23f0 > > commit b0025f9b7ff04ed623e9e5d8f9eaf172d5ff23f0 > Author: Ed Maste > AuthorDate: 2021-09-04 15:33:13 +0000 > Commit: Ed Maste > CommitDate: 2021-09-04 15:33:13 +0000 > > openssh: update default version addendum in man pages > > Fixes: 2f513db72b03 ("Upgrade to OpenSSH 7.9p1.") > MFC after: 3 days > Sponsored by: The FreeBSD Foundation > --- > crypto/openssh/ssh_config.5 | 2 +- > crypto/openssh/sshd_config.5 | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/crypto/openssh/ssh_config.5 b/crypto/openssh/ssh_config.5 > index 468b5025ae14..e8b52f309b50 100644 > --- a/crypto/openssh/ssh_config.5 > +++ b/crypto/openssh/ssh_config.5 > @@ -1658,7 +1658,7 @@ in > Specifies a string to append to the regular version string to identify > OS- or site-specific modifications. > The default is > -.Dq FreeBSD-20180909 . > +.Dq FreeBSD-20200214 . > The value > .Cm none > may be used to disable this. > diff --git a/crypto/openssh/sshd_config.5 b/crypto/openssh/sshd_config.5 > index d28622d984a1..0ae5e665af3d 100644 > --- a/crypto/openssh/sshd_config.5 > +++ b/crypto/openssh/sshd_config.5 > @@ -1654,7 +1654,7 @@ The default is > Optionally specifies additional text to append to the SSH protocol banner > sent by the server upon connection. > The default is > -.Qq FreeBSD-20180909 . > +.Qq FreeBSD-20200214 . > The value > .Cm none > may be used to disable this. > _______________________________________________ > dev-commits-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all > To unsubscribe, send any mail to "dev-commits-src-all-unsubscribe@freebsd.org" > Hi, I'm wondering why the FreeBSD project adds this information to the banner by default. I learned that not exposing information about the running system is good security practice. Any thoughts about this? What is the gain of this banner? NB: I'm not in a position to really question this, just curious why it is the default. Regards, Ronald. From owner-dev-commits-src-all@freebsd.org Sun Sep 5 17:26:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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-all@freebsd.org Sun Sep 5 18:41:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0B13967FA18; Sun, 5 Sep 2021 18:41: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 4H2gP16vdkz3QPS; Sun, 5 Sep 2021 18:41: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 CCC1E104E4; Sun, 5 Sep 2021 18:41: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 185IfvfV066113; Sun, 5 Sep 2021 18:41:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 185IfvvI066112; Sun, 5 Sep 2021 18:41:57 GMT (envelope-from git) Date: Sun, 5 Sep 2021 18:41:57 GMT Message-Id: <202109051841.185IfvvI066112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 007724cbca6f - main - hpen(4): removed leftover hpen_final_digi_cb declaration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 007724cbca6f6d91b8c3450bd4a11f3ea2bb647a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2021 18:41:58 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=007724cbca6f6d91b8c3450bd4a11f3ea2bb647a commit 007724cbca6f6d91b8c3450bd4a11f3ea2bb647a Author: Mateusz Guzik AuthorDate: 2021-09-05 17:30:51 +0000 Commit: Mateusz Guzik CommitDate: 2021-09-05 17:31:34 +0000 hpen(4): removed leftover hpen_final_digi_cb declaration --- sys/dev/hid/hpen.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/hid/hpen.c b/sys/dev/hid/hpen.c index 8a86b95b1020..21a5e28a9827 100644 --- a/sys/dev/hid/hpen.c +++ b/sys/dev/hid/hpen.c @@ -59,7 +59,6 @@ static const uint8_t hpen_graphire3_4x5_report_descr[] = { HID_GRAPHIRE3_4X5_REPORT_DESCR() }; static hidmap_cb_t hpen_battery_strenght_cb; -static hidmap_cb_t hpen_final_digi_cb; static hidmap_cb_t hpen_final_pen_cb; #define HPEN_MAP_BUT(usage, code) \ From owner-dev-commits-src-all@freebsd.org Sun Sep 5 19:51:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 5E04A660910; Sun, 5 Sep 2021 19: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 4H2hxd2D5xz4SkJ; Sun, 5 Sep 2021 19:51: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 2DB19118A2; Sun, 5 Sep 2021 19:51: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 185JpnEg056870; Sun, 5 Sep 2021 19:51:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 185JpnkA056869; Sun, 5 Sep 2021 19:51:49 GMT (envelope-from git) Date: Sun, 5 Sep 2021 19:51:49 GMT Message-Id: <202109051951.185JpnkA056869@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 7347dfce0139 - main - Add run_interrupt_driven_config_hooks to TSLOG MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7347dfce0139d0faaa45d45c50586e4cf5d7104b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2021 19:51:49 -0000 The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=7347dfce0139d0faaa45d45c50586e4cf5d7104b commit 7347dfce0139d0faaa45d45c50586e4cf5d7104b Author: Colin Percival AuthorDate: 2021-09-05 19:45:29 +0000 Commit: Colin Percival CommitDate: 2021-09-05 19:45:29 +0000 Add run_interrupt_driven_config_hooks to TSLOG The 'intr_config_hooks' SYSINIT is now taking a nontrivial amount of time in my profiling; run_interrupt_driven_config_hooks is responsible for most of it, so this adds useful information to the resulting flamecharts. --- sys/kern/subr_autoconf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index f6039e34e29f..f87d99bbedcf 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -121,6 +121,7 @@ run_interrupt_driven_config_hooks() static int running; struct intr_config_hook *hook_entry; + TSENTER(); mtx_lock(&intr_config_hook_lock); /* @@ -146,6 +147,7 @@ run_interrupt_driven_config_hooks() running = 0; mtx_unlock(&intr_config_hook_lock); + TSEXIT(); } static void From owner-dev-commits-src-all@freebsd.org Sun Sep 5 19:51:50 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B01696608F0; Sun, 5 Sep 2021 19:51: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 4H2hxf3lMhz4SVv; Sun, 5 Sep 2021 19:51: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 5058611666; Sun, 5 Sep 2021 19:51: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 185Jpojv056901; Sun, 5 Sep 2021 19:51:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 185Jpo57056900; Sun, 5 Sep 2021 19:51:50 GMT (envelope-from git) Date: Sun, 5 Sep 2021 19:51:50 GMT Message-Id: <202109051951.185Jpo57056900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: bad42df9bfcb - main - Add some nvme initialization routines to TSLOG MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bad42df9bfcb8d77bdec04ea1f9acd874c762740 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2021 19:51:50 -0000 The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=bad42df9bfcb8d77bdec04ea1f9acd874c762740 commit bad42df9bfcb8d77bdec04ea1f9acd874c762740 Author: Colin Percival AuthorDate: 2021-09-05 19:48:43 +0000 Commit: Colin Percival CommitDate: 2021-09-05 19:48:43 +0000 Add some nvme initialization routines to TSLOG About 335 ms of EC2 instance boot time is being spent here. --- sys/dev/nvme/nvme_ctrlr.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 52eab6254d89..833bf328584a 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -407,6 +407,7 @@ nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) { int err; + TSENTER(); nvme_ctrlr_disable_qpairs(ctrlr); pause("nvmehwreset", hz / 10); @@ -414,7 +415,9 @@ nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) err = nvme_ctrlr_disable(ctrlr); if (err != 0) return err; - return (nvme_ctrlr_enable(ctrlr)); + err = nvme_ctrlr_enable(ctrlr); + TSEXIT(); + return (err); } void @@ -1045,6 +1048,8 @@ nvme_ctrlr_start(void *ctrlr_arg, bool resetting) uint32_t old_num_io_queues; int i; + TSENTER(); + /* * Only reset adminq here when we are restarting the * controller after a reset. During initialization, @@ -1117,6 +1122,7 @@ nvme_ctrlr_start(void *ctrlr_arg, bool resetting) for (i = 0; i < ctrlr->num_io_queues; i++) nvme_io_qpair_enable(&ctrlr->ioq[i]); + TSEXIT(); } void @@ -1124,6 +1130,8 @@ nvme_ctrlr_start_config_hook(void *arg) { struct nvme_controller *ctrlr = arg; + TSENTER(); + /* * Reset controller twice to ensure we do a transition from cc.en==1 to * cc.en==0. This is because we don't really know what status the @@ -1155,6 +1163,7 @@ fail: ctrlr->is_initialized = 1; nvme_notify_new_controller(ctrlr); + TSEXIT(); } static void From owner-dev-commits-src-all@freebsd.org Sun Sep 5 19:51:52 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F38E266067A; Sun, 5 Sep 2021 19:51: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 4H2hxg5hFjz4SyF; Sun, 5 Sep 2021 19:51: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 770E111776; Sun, 5 Sep 2021 19:51: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 185Jppdt056925; Sun, 5 Sep 2021 19:51:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 185JppL2056924; Sun, 5 Sep 2021 19:51:51 GMT (envelope-from git) Date: Sun, 5 Sep 2021 19:51:51 GMT Message-Id: <202109051951.185JppL2056924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: bd11e253a9a4 - main - Add _sleep to TSLOG MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd11e253a9a459c9a7b69ebb1c68f0162eb6119f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2021 19:51:52 -0000 The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=bd11e253a9a459c9a7b69ebb1c68f0162eb6119f commit bd11e253a9a459c9a7b69ebb1c68f0162eb6119f Author: Colin Percival AuthorDate: 2021-09-05 19:50:15 +0000 Commit: Colin Percival CommitDate: 2021-09-05 19:50:15 +0000 Add _sleep to TSLOG Most of the nvme initialization time in my tests is being spent here (via pause_sbt). --- sys/kern/kern_synch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 89b937315907..930bd940d2ab 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -141,6 +141,7 @@ _sleep(const void *ident, struct lock_object *lock, int priority, int catch, pri, rval, sleepq_flags; WITNESS_SAVE_DECL(lock_witness); + TSENTER(); td = curthread; #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -233,6 +234,7 @@ _sleep(const void *ident, struct lock_object *lock, int priority, class->lc_lock(lock, lock_state); WITNESS_RESTORE(lock, lock_witness); } + TSEXIT(); return (rval); } From owner-dev-commits-src-all@freebsd.org Sun Sep 5 22:33:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the 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();