From owner-dev-commits-src-branches@freebsd.org Mon Jun 28 04:00:29 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0E0264E511; Mon, 28 Jun 2021 04:00: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 4GCv5n6B6hz3pvq; Mon, 28 Jun 2021 04: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 BD12A1E9E2; Mon, 28 Jun 2021 04: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 15S40TvU077796; Mon, 28 Jun 2021 04: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 15S40Tq2077795; Mon, 28 Jun 2021 04:00:29 GMT (envelope-from git) Date: Mon, 28 Jun 2021 04:00:29 GMT Message-Id: <202106280400.15S40Tq2077795@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Takanori Watanabe Subject: git: 766da930f994 - stable/12 - Fix a use-after-free in an error case. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: takawata X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 766da930f994bc0fe27cc9235f0594a6c4e0a88f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 04:00:30 -0000 The branch stable/12 has been updated by takawata: URL: https://cgit.FreeBSD.org/src/commit/?id=766da930f994bc0fe27cc9235f0594a6c4e0a88f commit 766da930f994bc0fe27cc9235f0594a6c4e0a88f Author: Takanori Watanabe AuthorDate: 2021-05-26 09:23:33 +0000 Commit: Takanori Watanabe CommitDate: 2021-06-28 03:58:48 +0000 Fix a use-after-free in an error case. PR: 255872 Submitted by: lylgood Differential Revision: https://reviews.freebsd.org/D30454 (cherry picked from commit 14803ec8d193d8d46f4137a7dba61b277c6a2fed) --- sys/netgraph/bluetooth/hci/ng_hci_evnt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c index b0dae0e18ecf..f144d284aee3 100644 --- a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c +++ b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c @@ -525,6 +525,7 @@ static int le_connection_complete(ng_hci_unit_p unit, struct mbuf *event) if (error != 0) { ng_hci_con_untimeout(con); ng_hci_free_con(con); + goto out; } } else if ((error = ng_hci_con_untimeout(con)) != 0) From owner-dev-commits-src-branches@freebsd.org Mon Jun 28 04:02:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 985F364DCEE; Mon, 28 Jun 2021 04:02: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 4GCv7X1Vzmz3qZS; Mon, 28 Jun 2021 04:02: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 039B21E9FD; Mon, 28 Jun 2021 04:02: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 15S41xd3079613; Mon, 28 Jun 2021 04:01:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15S41x19079612; Mon, 28 Jun 2021 04:01:59 GMT (envelope-from git) Date: Mon, 28 Jun 2021 04:01:59 GMT Message-Id: <202106280401.15S41x19079612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Takanori Watanabe Subject: git: 7bbd5ebae80b - stable/11 - Fix a use-after-free in an error case. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: takawata X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 7bbd5ebae80b52a87d62164a04221752efa8fd50 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 04:02:00 -0000 The branch stable/11 has been updated by takawata: URL: https://cgit.FreeBSD.org/src/commit/?id=7bbd5ebae80b52a87d62164a04221752efa8fd50 commit 7bbd5ebae80b52a87d62164a04221752efa8fd50 Author: Takanori Watanabe AuthorDate: 2021-05-26 09:23:33 +0000 Commit: Takanori Watanabe CommitDate: 2021-06-28 04:00:51 +0000 Fix a use-after-free in an error case. PR: 255872 Submitted by: lylgood Differential Revision: https://reviews.freebsd.org/D30454 (cherry picked from commit 14803ec8d193d8d46f4137a7dba61b277c6a2fed) --- sys/netgraph/bluetooth/hci/ng_hci_evnt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c index 1c1aeee3b6b2..78f8d9e121b3 100644 --- a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c +++ b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c @@ -509,6 +509,7 @@ static int le_connection_complete(ng_hci_unit_p unit, struct mbuf *event) if (error != 0) { ng_hci_con_untimeout(con); ng_hci_free_con(con); + goto out; } } else if ((error = ng_hci_con_untimeout(con)) != 0) From owner-dev-commits-src-branches@freebsd.org Mon Jun 28 09:11:45 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45DBF652D48; Mon, 28 Jun 2021 09:11: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 4GD20x1S0Mz4fSR; Mon, 28 Jun 2021 09:11: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 1A4DE22D09; Mon, 28 Jun 2021 09:11: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 15S9Bjds091151; Mon, 28 Jun 2021 09:11:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15S9BjEK091150; Mon, 28 Jun 2021 09:11:45 GMT (envelope-from git) Date: Mon, 28 Jun 2021 09:11:45 GMT Message-Id: <202106280911.15S9BjEK091150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: cb6ebbaa485a - stable/13 - sbin/md5: add tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cb6ebbaa485aafaa989312f46ff8756e66efcddb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 09:11:45 -0000 The branch stable/13 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=cb6ebbaa485aafaa989312f46ff8756e66efcddb commit cb6ebbaa485aafaa989312f46ff8756e66efcddb Author: Stefan Eßer AuthorDate: 2021-06-25 06:51:40 +0000 Commit: Stefan Eßer CommitDate: 2021-06-28 09:05:30 +0000 sbin/md5: add tests While the correctness of the supported hash algorithms can be tested with the built-in self-test feature, these test cases are meant to detect changes in the output format. A follow-up commit will improve the compatibility with the coreutils versions of the hash programs, and these tests should detect any unintended side-effects of such a change on existing functionality. (cherry picked from commit 884fc5527a3ffd9830b941cbec328de1623044cc) sbin/md5: Create /usr/tests/sbin/md5 directory for placing tests (Fix by lwhsu (Li-Wen Hsu) to un-break "make distribute".) (cherry picked from commit cb194afef50dc4e1473413a69462aaf03cfe0ce4) sbin/md5: fix test case to not write outside temp directory The bsd-p-test did create files 1.out .. 8.out in the test directory. This has been fixed and the temporary output files are now written to the temporary directory. (cherry picked from commit 95d3044bbdadfca6120a3e7c61c9ebb9a476f369) Sponsored by: The FreeBSD Foundation (commit cb194afef50dc only) --- etc/mtree/BSD.tests.dist | 2 ++ sbin/md5/Makefile | 5 ++++ sbin/md5/tests/1.inp | 0 sbin/md5/tests/1.sha512-p.chk | 1 + sbin/md5/tests/1.sha512sum-p.chk | 1 + sbin/md5/tests/2.inp | 1 + sbin/md5/tests/2.sha512-p.chk | 1 + sbin/md5/tests/2.sha512sum-p.chk | 1 + sbin/md5/tests/3.inp | 1 + sbin/md5/tests/3.sha512-p.chk | 1 + sbin/md5/tests/3.sha512sum-p.chk | 1 + sbin/md5/tests/4.inp | 1 + sbin/md5/tests/4.sha512-p.chk | 1 + sbin/md5/tests/4.sha512sum-p.chk | 1 + sbin/md5/tests/5.inp | 1 + sbin/md5/tests/5.sha512-p.chk | 1 + sbin/md5/tests/5.sha512sum-p.chk | 1 + sbin/md5/tests/6.inp | 1 + sbin/md5/tests/6.sha512-p.chk | 1 + sbin/md5/tests/6.sha512sum-p.chk | 1 + sbin/md5/tests/7.inp | 1 + sbin/md5/tests/7.sha512-p.chk | 1 + sbin/md5/tests/7.sha512sum-p.chk | 1 + sbin/md5/tests/8.inp | 1 + sbin/md5/tests/8.sha512-p.chk | 1 + sbin/md5/tests/8.sha512sum-p.chk | 1 + sbin/md5/tests/Makefile | 41 +++++++++++++++++++++++++++++++++ sbin/md5/tests/algorithms.txt | 11 +++++++++ sbin/md5/tests/bsd-c-test.SH | 23 ++++++++++++++++++ sbin/md5/tests/bsd-p-test.SH | 24 +++++++++++++++++++ sbin/md5/tests/bsd-s-test.SH | 30 ++++++++++++++++++++++++ sbin/md5/tests/md5.digest | 8 +++++++ sbin/md5/tests/md5sum.digest | 8 +++++++ sbin/md5/tests/rmd160.digest | 8 +++++++ sbin/md5/tests/rmd160sum.digest | 8 +++++++ sbin/md5/tests/self-test.SH | 8 +++++++ sbin/md5/tests/self-test.md5.chk | 9 ++++++++ sbin/md5/tests/self-test.rmd160.chk | 9 ++++++++ sbin/md5/tests/self-test.sh_inp | 8 +++++++ sbin/md5/tests/self-test.sha1.chk | 9 ++++++++ sbin/md5/tests/self-test.sha224.chk | 9 ++++++++ sbin/md5/tests/self-test.sha256.chk | 9 ++++++++ sbin/md5/tests/self-test.sha384.chk | 9 ++++++++ sbin/md5/tests/self-test.sha512.chk | 9 ++++++++ sbin/md5/tests/self-test.sha512t256.chk | 9 ++++++++ sbin/md5/tests/self-test.skein1024.chk | 9 ++++++++ sbin/md5/tests/self-test.skein256.chk | 9 ++++++++ sbin/md5/tests/self-test.skein512.chk | 9 ++++++++ sbin/md5/tests/sha1.digest | 8 +++++++ sbin/md5/tests/sha1sum.digest | 8 +++++++ sbin/md5/tests/sha224.digest | 8 +++++++ sbin/md5/tests/sha224sum.digest | 8 +++++++ sbin/md5/tests/sha256.digest | 8 +++++++ sbin/md5/tests/sha256sum.digest | 8 +++++++ sbin/md5/tests/sha384.digest | 8 +++++++ sbin/md5/tests/sha384sum.digest | 8 +++++++ sbin/md5/tests/sha512.digest | 8 +++++++ sbin/md5/tests/sha512sum.digest | 8 +++++++ sbin/md5/tests/sha512t256.digest | 8 +++++++ sbin/md5/tests/sha512t256sum.digest | 8 +++++++ sbin/md5/tests/skein1024.digest | 8 +++++++ sbin/md5/tests/skein1024sum.digest | 8 +++++++ sbin/md5/tests/skein256.digest | 8 +++++++ sbin/md5/tests/skein256sum.digest | 8 +++++++ sbin/md5/tests/skein512.digest | 8 +++++++ sbin/md5/tests/skein512sum.digest | 8 +++++++ 66 files changed, 450 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 1dc756aecbc5..60cdca439887 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -438,6 +438,8 @@ .. ifconfig .. + md5 + .. mdconfig .. nvmecontrol diff --git a/sbin/md5/Makefile b/sbin/md5/Makefile index dcbd94dcd381..6e29d94eb92a 100644 --- a/sbin/md5/Makefile +++ b/sbin/md5/Makefile @@ -36,4 +36,9 @@ LIBADD= md CFLAGS+=-DHAVE_CAPSICUM .endif +.include + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include diff --git a/sbin/md5/tests/1.inp b/sbin/md5/tests/1.inp new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sbin/md5/tests/1.sha512-p.chk b/sbin/md5/tests/1.sha512-p.chk new file mode 100644 index 000000000000..c2f1924ca315 --- /dev/null +++ b/sbin/md5/tests/1.sha512-p.chk @@ -0,0 +1 @@ +cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e diff --git a/sbin/md5/tests/1.sha512sum-p.chk b/sbin/md5/tests/1.sha512sum-p.chk new file mode 100644 index 000000000000..c2f1924ca315 --- /dev/null +++ b/sbin/md5/tests/1.sha512sum-p.chk @@ -0,0 +1 @@ +cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e diff --git a/sbin/md5/tests/2.inp b/sbin/md5/tests/2.inp new file mode 100644 index 000000000000..2e65efe2a145 --- /dev/null +++ b/sbin/md5/tests/2.inp @@ -0,0 +1 @@ +a \ No newline at end of file diff --git a/sbin/md5/tests/2.sha512-p.chk b/sbin/md5/tests/2.sha512-p.chk new file mode 100644 index 000000000000..be4d8addd112 --- /dev/null +++ b/sbin/md5/tests/2.sha512-p.chk @@ -0,0 +1 @@ +a1f40fc92da241694750979ee6cf582f2d5d7d28e18335de05abc54d0560e0f5302860c652bf08d560252aa5e74210546f369fbbbce8c12cfc7957b2652fe9a75 diff --git a/sbin/md5/tests/2.sha512sum-p.chk b/sbin/md5/tests/2.sha512sum-p.chk new file mode 100644 index 000000000000..be4d8addd112 --- /dev/null +++ b/sbin/md5/tests/2.sha512sum-p.chk @@ -0,0 +1 @@ +a1f40fc92da241694750979ee6cf582f2d5d7d28e18335de05abc54d0560e0f5302860c652bf08d560252aa5e74210546f369fbbbce8c12cfc7957b2652fe9a75 diff --git a/sbin/md5/tests/3.inp b/sbin/md5/tests/3.inp new file mode 100644 index 000000000000..f2ba8f84ab5c --- /dev/null +++ b/sbin/md5/tests/3.inp @@ -0,0 +1 @@ +abc \ No newline at end of file diff --git a/sbin/md5/tests/3.sha512-p.chk b/sbin/md5/tests/3.sha512-p.chk new file mode 100644 index 000000000000..3971db2fddea --- /dev/null +++ b/sbin/md5/tests/3.sha512-p.chk @@ -0,0 +1 @@ +abcddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f diff --git a/sbin/md5/tests/3.sha512sum-p.chk b/sbin/md5/tests/3.sha512sum-p.chk new file mode 100644 index 000000000000..3971db2fddea --- /dev/null +++ b/sbin/md5/tests/3.sha512sum-p.chk @@ -0,0 +1 @@ +abcddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f diff --git a/sbin/md5/tests/4.inp b/sbin/md5/tests/4.inp new file mode 100644 index 000000000000..e407fe0e6143 --- /dev/null +++ b/sbin/md5/tests/4.inp @@ -0,0 +1 @@ +message digest \ No newline at end of file diff --git a/sbin/md5/tests/4.sha512-p.chk b/sbin/md5/tests/4.sha512-p.chk new file mode 100644 index 000000000000..cd5bad00b50d --- /dev/null +++ b/sbin/md5/tests/4.sha512-p.chk @@ -0,0 +1 @@ +message digest107dbf389d9e9f71a3a95f6c055b9251bc5268c2be16d6c13492ea45b0199f3309e16455ab1e96118e8a905d5597b72038ddb372a89826046de66687bb420e7c diff --git a/sbin/md5/tests/4.sha512sum-p.chk b/sbin/md5/tests/4.sha512sum-p.chk new file mode 100644 index 000000000000..cd5bad00b50d --- /dev/null +++ b/sbin/md5/tests/4.sha512sum-p.chk @@ -0,0 +1 @@ +message digest107dbf389d9e9f71a3a95f6c055b9251bc5268c2be16d6c13492ea45b0199f3309e16455ab1e96118e8a905d5597b72038ddb372a89826046de66687bb420e7c diff --git a/sbin/md5/tests/5.inp b/sbin/md5/tests/5.inp new file mode 100644 index 000000000000..e85d5b45283a --- /dev/null +++ b/sbin/md5/tests/5.inp @@ -0,0 +1 @@ +abcdefghijklmnopqrstuvwxyz \ No newline at end of file diff --git a/sbin/md5/tests/5.sha512-p.chk b/sbin/md5/tests/5.sha512-p.chk new file mode 100644 index 000000000000..77f97a5a0117 --- /dev/null +++ b/sbin/md5/tests/5.sha512-p.chk @@ -0,0 +1 @@ +abcdefghijklmnopqrstuvwxyz4dbff86cc2ca1bae1e16468a05cb9881c97f1753bce3619034898faa1aabe429955a1bf8ec483d7421fe3c1646613a59ed5441fb0f321389f77f48a879c7b1f1 diff --git a/sbin/md5/tests/5.sha512sum-p.chk b/sbin/md5/tests/5.sha512sum-p.chk new file mode 100644 index 000000000000..77f97a5a0117 --- /dev/null +++ b/sbin/md5/tests/5.sha512sum-p.chk @@ -0,0 +1 @@ +abcdefghijklmnopqrstuvwxyz4dbff86cc2ca1bae1e16468a05cb9881c97f1753bce3619034898faa1aabe429955a1bf8ec483d7421fe3c1646613a59ed5441fb0f321389f77f48a879c7b1f1 diff --git a/sbin/md5/tests/6.inp b/sbin/md5/tests/6.inp new file mode 100644 index 000000000000..9f75c3756298 --- /dev/null +++ b/sbin/md5/tests/6.inp @@ -0,0 +1 @@ +ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 \ No newline at end of file diff --git a/sbin/md5/tests/6.sha512-p.chk b/sbin/md5/tests/6.sha512-p.chk new file mode 100644 index 000000000000..d14aad405215 --- /dev/null +++ b/sbin/md5/tests/6.sha512-p.chk @@ -0,0 +1 @@ +ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567891e07be23c26a86ea37ea810c8ec7809352515a970e9253c26f536cfc7a9996c45c8370583e0a78fa4a90041d71a4ceab7423f19c71b9d5a3e01249f0bebd5894 diff --git a/sbin/md5/tests/6.sha512sum-p.chk b/sbin/md5/tests/6.sha512sum-p.chk new file mode 100644 index 000000000000..d14aad405215 --- /dev/null +++ b/sbin/md5/tests/6.sha512sum-p.chk @@ -0,0 +1 @@ +ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567891e07be23c26a86ea37ea810c8ec7809352515a970e9253c26f536cfc7a9996c45c8370583e0a78fa4a90041d71a4ceab7423f19c71b9d5a3e01249f0bebd5894 diff --git a/sbin/md5/tests/7.inp b/sbin/md5/tests/7.inp new file mode 100644 index 000000000000..15e0acf537d8 --- /dev/null +++ b/sbin/md5/tests/7.inp @@ -0,0 +1 @@ +12345678901234567890123456789012345678901234567890123456789012345678901234567890 \ No newline at end of file diff --git a/sbin/md5/tests/7.sha512-p.chk b/sbin/md5/tests/7.sha512-p.chk new file mode 100644 index 000000000000..efd5828f95ff --- /dev/null +++ b/sbin/md5/tests/7.sha512-p.chk @@ -0,0 +1 @@ +1234567890123456789012345678901234567890123456789012345678901234567890123456789072ec1ef1124a45b047e8b7c75a932195135bb61de24ec0d1914042246e0aec3a2354e093d76f3048b456764346900cb130d2a4fd5dd16abb5e30bcb850dee843 diff --git a/sbin/md5/tests/7.sha512sum-p.chk b/sbin/md5/tests/7.sha512sum-p.chk new file mode 100644 index 000000000000..efd5828f95ff --- /dev/null +++ b/sbin/md5/tests/7.sha512sum-p.chk @@ -0,0 +1 @@ +1234567890123456789012345678901234567890123456789012345678901234567890123456789072ec1ef1124a45b047e8b7c75a932195135bb61de24ec0d1914042246e0aec3a2354e093d76f3048b456764346900cb130d2a4fd5dd16abb5e30bcb850dee843 diff --git a/sbin/md5/tests/8.inp b/sbin/md5/tests/8.inp new file mode 100644 index 000000000000..689a689eceea --- /dev/null +++ b/sbin/md5/tests/8.inp @@ -0,0 +1 @@ +MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubt \ No newline at end of file diff --git a/sbin/md5/tests/8.sha512-p.chk b/sbin/md5/tests/8.sha512-p.chk new file mode 100644 index 000000000000..d53bfc56d752 --- /dev/null +++ b/sbin/md5/tests/8.sha512-p.chk @@ -0,0 +1 @@ +MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubte8a835195e039708b13d9131e025f4441dbdc521ce625f245a436dcd762f54bf5cb298d96235e6c6a304e087ec8189b9512cbdf6427737ea82793460c367b9c3 diff --git a/sbin/md5/tests/8.sha512sum-p.chk b/sbin/md5/tests/8.sha512sum-p.chk new file mode 100644 index 000000000000..d53bfc56d752 --- /dev/null +++ b/sbin/md5/tests/8.sha512sum-p.chk @@ -0,0 +1 @@ +MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubte8a835195e039708b13d9131e025f4441dbdc521ce625f245a436dcd762f54bf5cb298d96235e6c6a304e087ec8189b9512cbdf6427737ea82793460c367b9c3 diff --git a/sbin/md5/tests/Makefile b/sbin/md5/tests/Makefile new file mode 100644 index 000000000000..b37332aa9894 --- /dev/null +++ b/sbin/md5/tests/Makefile @@ -0,0 +1,41 @@ +# $FreeBSD$ + +.include + +PACKAGE= tests + +TEST_DIR= ${SRCTOP}/sbin/md5/tests + +.PATH: ${TEST_DIR} + +FILESGROUPS+= FILESinputs +FILESinputsPACKAGE= ${PACKAGE} +FILESinputsDIR= ${TESTSDIR} +FILESinputs!= echo ${TEST_DIR}/*.inp + +FILESGROUPS+= FILESchkfiles +FILESchkfilesPACKAGE= ${PACKAGE} +FILESchkfilesDIR= ${TESTSDIR} +FILESchkfiles!= echo ${TEST_DIR}/*.chk + +FILESGROUPS+= FILESdigests +FILESdigestsPACKAGE= ${PACKAGE} +FILESdigestsDIR= ${TESTSDIR} +FILESdigests!= echo ${TEST_DIR}/*.digest + +FILESGROUPS+= FILESparam +FILESparamPACKAGE= ${PACKAGE} +FILESparamDIR= ${TESTSDIR} +FILESparam!= echo ${TEST_DIR}/*.txt + +PLAIN_TESTS_SH+= self-test +PLAIN_TESTS_SH+= bsd-c-test +PLAIN_TESTS_SH+= bsd-p-test +PLAIN_TESTS_SH+= bsd-s-test + +.SUFFIXES: .SH + +.SH.sh: + sed 's|%%TESTSBASE%%|${TESTSBASE}|g' ${.ALLSRC} > ${.TARGET} + +.include diff --git a/sbin/md5/tests/algorithms.txt b/sbin/md5/tests/algorithms.txt new file mode 100644 index 000000000000..88f0ff5b783a --- /dev/null +++ b/sbin/md5/tests/algorithms.txt @@ -0,0 +1,11 @@ +md5 +rmd160 +sha1 +sha224 +sha256 +sha384 +sha512 +sha512t256 +skein1024 +skein256 +skein512 diff --git a/sbin/md5/tests/bsd-c-test.SH b/sbin/md5/tests/bsd-c-test.SH new file mode 100644 index 000000000000..0327b95f0c0e --- /dev/null +++ b/sbin/md5/tests/bsd-c-test.SH @@ -0,0 +1,23 @@ +#!/bin/sh + +exitcode=0 + +testloop () { + opt=$1 + + while read algorithm; do + n=0 + for f in %%TESTSBASE%%/sbin/md5/*.inp; do + n=$((n + 1)) + expected=$(head -$n %%TESTSBASE%%/sbin/md5/$algorithm.digest | tail -1 | cut -w -f4) + hash=$($algorithm $opt -c "$expected" $f) || exitcode=1 + done + done < %%TESTSBASE%%/sbin/md5/algorithms.txt +} + +testloop "" +testloop -q +testloop -r +testloop -qr + +exit $exitcode diff --git a/sbin/md5/tests/bsd-p-test.SH b/sbin/md5/tests/bsd-p-test.SH new file mode 100644 index 000000000000..77a725377e2c --- /dev/null +++ b/sbin/md5/tests/bsd-p-test.SH @@ -0,0 +1,24 @@ +#!/bin/sh + +exitcode=0 + +testloop () { + opt=$1 + sum=$2 + + for algorithm in sha512; do + for f in %%TESTSBASE%%/sbin/md5/*.inp; do + outbase=$(basename $f .inp) + $algorithm$sum $opt -p < $f > $outbase.out + diff %%TESTSBASE%%/sbin/md5/$outbase.$algorithm$sum-p.chk $outbase.out || exitcode=1 + done + done +} + +testloop "" "" +testloop -q "" +testloop -qr "" +testloop "" sum +testloop -q sum + +exit $exitcode diff --git a/sbin/md5/tests/bsd-s-test.SH b/sbin/md5/tests/bsd-s-test.SH new file mode 100644 index 000000000000..83267711137f --- /dev/null +++ b/sbin/md5/tests/bsd-s-test.SH @@ -0,0 +1,30 @@ +#!/bin/sh + +exitcode=0 + +testloop () { + opt=$1 + sum=$2 + field=$3 + + while read algorithm; do + n=0 + for f in %%TESTSBASE%%/sbin/md5/*.inp; do + n=$((n + 1)) + read text < $f + hash=$($algorithm$sum $opt -s "$text" | cut -d= -f$field) + hash=$(echo $hash | cut -w -f1) + expected=$(head -$n %%TESTSBASE%%/sbin/md5/$algorithm.digest | tail -1 | cut -w -f4) + [ "$hash" = "$expected" ] || exitcode=1 + done + done < %%TESTSBASE%%/sbin/md5/algorithms.txt +} + +testloop "" "" 2 +testloop -q "" 1 +testloop -r "" 1 +testloop -qr "" 1 +testloop "" sum 1 +testloop -q sum 1 + +exit $exitcode diff --git a/sbin/md5/tests/md5.digest b/sbin/md5/tests/md5.digest new file mode 100644 index 000000000000..38b8dcb6e705 --- /dev/null +++ b/sbin/md5/tests/md5.digest @@ -0,0 +1,8 @@ +MD5 (1.inp) = d41d8cd98f00b204e9800998ecf8427e +MD5 (2.inp) = 0cc175b9c0f1b6a831c399e269772661 +MD5 (3.inp) = 900150983cd24fb0d6963f7d28e17f72 +MD5 (4.inp) = f96b697d7cb7938d525a2f31aaf161d0 +MD5 (5.inp) = c3fcd3d76192e4007dfb496cca67e13b +MD5 (6.inp) = d174ab98d277d9f5a5611c2c9f419d9f +MD5 (7.inp) = 57edf4a22be3c955ac49da2e2107b67a +MD5 (8.inp) = b50663f41d44d92171cb9976bc118538 diff --git a/sbin/md5/tests/md5sum.digest b/sbin/md5/tests/md5sum.digest new file mode 100644 index 000000000000..c560afa0d7f0 --- /dev/null +++ b/sbin/md5/tests/md5sum.digest @@ -0,0 +1,8 @@ +d41d8cd98f00b204e9800998ecf8427e 1.inp +0cc175b9c0f1b6a831c399e269772661 2.inp +900150983cd24fb0d6963f7d28e17f72 3.inp +f96b697d7cb7938d525a2f31aaf161d0 4.inp +c3fcd3d76192e4007dfb496cca67e13b 5.inp +d174ab98d277d9f5a5611c2c9f419d9f 6.inp +57edf4a22be3c955ac49da2e2107b67a 7.inp +b50663f41d44d92171cb9976bc118538 8.inp diff --git a/sbin/md5/tests/rmd160.digest b/sbin/md5/tests/rmd160.digest new file mode 100644 index 000000000000..b2ffd3c0ce45 --- /dev/null +++ b/sbin/md5/tests/rmd160.digest @@ -0,0 +1,8 @@ +RMD160 (1.inp) = 9c1185a5c5e9fc54612808977ee8f548b2258d31 +RMD160 (2.inp) = 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe +RMD160 (3.inp) = 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc +RMD160 (4.inp) = 5d0689ef49d2fae572b881b123a85ffa21595f36 +RMD160 (5.inp) = f71c27109c692c1b56bbdceb5b9d2865b3708dbc +RMD160 (6.inp) = b0e20b6e3116640286ed3a87a5713079b21f5189 +RMD160 (7.inp) = 9b752e45573d4b39f4dbd3323cab82bf63326bfb +RMD160 (8.inp) = 5feb69c6bf7c29d95715ad55f57d8ac5b2b7dd32 diff --git a/sbin/md5/tests/rmd160sum.digest b/sbin/md5/tests/rmd160sum.digest new file mode 100644 index 000000000000..4864ff39e050 --- /dev/null +++ b/sbin/md5/tests/rmd160sum.digest @@ -0,0 +1,8 @@ +9c1185a5c5e9fc54612808977ee8f548b2258d31 1.inp +0bdc9d2d256b3ee9daae347be6f4dc835a467ffe 2.inp +8eb208f7e05d987a9b044a8e98c6b087f15a0bfc 3.inp +5d0689ef49d2fae572b881b123a85ffa21595f36 4.inp +f71c27109c692c1b56bbdceb5b9d2865b3708dbc 5.inp +b0e20b6e3116640286ed3a87a5713079b21f5189 6.inp +9b752e45573d4b39f4dbd3323cab82bf63326bfb 7.inp +5feb69c6bf7c29d95715ad55f57d8ac5b2b7dd32 8.inp diff --git a/sbin/md5/tests/self-test.SH b/sbin/md5/tests/self-test.SH new file mode 100644 index 000000000000..33bd5569c23c --- /dev/null +++ b/sbin/md5/tests/self-test.SH @@ -0,0 +1,8 @@ +#!/bin/sh + +while read algorithm; do + $algorithm -x > self-test.$algorithm.out || exitcode=$? + diff %%TESTSBASE%%/sbin/md5/self-test.$algorithm.chk self-test.$algorithm.out +done < %%TESTSBASE%%/sbin/md5/algorithms.txt + +exit $exitcode diff --git a/sbin/md5/tests/self-test.md5.chk b/sbin/md5/tests/self-test.md5.chk new file mode 100644 index 000000000000..d4eb05560b53 --- /dev/null +++ b/sbin/md5/tests/self-test.md5.chk @@ -0,0 +1,9 @@ +MD5 test suite: +MD5 ("") = d41d8cd98f00b204e9800998ecf8427e - verified correct +MD5 ("a") = 0cc175b9c0f1b6a831c399e269772661 - verified correct +MD5 ("abc") = 900150983cd24fb0d6963f7d28e17f72 - verified correct +MD5 ("message digest") = f96b697d7cb7938d525a2f31aaf161d0 - verified correct +MD5 ("abcdefghijklmnopqrstuvwxyz") = c3fcd3d76192e4007dfb496cca67e13b - verified correct +MD5 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = d174ab98d277d9f5a5611c2c9f419d9f - verified correct +MD5 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = 57edf4a22be3c955ac49da2e2107b67a - verified correct +MD5 ("MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubt") = b50663f41d44d92171cb9976bc118538 - verified correct diff --git a/sbin/md5/tests/self-test.rmd160.chk b/sbin/md5/tests/self-test.rmd160.chk new file mode 100644 index 000000000000..a0680ac7f647 --- /dev/null +++ b/sbin/md5/tests/self-test.rmd160.chk @@ -0,0 +1,9 @@ +RMD160 test suite: +RMD160 ("") = 9c1185a5c5e9fc54612808977ee8f548b2258d31 - verified correct +RMD160 ("a") = 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe - verified correct +RMD160 ("abc") = 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc - verified correct +RMD160 ("message digest") = 5d0689ef49d2fae572b881b123a85ffa21595f36 - verified correct +RMD160 ("abcdefghijklmnopqrstuvwxyz") = f71c27109c692c1b56bbdceb5b9d2865b3708dbc - verified correct +RMD160 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = b0e20b6e3116640286ed3a87a5713079b21f5189 - verified correct +RMD160 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = 9b752e45573d4b39f4dbd3323cab82bf63326bfb - verified correct +RMD160 ("MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubt") = 5feb69c6bf7c29d95715ad55f57d8ac5b2b7dd32 - verified correct diff --git a/sbin/md5/tests/self-test.sh_inp b/sbin/md5/tests/self-test.sh_inp new file mode 100644 index 000000000000..33bd5569c23c --- /dev/null +++ b/sbin/md5/tests/self-test.sh_inp @@ -0,0 +1,8 @@ +#!/bin/sh + +while read algorithm; do + $algorithm -x > self-test.$algorithm.out || exitcode=$? + diff %%TESTSBASE%%/sbin/md5/self-test.$algorithm.chk self-test.$algorithm.out +done < %%TESTSBASE%%/sbin/md5/algorithms.txt + +exit $exitcode diff --git a/sbin/md5/tests/self-test.sha1.chk b/sbin/md5/tests/self-test.sha1.chk new file mode 100644 index 000000000000..e463947feb36 --- /dev/null +++ b/sbin/md5/tests/self-test.sha1.chk @@ -0,0 +1,9 @@ +SHA1 test suite: +SHA1 ("") = da39a3ee5e6b4b0d3255bfef95601890afd80709 - verified correct +SHA1 ("a") = 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 - verified correct +SHA1 ("abc") = a9993e364706816aba3e25717850c26c9cd0d89d - verified correct +SHA1 ("message digest") = c12252ceda8be8994d5fa0290a47231c1d16aae3 - verified correct +SHA1 ("abcdefghijklmnopqrstuvwxyz") = 32d10c7b8cf96570ca04ce37f2a19d84240d3a89 - verified correct +SHA1 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = 761c457bf73b14d27e9e9265c46f4b4dda11f940 - verified correct +SHA1 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = 50abf5706a150990a08b2c5ea40fa0e585554732 - verified correct +SHA1 ("MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubt") = 18eca4333979c4181199b7b4fab8786d16cf2846 - verified correct diff --git a/sbin/md5/tests/self-test.sha224.chk b/sbin/md5/tests/self-test.sha224.chk new file mode 100644 index 000000000000..e74cccafa6d7 --- /dev/null +++ b/sbin/md5/tests/self-test.sha224.chk @@ -0,0 +1,9 @@ +SHA224 test suite: +SHA224 ("") = d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f - verified correct +SHA224 ("a") = abd37534c7d9a2efb9465de931cd7055ffdb8879563ae98078d6d6d5 - verified correct +SHA224 ("abc") = 23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7 - verified correct +SHA224 ("message digest") = 2cb21c83ae2f004de7e81c3c7019cbcb65b71ab656b22d6d0c39b8eb - verified correct +SHA224 ("abcdefghijklmnopqrstuvwxyz") = 45a5f72c39c5cff2522eb3429799e49e5f44b356ef926bcf390dccc2 - verified correct +SHA224 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = bff72b4fcb7d75e5632900ac5f90d219e05e97a7bde72e740db393d9 - verified correct +SHA224 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = b50aecbe4e9bb0b57bc5f3ae760a8e01db24f203fb3cdcd13148046e - verified correct +SHA224 ("MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubt") = 5ae55f3779c8a1204210d7ed7689f661fbe140f96f272ab79e19d470 - verified correct diff --git a/sbin/md5/tests/self-test.sha256.chk b/sbin/md5/tests/self-test.sha256.chk new file mode 100644 index 000000000000..ba640b6a9217 --- /dev/null +++ b/sbin/md5/tests/self-test.sha256.chk @@ -0,0 +1,9 @@ +SHA256 test suite: +SHA256 ("") = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - verified correct +SHA256 ("a") = ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb - verified correct +SHA256 ("abc") = ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - verified correct +SHA256 ("message digest") = f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650 - verified correct +SHA256 ("abcdefghijklmnopqrstuvwxyz") = 71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73 - verified correct +SHA256 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = db4bfcbd4da0cd85a60c3c37d3fbd8805c77f15fc6b1fdfe614ee0a7c8fdb4c0 - verified correct +SHA256 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = f371bc4a311f2b009eef952dd83ca80e2b60026c8e935592d0f9c308453c813e - verified correct +SHA256 ("MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubt") = e6eae09f10ad4122a0e2a4075761d185a272ebd9f5aa489e998ff2f09cbfdd9f - verified correct diff --git a/sbin/md5/tests/self-test.sha384.chk b/sbin/md5/tests/self-test.sha384.chk new file mode 100644 index 000000000000..a493cadc1964 --- /dev/null +++ b/sbin/md5/tests/self-test.sha384.chk @@ -0,0 +1,9 @@ +SHA384 test suite: +SHA384 ("") = 38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b - verified correct +SHA384 ("a") = 54a59b9f22b0b80880d8427e548b7c23abd873486e1f035dce9cd697e85175033caa88e6d57bc35efae0b5afd3145f31 - verified correct +SHA384 ("abc") = cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7 - verified correct +SHA384 ("message digest") = 473ed35167ec1f5d8e550368a3db39be54639f828868e9454c239fc8b52e3c61dbd0d8b4de1390c256dcbb5d5fd99cd5 - verified correct +SHA384 ("abcdefghijklmnopqrstuvwxyz") = feb67349df3db6f5924815d6c3dc133f091809213731fe5c7b5f4999e463479ff2877f5f2936fa63bb43784b12f3ebb4 - verified correct +SHA384 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = 1761336e3f7cbfe51deb137f026f89e01a448e3b1fafa64039c1464ee8732f11a5341a6f41e0c202294736ed64db1a84 - verified correct +SHA384 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = b12932b0627d1c060942f5447764155655bd4da0c9afa6dd9b9ef53129af1b8fb0195996d2de9ca0df9d821ffee67026 - verified correct +SHA384 ("MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubt") = 99428d401bf4abcd4ee0695248c9858b7503853acfae21a9cffa7855f46d1395ef38596fcd06d5a8c32d41a839cc5dfb - verified correct diff --git a/sbin/md5/tests/self-test.sha512.chk b/sbin/md5/tests/self-test.sha512.chk new file mode 100644 index 000000000000..f36e455cdaa5 --- /dev/null +++ b/sbin/md5/tests/self-test.sha512.chk @@ -0,0 +1,9 @@ +SHA512 test suite: +SHA512 ("") = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e - verified correct +SHA512 ("a") = 1f40fc92da241694750979ee6cf582f2d5d7d28e18335de05abc54d0560e0f5302860c652bf08d560252aa5e74210546f369fbbbce8c12cfc7957b2652fe9a75 - verified correct +SHA512 ("abc") = ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f - verified correct +SHA512 ("message digest") = 107dbf389d9e9f71a3a95f6c055b9251bc5268c2be16d6c13492ea45b0199f3309e16455ab1e96118e8a905d5597b72038ddb372a89826046de66687bb420e7c - verified correct +SHA512 ("abcdefghijklmnopqrstuvwxyz") = 4dbff86cc2ca1bae1e16468a05cb9881c97f1753bce3619034898faa1aabe429955a1bf8ec483d7421fe3c1646613a59ed5441fb0f321389f77f48a879c7b1f1 - verified correct +SHA512 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = 1e07be23c26a86ea37ea810c8ec7809352515a970e9253c26f536cfc7a9996c45c8370583e0a78fa4a90041d71a4ceab7423f19c71b9d5a3e01249f0bebd5894 - verified correct +SHA512 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = 72ec1ef1124a45b047e8b7c75a932195135bb61de24ec0d1914042246e0aec3a2354e093d76f3048b456764346900cb130d2a4fd5dd16abb5e30bcb850dee843 - verified correct +SHA512 ("MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubt") = e8a835195e039708b13d9131e025f4441dbdc521ce625f245a436dcd762f54bf5cb298d96235e6c6a304e087ec8189b9512cbdf6427737ea82793460c367b9c3 - verified correct diff --git a/sbin/md5/tests/self-test.sha512t256.chk b/sbin/md5/tests/self-test.sha512t256.chk new file mode 100644 index 000000000000..25612ace484a --- /dev/null +++ b/sbin/md5/tests/self-test.sha512t256.chk @@ -0,0 +1,9 @@ +SHA512t256 test suite: +SHA512t256 ("") = c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a - verified correct +SHA512t256 ("a") = 455e518824bc0601f9fb858ff5c37d417d67c2f8e0df2babe4808858aea830f8 - verified correct +SHA512t256 ("abc") = 53048e2681941ef99b2e29b76b4c7dabe4c2d0c634fc6d46e0e2f13107e7af23 - verified correct +SHA512t256 ("message digest") = 0cf471fd17ed69d990daf3433c89b16d63dec1bb9cb42a6094604ee5d7b4e9fb - verified correct +SHA512t256 ("abcdefghijklmnopqrstuvwxyz") = fc3189443f9c268f626aea08a756abe7b726b05f701cb08222312ccfd6710a26 - verified correct +SHA512t256 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = cdf1cc0effe26ecc0c13758f7b4a48e000615df241284185c39eb05d355bb9c8 - verified correct +SHA512t256 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = 2c9fdbc0c90bdd87612ee8455474f9044850241dc105b1e8b94b8ddf5fac9148 - verified correct +SHA512t256 ("MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubt") = dd095fc859b336c30a52548b3dc59fcc0d1be8616ebcf3368fad23107db2d736 - verified correct diff --git a/sbin/md5/tests/self-test.skein1024.chk b/sbin/md5/tests/self-test.skein1024.chk new file mode 100644 index 000000000000..8cfc5997afde --- /dev/null +++ b/sbin/md5/tests/self-test.skein1024.chk @@ -0,0 +1,9 @@ +Skein1024 test suite: +Skein1024 ("") = 0fff9563bb3279289227ac77d319b6fff8d7e9f09da1247b72a0a265cd6d2a62645ad547ed8193db48cff847c06494a03f55666d3b47eb4c20456c9373c86297d630d5578ebd34cb40991578f9f52b18003efa35d3da6553ff35db91b81ab890bec1b189b7f52cb2a783ebb7d823d725b0b4a71f6824e88f68f982eefc6d19c6 - verified correct +Skein1024 ("a") = 6ab4c4ba9814a3d976ec8bffa7fcc638ceba0544a97b3c98411323ffd2dc936315d13dc93c13c4e88cda6f5bac6f2558b2d8694d3b6143e40d644ae43ca940685cb37f809d3d0550c56cba8036dee729a4f8fb960732e59e64d57f7f7710f8670963cdcdc95b41daab4855fcf8b6762a64b173ee61343a2c7689af1d293eba97 - verified correct +Skein1024 ("abc") = 35a599a0f91abcdb4cb73c19b8cb8d947742d82c309137a7caed29e8e0a2ca7a9ff9a90c34c1908cc7e7fd99bb15032fb86e76df21b72628399b5f7c3cc209d7bb31c99cd4e19465622a049afbb87c03b5ce3888d17e6e667279ec0aa9b3e2712624c01b5f5bbe1a564220bdcf6990af0c2539019f313fdd7406cca3892a1f1f - verified correct +Skein1024 ("message digest") = ea891f5268acd0fac97467fc1aa89d1ce8681a9992a42540e53babee861483110c2d16f49e73bac27653ff173003e40cfb08516cd34262e6af95a5d8645c9c1abb3e813604d508b8511b30f9a5c1b352aa0791c7d2f27b2706dccea54bc7de6555b5202351751c3299f97c09cf89c40f67187e2521c0fad82b30edbb224f0458 - verified correct +Skein1024 ("abcdefghijklmnopqrstuvwxyz") = f23d95c2a25fbcd0e797cd058fec39d3c52d2b5afd7a9af1df934e63257d1d3dcf3246e7329c0f1104c1e51e3d22e300507b0c3b9f985bb1f645ef49835080536becf83788e17fed09c9982ba65c3cb7ffe6a5f745b911c506962adf226e435c42f6f6bc08d288f9c810e807e3216ef444f3db22744441deefa4900982a1371f - verified correct +Skein1024 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = cf3889e8a8d11bfd3938055d7d061437962bc5eac8ae83b1b71c94be201b8cf657fdbfc38674997a008c0c903f56a23feb3ae30e012377f1cfa080a9ca7fe8b96138662653fb3335c7d06595bf8baf65e215307532094cfdfa056bd8052ab792a3944a2adaa47b30335b8badb8fe9eb94fe329cdca04e58bbc530f0af709f469 - verified correct +Skein1024 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = cf21a613620e6c119eca31fdfaad449a8e02f95ca256c21d2a105f8e4157048f9fe1e897893ea18b64e0e37cb07d5ac947f27ba544caf7cbc1ad094e675aed77a366270f7eb7f46543bccfa61c526fd628408058ed00ed566ac35a9761d002e629c4fb0d430b2f4ad016fcc49c44d2981c4002da0eecc42144160e2eaea4855a - verified correct +Skein1024 ("MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubt") = e6799b78db54085a2be7ff4c8007f147fa88d326abab30be0560b953396d8802feee9a15419b48a467574e9283be15685ca8a079ee52b27166b64dd70b124b1d4e4f6aca37224c3f2685e67e67baef9f94b905698adc794a09672aba977a61b20966912acdb08c21a2c37001785355dc884751a21f848ab36e590331ff938138 - verified correct diff --git a/sbin/md5/tests/self-test.skein256.chk b/sbin/md5/tests/self-test.skein256.chk new file mode 100644 index 000000000000..41d1fdcb8cc8 --- /dev/null +++ b/sbin/md5/tests/self-test.skein256.chk @@ -0,0 +1,9 @@ +Skein256 test suite: +Skein256 ("") = c8877087da56e072870daa843f176e9453115929094c3a40c463a196c29bf7ba - verified correct +Skein256 ("a") = 7fba44ff1a31d71a0c1f82e6e82fb5e9ac6c92a39c9185b9951fed82d82fe635 - verified correct +Skein256 ("abc") = 258bdec343b9fde1639221a5ae0144a96e552e5288753c5fec76c05fc2fc1870 - verified correct +Skein256 ("message digest") = 4d2ce0062b5eb3a4db95bc1117dd8aa014f6cd50fdc8e64f31f7d41f9231e488 - verified correct +Skein256 ("abcdefghijklmnopqrstuvwxyz") = 46d8440685461b00e3ddb891b2ecc6855287d2bd8834a95fb1c1708b00ea5e82 - verified correct +Skein256 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = 7c5eb606389556b33d34eb2536459528dc0af97adbcd0ce273aeb650f598d4b2 - verified correct +Skein256 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = 4def7a7e5464a140ae9c3a80279fbebce4bd00f9faad819ab7e001512f67a10d - verified correct +Skein256 ("MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubt") = d9c017dbe355f318d036469eb9b5fbe129fc2b5786a9dc6746a516eab6fe0126 - verified correct diff --git a/sbin/md5/tests/self-test.skein512.chk b/sbin/md5/tests/self-test.skein512.chk new file mode 100644 index 000000000000..437220e17adb --- /dev/null +++ b/sbin/md5/tests/self-test.skein512.chk @@ -0,0 +1,9 @@ +Skein512 test suite: +Skein512 ("") = bc5b4c50925519c290cc634277ae3d6257212395cba733bbad37a4af0fa06af41fca7903d06564fea7a2d3730dbdb80c1f85562dfcc070334ea4d1d9e72cba7a - verified correct +Skein512 ("a") = b1cd8d33f61b3737adfd59bb13ad82f4a9548e92f22956a8976cca3fdb7fee4fe91698146c4197cec85d38b83c5d93bdba92c01fd9a53870d0c7f967bc62bdce - verified correct +Skein512 ("abc") = 8f5dd9ec798152668e35129496b029a960c9a9b88662f7f9482f110b31f9f93893ecfb25c009baad9e46737197d5630379816a886aa05526d3a70df272d96e75 - verified correct +Skein512 ("message digest") = 15b73c158ffb875fed4d72801ded0794c720b121c0c78edf45f900937e6933d9e21a3a984206933d504b5dbb2368000411477ee1b204c986068df77886542fcc - verified correct +Skein512 ("abcdefghijklmnopqrstuvwxyz") = 23793ad900ef12f9165c8080da6fdfd2c8354a2929b8aadf83aa82a3c6470342f57cf8c035ec0d97429b626c4d94f28632c8f5134fd367dca5cf293d2ec13f8c - verified correct +Skein512 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = 0c6bed927e022f5ddcf81877d42e5f75798a9f8fd3ede3d83baac0a2f364b082e036c11af35fe478745459dd8f5c0b73efe3c56ba5bb2009208d5a29cc6e469c - verified correct +Skein512 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = 2ca9fcffb3456f297d1b5f407014ecb856f0baac8eb540f534b1f187196f21e88f31103128c2f03fcc9857d7a58eb66f9525e2302d88833ee069295537a434ce - verified correct +Skein512 ("MD5 has not yet (2001-09-03) been broken, but sufficient attacks have been made that its security is in some doubt") = 1131f2aaa0e97126c9314f9f968cc827259bbfabced2943bb8c9274448998fb3b78738b4580dd500c76105fd3c03e465e1414f2c29664286b1f79d3e51128125 - verified correct diff --git a/sbin/md5/tests/sha1.digest b/sbin/md5/tests/sha1.digest new file mode 100644 index 000000000000..10ce642c0883 --- /dev/null +++ b/sbin/md5/tests/sha1.digest @@ -0,0 +1,8 @@ +SHA1 (1.inp) = da39a3ee5e6b4b0d3255bfef95601890afd80709 +SHA1 (2.inp) = 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 +SHA1 (3.inp) = a9993e364706816aba3e25717850c26c9cd0d89d +SHA1 (4.inp) = c12252ceda8be8994d5fa0290a47231c1d16aae3 +SHA1 (5.inp) = 32d10c7b8cf96570ca04ce37f2a19d84240d3a89 +SHA1 (6.inp) = 761c457bf73b14d27e9e9265c46f4b4dda11f940 +SHA1 (7.inp) = 50abf5706a150990a08b2c5ea40fa0e585554732 +SHA1 (8.inp) = 18eca4333979c4181199b7b4fab8786d16cf2846 diff --git a/sbin/md5/tests/sha1sum.digest b/sbin/md5/tests/sha1sum.digest new file mode 100644 index 000000000000..d82d2889ff5d --- /dev/null +++ b/sbin/md5/tests/sha1sum.digest @@ -0,0 +1,8 @@ +da39a3ee5e6b4b0d3255bfef95601890afd80709 1.inp +86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 2.inp +a9993e364706816aba3e25717850c26c9cd0d89d 3.inp +c12252ceda8be8994d5fa0290a47231c1d16aae3 4.inp +32d10c7b8cf96570ca04ce37f2a19d84240d3a89 5.inp +761c457bf73b14d27e9e9265c46f4b4dda11f940 6.inp +50abf5706a150990a08b2c5ea40fa0e585554732 7.inp +18eca4333979c4181199b7b4fab8786d16cf2846 8.inp diff --git a/sbin/md5/tests/sha224.digest b/sbin/md5/tests/sha224.digest new file mode 100644 index 000000000000..a1007511a978 --- /dev/null +++ b/sbin/md5/tests/sha224.digest @@ -0,0 +1,8 @@ +SHA224 (1.inp) = d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f +SHA224 (2.inp) = abd37534c7d9a2efb9465de931cd7055ffdb8879563ae98078d6d6d5 +SHA224 (3.inp) = 23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7 +SHA224 (4.inp) = 2cb21c83ae2f004de7e81c3c7019cbcb65b71ab656b22d6d0c39b8eb +SHA224 (5.inp) = 45a5f72c39c5cff2522eb3429799e49e5f44b356ef926bcf390dccc2 +SHA224 (6.inp) = bff72b4fcb7d75e5632900ac5f90d219e05e97a7bde72e740db393d9 +SHA224 (7.inp) = b50aecbe4e9bb0b57bc5f3ae760a8e01db24f203fb3cdcd13148046e +SHA224 (8.inp) = 5ae55f3779c8a1204210d7ed7689f661fbe140f96f272ab79e19d470 diff --git a/sbin/md5/tests/sha224sum.digest b/sbin/md5/tests/sha224sum.digest new file mode 100644 index 000000000000..37fd833032fb --- /dev/null +++ b/sbin/md5/tests/sha224sum.digest @@ -0,0 +1,8 @@ +d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f 1.inp +abd37534c7d9a2efb9465de931cd7055ffdb8879563ae98078d6d6d5 2.inp +23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7 3.inp +2cb21c83ae2f004de7e81c3c7019cbcb65b71ab656b22d6d0c39b8eb 4.inp +45a5f72c39c5cff2522eb3429799e49e5f44b356ef926bcf390dccc2 5.inp +bff72b4fcb7d75e5632900ac5f90d219e05e97a7bde72e740db393d9 6.inp +b50aecbe4e9bb0b57bc5f3ae760a8e01db24f203fb3cdcd13148046e 7.inp +5ae55f3779c8a1204210d7ed7689f661fbe140f96f272ab79e19d470 8.inp diff --git a/sbin/md5/tests/sha256.digest b/sbin/md5/tests/sha256.digest new file mode 100644 index 000000000000..b6c4411261a8 --- /dev/null +++ b/sbin/md5/tests/sha256.digest @@ -0,0 +1,8 @@ +SHA256 (1.inp) = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 +SHA256 (2.inp) = ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb +SHA256 (3.inp) = ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad +SHA256 (4.inp) = f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650 +SHA256 (5.inp) = 71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73 +SHA256 (6.inp) = db4bfcbd4da0cd85a60c3c37d3fbd8805c77f15fc6b1fdfe614ee0a7c8fdb4c0 +SHA256 (7.inp) = f371bc4a311f2b009eef952dd83ca80e2b60026c8e935592d0f9c308453c813e +SHA256 (8.inp) = e6eae09f10ad4122a0e2a4075761d185a272ebd9f5aa489e998ff2f09cbfdd9f diff --git a/sbin/md5/tests/sha256sum.digest b/sbin/md5/tests/sha256sum.digest new file mode 100644 index 000000000000..35ce99a0c6c1 --- /dev/null +++ b/sbin/md5/tests/sha256sum.digest @@ -0,0 +1,8 @@ +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 1.inp +ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb 2.inp +ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad 3.inp +f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650 4.inp +71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73 5.inp +db4bfcbd4da0cd85a60c3c37d3fbd8805c77f15fc6b1fdfe614ee0a7c8fdb4c0 6.inp +f371bc4a311f2b009eef952dd83ca80e2b60026c8e935592d0f9c308453c813e 7.inp +e6eae09f10ad4122a0e2a4075761d185a272ebd9f5aa489e998ff2f09cbfdd9f 8.inp diff --git a/sbin/md5/tests/sha384.digest b/sbin/md5/tests/sha384.digest new file mode 100644 index 000000000000..b56ef8b708e4 --- /dev/null +++ b/sbin/md5/tests/sha384.digest @@ -0,0 +1,8 @@ +SHA384 (1.inp) = 38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b +SHA384 (2.inp) = 54a59b9f22b0b80880d8427e548b7c23abd873486e1f035dce9cd697e85175033caa88e6d57bc35efae0b5afd3145f31 +SHA384 (3.inp) = cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7 +SHA384 (4.inp) = 473ed35167ec1f5d8e550368a3db39be54639f828868e9454c239fc8b52e3c61dbd0d8b4de1390c256dcbb5d5fd99cd5 +SHA384 (5.inp) = feb67349df3db6f5924815d6c3dc133f091809213731fe5c7b5f4999e463479ff2877f5f2936fa63bb43784b12f3ebb4 +SHA384 (6.inp) = 1761336e3f7cbfe51deb137f026f89e01a448e3b1fafa64039c1464ee8732f11a5341a6f41e0c202294736ed64db1a84 +SHA384 (7.inp) = b12932b0627d1c060942f5447764155655bd4da0c9afa6dd9b9ef53129af1b8fb0195996d2de9ca0df9d821ffee67026 +SHA384 (8.inp) = 99428d401bf4abcd4ee0695248c9858b7503853acfae21a9cffa7855f46d1395ef38596fcd06d5a8c32d41a839cc5dfb diff --git a/sbin/md5/tests/sha384sum.digest b/sbin/md5/tests/sha384sum.digest new file mode 100644 index 000000000000..7d669e0dda08 --- /dev/null +++ b/sbin/md5/tests/sha384sum.digest @@ -0,0 +1,8 @@ +38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b 1.inp +54a59b9f22b0b80880d8427e548b7c23abd873486e1f035dce9cd697e85175033caa88e6d57bc35efae0b5afd3145f31 2.inp +cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7 3.inp +473ed35167ec1f5d8e550368a3db39be54639f828868e9454c239fc8b52e3c61dbd0d8b4de1390c256dcbb5d5fd99cd5 4.inp +feb67349df3db6f5924815d6c3dc133f091809213731fe5c7b5f4999e463479ff2877f5f2936fa63bb43784b12f3ebb4 5.inp +1761336e3f7cbfe51deb137f026f89e01a448e3b1fafa64039c1464ee8732f11a5341a6f41e0c202294736ed64db1a84 6.inp +b12932b0627d1c060942f5447764155655bd4da0c9afa6dd9b9ef53129af1b8fb0195996d2de9ca0df9d821ffee67026 7.inp +99428d401bf4abcd4ee0695248c9858b7503853acfae21a9cffa7855f46d1395ef38596fcd06d5a8c32d41a839cc5dfb 8.inp diff --git a/sbin/md5/tests/sha512.digest b/sbin/md5/tests/sha512.digest new file mode 100644 index 000000000000..dd82845b8131 --- /dev/null +++ b/sbin/md5/tests/sha512.digest @@ -0,0 +1,8 @@ +SHA512 (1.inp) = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e +SHA512 (2.inp) = 1f40fc92da241694750979ee6cf582f2d5d7d28e18335de05abc54d0560e0f5302860c652bf08d560252aa5e74210546f369fbbbce8c12cfc7957b2652fe9a75 +SHA512 (3.inp) = ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f +SHA512 (4.inp) = 107dbf389d9e9f71a3a95f6c055b9251bc5268c2be16d6c13492ea45b0199f3309e16455ab1e96118e8a905d5597b72038ddb372a89826046de66687bb420e7c +SHA512 (5.inp) = 4dbff86cc2ca1bae1e16468a05cb9881c97f1753bce3619034898faa1aabe429955a1bf8ec483d7421fe3c1646613a59ed5441fb0f321389f77f48a879c7b1f1 +SHA512 (6.inp) = 1e07be23c26a86ea37ea810c8ec7809352515a970e9253c26f536cfc7a9996c45c8370583e0a78fa4a90041d71a4ceab7423f19c71b9d5a3e01249f0bebd5894 +SHA512 (7.inp) = 72ec1ef1124a45b047e8b7c75a932195135bb61de24ec0d1914042246e0aec3a2354e093d76f3048b456764346900cb130d2a4fd5dd16abb5e30bcb850dee843 +SHA512 (8.inp) = e8a835195e039708b13d9131e025f4441dbdc521ce625f245a436dcd762f54bf5cb298d96235e6c6a304e087ec8189b9512cbdf6427737ea82793460c367b9c3 diff --git a/sbin/md5/tests/sha512sum.digest b/sbin/md5/tests/sha512sum.digest new file mode 100644 index 000000000000..55bbd509e4df --- /dev/null +++ b/sbin/md5/tests/sha512sum.digest @@ -0,0 +1,8 @@ +cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e 1.inp +1f40fc92da241694750979ee6cf582f2d5d7d28e18335de05abc54d0560e0f5302860c652bf08d560252aa5e74210546f369fbbbce8c12cfc7957b2652fe9a75 2.inp +ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f 3.inp +107dbf389d9e9f71a3a95f6c055b9251bc5268c2be16d6c13492ea45b0199f3309e16455ab1e96118e8a905d5597b72038ddb372a89826046de66687bb420e7c 4.inp +4dbff86cc2ca1bae1e16468a05cb9881c97f1753bce3619034898faa1aabe429955a1bf8ec483d7421fe3c1646613a59ed5441fb0f321389f77f48a879c7b1f1 5.inp +1e07be23c26a86ea37ea810c8ec7809352515a970e9253c26f536cfc7a9996c45c8370583e0a78fa4a90041d71a4ceab7423f19c71b9d5a3e01249f0bebd5894 6.inp +72ec1ef1124a45b047e8b7c75a932195135bb61de24ec0d1914042246e0aec3a2354e093d76f3048b456764346900cb130d2a4fd5dd16abb5e30bcb850dee843 7.inp +e8a835195e039708b13d9131e025f4441dbdc521ce625f245a436dcd762f54bf5cb298d96235e6c6a304e087ec8189b9512cbdf6427737ea82793460c367b9c3 8.inp diff --git a/sbin/md5/tests/sha512t256.digest b/sbin/md5/tests/sha512t256.digest new file mode 100644 index 000000000000..3e7df9eb98db --- /dev/null +++ b/sbin/md5/tests/sha512t256.digest @@ -0,0 +1,8 @@ +SHA512t256 (1.inp) = c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a +SHA512t256 (2.inp) = 455e518824bc0601f9fb858ff5c37d417d67c2f8e0df2babe4808858aea830f8 +SHA512t256 (3.inp) = 53048e2681941ef99b2e29b76b4c7dabe4c2d0c634fc6d46e0e2f13107e7af23 +SHA512t256 (4.inp) = 0cf471fd17ed69d990daf3433c89b16d63dec1bb9cb42a6094604ee5d7b4e9fb +SHA512t256 (5.inp) = fc3189443f9c268f626aea08a756abe7b726b05f701cb08222312ccfd6710a26 +SHA512t256 (6.inp) = cdf1cc0effe26ecc0c13758f7b4a48e000615df241284185c39eb05d355bb9c8 +SHA512t256 (7.inp) = 2c9fdbc0c90bdd87612ee8455474f9044850241dc105b1e8b94b8ddf5fac9148 +SHA512t256 (8.inp) = dd095fc859b336c30a52548b3dc59fcc0d1be8616ebcf3368fad23107db2d736 diff --git a/sbin/md5/tests/sha512t256sum.digest b/sbin/md5/tests/sha512t256sum.digest new file mode 100644 index 000000000000..425e31006d6e --- /dev/null +++ b/sbin/md5/tests/sha512t256sum.digest @@ -0,0 +1,8 @@ +c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a 1.inp +455e518824bc0601f9fb858ff5c37d417d67c2f8e0df2babe4808858aea830f8 2.inp +53048e2681941ef99b2e29b76b4c7dabe4c2d0c634fc6d46e0e2f13107e7af23 3.inp +0cf471fd17ed69d990daf3433c89b16d63dec1bb9cb42a6094604ee5d7b4e9fb 4.inp +fc3189443f9c268f626aea08a756abe7b726b05f701cb08222312ccfd6710a26 5.inp +cdf1cc0effe26ecc0c13758f7b4a48e000615df241284185c39eb05d355bb9c8 6.inp +2c9fdbc0c90bdd87612ee8455474f9044850241dc105b1e8b94b8ddf5fac9148 7.inp +dd095fc859b336c30a52548b3dc59fcc0d1be8616ebcf3368fad23107db2d736 8.inp diff --git a/sbin/md5/tests/skein1024.digest b/sbin/md5/tests/skein1024.digest new file mode 100644 index 000000000000..dea354221b26 --- /dev/null +++ b/sbin/md5/tests/skein1024.digest @@ -0,0 +1,8 @@ +Skein1024 (1.inp) = 0fff9563bb3279289227ac77d319b6fff8d7e9f09da1247b72a0a265cd6d2a62645ad547ed8193db48cff847c06494a03f55666d3b47eb4c20456c9373c86297d630d5578ebd34cb40991578f9f52b18003efa35d3da6553ff35db91b81ab890bec1b189b7f52cb2a783ebb7d823d725b0b4a71f6824e88f68f982eefc6d19c6 +Skein1024 (2.inp) = 6ab4c4ba9814a3d976ec8bffa7fcc638ceba0544a97b3c98411323ffd2dc936315d13dc93c13c4e88cda6f5bac6f2558b2d8694d3b6143e40d644ae43ca940685cb37f809d3d0550c56cba8036dee729a4f8fb960732e59e64d57f7f7710f8670963cdcdc95b41daab4855fcf8b6762a64b173ee61343a2c7689af1d293eba97 +Skein1024 (3.inp) = 35a599a0f91abcdb4cb73c19b8cb8d947742d82c309137a7caed29e8e0a2ca7a9ff9a90c34c1908cc7e7fd99bb15032fb86e76df21b72628399b5f7c3cc209d7bb31c99cd4e19465622a049afbb87c03b5ce3888d17e6e667279ec0aa9b3e2712624c01b5f5bbe1a564220bdcf6990af0c2539019f313fdd7406cca3892a1f1f +Skein1024 (4.inp) = ea891f5268acd0fac97467fc1aa89d1ce8681a9992a42540e53babee861483110c2d16f49e73bac27653ff173003e40cfb08516cd34262e6af95a5d8645c9c1abb3e813604d508b8511b30f9a5c1b352aa0791c7d2f27b2706dccea54bc7de6555b5202351751c3299f97c09cf89c40f67187e2521c0fad82b30edbb224f0458 +Skein1024 (5.inp) = f23d95c2a25fbcd0e797cd058fec39d3c52d2b5afd7a9af1df934e63257d1d3dcf3246e7329c0f1104c1e51e3d22e300507b0c3b9f985bb1f645ef49835080536becf83788e17fed09c9982ba65c3cb7ffe6a5f745b911c506962adf226e435c42f6f6bc08d288f9c810e807e3216ef444f3db22744441deefa4900982a1371f +Skein1024 (6.inp) = cf3889e8a8d11bfd3938055d7d061437962bc5eac8ae83b1b71c94be201b8cf657fdbfc38674997a008c0c903f56a23feb3ae30e012377f1cfa080a9ca7fe8b96138662653fb3335c7d06595bf8baf65e215307532094cfdfa056bd8052ab792a3944a2adaa47b30335b8badb8fe9eb94fe329cdca04e58bbc530f0af709f469 +Skein1024 (7.inp) = cf21a613620e6c119eca31fdfaad449a8e02f95ca256c21d2a105f8e4157048f9fe1e897893ea18b64e0e37cb07d5ac947f27ba544caf7cbc1ad094e675aed77a366270f7eb7f46543bccfa61c526fd628408058ed00ed566ac35a9761d002e629c4fb0d430b2f4ad016fcc49c44d2981c4002da0eecc42144160e2eaea4855a +Skein1024 (8.inp) = e6799b78db54085a2be7ff4c8007f147fa88d326abab30be0560b953396d8802feee9a15419b48a467574e9283be15685ca8a079ee52b27166b64dd70b124b1d4e4f6aca37224c3f2685e67e67baef9f94b905698adc794a09672aba977a61b20966912acdb08c21a2c37001785355dc884751a21f848ab36e590331ff938138 diff --git a/sbin/md5/tests/skein1024sum.digest b/sbin/md5/tests/skein1024sum.digest new file mode 100644 index 000000000000..dca058ab55b7 --- /dev/null +++ b/sbin/md5/tests/skein1024sum.digest @@ -0,0 +1,8 @@ +0fff9563bb3279289227ac77d319b6fff8d7e9f09da1247b72a0a265cd6d2a62645ad547ed8193db48cff847c06494a03f55666d3b47eb4c20456c9373c86297d630d5578ebd34cb40991578f9f52b18003efa35d3da6553ff35db91b81ab890bec1b189b7f52cb2a783ebb7d823d725b0b4a71f6824e88f68f982eefc6d19c6 1.inp +6ab4c4ba9814a3d976ec8bffa7fcc638ceba0544a97b3c98411323ffd2dc936315d13dc93c13c4e88cda6f5bac6f2558b2d8694d3b6143e40d644ae43ca940685cb37f809d3d0550c56cba8036dee729a4f8fb960732e59e64d57f7f7710f8670963cdcdc95b41daab4855fcf8b6762a64b173ee61343a2c7689af1d293eba97 2.inp +35a599a0f91abcdb4cb73c19b8cb8d947742d82c309137a7caed29e8e0a2ca7a9ff9a90c34c1908cc7e7fd99bb15032fb86e76df21b72628399b5f7c3cc209d7bb31c99cd4e19465622a049afbb87c03b5ce3888d17e6e667279ec0aa9b3e2712624c01b5f5bbe1a564220bdcf6990af0c2539019f313fdd7406cca3892a1f1f 3.inp +ea891f5268acd0fac97467fc1aa89d1ce8681a9992a42540e53babee861483110c2d16f49e73bac27653ff173003e40cfb08516cd34262e6af95a5d8645c9c1abb3e813604d508b8511b30f9a5c1b352aa0791c7d2f27b2706dccea54bc7de6555b5202351751c3299f97c09cf89c40f67187e2521c0fad82b30edbb224f0458 4.inp +f23d95c2a25fbcd0e797cd058fec39d3c52d2b5afd7a9af1df934e63257d1d3dcf3246e7329c0f1104c1e51e3d22e300507b0c3b9f985bb1f645ef49835080536becf83788e17fed09c9982ba65c3cb7ffe6a5f745b911c506962adf226e435c42f6f6bc08d288f9c810e807e3216ef444f3db22744441deefa4900982a1371f 5.inp +cf3889e8a8d11bfd3938055d7d061437962bc5eac8ae83b1b71c94be201b8cf657fdbfc38674997a008c0c903f56a23feb3ae30e012377f1cfa080a9ca7fe8b96138662653fb3335c7d06595bf8baf65e215307532094cfdfa056bd8052ab792a3944a2adaa47b30335b8badb8fe9eb94fe329cdca04e58bbc530f0af709f469 6.inp +cf21a613620e6c119eca31fdfaad449a8e02f95ca256c21d2a105f8e4157048f9fe1e897893ea18b64e0e37cb07d5ac947f27ba544caf7cbc1ad094e675aed77a366270f7eb7f46543bccfa61c526fd628408058ed00ed566ac35a9761d002e629c4fb0d430b2f4ad016fcc49c44d2981c4002da0eecc42144160e2eaea4855a 7.inp +e6799b78db54085a2be7ff4c8007f147fa88d326abab30be0560b953396d8802feee9a15419b48a467574e9283be15685ca8a079ee52b27166b64dd70b124b1d4e4f6aca37224c3f2685e67e67baef9f94b905698adc794a09672aba977a61b20966912acdb08c21a2c37001785355dc884751a21f848ab36e590331ff938138 8.inp diff --git a/sbin/md5/tests/skein256.digest b/sbin/md5/tests/skein256.digest new file mode 100644 index 000000000000..ee17f8df1532 --- /dev/null +++ b/sbin/md5/tests/skein256.digest @@ -0,0 +1,8 @@ +Skein256 (1.inp) = c8877087da56e072870daa843f176e9453115929094c3a40c463a196c29bf7ba +Skein256 (2.inp) = 7fba44ff1a31d71a0c1f82e6e82fb5e9ac6c92a39c9185b9951fed82d82fe635 +Skein256 (3.inp) = 258bdec343b9fde1639221a5ae0144a96e552e5288753c5fec76c05fc2fc1870 +Skein256 (4.inp) = 4d2ce0062b5eb3a4db95bc1117dd8aa014f6cd50fdc8e64f31f7d41f9231e488 +Skein256 (5.inp) = 46d8440685461b00e3ddb891b2ecc6855287d2bd8834a95fb1c1708b00ea5e82 +Skein256 (6.inp) = 7c5eb606389556b33d34eb2536459528dc0af97adbcd0ce273aeb650f598d4b2 +Skein256 (7.inp) = 4def7a7e5464a140ae9c3a80279fbebce4bd00f9faad819ab7e001512f67a10d +Skein256 (8.inp) = d9c017dbe355f318d036469eb9b5fbe129fc2b5786a9dc6746a516eab6fe0126 diff --git a/sbin/md5/tests/skein256sum.digest b/sbin/md5/tests/skein256sum.digest new file mode 100644 index 000000000000..2e1c8d1bc60d --- /dev/null +++ b/sbin/md5/tests/skein256sum.digest @@ -0,0 +1,8 @@ +c8877087da56e072870daa843f176e9453115929094c3a40c463a196c29bf7ba 1.inp +7fba44ff1a31d71a0c1f82e6e82fb5e9ac6c92a39c9185b9951fed82d82fe635 2.inp +258bdec343b9fde1639221a5ae0144a96e552e5288753c5fec76c05fc2fc1870 3.inp +4d2ce0062b5eb3a4db95bc1117dd8aa014f6cd50fdc8e64f31f7d41f9231e488 4.inp +46d8440685461b00e3ddb891b2ecc6855287d2bd8834a95fb1c1708b00ea5e82 5.inp +7c5eb606389556b33d34eb2536459528dc0af97adbcd0ce273aeb650f598d4b2 6.inp +4def7a7e5464a140ae9c3a80279fbebce4bd00f9faad819ab7e001512f67a10d 7.inp +d9c017dbe355f318d036469eb9b5fbe129fc2b5786a9dc6746a516eab6fe0126 8.inp diff --git a/sbin/md5/tests/skein512.digest b/sbin/md5/tests/skein512.digest new file mode 100644 index 000000000000..6b2e9ad0f723 --- /dev/null +++ b/sbin/md5/tests/skein512.digest @@ -0,0 +1,8 @@ +Skein512 (1.inp) = bc5b4c50925519c290cc634277ae3d6257212395cba733bbad37a4af0fa06af41fca7903d06564fea7a2d3730dbdb80c1f85562dfcc070334ea4d1d9e72cba7a +Skein512 (2.inp) = b1cd8d33f61b3737adfd59bb13ad82f4a9548e92f22956a8976cca3fdb7fee4fe91698146c4197cec85d38b83c5d93bdba92c01fd9a53870d0c7f967bc62bdce +Skein512 (3.inp) = 8f5dd9ec798152668e35129496b029a960c9a9b88662f7f9482f110b31f9f93893ecfb25c009baad9e46737197d5630379816a886aa05526d3a70df272d96e75 +Skein512 (4.inp) = 15b73c158ffb875fed4d72801ded0794c720b121c0c78edf45f900937e6933d9e21a3a984206933d504b5dbb2368000411477ee1b204c986068df77886542fcc +Skein512 (5.inp) = 23793ad900ef12f9165c8080da6fdfd2c8354a2929b8aadf83aa82a3c6470342f57cf8c035ec0d97429b626c4d94f28632c8f5134fd367dca5cf293d2ec13f8c +Skein512 (6.inp) = 0c6bed927e022f5ddcf81877d42e5f75798a9f8fd3ede3d83baac0a2f364b082e036c11af35fe478745459dd8f5c0b73efe3c56ba5bb2009208d5a29cc6e469c +Skein512 (7.inp) = 2ca9fcffb3456f297d1b5f407014ecb856f0baac8eb540f534b1f187196f21e88f31103128c2f03fcc9857d7a58eb66f9525e2302d88833ee069295537a434ce +Skein512 (8.inp) = 1131f2aaa0e97126c9314f9f968cc827259bbfabced2943bb8c9274448998fb3b78738b4580dd500c76105fd3c03e465e1414f2c29664286b1f79d3e51128125 diff --git a/sbin/md5/tests/skein512sum.digest b/sbin/md5/tests/skein512sum.digest new file mode 100644 index 000000000000..3ee9b67038ad --- /dev/null +++ b/sbin/md5/tests/skein512sum.digest @@ -0,0 +1,8 @@ +bc5b4c50925519c290cc634277ae3d6257212395cba733bbad37a4af0fa06af41fca7903d06564fea7a2d3730dbdb80c1f85562dfcc070334ea4d1d9e72cba7a 1.inp +b1cd8d33f61b3737adfd59bb13ad82f4a9548e92f22956a8976cca3fdb7fee4fe91698146c4197cec85d38b83c5d93bdba92c01fd9a53870d0c7f967bc62bdce 2.inp +8f5dd9ec798152668e35129496b029a960c9a9b88662f7f9482f110b31f9f93893ecfb25c009baad9e46737197d5630379816a886aa05526d3a70df272d96e75 3.inp +15b73c158ffb875fed4d72801ded0794c720b121c0c78edf45f900937e6933d9e21a3a984206933d504b5dbb2368000411477ee1b204c986068df77886542fcc 4.inp +23793ad900ef12f9165c8080da6fdfd2c8354a2929b8aadf83aa82a3c6470342f57cf8c035ec0d97429b626c4d94f28632c8f5134fd367dca5cf293d2ec13f8c 5.inp +0c6bed927e022f5ddcf81877d42e5f75798a9f8fd3ede3d83baac0a2f364b082e036c11af35fe478745459dd8f5c0b73efe3c56ba5bb2009208d5a29cc6e469c 6.inp +2ca9fcffb3456f297d1b5f407014ecb856f0baac8eb540f534b1f187196f21e88f31103128c2f03fcc9857d7a58eb66f9525e2302d88833ee069295537a434ce 7.inp +1131f2aaa0e97126c9314f9f968cc827259bbfabced2943bb8c9274448998fb3b78738b4580dd500c76105fd3c03e465e1414f2c29664286b1f79d3e51128125 8.inp From owner-dev-commits-src-branches@freebsd.org Mon Jun 28 12:07:54 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6BEE965539E; Mon, 28 Jun 2021 12:07: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 4GD5wB2Zz9z4t0F; Mon, 28 Jun 2021 12:07: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 4166724F5C; Mon, 28 Jun 2021 12:07: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 15SC7sVY022831; Mon, 28 Jun 2021 12:07:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SC7sEZ022830; Mon, 28 Jun 2021 12:07:54 GMT (envelope-from git) Date: Mon, 28 Jun 2021 12:07:54 GMT Message-Id: <202106281207.15SC7sEZ022830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Peter Grehan Subject: git: 4bb2057c13b5 - stable/13 - bhyve: implement rdmsr for MSR_IA32_FEATURE_CONTROL MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grehan X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4bb2057c13b5894393034d82899c930e36c34153 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 12:07:54 -0000 The branch stable/13 has been updated by grehan: URL: https://cgit.FreeBSD.org/src/commit/?id=4bb2057c13b5894393034d82899c930e36c34153 commit 4bb2057c13b5894393034d82899c930e36c34153 Author: Corvin Köhne AuthorDate: 2021-04-15 03:49:19 +0000 Commit: Peter Grehan CommitDate: 2021-06-28 10:08:56 +0000 bhyve: implement rdmsr for MSR_IA32_FEATURE_CONTROL Without the -w option, Windows guests crash on boot. This is caused by a rdmsr of MSR_IA32_FEATURE_CONTROL. Windows checks this MSR to determine enabled VMX features. This MSR isn't emulated in bhyve, so a #GP exception is injected which causes Windows to crash. Fix by returning a rdmsr of MSR_IA32_FEATURE_CONTROL with Lock Bit set and VMX disabled to informWindows that VMX isn't available. (cherry picked from commit 17d214c2ca9f110db3fa2a10d6b448d624e87774) --- usr.sbin/bhyve/xmsr.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/usr.sbin/bhyve/xmsr.c b/usr.sbin/bhyve/xmsr.c index 0b87821836b7..1a7f98ee222a 100644 --- a/usr.sbin/bhyve/xmsr.c +++ b/usr.sbin/bhyve/xmsr.c @@ -124,6 +124,14 @@ emulate_rdmsr(struct vmctx *ctx, int vcpu, uint32_t num, uint64_t *val) */ *val = 0x000a1003; break; + case MSR_IA32_FEATURE_CONTROL: + /* + * Windows guests check this MSR. + * Set the lock bit to avoid writes + * to this MSR. + */ + *val = IA32_FEATURE_CONTROL_LOCK; + break; default: error = -1; break; From owner-dev-commits-src-branches@freebsd.org Mon Jun 28 15:16:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 09516657A47; Mon, 28 Jun 2021 15:16: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 4GDB6J6ZYtz3MdN; Mon, 28 Jun 2021 15:16: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 C6124276EF; Mon, 28 Jun 2021 15:16: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 15SFGuM8076555; Mon, 28 Jun 2021 15:16:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SFGuDW076554; Mon, 28 Jun 2021 15:16:56 GMT (envelope-from git) Date: Mon, 28 Jun 2021 15:16:56 GMT Message-Id: <202106281516.15SFGuDW076554@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: 6fd5a4a6f3ac - stable/13 - virtio_blk: Fix issuing T_GET_ID before DRIVER_OK status 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: 6fd5a4a6f3ac3cb7bb3e6d55359a5ba087b76cd9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 15:16:57 -0000 The branch stable/13 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=6fd5a4a6f3ac3cb7bb3e6d55359a5ba087b76cd9 commit 6fd5a4a6f3ac3cb7bb3e6d55359a5ba087b76cd9 Author: Ka Ho Ng AuthorDate: 2021-05-05 15:16:29 +0000 Commit: Ka Ho Ng CommitDate: 2021-06-28 15:16:39 +0000 virtio_blk: Fix issuing T_GET_ID before DRIVER_OK status DRIVER_OK status is set after device_attach() succeeds. For now postpone disk_create to attach_completed() method. Sponsored by: The FreeBSD Foundation Reviewed by: grehan Approved by: lwhsu (mentor) Differential Revision: https://reviews.freebsd.org/D30049 (cherry picked from commit 4e1e1d667fc84460c131dfe617b39072e87473ab) --- sys/dev/virtio/block/virtio_blk.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/sys/dev/virtio/block/virtio_blk.c b/sys/dev/virtio/block/virtio_blk.c index 50642fb0b009..8a5558f4571d 100644 --- a/sys/dev/virtio/block/virtio_blk.c +++ b/sys/dev/virtio/block/virtio_blk.c @@ -126,6 +126,7 @@ static int vtblk_detach(device_t); static int vtblk_suspend(device_t); static int vtblk_resume(device_t); static int vtblk_shutdown(device_t); +static int vtblk_attach_completed(device_t); static int vtblk_config_change(device_t); static int vtblk_open(struct disk *); @@ -255,6 +256,7 @@ static device_method_t vtblk_methods[] = { DEVMETHOD(device_shutdown, vtblk_shutdown), /* VirtIO methods. */ + DEVMETHOD(virtio_attach_completed, vtblk_attach_completed), DEVMETHOD(virtio_config_change, vtblk_config_change), DEVMETHOD_END @@ -378,8 +380,6 @@ vtblk_attach(device_t dev) goto fail; } - vtblk_create_disk(sc); - virtqueue_enable_intr(sc->vtblk_vq); fail: @@ -461,6 +461,22 @@ vtblk_shutdown(device_t dev) return (0); } +static int +vtblk_attach_completed(device_t dev) +{ + struct vtblk_softc *sc; + + sc = device_get_softc(dev); + + /* + * Create disk after attach as VIRTIO_BLK_T_GET_ID can only be + * processed after the device acknowledged + * VIRTIO_CONFIG_STATUS_DRIVER_OK. + */ + vtblk_create_disk(sc); + return (0); +} + static int vtblk_config_change(device_t dev) { From owner-dev-commits-src-branches@freebsd.org Mon Jun 28 16:02:19 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E7116586C9; Mon, 28 Jun 2021 16:02: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 4GDC6g1M5Gz3hGC; Mon, 28 Jun 2021 16:02: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 15D4F53E; Mon, 28 Jun 2021 16:02: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 15SG2IQb042068; Mon, 28 Jun 2021 16:02:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SG2IUi042067; Mon, 28 Jun 2021 16:02:18 GMT (envelope-from git) Date: Mon, 28 Jun 2021 16:02:18 GMT Message-Id: <202106281602.15SG2IUi042067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Chuck Tuffli Subject: git: 0e6ba563384f - stable/13 - bhyve: add SMBIOS Baseboard Information MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chuck X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0e6ba563384fb41518648009b391b26d9a3824c0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 16:02:19 -0000 The branch stable/13 has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=0e6ba563384fb41518648009b391b26d9a3824c0 commit 0e6ba563384fb41518648009b391b26d9a3824c0 Author: Chuck Tuffli AuthorDate: 2021-04-12 15:09:52 +0000 Commit: Chuck Tuffli CommitDate: 2021-06-28 15:48:26 +0000 bhyve: add SMBIOS Baseboard Information Add the System Management BIOS Baseboard (or Module) Information a.k.a. Type 2 structure to the SMBIOS emulation. (cherry picked from commit 0c6282e842b33a1c86e01b27fc40af9c76fd404e) --- usr.sbin/bhyve/smbiostbl.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/usr.sbin/bhyve/smbiostbl.c b/usr.sbin/bhyve/smbiostbl.c index d9f8a649c710..24ebf2838371 100644 --- a/usr.sbin/bhyve/smbiostbl.c +++ b/usr.sbin/bhyve/smbiostbl.c @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #define SMBIOS_TYPE_BIOS 0 #define SMBIOS_TYPE_SYSTEM 1 +#define SMBIOS_TYPE_BOARD 2 #define SMBIOS_TYPE_CHASSIS 3 #define SMBIOS_TYPE_PROCESSOR 4 #define SMBIOS_TYPE_MEMARRAY 16 @@ -156,10 +157,31 @@ struct smbios_table_type1 { uint8_t family; /* family name string */ } __packed; +/* + * Baseboard (or Module) Information + */ +#define SMBIOS_BRF_HOSTING 0x1 +#define SMBIOS_BRT_MOTHERBOARD 0xa + +struct smbios_table_type2 { + struct smbios_structure header; + uint8_t manufacturer; /* manufacturer string */ + uint8_t product; /* product name string */ + uint8_t version; /* version string */ + uint8_t serial; /* serial number string */ + uint8_t asset; /* asset tag string */ + uint8_t fflags; /* feature flags */ + uint8_t location; /* location in chassis */ + uint16_t chandle; /* chassis handle */ + uint8_t type; /* board type */ + uint8_t n_objs; /* number of contained object handles */ +} __packed; + /* * System Enclosure or Chassis */ #define SMBIOS_CHT_UNKNOWN 0x02 /* unknown */ +#define SMBIOS_CHT_DESKTOP 0x03 /* desktop */ #define SMBIOS_CHST_SAFE 0x03 /* safe */ @@ -359,6 +381,30 @@ const char *smbios_type1_strings[] = { NULL }; +struct smbios_table_type2 smbios_type2_template = { + { SMBIOS_TYPE_BOARD, sizeof (struct smbios_table_type2), 0 }, + 1, /* manufacturer string */ + 2, /* product string */ + 3, /* version string */ + 4, /* serial number string */ + 5, /* asset tag string */ + SMBIOS_BRF_HOSTING, /* feature flags */ + 6, /* location string */ + SMBIOS_CHT_DESKTOP, /* chassis handle */ + SMBIOS_BRT_MOTHERBOARD, /* board type */ + 0 +}; + +const char *smbios_type2_strings[] = { + "FreeBSD", /* manufacturer string */ + "BHYVE", /* product name string */ + "1.0", /* version string */ + "None", /* serial number string */ + "None", /* asset tag string */ + "None", /* location string */ + NULL +}; + struct smbios_table_type3 smbios_type3_template = { { SMBIOS_TYPE_CHASSIS, sizeof (struct smbios_table_type3), 0 }, 1, /* manufacturer string */ @@ -517,6 +563,9 @@ static struct smbios_template_entry smbios_template[] = { { (struct smbios_structure *)&smbios_type1_template, smbios_type1_strings, smbios_type1_initializer }, + { (struct smbios_structure *)&smbios_type2_template, + smbios_type2_strings, + smbios_generic_initializer }, { (struct smbios_structure *)&smbios_type3_template, smbios_type3_strings, smbios_generic_initializer }, From owner-dev-commits-src-branches@freebsd.org Mon Jun 28 16:04:19 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D5AD6586E3; Mon, 28 Jun 2021 16:04: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 4GDC8z44ljz3hPm; Mon, 28 Jun 2021 16:04: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 7431232C; Mon, 28 Jun 2021 16:04: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 15SG4Jj4043223; Mon, 28 Jun 2021 16:04:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SG4JHM043222; Mon, 28 Jun 2021 16:04:19 GMT (envelope-from git) Date: Mon, 28 Jun 2021 16:04:19 GMT Message-Id: <202106281604.15SG4JHM043222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: c0d5665be0dc - stable/13 - md5: Create md5sum, etc compatible programs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c0d5665be0dce799c5ca9a72b3ee8e1da8dd99d7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 16:04:19 -0000 The branch stable/13 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=c0d5665be0dce799c5ca9a72b3ee8e1da8dd99d7 commit c0d5665be0dce799c5ca9a72b3ee8e1da8dd99d7 Author: Warner Losh AuthorDate: 2021-05-19 17:26:20 +0000 Commit: Stefan Eßer CommitDate: 2021-06-28 16:03:38 +0000 md5: Create md5sum, etc compatible programs On Linux, there's a similar set of programs to ours, but that end in the letters 'sum'. These act basically like FreeBSD versions run with the -r option. Add code so that when the program ends in 'sum' you get the linux -r behavior. This is enough to make most things that use sha*sum work correctly (the -c / --check options, as well as the long args are not implemented). When running with the -sum programs, ignore -t instead of running internal speed tests and make -c an error. Reviewed by: sef, and kp and allanjude (earlier version) Relnotes: yes Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30309 (cherry picked from commit 086feed850c31c278f25c958b97992d024139896) --- sbin/md5/Makefile | 30 ++++++++++++++++++++++++++---- sbin/md5/md5.1 | 34 ++++++++++++++++++++++++++++++++-- sbin/md5/md5.c | 35 ++++++++++++++++++++++++++++++----- 3 files changed, 88 insertions(+), 11 deletions(-) diff --git a/sbin/md5/Makefile b/sbin/md5/Makefile index 6e29d94eb92a..e499967d23d5 100644 --- a/sbin/md5/Makefile +++ b/sbin/md5/Makefile @@ -4,27 +4,49 @@ PACKAGE=runtime PROG= md5 -LINKS= ${BINDIR}/md5 ${BINDIR}/rmd160 \ +LINKS= ${BINDIR}/md5 ${BINDIR}/md5sum \ + ${BINDIR}/md5 ${BINDIR}/rmd160 \ + ${BINDIR}/md5 ${BINDIR}/rmd160sum \ ${BINDIR}/md5 ${BINDIR}/sha1 \ + ${BINDIR}/md5 ${BINDIR}/sha1sum \ ${BINDIR}/md5 ${BINDIR}/sha224 \ + ${BINDIR}/md5 ${BINDIR}/sha224sum \ ${BINDIR}/md5 ${BINDIR}/sha256 \ + ${BINDIR}/md5 ${BINDIR}/sha256sum \ ${BINDIR}/md5 ${BINDIR}/sha384 \ + ${BINDIR}/md5 ${BINDIR}/sha384sum \ ${BINDIR}/md5 ${BINDIR}/sha512 \ + ${BINDIR}/md5 ${BINDIR}/sha512sum \ ${BINDIR}/md5 ${BINDIR}/sha512t256 \ + ${BINDIR}/md5 ${BINDIR}/sha512t256sum \ ${BINDIR}/md5 ${BINDIR}/skein256 \ + ${BINDIR}/md5 ${BINDIR}/skein256sum \ ${BINDIR}/md5 ${BINDIR}/skein512 \ - ${BINDIR}/md5 ${BINDIR}/skein1024 + ${BINDIR}/md5 ${BINDIR}/skein512sum \ + ${BINDIR}/md5 ${BINDIR}/skein1024 \ + ${BINDIR}/md5 ${BINDIR}/skein1024sum -MLINKS= md5.1 rmd160.1 \ +MLINKS= md5.1 md5sum.1 \ + md5.1 rmd160.1 \ + md5.1 rmd160sum.1 \ md5.1 sha1.1 \ + md5.1 sha1sum.1 \ md5.1 sha224.1 \ + md5.1 sha224sum.1 \ md5.1 sha256.1 \ + md5.1 sha256sum.1 \ md5.1 sha384.1 \ + md5.1 sha384sum.1 \ md5.1 sha512.1 \ + md5.1 sha512sum.1 \ md5.1 sha512t256.1 \ + md5.1 sha512t256sum.1 \ md5.1 skein256.1 \ + md5.1 skein256sum.1 \ md5.1 skein512.1 \ - md5.1 skein1024.1 + md5.1 skein512sum.1 \ + md5.1 skein1024.1 \ + md5.1 skein1024sum.1 LIBADD= md diff --git a/sbin/md5/md5.1 b/sbin/md5/md5.1 index e6b29233c399..c154c4788f8d 100644 --- a/sbin/md5/md5.1 +++ b/sbin/md5/md5.1 @@ -1,10 +1,12 @@ .\" $FreeBSD$ -.Dd June 19, 2020 +.Dd May 19, 2021 .Dt MD5 1 .Os .Sh NAME .Nm md5 , sha1 , sha224 , sha256 , sha384 , sha512 , sha512t256 , rmd160 , -.Nm skein256 , skein512 , skein1024 +.Nm skein256 , skein512 , skein1024 , +.Nm md5sum , sha1sum , sha224sum , sha256sum , sha384sum , sha512sum , +.Nm sha512t256sum , rmd160sum , skein256sum , skein512sum , skein1024sum .Nd calculate a message-digest fingerprint (checksum) for a file .Sh SYNOPSIS .Nm @@ -26,6 +28,15 @@ output a or .Dq message digest of the input. +The +.Nm md5sum , sha1sum , sha224sum , sha256sum , sha384sum , sha512sum , +.Nm sha512t256sum , rmd160sum , skein256sum , skein512sum , +and +.Nm skein1024sum +utilities do the same, but default to the reversed format of +the +.Fl r +flag. It is conjectured that it is computationally infeasible to produce two messages having the same message digest, or to produce any message having a given prespecified target message digest. @@ -59,9 +70,18 @@ precede any files named on the command line. The hexadecimal checksum of each file listed on the command line is printed after the options are processed. .Bl -tag -width indent +.It Fl b +Ignored for compatibility with the coreutils +.Nm -sum +programs. .It Fl c Ar string Compare the digest of the file against this string. .Pq Note that this option is not yet useful if multiple files are specified. +This option causes an error in for the +.Nm -sum +programs because it check the checksums listed in a file for the coreutils +.Nm -sum +programs that is not yet implemented. .It Fl s Ar string Print a checksum of the given .Ar string . @@ -81,6 +101,9 @@ when combined with the options. .It Fl t Run a built-in time trial. +For the +.Nm -sum +versions, this is a nop for compatibility with coreutils. .It Fl x Run a built-in test script. .El @@ -171,6 +194,13 @@ Secure Hash Standard (SHS): .Pp The RIPEMD-160 page: .Pa http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html . +.Sh BUGS +All of the utilities that end in +.Sq sum +are intended to be compatible with the GNU coreutils programs. +However, the long arguments and the +.Fl -check +functionality are not provided. .Sh ACKNOWLEDGMENTS This program is placed in the public domain for free general use by RSA Data Security. diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index 96dfcede9711..4381ef124c7b 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -177,13 +177,32 @@ main(int argc, char *argv[]) char buf[HEX_DIGEST_LENGTH]; size_t len; unsigned digest; - const char* progname; + char *progname; + bool gnu_emu = false; if ((progname = strrchr(argv[0], '/')) == NULL) progname = argv[0]; else progname++; + /* + * GNU coreutils has a number of programs named *sum. These produce + * similar results to the BSD version, but in a different format, + * similar to BSD's -r flag. We install links to this program with + * ending 'sum' to provide this compatibility. Check here to see if the + * name of the program ends in 'sum', set the flag and drop the 'sum' so + * the digest lookup works. Also, make -t a nop when running in this mode + * since that means 'text file' there (though it's a nop in coreutils + * on unix-like systems). The -c flag conflicts, so it's just disabled + * in this mode (though in the future it might be implemented). + */ + len = strlen(progname); + if (len > 3 && strcmp(progname + len - 3, "sum") == 0) { + progname[len - 3] = '\0'; + rflag = 1; + gnu_emu = true; + } + for (digest = 0; digest < sizeof(Algorithm)/sizeof(*Algorithm); digest++) if (strcasecmp(Algorithm[digest].progname, progname) == 0) break; @@ -195,9 +214,13 @@ main(int argc, char *argv[]) checkAgainst = NULL; checksFailed = 0; skip = 0; - while ((ch = getopt(argc, argv, "c:pqrs:tx")) != -1) + while ((ch = getopt(argc, argv, "bc:pqrs:tx")) != -1) switch (ch) { + case 'b': + break; case 'c': + if (gnu_emu) + errx(1, "-c check option not supported"); checkAgainst = optarg; break; case 'p': @@ -214,8 +237,10 @@ main(int argc, char *argv[]) string = optarg; break; case 't': - MDTimeTrial(&Algorithm[digest]); - skip = 1; + if (!gnu_emu) { + MDTimeTrial(&Algorithm[digest]); + skip = 1; + } /* else: text mode is a nop */ break; case 'x': MDTestSuite(&Algorithm[digest]); @@ -348,7 +373,7 @@ MDTimeTrial(const Algorithm_t *alg) printf(" done\n"); printf("Digest = %s", p); printf("\nTime = %f seconds\n", seconds); - printf("Speed = %f MiB/second\n", (float) TEST_BLOCK_LEN * + printf("Speed = %f MiB/second\n", (float) TEST_BLOCK_LEN * (float) TEST_BLOCK_COUNT / seconds / (1 << 20)); } /* From owner-dev-commits-src-branches@freebsd.org Mon Jun 28 16:04:20 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAC4F657EE6; Mon, 28 Jun 2021 16:04: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 4GDC9056bQz3hGh; Mon, 28 Jun 2021 16:04: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 978022CA; Mon, 28 Jun 2021 16:04: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 15SG4Knq043251; Mon, 28 Jun 2021 16:04:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SG4Kts043250; Mon, 28 Jun 2021 16:04:20 GMT (envelope-from git) Date: Mon, 28 Jun 2021 16:04:20 GMT Message-Id: <202106281604.15SG4Kts043250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: 9ecf4bd8e904 - stable/13 - md5: portability fix -- include stdbool.h explicitly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9ecf4bd8e90470d4e282106225a5fbb05a538c2a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 16:04:20 -0000 The branch stable/13 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=9ecf4bd8e90470d4e282106225a5fbb05a538c2a commit 9ecf4bd8e90470d4e282106225a5fbb05a538c2a Author: Warner Losh AuthorDate: 2021-05-20 17:26:46 +0000 Commit: Stefan Eßer CommitDate: 2021-06-28 16:03:38 +0000 md5: portability fix -- include stdbool.h explicitly stdbool.h needs to be included to use type bool variables. Due to namespace pollution, this gets brought in on FreeBSD, but not on other systems. Include it explicilty. Noticed by: arichards@ Sponsored by: Netflix (cherry picked from commit d0ea5e467f3c44909667c5ee90c3d26653fb6687) --- sbin/md5/md5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index 4381ef124c7b..e553d4c56e85 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-dev-commits-src-branches@freebsd.org Mon Jun 28 16:14:47 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B82C7658813; Mon, 28 Jun 2021 16:14: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 4GDCP34V5vz3hc9; Mon, 28 Jun 2021 16:14: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 7E4C76A6; Mon, 28 Jun 2021 16:14: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 15SGEl6H056222; Mon, 28 Jun 2021 16:14:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SGElOt056221; Mon, 28 Jun 2021 16:14:47 GMT (envelope-from git) Date: Mon, 28 Jun 2021 16:14:47 GMT Message-Id: <202106281614.15SGElOt056221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: 40484600782f - stable/13 - sbin/md5: improve compatibility with coreutils -c option MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 40484600782fb3df037cbaaa5e1c41afe200c257 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 16:14:47 -0000 The branch stable/13 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=40484600782fb3df037cbaaa5e1c41afe200c257 commit 40484600782fb3df037cbaaa5e1c41afe200c257 Author: Stefan Eßer AuthorDate: 2021-06-19 11:27:16 +0000 Commit: Stefan Eßer CommitDate: 2021-06-28 16:13:09 +0000 sbin/md5: improve compatibility with coreutils -c option The -c option expects a digest file in either BSD or coreutils format. The output for matched and mismatched files is identical to that of the coreutils version. The review of these changes included test cases that have already been committed for the functionality that existed before. Another test script is added to cover the coreutils compatible extension implemented by this patch. This commit contains a tests/Makefile that has been cleaned up compared to the review version, using an implicit rule to apply the TESTBASE path at build time (and the scripts have been renamed to have an extension of .SH instead of .sh to trigger this rule). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D30812 (cherry picked from commit 84f35b6f86efd004a8f25ef6eecea0f5d02733c4) (cherry picked from commit c2870e576bd20872ed227375a862e0330ef90ad8) --- sbin/md5/md5.1 | 64 ++++++++++++--- sbin/md5/md5.c | 162 ++++++++++++++++++++++++++++++++----- sbin/md5/tests/Makefile | 1 + sbin/md5/tests/coreutils-c-test.SH | 21 +++++ 4 files changed, 214 insertions(+), 34 deletions(-) diff --git a/sbin/md5/md5.1 b/sbin/md5/md5.1 index c154c4788f8d..da034d1298c5 100644 --- a/sbin/md5/md5.1 +++ b/sbin/md5/md5.1 @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd May 19, 2021 +.Dd June 24, 2021 .Dt MD5 1 .Os .Sh NAME @@ -15,6 +15,12 @@ .Op Fl s Ar string .Op Ar .Pp +.Nm md5sum +.Op Fl pqrtx +.Op Fl c Ar file +.Op Fl s Ar string +.Op Ar +.Pp (All other hashes have the same options and usage.) .Sh DESCRIPTION The @@ -75,13 +81,28 @@ Ignored for compatibility with the coreutils .Nm -sum programs. .It Fl c Ar string -Compare the digest of the file against this string. +If the program was called with a name that does not end in +.Nm sum , +compare the digest of the file against this string. .Pq Note that this option is not yet useful if multiple files are specified. -This option causes an error in for the -.Nm -sum -programs because it check the checksums listed in a file for the coreutils -.Nm -sum -programs that is not yet implemented. +.It Fl c Ar file +If the program was called with a name that does end in +.Nm sum , +the file passed as argument must contain digest lines generated by the same digest algorithm +with or without the +.Fl r +option +.Pq i.e. in either classical BSD format or in GNU coreutils format . +A line with file name followed by +.Dq : +and either OK or FAILED is written for each well-formed line in the digest file. +If applicable, the number of failed comparisons and the number of lines that were +skipped since they were not well-formed are printed at the end. +The +.Fl q +option can be used to quiesce the output unless there are mismatched entries in +the digest. +.Pp .It Fl s Ar string Print a checksum of the given .Ar string . @@ -136,8 +157,8 @@ $ echo -n Hello | md5 Calculate the checksum of multiple files reversing the output: .Bd -literal -offset indent $ md5 -r /boot/loader.conf /etc/rc.conf -ada5f60f23af88ff95b8091d6d67bef6 /boot/loader.conf -d80bf36c332dc0fdc479366ec3fa44cd /etc/rc.conf +ada5f60f23af88ff95b8091d6d67bef6 /boot/loader.conf +d80bf36c332dc0fdc479366ec3fa44cd /etc/rc.conf .Ed .Pp Write the digest for @@ -160,6 +181,27 @@ which results in a failure. $ md5 -c randomstring /boot/loader.conf MD5 (/boot/loader.conf) = ada5f60f23af88ff95b8091d6d67bef6 [ Failed ] .Ed +.Pp +If invoked with a name ending in +.Nm -sum +the +.Fl c +option does not compare against a hash string passed as parameter. +Instead, it expects a digest file, as created under the name +.Pa digest +for +.Pa /boot/loader.conf +in the example above. +.Bd -literal -offset indent +$ md5 -c digest /boot/loader.conf +/boot/loader.conf: OK +.Ed +.Pp +The digest file may contain any number of lines in the format generated with or without the +.Fl r +option +.Pq i.e. in either classical BSD format or in GNU coreutils format . +If a hash value does not match the file, FAILED is printed instead of OK. .Sh SEE ALSO .Xr cksum 1 , .Xr md5 3 , @@ -198,9 +240,7 @@ The RIPEMD-160 page: All of the utilities that end in .Sq sum are intended to be compatible with the GNU coreutils programs. -However, the long arguments and the -.Fl -check -functionality are not provided. +However, the long option functionality is not provided. .Sh ACKNOWLEDGMENTS This program is placed in the public domain for free general use by RSA Data Security. diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index e553d4c56e85..d4245d2aad4b 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #define TEST_BLOCK_COUNT 100000 #define MDTESTCOUNT 8 +static int cflag; static int pflag; static int qflag; static int rflag; @@ -152,12 +153,93 @@ static const struct Algorithm_t Algorithm[] = { (DIGEST_End*)&SKEIN1024_End, &SKEIN1024_Data, &SKEIN1024_Fd } }; +static unsigned digest; +static unsigned malformed; +static bool gnu_emu = false; + static void MD5_Update(MD5_CTX *c, const unsigned char *data, size_t len) { MD5Update(c, data, len); } +struct chksumrec { + char *filename; + char *chksum; + struct chksumrec *next; +}; + +static struct chksumrec *head = NULL; +static struct chksumrec **next = &head; + +#define PADDING 7 /* extra padding for "SHA512t256 (...) = ...\n" style */ +#define CHKFILELINELEN (HEX_DIGEST_LENGTH + MAXPATHLEN + PADDING) + +static int gnu_check(const char *checksumsfile) +{ + FILE *inp; + char linebuf[CHKFILELINELEN]; + int linelen; + int lineno; + char *filename; + char *hashstr; + struct chksumrec *rec; + const char *digestname; + int digestnamelen; + int hashstrlen; + + if ((inp = fopen(checksumsfile, "r")) == NULL) + err(1, "%s", checksumsfile); + digestname = Algorithm[digest].name; + digestnamelen = strlen(digestname); + hashstrlen = strlen(*(Algorithm[digest].TestOutput[0])); + lineno = 1; + while (fgets(linebuf, sizeof(linebuf), inp) != NULL) { + linelen = strlen(linebuf) - 1; + if (linelen <= 0) + break; + if (linebuf[linelen] != '\n') + errx(1, "malformed input line %d (len=%d)", lineno, linelen); + linebuf[linelen] = '\0'; + filename = linebuf + digestnamelen + 2; + hashstr = linebuf + linelen - hashstrlen; + /* + * supported formats: + * BSD: (): + * GNU: [ *] + */ + if (linelen >= digestnamelen + hashstrlen + 6 && + strncmp(linebuf, digestname, digestnamelen) == 0 && + strncmp(filename - 2, " (", 2) == 0 && + strncmp(hashstr - 4, ") = ", 4) == 0) { + *(hashstr - 4) = '\0'; + } else if (linelen >= hashstrlen + 3 && + linebuf[hashstrlen] == ' ') { + linebuf[hashstrlen] = '\0'; + hashstr = linebuf; + filename = linebuf + hashstrlen + 1; + if (*filename == ' ' || *filename == '*') + filename++; + } else { + malformed++; + continue; + } + rec = malloc(sizeof (*rec)); + if (rec == NULL) + errx(1, "malloc failed"); + rec->chksum = strdup(hashstr); + rec->filename = strdup(filename); + if (rec->chksum == NULL || rec->filename == NULL) + errx(1, "malloc failed"); + rec->next = NULL; + *next = rec; + next = &rec->next; + lineno++; + } + fclose(inp); + return (lineno - 1); +} + /* Main driver. Arguments (may be any combination): @@ -177,9 +259,9 @@ main(int argc, char *argv[]) char *p, *string; char buf[HEX_DIGEST_LENGTH]; size_t len; - unsigned digest; char *progname; - bool gnu_emu = false; + struct chksumrec *rec; + int numrecs; if ((progname = strrchr(argv[0], '/')) == NULL) progname = argv[0]; @@ -199,13 +281,13 @@ main(int argc, char *argv[]) */ len = strlen(progname); if (len > 3 && strcmp(progname + len - 3, "sum") == 0) { - progname[len - 3] = '\0'; + len -= 3; rflag = 1; gnu_emu = true; } for (digest = 0; digest < sizeof(Algorithm)/sizeof(*Algorithm); digest++) - if (strcasecmp(Algorithm[digest].progname, progname) == 0) + if (strncasecmp(Algorithm[digest].progname, progname, len) == 0) break; if (digest == sizeof(Algorithm)/sizeof(*Algorithm)) @@ -220,9 +302,11 @@ main(int argc, char *argv[]) case 'b': break; case 'c': + cflag = 1; if (gnu_emu) - errx(1, "-c check option not supported"); - checkAgainst = optarg; + numrecs = gnu_check(optarg); + else + checkAgainst = optarg; break; case 'p': pflag = 1; @@ -258,6 +342,20 @@ main(int argc, char *argv[]) err(1, "unable to limit rights for stdio"); #endif + if (cflag && gnu_emu) { + /* + * Replace argv by an array of filenames from the digest file + */ + argc = 0; + argv = (char**)calloc(sizeof(char *), numrecs + 1); + for (rec = head; rec != NULL; rec = rec->next) { + argv[argc] = rec->filename; + argc++; + } + argv[argc] = NULL; + rec = head; + } + if (*argv) { do { if ((fd = open(*argv, O_RDONLY)) < 0) { @@ -279,11 +377,15 @@ main(int argc, char *argv[]) err(1, "capsicum"); #endif } + if (cflag && gnu_emu) { + checkAgainst = rec->chksum; + rec = rec->next; + } p = Algorithm[digest].Fd(fd, buf); (void)close(fd); MDOutput(&Algorithm[digest], p, argv); } while (*++argv); - } else if (!sflag && !skip) { + } else if (!cflag && !sflag && !skip) { #ifdef HAVE_CAPSICUM if (caph_limit_stdin() < 0 || caph_enter() < 0) err(1, "capsicum"); @@ -295,7 +397,12 @@ main(int argc, char *argv[]) p = Algorithm[digest].Data(string, len, buf); MDOutput(&Algorithm[digest], p, &string); } - + if (gnu_emu) { + if (malformed > 0) + warnx("WARNING: %d lines are improperly formatted", malformed); + if (checksFailed > 0) + warnx("WARNING: %d computed checksums did NOT match", checksFailed); + } if (failed != 0) return (1); if (checksFailed != 0) @@ -310,6 +417,8 @@ main(int argc, char *argv[]) static void MDOutput(const Algorithm_t *alg, char *p, char *argv[]) { + bool checkfailed = false; + if (p == NULL) { warn("%s", *argv); failed++; @@ -318,21 +427,27 @@ MDOutput(const Algorithm_t *alg, char *p, char *argv[]) * If argv is NULL we are reading from stdin, where the output * format has always been just the hash. */ - if (qflag || argv == NULL) - printf("%s", p); - else if (rflag) - printf("%s %s", p, *argv); - else - printf("%s (%s) = %s", - alg->name, *argv, p); - if (checkAgainst && strcasecmp(checkAgainst, p) != 0) - { - checksFailed++; - if (!qflag) - printf(" [ Failed ]"); + if (cflag && gnu_emu) { + checkfailed = strcasecmp(checkAgainst, p) != 0; + if (!qflag || checkfailed) + printf("%s: %s\n", *argv, checkfailed ? "FAILED" : "OK"); + } else if (qflag || argv == NULL) { + printf("%s\n", p); + } else { + if (rflag) + printf("%s %s", p, *argv); + else + printf("%s (%s) = %s", alg->name, *argv, p); + if (checkAgainst) { + checkfailed = strcasecmp(checkAgainst, p) != 0; + if (!qflag && checkfailed) + printf(" [ Failed ]"); + } + printf("\n"); } - printf("\n"); } + if (checkfailed) + checksFailed++; } /* @@ -559,6 +674,9 @@ static void usage(const Algorithm_t *alg) { - fprintf(stderr, "usage: %s [-pqrtx] [-c string] [-s string] [files ...]\n", alg->progname); + if (gnu_emu) + fprintf(stderr, "usage: %ssum [-pqrtx] [-c file] [-s string] [files ...]\n", alg->progname); + else + fprintf(stderr, "usage: %s [-pqrtx] [-c string] [-s string] [files ...]\n", alg->progname); exit(1); } diff --git a/sbin/md5/tests/Makefile b/sbin/md5/tests/Makefile index b37332aa9894..93f3913c687d 100644 --- a/sbin/md5/tests/Makefile +++ b/sbin/md5/tests/Makefile @@ -32,6 +32,7 @@ PLAIN_TESTS_SH+= self-test PLAIN_TESTS_SH+= bsd-c-test PLAIN_TESTS_SH+= bsd-p-test PLAIN_TESTS_SH+= bsd-s-test +PLAIN_TESTS_SH+= coreutils-c-test .SUFFIXES: .SH diff --git a/sbin/md5/tests/coreutils-c-test.SH b/sbin/md5/tests/coreutils-c-test.SH new file mode 100644 index 000000000000..5996e533c627 --- /dev/null +++ b/sbin/md5/tests/coreutils-c-test.SH @@ -0,0 +1,21 @@ +#!/bin/sh + +/bin/cp %%TESTSBASE%%/sbin/md5/*.inp . || exit 127 + +exitcode=0 + +testloop () { + opt=$1 + + while read algorithm; do + ${algorithm}sum -c %%TESTSBASE%%/sbin/md5/${algorithm}.digest || exitcode=1 + ${algorithm}sum -c %%TESTSBASE%%/sbin/md5/${algorithm}sum.digest || exitcode=1 + done < %%TESTSBASE%%/sbin/md5/algorithms.txt +} + +testloop "" +testloop -q +testloop -r +testloop -qr + +exit $exitcode From owner-dev-commits-src-branches@freebsd.org Mon Jun 28 16:14:49 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 343DA658888; Mon, 28 Jun 2021 16:14: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 4GDCP45FB0z3hrG; Mon, 28 Jun 2021 16:14: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 97C0524E; Mon, 28 Jun 2021 16:14: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 15SGEmnX056250; Mon, 28 Jun 2021 16:14:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SGEm3B056249; Mon, 28 Jun 2021 16:14:48 GMT (envelope-from git) Date: Mon, 28 Jun 2021 16:14:48 GMT Message-Id: <202106281614.15SGEm3B056249@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: a4f9c6a9e6e1 - stable/13 - md5: Fix cross-build after c2870e576bd2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a4f9c6a9e6e18d8d2825f322f91698a2ca77505b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 16:14:49 -0000 The branch stable/13 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=a4f9c6a9e6e18d8d2825f322f91698a2ca77505b commit a4f9c6a9e6e18d8d2825f322f91698a2ca77505b Author: Jessica Clarke AuthorDate: 2021-06-25 21:00:11 +0000 Commit: Stefan Eßer CommitDate: 2021-06-28 16:14:02 +0000 md5: Fix cross-build after c2870e576bd2 On macOS and Linux the current set of headers do not end up pulling in sys/param.h, causing MAXPATHLEN to not be defined and the build to fail. (cherry picked from commit cab31e0e216c7defefd4aba14693ba2252ea7308) --- sbin/md5/md5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index d4245d2aad4b..43a76227a9d2 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -21,6 +21,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 14:02:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ADF2664C86A; Tue, 29 Jun 2021 14: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 4GDmQT4Lbfz4vTp; Tue, 29 Jun 2021 14:02: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 7D3A81A549; Tue, 29 Jun 2021 14:02: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 15TE2vtO099888; Tue, 29 Jun 2021 14:02:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TE2v2M099887; Tue, 29 Jun 2021 14:02:57 GMT (envelope-from git) Date: Tue, 29 Jun 2021 14:02:57 GMT Message-Id: <202106291402.15TE2v2M099887@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: 47722575d948 - stable/13 - mkimg: Add fat32lba partition type 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: 47722575d948b742c0f76e5caefedcaf3f2cec24 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 14:02:57 -0000 The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=47722575d948b742c0f76e5caefedcaf3f2cec24 commit 47722575d948b742c0f76e5caefedcaf3f2cec24 Author: Jose Luis Duran AuthorDate: 2021-06-18 14:55:24 +0000 Commit: Ed Maste CommitDate: 2021-06-29 14:02:11 +0000 mkimg: Add fat32lba partition type Syntactic sugar for a `gpart add -t '!12' ...` equivalent. Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/484 (cherry picked from commit d98a4eb807e972ac207264043ba3c50ba94f5df5) --- usr.bin/mkimg/ebr.c | 1 + usr.bin/mkimg/mbr.c | 1 + usr.bin/mkimg/scheme.c | 1 + usr.bin/mkimg/scheme.h | 1 + 4 files changed, 4 insertions(+) diff --git a/usr.bin/mkimg/ebr.c b/usr.bin/mkimg/ebr.c index a069982e7aa3..bee2e64bea14 100644 --- a/usr.bin/mkimg/ebr.c +++ b/usr.bin/mkimg/ebr.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); static struct mkimg_alias ebr_aliases[] = { { ALIAS_FAT16B, ALIAS_INT2TYPE(DOSPTYP_FAT16) }, { ALIAS_FAT32, ALIAS_INT2TYPE(DOSPTYP_FAT32) }, + { ALIAS_FAT32LBA, ALIAS_INT2TYPE(DOSPTYP_FAT32LBA) }, { ALIAS_FREEBSD, ALIAS_INT2TYPE(DOSPTYP_386BSD) }, { ALIAS_NONE, 0 } }; diff --git a/usr.bin/mkimg/mbr.c b/usr.bin/mkimg/mbr.c index 46767ea96d06..e52e9df7ca64 100644 --- a/usr.bin/mkimg/mbr.c +++ b/usr.bin/mkimg/mbr.c @@ -44,6 +44,7 @@ static struct mkimg_alias mbr_aliases[] = { { ALIAS_EFI, ALIAS_INT2TYPE(DOSPTYP_EFI) }, { ALIAS_FAT16B, ALIAS_INT2TYPE(DOSPTYP_FAT16) }, { ALIAS_FAT32, ALIAS_INT2TYPE(DOSPTYP_FAT32) }, + { ALIAS_FAT32LBA, ALIAS_INT2TYPE(DOSPTYP_FAT32LBA) }, { ALIAS_FREEBSD, ALIAS_INT2TYPE(DOSPTYP_386BSD) }, { ALIAS_NTFS, ALIAS_INT2TYPE(DOSPTYP_NTFS) }, { ALIAS_PPCBOOT, ALIAS_INT2TYPE(DOSPTYP_PPCBOOT) }, diff --git a/usr.bin/mkimg/scheme.c b/usr.bin/mkimg/scheme.c index c81182837b2e..5afe3245a2ba 100644 --- a/usr.bin/mkimg/scheme.c +++ b/usr.bin/mkimg/scheme.c @@ -47,6 +47,7 @@ static struct { { "efi", ALIAS_EFI }, { "fat16b", ALIAS_FAT16B }, { "fat32", ALIAS_FAT32 }, + { "fat32lba", ALIAS_FAT32LBA }, { "freebsd", ALIAS_FREEBSD }, { "freebsd-boot", ALIAS_FREEBSD_BOOT }, { "freebsd-nandfs", ALIAS_FREEBSD_NANDFS }, diff --git a/usr.bin/mkimg/scheme.h b/usr.bin/mkimg/scheme.h index 86b92a372860..00c1b7f516c9 100644 --- a/usr.bin/mkimg/scheme.h +++ b/usr.bin/mkimg/scheme.h @@ -36,6 +36,7 @@ enum alias { ALIAS_EFI, ALIAS_FAT16B, ALIAS_FAT32, + ALIAS_FAT32LBA, ALIAS_FREEBSD, ALIAS_FREEBSD_BOOT, ALIAS_FREEBSD_NANDFS, From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 19:58:56 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1B1E6518FA; Tue, 29 Jun 2021 19: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 4GDwKD5Xppz3qFs; Tue, 29 Jun 2021 19: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 A2D071F07C; Tue, 29 Jun 2021 19: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 15TJwuDH066694; Tue, 29 Jun 2021 19:58:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TJwu05066693; Tue, 29 Jun 2021 19:58:56 GMT (envelope-from git) Date: Tue, 29 Jun 2021 19:58:56 GMT Message-Id: <202106291958.15TJwu05066693@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: 7a37d13b6cfa - stable/13 - linux(4): Prevent integer overflow in futex_requeue. 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: 7a37d13b6cfa5235c88678f96ede6bfca74b28e8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 19:58:56 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7a37d13b6cfa5235c88678f96ede6bfca74b28e8 commit 7a37d13b6cfa5235c88678f96ede6bfca74b28e8 Author: Dmitry Chagin AuthorDate: 2021-06-10 11:23:11 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 19:58:32 +0000 linux(4): Prevent integer overflow in futex_requeue. To prevent a signed integer overflow in futex_requeue add a sanity check to catch negative values of nrwake or nrrequeue. (cherry picked from commit 25b09d6f398ea8a260ee8e2e8209fd76c61e13ee) --- sys/compat/linux/linux_futex.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 43ac318d2b51..75fdddb203b7 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -587,18 +587,19 @@ futex_wake(struct futex *f, int n, uint32_t bitset) } static int -futex_requeue(struct futex *f, int n, struct futex *f2, int n2) +futex_requeue(struct futex *f, int nrwake, struct futex *f2, + int nrrequeue) { struct waiting_proc *wp, *wpt; int count = 0; - LIN_SDT_PROBE4(futex, futex_requeue, entry, f, n, f2, n2); + LIN_SDT_PROBE4(futex, futex_requeue, entry, f, nrwake, f2, nrrequeue); FUTEX_ASSERT_LOCKED(f); FUTEX_ASSERT_LOCKED(f2); TAILQ_FOREACH_SAFE(wp, &f->f_waiting_proc, wp_list, wpt) { - if (++count <= n) { + if (++count <= nrwake) { LINUX_CTR2(sys_futex, "futex_req_wake uaddr %p wp %p", f->f_uaddr, wp); wp->wp_flags |= FUTEX_WP_REMOVED; @@ -624,7 +625,7 @@ futex_requeue(struct futex *f, int n, struct futex *f2, int n2) FUTEXES_LOCK; ++f2->f_refcount; FUTEXES_UNLOCK; - if (count - n >= n2) + if (count - nrwake >= nrrequeue) break; } } @@ -736,7 +737,7 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr) int linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) { - int clockrt, nrwake, op_ret, ret; + int clockrt, nrwake, nrrequeue, op_ret, ret; struct linux_pemuldata *pem; struct waiting_proc *wp; struct futex *f, *f2; @@ -880,6 +881,15 @@ retry0: return (EINVAL); } + nrrequeue = (int)(unsigned long)args->timeout; + nrwake = args->val; + /* + * Sanity check to prevent signed integer overflow, + * see Linux CVE-2018-6927 + */ + if (nrwake < 0 || nrrequeue < 0) + return (EINVAL); + retry1: error = futex_get(args->uaddr, NULL, &f, flags | FUTEX_DONTLOCK); if (error) { @@ -930,8 +940,7 @@ retry1: return (EAGAIN); } - nrwake = (int)(unsigned long)args->timeout; - td->td_retval[0] = futex_requeue(f, args->val, f2, nrwake); + td->td_retval[0] = futex_requeue(f, nrwake, f2, nrrequeue); futex_put(f2, NULL); futex_put(f, NULL); break; From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 19:59:16 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFE21651695; Tue, 29 Jun 2021 19:59: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 4GDwKc4XlDz3qG3; Tue, 29 Jun 2021 19:59: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 844751F1B9; Tue, 29 Jun 2021 19:59: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 15TJxGrL066832; Tue, 29 Jun 2021 19:59:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TJxGLG066831; Tue, 29 Jun 2021 19:59:16 GMT (envelope-from git) Date: Tue, 29 Jun 2021 19:59:16 GMT Message-Id: <202106291959.15TJxGLG066831@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: 43a58daffe72 - stable/12 - linux(4): Prevent integer overflow in futex_requeue. 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/12 X-Git-Reftype: branch X-Git-Commit: 43a58daffe7256f0948ce895fed9fae55dec98fc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 19:59:16 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=43a58daffe7256f0948ce895fed9fae55dec98fc commit 43a58daffe7256f0948ce895fed9fae55dec98fc Author: Dmitry Chagin AuthorDate: 2021-06-10 11:23:11 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 18:48:09 +0000 linux(4): Prevent integer overflow in futex_requeue. To prevent a signed integer overflow in futex_requeue add a sanity check to catch negative values of nrwake or nrrequeue. (cherry picked from commit 25b09d6f398ea8a260ee8e2e8209fd76c61e13ee) --- sys/compat/linux/linux_futex.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index b0fcfdfd2976..9324670b4875 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -587,18 +587,19 @@ futex_wake(struct futex *f, int n, uint32_t bitset) } static int -futex_requeue(struct futex *f, int n, struct futex *f2, int n2) +futex_requeue(struct futex *f, int nrwake, struct futex *f2, + int nrrequeue) { struct waiting_proc *wp, *wpt; int count = 0; - LIN_SDT_PROBE4(futex, futex_requeue, entry, f, n, f2, n2); + LIN_SDT_PROBE4(futex, futex_requeue, entry, f, nrwake, f2, nrrequeue); FUTEX_ASSERT_LOCKED(f); FUTEX_ASSERT_LOCKED(f2); TAILQ_FOREACH_SAFE(wp, &f->f_waiting_proc, wp_list, wpt) { - if (++count <= n) { + if (++count <= nrwake) { LINUX_CTR2(sys_futex, "futex_req_wake uaddr %p wp %p", f->f_uaddr, wp); wp->wp_flags |= FUTEX_WP_REMOVED; @@ -624,7 +625,7 @@ futex_requeue(struct futex *f, int n, struct futex *f2, int n2) FUTEXES_LOCK; ++f2->f_refcount; FUTEXES_UNLOCK; - if (count - n >= n2) + if (count - nrwake >= nrrequeue) break; } } @@ -736,7 +737,7 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr) int linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) { - int clockrt, nrwake, op_ret, ret; + int clockrt, nrwake, nrrequeue, op_ret, ret; struct linux_pemuldata *pem; struct waiting_proc *wp; struct futex *f, *f2; @@ -880,6 +881,15 @@ retry0: return (EINVAL); } + nrrequeue = (int)(unsigned long)args->timeout; + nrwake = args->val; + /* + * Sanity check to prevent signed integer overflow, + * see Linux CVE-2018-6927 + */ + if (nrwake < 0 || nrrequeue < 0) + return (EINVAL); + retry1: error = futex_get(args->uaddr, NULL, &f, flags | FUTEX_DONTLOCK); if (error) { @@ -930,8 +940,7 @@ retry1: return (EAGAIN); } - nrwake = (int)(unsigned long)args->timeout; - td->td_retval[0] = futex_requeue(f, args->val, f2, nrwake); + td->td_retval[0] = futex_requeue(f, nrwake, f2, nrrequeue); futex_put(f2, NULL); futex_put(f, NULL); break; From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 19:59:21 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D8376515FF; Tue, 29 Jun 2021 19:59: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 4GDwKj0Lqgz3qLr; Tue, 29 Jun 2021 19:59: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 E88391F1BA; Tue, 29 Jun 2021 19:59: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 15TJxKnc066961; Tue, 29 Jun 2021 19:59:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TJxKEl066960; Tue, 29 Jun 2021 19:59:20 GMT (envelope-from git) Date: Tue, 29 Jun 2021 19:59:20 GMT Message-Id: <202106291959.15TJxKEl066960@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: f80ee27f447a - stable/11 - linux(4): Prevent integer overflow in futex_requeue. 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/11 X-Git-Reftype: branch X-Git-Commit: f80ee27f447abc7baeb413cc0a7b7c21f9d32f8b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 19:59:21 -0000 The branch stable/11 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f80ee27f447abc7baeb413cc0a7b7c21f9d32f8b commit f80ee27f447abc7baeb413cc0a7b7c21f9d32f8b Author: Dmitry Chagin AuthorDate: 2021-06-10 11:23:11 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 18:47:53 +0000 linux(4): Prevent integer overflow in futex_requeue. To prevent a signed integer overflow in futex_requeue add a sanity check to catch negative values of nrwake or nrrequeue. (cherry picked from commit 25b09d6f398ea8a260ee8e2e8209fd76c61e13ee) --- sys/compat/linux/linux_futex.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 686d2f7d2ec7..0be0483f4496 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -596,18 +596,19 @@ futex_wake(struct futex *f, int n, uint32_t bitset) } static int -futex_requeue(struct futex *f, int n, struct futex *f2, int n2) +futex_requeue(struct futex *f, int nrwake, struct futex *f2, + int nrrequeue) { struct waiting_proc *wp, *wpt; int count = 0; - LIN_SDT_PROBE4(futex, futex_requeue, entry, f, n, f2, n2); + LIN_SDT_PROBE4(futex, futex_requeue, entry, f, nrwake, f2, nrrequeue); FUTEX_ASSERT_LOCKED(f); FUTEX_ASSERT_LOCKED(f2); TAILQ_FOREACH_SAFE(wp, &f->f_waiting_proc, wp_list, wpt) { - if (++count <= n) { + if (++count <= nrwake) { LINUX_CTR2(sys_futex, "futex_req_wake uaddr %p wp %p", f->f_uaddr, wp); wp->wp_flags |= FUTEX_WP_REMOVED; @@ -633,7 +634,7 @@ futex_requeue(struct futex *f, int n, struct futex *f2, int n2) FUTEXES_LOCK; ++f2->f_refcount; FUTEXES_UNLOCK; - if (count - n >= n2) + if (count - nrwake >= nrrequeue) break; } } @@ -744,7 +745,7 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr) int linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) { - int clockrt, nrwake, op_ret, ret; + int clockrt, nrwake, nrrequeue, op_ret, ret; struct linux_pemuldata *pem; struct waiting_proc *wp; struct futex *f, *f2; @@ -888,6 +889,15 @@ retry0: return (EINVAL); } + nrrequeue = (int)(unsigned long)args->timeout; + nrwake = args->val; + /* + * Sanity check to prevent signed integer overflow, + * see Linux CVE-2018-6927 + */ + if (nrwake < 0 || nrrequeue < 0) + return (EINVAL); + retry1: error = futex_get(args->uaddr, NULL, &f, flags | FUTEX_DONTLOCK); if (error) { @@ -938,8 +948,7 @@ retry1: return (EAGAIN); } - nrwake = (int)(unsigned long)args->timeout; - td->td_retval[0] = futex_requeue(f, args->val, f2, nrwake); + td->td_retval[0] = futex_requeue(f, nrwake, f2, nrrequeue); futex_put(f2, NULL); futex_put(f, NULL); break; From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CEAC651BFE; Tue, 29 Jun 2021 20:24: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 4GDwt81Mf4z3skZ; Tue, 29 Jun 2021 20:24: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 F32501FB07; Tue, 29 Jun 2021 20:23: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 15TKNxWL006928; Tue, 29 Jun 2021 20:23:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TKNx8j006927; Tue, 29 Jun 2021 20:23:59 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:23:59 GMT Message-Id: <202106292023.15TKNx8j006927@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: dac086497e50 - releng/13.0 - Add C++ headers 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: dac086497e50619b26d227de02b602f5350d7366 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:00 -0000 The branch releng/13.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=dac086497e50619b26d227de02b602f5350d7366 commit dac086497e50619b26d227de02b602f5350d7366 Author: Dimitry Andric AuthorDate: 2021-06-03 18:53:18 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 17:08:58 +0000 Add C++ headers I missed adding these to the libc++ Makefile, when importing llvm-project 11.0.0-rc1, even though they were supplied by upstream. While here, update OptionalObsoleteFiles.inc to add these new headers, and cleanup old cruft. Approved by: so Security: EN-21:18.libc++ Reported by: yuri Submitted by: jkim (Makefile diff) PR: 255374 MFC after: 3 days (cherry picked from commit 95aa617e4bf09fcc813b1bab3d0dbf4b606807b1) (cherry picked from commit 70e13c4cffd5ff7a70296bc5c4c3b7525c278b1d) --- lib/libc++/Makefile | 6 +++++ tools/build/mk/OptionalObsoleteFiles.inc | 43 ++++++++++++++++++++------------ 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index bfb394fda2fb..066faf4abb1f 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -112,6 +112,7 @@ STD_HEADERS+= algorithm STD_HEADERS+= any STD_HEADERS+= array STD_HEADERS+= atomic +STD_HEADERS+= barrier STD_HEADERS+= bit STD_HEADERS+= bitset STD_HEADERS+= cassert @@ -131,6 +132,7 @@ STD_HEADERS+= codecvt STD_HEADERS+= compare STD_HEADERS+= complex STD_HEADERS+= complex.h +STD_HEADERS+= concepts STD_HEADERS+= condition_variable STD_HEADERS+= csetjmp STD_HEADERS+= csignal @@ -149,6 +151,7 @@ STD_HEADERS+= cwctype STD_HEADERS+= deque STD_HEADERS+= errno.h STD_HEADERS+= exception +STD_HEADERS+= execution STD_HEADERS+= fenv.h STD_HEADERS+= filesystem STD_HEADERS+= float.h @@ -164,6 +167,7 @@ STD_HEADERS+= iosfwd STD_HEADERS+= iostream STD_HEADERS+= istream STD_HEADERS+= iterator +STD_HEADERS+= latch STD_HEADERS+= limits STD_HEADERS+= limits.h STD_HEADERS+= list @@ -174,6 +178,7 @@ STD_HEADERS+= math.h STD_HEADERS+= memory STD_HEADERS+= mutex STD_HEADERS+= new +STD_HEADERS+= numbers STD_HEADERS+= numeric STD_HEADERS+= optional STD_HEADERS+= ostream @@ -182,6 +187,7 @@ STD_HEADERS+= random STD_HEADERS+= ratio STD_HEADERS+= regex STD_HEADERS+= scoped_allocator +STD_HEADERS+= semaphore STD_HEADERS+= set STD_HEADERS+= setjmp.h STD_HEADERS+= shared_mutex diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 4045355fb27f..ad4793ac9047 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -3831,6 +3831,7 @@ OLD_FILES+=usr/include/c++/v1/algorithm OLD_FILES+=usr/include/c++/v1/any OLD_FILES+=usr/include/c++/v1/array OLD_FILES+=usr/include/c++/v1/atomic +OLD_FILES+=usr/include/c++/v1/barrier OLD_FILES+=usr/include/c++/v1/bit OLD_FILES+=usr/include/c++/v1/bitset OLD_FILES+=usr/include/c++/v1/cassert @@ -3850,6 +3851,7 @@ OLD_FILES+=usr/include/c++/v1/codecvt OLD_FILES+=usr/include/c++/v1/compare OLD_FILES+=usr/include/c++/v1/complex OLD_FILES+=usr/include/c++/v1/complex.h +OLD_FILES+=usr/include/c++/v1/concepts OLD_FILES+=usr/include/c++/v1/condition_variable OLD_FILES+=usr/include/c++/v1/csetjmp OLD_FILES+=usr/include/c++/v1/csignal @@ -3869,14 +3871,12 @@ OLD_FILES+=usr/include/c++/v1/cxxabi.h OLD_FILES+=usr/include/c++/v1/deque OLD_FILES+=usr/include/c++/v1/errno.h OLD_FILES+=usr/include/c++/v1/exception +OLD_FILES+=usr/include/c++/v1/execution OLD_FILES+=usr/include/c++/v1/experimental/__config OLD_FILES+=usr/include/c++/v1/experimental/__memory OLD_FILES+=usr/include/c++/v1/experimental/algorithm -OLD_FILES+=usr/include/c++/v1/experimental/any -OLD_FILES+=usr/include/c++/v1/experimental/chrono OLD_FILES+=usr/include/c++/v1/experimental/coroutine OLD_FILES+=usr/include/c++/v1/experimental/deque -OLD_FILES+=usr/include/c++/v1/experimental/dynarray OLD_FILES+=usr/include/c++/v1/experimental/filesystem OLD_FILES+=usr/include/c++/v1/experimental/forward_list OLD_FILES+=usr/include/c++/v1/experimental/functional @@ -3884,25 +3884,22 @@ OLD_FILES+=usr/include/c++/v1/experimental/iterator OLD_FILES+=usr/include/c++/v1/experimental/list OLD_FILES+=usr/include/c++/v1/experimental/map OLD_FILES+=usr/include/c++/v1/experimental/memory_resource -OLD_FILES+=usr/include/c++/v1/experimental/numeric -OLD_FILES+=usr/include/c++/v1/experimental/optional OLD_FILES+=usr/include/c++/v1/experimental/propagate_const -OLD_FILES+=usr/include/c++/v1/experimental/ratio OLD_FILES+=usr/include/c++/v1/experimental/regex OLD_FILES+=usr/include/c++/v1/experimental/set OLD_FILES+=usr/include/c++/v1/experimental/simd OLD_FILES+=usr/include/c++/v1/experimental/string -OLD_FILES+=usr/include/c++/v1/experimental/string_view -OLD_FILES+=usr/include/c++/v1/experimental/system_error -OLD_FILES+=usr/include/c++/v1/experimental/tuple OLD_FILES+=usr/include/c++/v1/experimental/type_traits OLD_FILES+=usr/include/c++/v1/experimental/unordered_map OLD_FILES+=usr/include/c++/v1/experimental/unordered_set OLD_FILES+=usr/include/c++/v1/experimental/utility OLD_FILES+=usr/include/c++/v1/experimental/vector +OLD_DIRS+=usr/include/c++/v1/experimental OLD_FILES+=usr/include/c++/v1/ext/__hash OLD_FILES+=usr/include/c++/v1/ext/hash_map OLD_FILES+=usr/include/c++/v1/ext/hash_set +OLD_DIRS+=usr/include/c++/v1/ext +OLD_FILES+=usr/include/c++/v1/fenv.h OLD_FILES+=usr/include/c++/v1/filesystem OLD_FILES+=usr/include/c++/v1/float.h OLD_FILES+=usr/include/c++/v1/forward_list @@ -3917,6 +3914,7 @@ OLD_FILES+=usr/include/c++/v1/iosfwd OLD_FILES+=usr/include/c++/v1/iostream OLD_FILES+=usr/include/c++/v1/istream OLD_FILES+=usr/include/c++/v1/iterator +OLD_FILES+=usr/include/c++/v1/latch OLD_FILES+=usr/include/c++/v1/limits OLD_FILES+=usr/include/c++/v1/limits.h OLD_FILES+=usr/include/c++/v1/list @@ -3927,7 +3925,7 @@ OLD_FILES+=usr/include/c++/v1/math.h OLD_FILES+=usr/include/c++/v1/memory OLD_FILES+=usr/include/c++/v1/mutex OLD_FILES+=usr/include/c++/v1/new -OLD_FILES+=usr/include/c++/v1/numeric +OLD_FILES+=usr/include/c++/v1/numbers OLD_FILES+=usr/include/c++/v1/numeric OLD_FILES+=usr/include/c++/v1/optional OLD_FILES+=usr/include/c++/v1/ostream @@ -3936,6 +3934,7 @@ OLD_FILES+=usr/include/c++/v1/random OLD_FILES+=usr/include/c++/v1/ratio OLD_FILES+=usr/include/c++/v1/regex OLD_FILES+=usr/include/c++/v1/scoped_allocator +OLD_FILES+=usr/include/c++/v1/semaphore OLD_FILES+=usr/include/c++/v1/set OLD_FILES+=usr/include/c++/v1/setjmp.h OLD_FILES+=usr/include/c++/v1/shared_mutex @@ -3956,12 +3955,12 @@ OLD_FILES+=usr/include/c++/v1/strstream OLD_FILES+=usr/include/c++/v1/system_error OLD_FILES+=usr/include/c++/v1/tgmath.h OLD_FILES+=usr/include/c++/v1/thread -OLD_FILES+=usr/include/c++/v1/version OLD_FILES+=usr/include/c++/v1/tr1/__bit_reference OLD_FILES+=usr/include/c++/v1/tr1/__bsd_locale_defaults.h OLD_FILES+=usr/include/c++/v1/tr1/__bsd_locale_fallbacks.h OLD_FILES+=usr/include/c++/v1/tr1/__config OLD_FILES+=usr/include/c++/v1/tr1/__debug +OLD_FILES+=usr/include/c++/v1/tr1/__errc OLD_FILES+=usr/include/c++/v1/tr1/__functional_03 OLD_FILES+=usr/include/c++/v1/tr1/__functional_base OLD_FILES+=usr/include/c++/v1/tr1/__functional_base_03 @@ -3969,6 +3968,7 @@ OLD_FILES+=usr/include/c++/v1/tr1/__hash_table OLD_FILES+=usr/include/c++/v1/tr1/__libcpp_version OLD_FILES+=usr/include/c++/v1/tr1/__locale OLD_FILES+=usr/include/c++/v1/tr1/__mutex_base +OLD_FILES+=usr/include/c++/v1/tr1/__node_handle OLD_FILES+=usr/include/c++/v1/tr1/__nullptr OLD_FILES+=usr/include/c++/v1/tr1/__split_buffer OLD_FILES+=usr/include/c++/v1/tr1/__sso_allocator @@ -3982,6 +3982,8 @@ OLD_FILES+=usr/include/c++/v1/tr1/algorithm OLD_FILES+=usr/include/c++/v1/tr1/any OLD_FILES+=usr/include/c++/v1/tr1/array OLD_FILES+=usr/include/c++/v1/tr1/atomic +OLD_FILES+=usr/include/c++/v1/tr1/barrier +OLD_FILES+=usr/include/c++/v1/tr1/bit OLD_FILES+=usr/include/c++/v1/tr1/bitset OLD_FILES+=usr/include/c++/v1/tr1/cassert OLD_FILES+=usr/include/c++/v1/tr1/ccomplex @@ -3989,6 +3991,7 @@ OLD_FILES+=usr/include/c++/v1/tr1/cctype OLD_FILES+=usr/include/c++/v1/tr1/cerrno OLD_FILES+=usr/include/c++/v1/tr1/cfenv OLD_FILES+=usr/include/c++/v1/tr1/cfloat +OLD_FILES+=usr/include/c++/v1/tr1/charconv OLD_FILES+=usr/include/c++/v1/tr1/chrono OLD_FILES+=usr/include/c++/v1/tr1/cinttypes OLD_FILES+=usr/include/c++/v1/tr1/ciso646 @@ -3996,8 +3999,10 @@ OLD_FILES+=usr/include/c++/v1/tr1/climits OLD_FILES+=usr/include/c++/v1/tr1/clocale OLD_FILES+=usr/include/c++/v1/tr1/cmath OLD_FILES+=usr/include/c++/v1/tr1/codecvt +OLD_FILES+=usr/include/c++/v1/tr1/compare OLD_FILES+=usr/include/c++/v1/tr1/complex OLD_FILES+=usr/include/c++/v1/tr1/complex.h +OLD_FILES+=usr/include/c++/v1/tr1/concepts OLD_FILES+=usr/include/c++/v1/tr1/condition_variable OLD_FILES+=usr/include/c++/v1/tr1/csetjmp OLD_FILES+=usr/include/c++/v1/tr1/csignal @@ -4016,6 +4021,9 @@ OLD_FILES+=usr/include/c++/v1/tr1/cwctype OLD_FILES+=usr/include/c++/v1/tr1/deque OLD_FILES+=usr/include/c++/v1/tr1/errno.h OLD_FILES+=usr/include/c++/v1/tr1/exception +OLD_FILES+=usr/include/c++/v1/tr1/execution +OLD_FILES+=usr/include/c++/v1/tr1/fenv.h +OLD_FILES+=usr/include/c++/v1/tr1/filesystem OLD_FILES+=usr/include/c++/v1/tr1/float.h OLD_FILES+=usr/include/c++/v1/tr1/forward_list OLD_FILES+=usr/include/c++/v1/tr1/fstream @@ -4029,6 +4037,7 @@ OLD_FILES+=usr/include/c++/v1/tr1/iosfwd OLD_FILES+=usr/include/c++/v1/tr1/iostream OLD_FILES+=usr/include/c++/v1/tr1/istream OLD_FILES+=usr/include/c++/v1/tr1/iterator +OLD_FILES+=usr/include/c++/v1/tr1/latch OLD_FILES+=usr/include/c++/v1/tr1/limits OLD_FILES+=usr/include/c++/v1/tr1/limits.h OLD_FILES+=usr/include/c++/v1/tr1/list @@ -4039,7 +4048,7 @@ OLD_FILES+=usr/include/c++/v1/tr1/math.h OLD_FILES+=usr/include/c++/v1/tr1/memory OLD_FILES+=usr/include/c++/v1/tr1/mutex OLD_FILES+=usr/include/c++/v1/tr1/new -OLD_FILES+=usr/include/c++/v1/tr1/numeric +OLD_FILES+=usr/include/c++/v1/tr1/numbers OLD_FILES+=usr/include/c++/v1/tr1/numeric OLD_FILES+=usr/include/c++/v1/tr1/optional OLD_FILES+=usr/include/c++/v1/tr1/ostream @@ -4048,9 +4057,11 @@ OLD_FILES+=usr/include/c++/v1/tr1/random OLD_FILES+=usr/include/c++/v1/tr1/ratio OLD_FILES+=usr/include/c++/v1/tr1/regex OLD_FILES+=usr/include/c++/v1/tr1/scoped_allocator +OLD_FILES+=usr/include/c++/v1/tr1/semaphore OLD_FILES+=usr/include/c++/v1/tr1/set OLD_FILES+=usr/include/c++/v1/tr1/setjmp.h OLD_FILES+=usr/include/c++/v1/tr1/shared_mutex +OLD_FILES+=usr/include/c++/v1/tr1/span OLD_FILES+=usr/include/c++/v1/tr1/sstream OLD_FILES+=usr/include/c++/v1/tr1/stack OLD_FILES+=usr/include/c++/v1/tr1/stdbool.h @@ -4077,8 +4088,10 @@ OLD_FILES+=usr/include/c++/v1/tr1/utility OLD_FILES+=usr/include/c++/v1/tr1/valarray OLD_FILES+=usr/include/c++/v1/tr1/variant OLD_FILES+=usr/include/c++/v1/tr1/vector +OLD_FILES+=usr/include/c++/v1/tr1/version OLD_FILES+=usr/include/c++/v1/tr1/wchar.h OLD_FILES+=usr/include/c++/v1/tr1/wctype.h +OLD_DIRS+=usr/include/c++/v1/tr1 OLD_FILES+=usr/include/c++/v1/tuple OLD_FILES+=usr/include/c++/v1/type_traits OLD_FILES+=usr/include/c++/v1/typeindex @@ -4092,8 +4105,10 @@ OLD_FILES+=usr/include/c++/v1/utility OLD_FILES+=usr/include/c++/v1/valarray OLD_FILES+=usr/include/c++/v1/variant OLD_FILES+=usr/include/c++/v1/vector +OLD_FILES+=usr/include/c++/v1/version OLD_FILES+=usr/include/c++/v1/wchar.h OLD_FILES+=usr/include/c++/v1/wctype.h +OLD_DIRS+=usr/include/c++/v1 OLD_FILES+=usr/lib32/libc++.a OLD_FILES+=usr/lib32/libc++.so OLD_LIBS+=usr/lib32/libc++.so.1 @@ -4104,10 +4119,6 @@ OLD_FILES+=usr/lib32/libcxxrt.a OLD_FILES+=usr/lib32/libcxxrt.so OLD_LIBS+=usr/lib32/libcxxrt.so.1 OLD_FILES+=usr/lib32/libcxxrt_p.a -OLD_DIRS+=usr/include/c++/v1/tr1 -OLD_DIRS+=usr/include/c++/v1/experimental -OLD_DIRS+=usr/include/c++/v1/ext -OLD_DIRS+=usr/include/c++/v1 .endif .if ${MK_LLD} == no From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AFF8651CDF; Tue, 29 Jun 2021 20:24: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 4GDwtB2DMWz3srR; Tue, 29 Jun 2021 20:24: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 2F4F11F777; Tue, 29 Jun 2021 20:24: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 15TKO2kP006983; Tue, 29 Jun 2021 20:24:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TKO2Nn006982; Tue, 29 Jun 2021 20:24:02 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:24:02 GMT Message-Id: <202106292024.15TKO2Nn006982@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: 78f91c1fbf02 - releng/13.0 - Fix vlan creation for the older ifconfig(8) binaries. 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 78f91c1fbf02b8768ebd8dd005eb922970ff4837 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:03 -0000 The branch releng/13.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=78f91c1fbf02b8768ebd8dd005eb922970ff4837 commit 78f91c1fbf02b8768ebd8dd005eb922970ff4837 Author: Alexander V. Chernikov AuthorDate: 2021-04-11 16:47:03 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 17:09:25 +0000 Fix vlan creation for the older ifconfig(8) binaries. Approved by: so Security: EN-21:20.vlan Reported by: allanjude MFC after: immediately (cherry picked from commit afbb64f1d85b7d8c2938031c3567946b5d10da4f) (cherry picked from commit 9abc85d17d0538704641fe2c4d9da1b666f86e4e) --- sys/net/if_vlan.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 26fb48257c11..58403e8dc076 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1012,6 +1012,10 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) vid = vlr.vlr_tag; proto = vlr.vlr_proto; +#ifdef COMPAT_FREEBSD12 + if (proto == 0) + proto = ETHERTYPE_VLAN; +#endif p = ifunit_ref(vlr.vlr_parent); if (p == NULL) return (ENXIO); @@ -1942,6 +1946,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = ENOENT; break; } +#ifdef COMPAT_FREEBSD12 + if (vlr.vlr_proto == 0) + vlr.vlr_proto = ETHERTYPE_VLAN; +#endif oldmtu = ifp->if_mtu; error = vlan_config(ifv, p, vlr.vlr_tag, vlr.vlr_proto); if_rele(p); From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:02 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1782C651EDA; Tue, 29 Jun 2021 20:24: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 4GDwt93hHlz3skd; Tue, 29 Jun 2021 20:24: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 0ABA41FABA; Tue, 29 Jun 2021 20:24: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 15TKO0xx006959; Tue, 29 Jun 2021 20:24:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TKO0dh006958; Tue, 29 Jun 2021 20:24:00 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:24:00 GMT Message-Id: <202106292024.15TKO0dh006958@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: ba5ed8109cc9 - releng/13.0 - libcasper: fix descriptors numbers 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: ba5ed8109cc99cccd4eebb626225afc5eefa16b0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:02 -0000 The branch releng/13.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ba5ed8109cc99cccd4eebb626225afc5eefa16b0 commit ba5ed8109cc99cccd4eebb626225afc5eefa16b0 Author: Mariusz Zaborski AuthorDate: 2021-06-09 21:46:51 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 17:09:02 +0000 libcasper: fix descriptors numbers Casper services expect that the first 3 descriptors (stdin/stdout/stderr) will point to /dev/null. Which Casper will ensure later. The Casper services are forked from the original process. If the initial process closes one of those descriptors, Casper may reuse one of them for it on purpose. If this is the case, then renumarate the descriptors used by Casper to higher numbers. This is done already after the fork, so it doesn't break the parent process. Approved by: so Security: EN-21:19.libcasper PR: 255339 Reported by: Borja Marcos Tested by: jkim@ (cherry picked from commit aa310ebfba3d49a0b6b03a103b969731a8136a73) (cherry picked from commit 934e10b4a388b13c2bcd8fbac8cd8cc4a641b1b0) --- lib/libcasper/libcasper/libcasper_impl.c | 27 +++++++++++++++++++++++++++ lib/libcasper/libcasper/libcasper_impl.h | 1 + lib/libcasper/libcasper/service.c | 23 +++++++++++++---------- lib/libcasper/libcasper/zygote.c | 15 +++++++++------ 4 files changed, 50 insertions(+), 16 deletions(-) diff --git a/lib/libcasper/libcasper/libcasper_impl.c b/lib/libcasper/libcasper/libcasper_impl.c index e4411630c8a1..ae28c8769a07 100644 --- a/lib/libcasper/libcasper/libcasper_impl.c +++ b/lib/libcasper/libcasper/libcasper_impl.c @@ -32,8 +32,10 @@ * $FreeBSD$ */ +#include #include #include +#include #include #include "libcasper_impl.h" @@ -44,3 +46,28 @@ fd_is_valid(int fd) return (fcntl(fd, F_GETFL) != -1 || errno != EBADF); } + +void +fd_fix_environment(int *fdp) +{ + int nullfd, nfd; + + if (*fdp > STDERR_FILENO) + return; + + nullfd = open(_PATH_DEVNULL, O_RDWR); + if (nullfd == -1) + errx(1, "Unable to open %s", _PATH_DEVNULL); + + while (*fdp <= STDERR_FILENO) { + nfd = dup(*fdp); + if (nfd == -1) + errx(1, "Unable to secure fd"); + if (dup2(nullfd, *fdp) == -1) + errx(1, "Unable to secure fd"); + *fdp = nfd; + } + + close(nullfd); +} + diff --git a/lib/libcasper/libcasper/libcasper_impl.h b/lib/libcasper/libcasper/libcasper_impl.h index 11e43f083977..24049a0c07c8 100644 --- a/lib/libcasper/libcasper/libcasper_impl.h +++ b/lib/libcasper/libcasper/libcasper_impl.h @@ -44,6 +44,7 @@ struct service; struct service_connection; bool fd_is_valid(int fd); +void fd_fix_environment(int *fdp); /* Private service functions. */ struct service *service_alloc(const char *name, diff --git a/lib/libcasper/libcasper/service.c b/lib/libcasper/libcasper/service.c index 5c1c64d9a9d7..e87d0640347c 100644 --- a/lib/libcasper/libcasper/service.c +++ b/lib/libcasper/libcasper/service.c @@ -386,24 +386,27 @@ stdnull(void) } static void -service_clean(int sock, int procfd, uint64_t flags) +service_clean(int *sockp, int *procfdp, uint64_t flags) { int fd, maxfd, minfd; - assert(sock > STDERR_FILENO); - assert(procfd > STDERR_FILENO); - assert(sock != procfd); + fd_fix_environment(sockp); + fd_fix_environment(procfdp); + + assert(*sockp > STDERR_FILENO); + assert(*procfdp > STDERR_FILENO); + assert(*sockp != *procfdp); if ((flags & CASPER_SERVICE_STDIO) == 0) stdnull(); if ((flags & CASPER_SERVICE_FD) == 0) { - if (procfd > sock) { - maxfd = procfd; - minfd = sock; + if (*procfdp > *sockp) { + maxfd = *procfdp; + minfd = *sockp; } else { - maxfd = sock; - minfd = procfd; + maxfd = *sockp; + minfd = *procfdp; } for (fd = STDERR_FILENO + 1; fd < maxfd; fd++) { @@ -424,7 +427,7 @@ service_start(struct service *service, int sock, int procfd) assert(service != NULL); assert(service->s_magic == SERVICE_MAGIC); setproctitle("%s", service->s_name); - service_clean(sock, procfd, service->s_flags); + service_clean(&sock, &procfd, service->s_flags); if (service_connection_add(service, sock, NULL) == NULL) _exit(1); diff --git a/lib/libcasper/libcasper/zygote.c b/lib/libcasper/libcasper/zygote.c index 2b84bb49a695..5cdd139cc134 100644 --- a/lib/libcasper/libcasper/zygote.c +++ b/lib/libcasper/libcasper/zygote.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libcasper_impl.h" #include "zygote.h" /* Zygote info. */ @@ -104,7 +105,7 @@ zygote_clone_service_execute(int *chanfdp, int *procfdp) * between sandbox and its owner. */ static void -zygote_main(int sock) +zygote_main(int *sockp) { int error, procfd; int chanfd[2]; @@ -113,12 +114,14 @@ zygote_main(int sock) zygote_func_t *func; pid_t pid; - assert(sock > STDERR_FILENO); + fd_fix_environment(sockp); + + assert(*sockp > STDERR_FILENO); setproctitle("zygote"); for (;;) { - nvlin = nvlist_recv(sock, 0); + nvlin = nvlist_recv(*sockp, 0); if (nvlin == NULL) { if (errno == ENOTCONN) { /* Casper exited. */ @@ -157,7 +160,7 @@ zygote_main(int sock) break; case 0: /* Child. */ - close(sock); + close(*sockp); close(chanfd[0]); func(chanfd[1]); /* NOTREACHED */ @@ -179,7 +182,7 @@ send: nvlist_move_descriptor(nvlout, "chanfd", chanfd[0]); nvlist_move_descriptor(nvlout, "procfd", procfd); } - (void)nvlist_send(sock, nvlout); + (void)nvlist_send(*sockp, nvlout); nvlist_destroy(nvlout); } /* NOTREACHED */ @@ -206,7 +209,7 @@ zygote_init(void) case 0: /* Child. */ close(sp[0]); - zygote_main(sp[1]); + zygote_main(&sp[1]); /* NOTREACHED */ abort(); default: From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:05 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 396F0651CE5; Tue, 29 Jun 2021 20:24: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 4GDwtC4SsZz3srY; Tue, 29 Jun 2021 20:24: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 588261FB08; Tue, 29 Jun 2021 20:24: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 15TKO3rM007007; Tue, 29 Jun 2021 20:24:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TKO34Y007006; Tue, 29 Jun 2021 20:24:03 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:24:03 GMT Message-Id: <202106292024.15TKO34Y007006@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: 4647d115ff84 - releng/13.0 - ipfw: Update the pfil mbuf pointer in ipfw_check_frame() 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 4647d115ff849534c9d6712cc2da32509721e20e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:05 -0000 The branch releng/13.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4647d115ff849534c9d6712cc2da32509721e20e commit 4647d115ff849534c9d6712cc2da32509721e20e Author: Mark Johnston AuthorDate: 2021-06-16 13:46:56 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 17:09:43 +0000 ipfw: Update the pfil mbuf pointer in ipfw_check_frame() ipfw_chk() might call m_pullup() and thus can change the mbuf chain head. In this case, the new chain head has to be returned to the pfil hook caller, otherwise the pfil hook caller is left with a dangling pointer. Note that this affects only the link-layer hooks installed when the net.link.ether.ipfw sysctl is set to 1. Approved by: so Security: EN-21:21.ipfw PR: 256439, 254015, 255069, 255104 Fixes: f355cb3e6 Reviewed by: ae Sponsored by: The FreeBSD Foundation (cherry picked from commit bc6a2267fffeafd3946637607a74cfd639398f9d) (cherry picked from commit ed1acef3fe3053b418ce3e41036ccf24957253a4) --- sys/netpfil/ipfw/ip_fw_pfil.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c index e21831c80ec6..01a44df47180 100644 --- a/sys/netpfil/ipfw/ip_fw_pfil.c +++ b/sys/netpfil/ipfw/ip_fw_pfil.c @@ -371,6 +371,8 @@ again: } ipfw = ipfw_chk(&args); + if (!mem) + *p.m = args.m; ret = PFIL_PASS; switch (ipfw) { From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:06 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 37C49651EE8; Tue, 29 Jun 2021 20:24: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 4GDwtD6CLWz3skw; Tue, 29 Jun 2021 20:24: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 7D0821F827; Tue, 29 Jun 2021 20:24: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 15TKO4oF007031; Tue, 29 Jun 2021 20:24:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TKO4TF007030; Tue, 29 Jun 2021 20:24:04 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:24:04 GMT Message-Id: <202106292024.15TKO4TF007030@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: d1fffaed2309 - releng/13.0 - linux(4): Prevent integer overflow in futex_requeue. 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: d1fffaed2309d8bd9dd840de422647c5c83f8411 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:06 -0000 The branch releng/13.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d1fffaed2309d8bd9dd840de422647c5c83f8411 commit d1fffaed2309d8bd9dd840de422647c5c83f8411 Author: Dmitry Chagin AuthorDate: 2021-06-10 11:23:11 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 20:06:09 +0000 linux(4): Prevent integer overflow in futex_requeue. To prevent a signed integer overflow in futex_requeue add a sanity check to catch negative values of nrwake or nrrequeue. Approved by: so Security: EN-21:22.linux_futex (cherry picked from commit 25b09d6f398ea8a260ee8e2e8209fd76c61e13ee) (cherry picked from commit 7a37d13b6cfa5235c88678f96ede6bfca74b28e8) --- sys/compat/linux/linux_futex.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 43ac318d2b51..75fdddb203b7 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -587,18 +587,19 @@ futex_wake(struct futex *f, int n, uint32_t bitset) } static int -futex_requeue(struct futex *f, int n, struct futex *f2, int n2) +futex_requeue(struct futex *f, int nrwake, struct futex *f2, + int nrrequeue) { struct waiting_proc *wp, *wpt; int count = 0; - LIN_SDT_PROBE4(futex, futex_requeue, entry, f, n, f2, n2); + LIN_SDT_PROBE4(futex, futex_requeue, entry, f, nrwake, f2, nrrequeue); FUTEX_ASSERT_LOCKED(f); FUTEX_ASSERT_LOCKED(f2); TAILQ_FOREACH_SAFE(wp, &f->f_waiting_proc, wp_list, wpt) { - if (++count <= n) { + if (++count <= nrwake) { LINUX_CTR2(sys_futex, "futex_req_wake uaddr %p wp %p", f->f_uaddr, wp); wp->wp_flags |= FUTEX_WP_REMOVED; @@ -624,7 +625,7 @@ futex_requeue(struct futex *f, int n, struct futex *f2, int n2) FUTEXES_LOCK; ++f2->f_refcount; FUTEXES_UNLOCK; - if (count - n >= n2) + if (count - nrwake >= nrrequeue) break; } } @@ -736,7 +737,7 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr) int linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) { - int clockrt, nrwake, op_ret, ret; + int clockrt, nrwake, nrrequeue, op_ret, ret; struct linux_pemuldata *pem; struct waiting_proc *wp; struct futex *f, *f2; @@ -880,6 +881,15 @@ retry0: return (EINVAL); } + nrrequeue = (int)(unsigned long)args->timeout; + nrwake = args->val; + /* + * Sanity check to prevent signed integer overflow, + * see Linux CVE-2018-6927 + */ + if (nrwake < 0 || nrrequeue < 0) + return (EINVAL); + retry1: error = futex_get(args->uaddr, NULL, &f, flags | FUTEX_DONTLOCK); if (error) { @@ -930,8 +940,7 @@ retry1: return (EAGAIN); } - nrwake = (int)(unsigned long)args->timeout; - td->td_retval[0] = futex_requeue(f, args->val, f2, nrwake); + td->td_retval[0] = futex_requeue(f, nrwake, f2, nrrequeue); futex_put(f2, NULL); futex_put(f, NULL); break; From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:06 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C18D4651CE8; Tue, 29 Jun 2021 20:24: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 4GDwtF5yLWz3svJ; Tue, 29 Jun 2021 20:24: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 9A26A1F9AE; Tue, 29 Jun 2021 20:24: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 15TKO51D007055; Tue, 29 Jun 2021 20:24:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TKO5ER007054; Tue, 29 Jun 2021 20:24:05 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:24:05 GMT Message-Id: <202106292024.15TKO5ER007054@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: b368bb75bad8 - releng/13.0 - Add UPDATING entries and bump version 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: b368bb75bad8c94ab391cb166d9e3bea0c2fa39e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:07 -0000 The branch releng/13.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b368bb75bad8c94ab391cb166d9e3bea0c2fa39e commit b368bb75bad8c94ab391cb166d9e3bea0c2fa39e Author: Mark Johnston AuthorDate: 2021-06-29 17:18:53 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 20:06:47 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 17 +++++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 87e4818e3ae7..dcf580314337 100644 --- a/UPDATING +++ b/UPDATING @@ -11,6 +11,23 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20210629: + 13.0-RELEASE-p3 FreeBSD-EN-21:18.libc++ + FreeBSD-EN-21:19.libcasper + FreeBSD-EN-21:20.vlan + FreeBSD-EN-21:21.ipfw + FreeBSD-EN-21:22.linux_futex + + Missing C++20 headers in libc++ [EN-21:18.libc++] + + libcasper assertion failure [EN-21:19.libcasper] + + Missing backwards compatibility in vlan(4) [EN-21:20.vlan] + + Kernel panic with ipfw link-layer filtering enabled [EN-21:21.ipfw] + + Linux compatibility layer futex(2) system call vulnerability [EN-21:22.linux_futex] + 20210601: 13.0-RELEASE-p2 FreeBSD-EN-21:17.libradius diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index e09ee0afdaec..5207dff32cb4 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -54,7 +54,7 @@ TYPE="FreeBSD" REVISION="13.0" -BRANCH="RELEASE-p2" +BRANCH="RELEASE-p3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:23 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8401E651CF5; Tue, 29 Jun 2021 20:24: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 4GDwtZ61hWz3t4F; Tue, 29 Jun 2021 20: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 5FA791F82C; Tue, 29 Jun 2021 20: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 15TKOMlr007261; Tue, 29 Jun 2021 20: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 15TKOMdd007260; Tue, 29 Jun 2021 20:24:22 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:24:22 GMT Message-Id: <202106292024.15TKOMdd007260@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: ee56c5900ae3 - releng/12.2 - libcasper: fix descriptors numbers 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/releng/12.2 X-Git-Reftype: branch X-Git-Commit: ee56c5900ae39748aa8dfcde743ad3815e4e78c2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:24 -0000 The branch releng/12.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ee56c5900ae39748aa8dfcde743ad3815e4e78c2 commit ee56c5900ae39748aa8dfcde743ad3815e4e78c2 Author: Mariusz Zaborski AuthorDate: 2021-06-09 21:46:51 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 17:08:43 +0000 libcasper: fix descriptors numbers Casper services expect that the first 3 descriptors (stdin/stdout/stderr) will point to /dev/null. Which Casper will ensure later. The Casper services are forked from the original process. If the initial process closes one of those descriptors, Casper may reuse one of them for it on purpose. If this is the case, then renumarate the descriptors used by Casper to higher numbers. This is done already after the fork, so it doesn't break the parent process. Approved by: so Security: EN-21:19.libcasper PR: 255339 Reported by: Borja Marcos Tested by: jkim@ (cherry picked from commit aa310ebfba3d49a0b6b03a103b969731a8136a73) (cherry picked from commit 4e2ae05c3ae8c470829b4c3a78aa8c34a7f0b617) --- lib/libcasper/libcasper/libcasper_impl.c | 27 +++++++++++++++++++++++++++ lib/libcasper/libcasper/libcasper_impl.h | 1 + lib/libcasper/libcasper/service.c | 23 +++++++++++++---------- lib/libcasper/libcasper/zygote.c | 15 +++++++++------ 4 files changed, 50 insertions(+), 16 deletions(-) diff --git a/lib/libcasper/libcasper/libcasper_impl.c b/lib/libcasper/libcasper/libcasper_impl.c index e4411630c8a1..ae28c8769a07 100644 --- a/lib/libcasper/libcasper/libcasper_impl.c +++ b/lib/libcasper/libcasper/libcasper_impl.c @@ -32,8 +32,10 @@ * $FreeBSD$ */ +#include #include #include +#include #include #include "libcasper_impl.h" @@ -44,3 +46,28 @@ fd_is_valid(int fd) return (fcntl(fd, F_GETFL) != -1 || errno != EBADF); } + +void +fd_fix_environment(int *fdp) +{ + int nullfd, nfd; + + if (*fdp > STDERR_FILENO) + return; + + nullfd = open(_PATH_DEVNULL, O_RDWR); + if (nullfd == -1) + errx(1, "Unable to open %s", _PATH_DEVNULL); + + while (*fdp <= STDERR_FILENO) { + nfd = dup(*fdp); + if (nfd == -1) + errx(1, "Unable to secure fd"); + if (dup2(nullfd, *fdp) == -1) + errx(1, "Unable to secure fd"); + *fdp = nfd; + } + + close(nullfd); +} + diff --git a/lib/libcasper/libcasper/libcasper_impl.h b/lib/libcasper/libcasper/libcasper_impl.h index 11e43f083977..24049a0c07c8 100644 --- a/lib/libcasper/libcasper/libcasper_impl.h +++ b/lib/libcasper/libcasper/libcasper_impl.h @@ -44,6 +44,7 @@ struct service; struct service_connection; bool fd_is_valid(int fd); +void fd_fix_environment(int *fdp); /* Private service functions. */ struct service *service_alloc(const char *name, diff --git a/lib/libcasper/libcasper/service.c b/lib/libcasper/libcasper/service.c index 5c1c64d9a9d7..e87d0640347c 100644 --- a/lib/libcasper/libcasper/service.c +++ b/lib/libcasper/libcasper/service.c @@ -386,24 +386,27 @@ stdnull(void) } static void -service_clean(int sock, int procfd, uint64_t flags) +service_clean(int *sockp, int *procfdp, uint64_t flags) { int fd, maxfd, minfd; - assert(sock > STDERR_FILENO); - assert(procfd > STDERR_FILENO); - assert(sock != procfd); + fd_fix_environment(sockp); + fd_fix_environment(procfdp); + + assert(*sockp > STDERR_FILENO); + assert(*procfdp > STDERR_FILENO); + assert(*sockp != *procfdp); if ((flags & CASPER_SERVICE_STDIO) == 0) stdnull(); if ((flags & CASPER_SERVICE_FD) == 0) { - if (procfd > sock) { - maxfd = procfd; - minfd = sock; + if (*procfdp > *sockp) { + maxfd = *procfdp; + minfd = *sockp; } else { - maxfd = sock; - minfd = procfd; + maxfd = *sockp; + minfd = *procfdp; } for (fd = STDERR_FILENO + 1; fd < maxfd; fd++) { @@ -424,7 +427,7 @@ service_start(struct service *service, int sock, int procfd) assert(service != NULL); assert(service->s_magic == SERVICE_MAGIC); setproctitle("%s", service->s_name); - service_clean(sock, procfd, service->s_flags); + service_clean(&sock, &procfd, service->s_flags); if (service_connection_add(service, sock, NULL) == NULL) _exit(1); diff --git a/lib/libcasper/libcasper/zygote.c b/lib/libcasper/libcasper/zygote.c index 2b84bb49a695..5cdd139cc134 100644 --- a/lib/libcasper/libcasper/zygote.c +++ b/lib/libcasper/libcasper/zygote.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libcasper_impl.h" #include "zygote.h" /* Zygote info. */ @@ -104,7 +105,7 @@ zygote_clone_service_execute(int *chanfdp, int *procfdp) * between sandbox and its owner. */ static void -zygote_main(int sock) +zygote_main(int *sockp) { int error, procfd; int chanfd[2]; @@ -113,12 +114,14 @@ zygote_main(int sock) zygote_func_t *func; pid_t pid; - assert(sock > STDERR_FILENO); + fd_fix_environment(sockp); + + assert(*sockp > STDERR_FILENO); setproctitle("zygote"); for (;;) { - nvlin = nvlist_recv(sock, 0); + nvlin = nvlist_recv(*sockp, 0); if (nvlin == NULL) { if (errno == ENOTCONN) { /* Casper exited. */ @@ -157,7 +160,7 @@ zygote_main(int sock) break; case 0: /* Child. */ - close(sock); + close(*sockp); close(chanfd[0]); func(chanfd[1]); /* NOTREACHED */ @@ -179,7 +182,7 @@ send: nvlist_move_descriptor(nvlout, "chanfd", chanfd[0]); nvlist_move_descriptor(nvlout, "procfd", procfd); } - (void)nvlist_send(sock, nvlout); + (void)nvlist_send(*sockp, nvlout); nvlist_destroy(nvlout); } /* NOTREACHED */ @@ -206,7 +209,7 @@ zygote_init(void) case 0: /* Child. */ close(sp[0]); - zygote_main(sp[1]); + zygote_main(&sp[1]); /* NOTREACHED */ abort(); default: From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:25 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3BAD4651F27; Tue, 29 Jun 2021 20: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 4GDwtb6rFNz3t8J; Tue, 29 Jun 2021 20:24: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 839D21F9B3; Tue, 29 Jun 2021 20:24:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TKONLW007285; Tue, 29 Jun 2021 20:24:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TKONsW007284; Tue, 29 Jun 2021 20:24:23 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:24:23 GMT Message-Id: <202106292024.15TKONsW007284@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: 18b6113dfaec - releng/12.2 - linux(4): Prevent integer overflow in futex_requeue. 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/releng/12.2 X-Git-Reftype: branch X-Git-Commit: 18b6113dfaeca9485aaf7338f0170f7b12603e53 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:25 -0000 The branch releng/12.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=18b6113dfaeca9485aaf7338f0170f7b12603e53 commit 18b6113dfaeca9485aaf7338f0170f7b12603e53 Author: Dmitry Chagin AuthorDate: 2021-06-10 11:23:11 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 20:01:56 +0000 linux(4): Prevent integer overflow in futex_requeue. To prevent a signed integer overflow in futex_requeue add a sanity check to catch negative values of nrwake or nrrequeue. Approved by: so Security: EN-21:22.linux_futex (cherry picked from commit 25b09d6f398ea8a260ee8e2e8209fd76c61e13ee) (cherry picked from commit 43a58daffe7256f0948ce895fed9fae55dec98fc) --- sys/compat/linux/linux_futex.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index b0fcfdfd2976..9324670b4875 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -587,18 +587,19 @@ futex_wake(struct futex *f, int n, uint32_t bitset) } static int -futex_requeue(struct futex *f, int n, struct futex *f2, int n2) +futex_requeue(struct futex *f, int nrwake, struct futex *f2, + int nrrequeue) { struct waiting_proc *wp, *wpt; int count = 0; - LIN_SDT_PROBE4(futex, futex_requeue, entry, f, n, f2, n2); + LIN_SDT_PROBE4(futex, futex_requeue, entry, f, nrwake, f2, nrrequeue); FUTEX_ASSERT_LOCKED(f); FUTEX_ASSERT_LOCKED(f2); TAILQ_FOREACH_SAFE(wp, &f->f_waiting_proc, wp_list, wpt) { - if (++count <= n) { + if (++count <= nrwake) { LINUX_CTR2(sys_futex, "futex_req_wake uaddr %p wp %p", f->f_uaddr, wp); wp->wp_flags |= FUTEX_WP_REMOVED; @@ -624,7 +625,7 @@ futex_requeue(struct futex *f, int n, struct futex *f2, int n2) FUTEXES_LOCK; ++f2->f_refcount; FUTEXES_UNLOCK; - if (count - n >= n2) + if (count - nrwake >= nrrequeue) break; } } @@ -736,7 +737,7 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr) int linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) { - int clockrt, nrwake, op_ret, ret; + int clockrt, nrwake, nrrequeue, op_ret, ret; struct linux_pemuldata *pem; struct waiting_proc *wp; struct futex *f, *f2; @@ -880,6 +881,15 @@ retry0: return (EINVAL); } + nrrequeue = (int)(unsigned long)args->timeout; + nrwake = args->val; + /* + * Sanity check to prevent signed integer overflow, + * see Linux CVE-2018-6927 + */ + if (nrwake < 0 || nrrequeue < 0) + return (EINVAL); + retry1: error = futex_get(args->uaddr, NULL, &f, flags | FUTEX_DONTLOCK); if (error) { @@ -930,8 +940,7 @@ retry1: return (EAGAIN); } - nrwake = (int)(unsigned long)args->timeout; - td->td_retval[0] = futex_requeue(f, args->val, f2, nrwake); + td->td_retval[0] = futex_requeue(f, nrwake, f2, nrrequeue); futex_put(f2, NULL); futex_put(f, NULL); break; From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:26 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 30901651B49; Tue, 29 Jun 2021 20: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 4GDwtd3tdxz3t6K; Tue, 29 Jun 2021 20:24: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 9EBA51F9B4; Tue, 29 Jun 2021 20:24: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 15TKOOga007316; Tue, 29 Jun 2021 20:24:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TKOOGc007315; Tue, 29 Jun 2021 20:24:24 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:24:24 GMT Message-Id: <202106292024.15TKOOGc007315@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: 2430d82b40ea - releng/12.2 - Add UPDATING entries and bump version 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/releng/12.2 X-Git-Reftype: branch X-Git-Commit: 2430d82b40ea1228b4b3dcb88388693262461eb1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:26 -0000 The branch releng/12.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2430d82b40ea1228b4b3dcb88388693262461eb1 commit 2430d82b40ea1228b4b3dcb88388693262461eb1 Author: Mark Johnston AuthorDate: 2021-06-29 17:19:13 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 20:02:29 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 7 +++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index f2a49d9dc59b..6cdcd8aa554d 100644 --- a/UPDATING +++ b/UPDATING @@ -16,6 +16,13 @@ from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20210629: p9 FreeBSD-EN-21:19.libcasper + FreeBSD-EN-21:22.linux_futex + + libcasper assertion failures [EN-21:19.libcasper] + + Linux compatibility layer futex(2) system call vulnerability [EN-21:22.linux_futex] + 20210601: p8 FreeBSD-EN-21:17.libradius Incorrect validation in rad_get_attr(3) [FreeBSD-EN-21:17.libradius] diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 87d2af8c7f4f..460c80a4a0e0 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -49,7 +49,7 @@ TYPE="FreeBSD" REVISION="12.2" -BRANCH="RELEASE-p8" +BRANCH="RELEASE-p9" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:31 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8A71651EFE; Tue, 29 Jun 2021 20:24: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 4GDwtk0q9jz3t2R; Tue, 29 Jun 2021 20:24: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 9F3081F377; Tue, 29 Jun 2021 20:24: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 15TKOTCR007460; Tue, 29 Jun 2021 20:24:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TKOTwH007459; Tue, 29 Jun 2021 20:24:29 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:24:29 GMT Message-Id: <202106292024.15TKOTwH007459@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: 3d2c68f53783 - releng/11.4 - libcasper: fix descriptors numbers 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/releng/11.4 X-Git-Reftype: branch X-Git-Commit: 3d2c68f5378391e4edba9f1a9b0c9a994ba09f6e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:31 -0000 The branch releng/11.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3d2c68f5378391e4edba9f1a9b0c9a994ba09f6e commit 3d2c68f5378391e4edba9f1a9b0c9a994ba09f6e Author: Mariusz Zaborski AuthorDate: 2021-06-09 21:46:51 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 17:08:28 +0000 libcasper: fix descriptors numbers Casper services expect that the first 3 descriptors (stdin/stdout/stderr) will point to /dev/null. Which Casper will ensure later. The Casper services are forked from the original process. If the initial process closes one of those descriptors, Casper may reuse one of them for it on purpose. If this is the case, then renumarate the descriptors used by Casper to higher numbers. This is done already after the fork, so it doesn't break the parent process. Approved by: so Security: EN-21:19.libcasper PR: 255339 Reported by: Borja Marcos Tested by: jkim@ (cherry picked from commit aa310ebfba3d49a0b6b03a103b969731a8136a73) (cherry picked from commit 6c0a51837f4ba242ea723a887c3b6120d9335c8f) --- lib/libcasper/libcasper/libcasper_impl.c | 27 +++++++++++++++++++++++++++ lib/libcasper/libcasper/libcasper_impl.h | 1 + lib/libcasper/libcasper/service.c | 23 +++++++++++++---------- lib/libcasper/libcasper/zygote.c | 15 +++++++++------ 4 files changed, 50 insertions(+), 16 deletions(-) diff --git a/lib/libcasper/libcasper/libcasper_impl.c b/lib/libcasper/libcasper/libcasper_impl.c index 57d489943252..f58bd44d2039 100644 --- a/lib/libcasper/libcasper/libcasper_impl.c +++ b/lib/libcasper/libcasper/libcasper_impl.c @@ -30,8 +30,10 @@ * $FreeBSD$ */ +#include #include #include +#include #include #include "libcasper_impl.h" @@ -42,3 +44,28 @@ fd_is_valid(int fd) return (fcntl(fd, F_GETFL) != -1 || errno != EBADF); } + +void +fd_fix_environment(int *fdp) +{ + int nullfd, nfd; + + if (*fdp > STDERR_FILENO) + return; + + nullfd = open(_PATH_DEVNULL, O_RDWR); + if (nullfd == -1) + errx(1, "Unable to open %s", _PATH_DEVNULL); + + while (*fdp <= STDERR_FILENO) { + nfd = dup(*fdp); + if (nfd == -1) + errx(1, "Unable to secure fd"); + if (dup2(nullfd, *fdp) == -1) + errx(1, "Unable to secure fd"); + *fdp = nfd; + } + + close(nullfd); +} + diff --git a/lib/libcasper/libcasper/libcasper_impl.h b/lib/libcasper/libcasper/libcasper_impl.h index 89f244d0b87d..01dbd234e3ff 100644 --- a/lib/libcasper/libcasper/libcasper_impl.h +++ b/lib/libcasper/libcasper/libcasper_impl.h @@ -42,6 +42,7 @@ struct service; struct service_connection; bool fd_is_valid(int fd); +void fd_fix_environment(int *fdp); /* Private service functions. */ struct service *service_alloc(const char *name, diff --git a/lib/libcasper/libcasper/service.c b/lib/libcasper/libcasper/service.c index cc53d0d630ae..b3d2d2f05ea3 100644 --- a/lib/libcasper/libcasper/service.c +++ b/lib/libcasper/libcasper/service.c @@ -365,24 +365,27 @@ stdnull(void) } static void -service_clean(int sock, int procfd, uint64_t flags) +service_clean(int *sockp, int *procfdp, uint64_t flags) { int fd, maxfd, minfd; - assert(sock > STDERR_FILENO); - assert(procfd > STDERR_FILENO); - assert(sock != procfd); + fd_fix_environment(sockp); + fd_fix_environment(procfdp); + + assert(*sockp > STDERR_FILENO); + assert(*procfdp > STDERR_FILENO); + assert(*sockp != *procfdp); if ((flags & CASPER_SERVICE_STDIO) == 0) stdnull(); if ((flags & CASPER_SERVICE_FD) == 0) { - if (procfd > sock) { - maxfd = procfd; - minfd = sock; + if (*procfdp > *sockp) { + maxfd = *procfdp; + minfd = *sockp; } else { - maxfd = sock; - minfd = procfd; + maxfd = *sockp; + minfd = *procfdp; } for (fd = STDERR_FILENO + 1; fd < maxfd; fd++) { @@ -403,7 +406,7 @@ service_start(struct service *service, int sock, int procfd) assert(service != NULL); assert(service->s_magic == SERVICE_MAGIC); setproctitle("%s", service->s_name); - service_clean(sock, procfd, service->s_flags); + service_clean(&sock, &procfd, service->s_flags); if (service_connection_add(service, sock, NULL) == NULL) exit(1); diff --git a/lib/libcasper/libcasper/zygote.c b/lib/libcasper/libcasper/zygote.c index feeb1537af87..ef0032ddf58d 100644 --- a/lib/libcasper/libcasper/zygote.c +++ b/lib/libcasper/libcasper/zygote.c @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libcasper_impl.h" #include "zygote.h" /* Zygote info. */ @@ -88,7 +89,7 @@ zygote_clone(zygote_func_t *func, int *chanfdp, int *procfdp) * between sandbox and its owner. */ static void -zygote_main(int sock) +zygote_main(int *sockp) { int error, procfd; int chanfd[2]; @@ -96,12 +97,14 @@ zygote_main(int sock) zygote_func_t *func; pid_t pid; - assert(sock > STDERR_FILENO); + fd_fix_environment(sockp); + + assert(*sockp > STDERR_FILENO); setproctitle("zygote"); for (;;) { - nvlin = nvlist_recv(sock, 0); + nvlin = nvlist_recv(*sockp, 0); if (nvlin == NULL) { if (errno == ENOTCONN) { /* Casper exited. */ @@ -133,7 +136,7 @@ zygote_main(int sock) break; case 0: /* Child. */ - close(sock); + close(*sockp); close(chanfd[0]); func(chanfd[1]); /* NOTREACHED */ @@ -155,7 +158,7 @@ send: nvlist_move_descriptor(nvlout, "chanfd", chanfd[0]); nvlist_move_descriptor(nvlout, "procfd", procfd); } - (void)nvlist_send(sock, nvlout); + (void)nvlist_send(*sockp, nvlout); nvlist_destroy(nvlout); } /* NOTREACHED */ @@ -182,7 +185,7 @@ zygote_init(void) case 0: /* Child. */ close(sp[0]); - zygote_main(sp[1]); + zygote_main(&sp[1]); /* NOTREACHED */ abort(); default: From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:33 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80847652083; Tue, 29 Jun 2021 20:24: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 4GDwtm1DX2z3t4q; Tue, 29 Jun 2021 20:24: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 E9F171FC02; Tue, 29 Jun 2021 20:24: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 15TKOV1Q007513; Tue, 29 Jun 2021 20:24:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TKOVEH007512; Tue, 29 Jun 2021 20:24:31 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:24:31 GMT Message-Id: <202106292024.15TKOVEH007512@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: f82ccb6f5974 - releng/11.4 - linux(4): Prevent integer overflow in futex_requeue. 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/releng/11.4 X-Git-Reftype: branch X-Git-Commit: f82ccb6f5974f0aae5957e47901476bfeb2a5387 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:34 -0000 The branch releng/11.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f82ccb6f5974f0aae5957e47901476bfeb2a5387 commit f82ccb6f5974f0aae5957e47901476bfeb2a5387 Author: Dmitry Chagin AuthorDate: 2021-06-10 11:23:11 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 19:59:59 +0000 linux(4): Prevent integer overflow in futex_requeue. To prevent a signed integer overflow in futex_requeue add a sanity check to catch negative values of nrwake or nrrequeue. Approved by: so Security: EN-21:22.linux_futex (cherry picked from commit 25b09d6f398ea8a260ee8e2e8209fd76c61e13ee) (cherry picked from commit f80ee27f447abc7baeb413cc0a7b7c21f9d32f8b) --- sys/compat/linux/linux_futex.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 686d2f7d2ec7..0be0483f4496 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -596,18 +596,19 @@ futex_wake(struct futex *f, int n, uint32_t bitset) } static int -futex_requeue(struct futex *f, int n, struct futex *f2, int n2) +futex_requeue(struct futex *f, int nrwake, struct futex *f2, + int nrrequeue) { struct waiting_proc *wp, *wpt; int count = 0; - LIN_SDT_PROBE4(futex, futex_requeue, entry, f, n, f2, n2); + LIN_SDT_PROBE4(futex, futex_requeue, entry, f, nrwake, f2, nrrequeue); FUTEX_ASSERT_LOCKED(f); FUTEX_ASSERT_LOCKED(f2); TAILQ_FOREACH_SAFE(wp, &f->f_waiting_proc, wp_list, wpt) { - if (++count <= n) { + if (++count <= nrwake) { LINUX_CTR2(sys_futex, "futex_req_wake uaddr %p wp %p", f->f_uaddr, wp); wp->wp_flags |= FUTEX_WP_REMOVED; @@ -633,7 +634,7 @@ futex_requeue(struct futex *f, int n, struct futex *f2, int n2) FUTEXES_LOCK; ++f2->f_refcount; FUTEXES_UNLOCK; - if (count - n >= n2) + if (count - nrwake >= nrrequeue) break; } } @@ -744,7 +745,7 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr) int linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) { - int clockrt, nrwake, op_ret, ret; + int clockrt, nrwake, nrrequeue, op_ret, ret; struct linux_pemuldata *pem; struct waiting_proc *wp; struct futex *f, *f2; @@ -888,6 +889,15 @@ retry0: return (EINVAL); } + nrrequeue = (int)(unsigned long)args->timeout; + nrwake = args->val; + /* + * Sanity check to prevent signed integer overflow, + * see Linux CVE-2018-6927 + */ + if (nrwake < 0 || nrrequeue < 0) + return (EINVAL); + retry1: error = futex_get(args->uaddr, NULL, &f, flags | FUTEX_DONTLOCK); if (error) { @@ -938,8 +948,7 @@ retry1: return (EAGAIN); } - nrwake = (int)(unsigned long)args->timeout; - td->td_retval[0] = futex_requeue(f, args->val, f2, nrwake); + td->td_retval[0] = futex_requeue(f, nrwake, f2, nrrequeue); futex_put(f2, NULL); futex_put(f, NULL); break; From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:31 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99789651EFD; Tue, 29 Jun 2021 20:24: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 4GDwtl0CL7z3t2Y; Tue, 29 Jun 2021 20:24: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 C31A41FC01; Tue, 29 Jun 2021 20:24: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 15TKOUwv007489; Tue, 29 Jun 2021 20:24:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TKOU5N007488; Tue, 29 Jun 2021 20:24:30 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:24:30 GMT Message-Id: <202106292024.15TKOU5N007488@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: cf827dced101 - releng/11.4 - libcasper: add missing unistd.h 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/releng/11.4 X-Git-Reftype: branch X-Git-Commit: cf827dced1015c707c3f5919ddbc0727e7ddb571 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:34 -0000 The branch releng/11.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cf827dced1015c707c3f5919ddbc0727e7ddb571 commit cf827dced1015c707c3f5919ddbc0727e7ddb571 Author: Mariusz Zaborski AuthorDate: 2021-06-18 09:41:40 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 17:08:35 +0000 libcasper: add missing unistd.h Approved by: so Reported by: Arrigo Marchiori (cherry picked from commit b4fe6fbab236a0fd37ebafb4d3bb15856f99596c) --- lib/libcasper/libcasper/libcasper_impl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libcasper/libcasper/libcasper_impl.c b/lib/libcasper/libcasper/libcasper_impl.c index f58bd44d2039..8d1ebd8dd074 100644 --- a/lib/libcasper/libcasper/libcasper_impl.c +++ b/lib/libcasper/libcasper/libcasper_impl.c @@ -35,6 +35,7 @@ #include #include #include +#include #include "libcasper_impl.h" From owner-dev-commits-src-branches@freebsd.org Tue Jun 29 20:24:34 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F600651FC2; Tue, 29 Jun 2021 20:24: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 4GDwtn5nnYz3sww; Tue, 29 Jun 2021 20:24: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 15DFD1FB88; Tue, 29 Jun 2021 20:24: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 15TKOWPx007537; Tue, 29 Jun 2021 20:24:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TKOWKB007536; Tue, 29 Jun 2021 20:24:32 GMT (envelope-from git) Date: Tue, 29 Jun 2021 20:24:32 GMT Message-Id: <202106292024.15TKOWKB007536@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: 7fe589000ce9 - releng/11.4 - Add UPDATING entries and bump version 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/releng/11.4 X-Git-Reftype: branch X-Git-Commit: 7fe589000ce991bff5919054fa1b1b7e4c38be68 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:34 -0000 The branch releng/11.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7fe589000ce991bff5919054fa1b1b7e4c38be68 commit 7fe589000ce991bff5919054fa1b1b7e4c38be68 Author: Mark Johnston AuthorDate: 2021-06-29 17:19:33 +0000 Commit: Mark Johnston CommitDate: 2021-06-29 20:01:28 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 7 +++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 8a9f819405fa..39436624b2d7 100644 --- a/UPDATING +++ b/UPDATING @@ -16,6 +16,13 @@ from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20210629: p12 FreeBSD-EN-21:19.libcasper + FreeBSD-EN-21:22.linux_futex + + libcasper assertion failure [EN-21:19.libcasper] + + Linux compatibility layer futex(2) system call vulnerability [EN-21:22.linux_futex] + 20210601: p11 FreeBSD-EN-21:17.libradius Incorrect validation in rad_get_attr(3) [FreeBSD-EN-21:17.libradius] diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 360ee0de08ab..fd228bf9ad03 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.4" -BRANCH="RELEASE-p11" +BRANCH="RELEASE-p12" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 01:19:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39760658464; Wed, 30 Jun 2021 01:19: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 4GF3Rd0x3pz3J6p; Wed, 30 Jun 2021 01:19: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 0818B233D2; Wed, 30 Jun 2021 01:19: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 15U1JuZs092420; Wed, 30 Jun 2021 01:19:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U1JuY4092419; Wed, 30 Jun 2021 01:19:56 GMT (envelope-from git) Date: Wed, 30 Jun 2021 01:19:56 GMT Message-Id: <202106300119.15U1JuY4092419@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: a5b5a24d1abe - stable/13 - nfscl: Make NFSv4.0 client acquisition NFSv4.1/4.2 compatible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a5b5a24d1abef8d32931d9260e9a04f4adf23494 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 01:19:57 -0000 The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=a5b5a24d1abef8d32931d9260e9a04f4adf23494 commit a5b5a24d1abef8d32931d9260e9a04f4adf23494 Author: Rick Macklem AuthorDate: 2021-06-16 00:42:13 +0000 Commit: Rick Macklem CommitDate: 2021-06-30 01:15:35 +0000 nfscl: Make NFSv4.0 client acquisition NFSv4.1/4.2 compatible When the NFSv4.0 client was implemented, acquisition of a clientid via SetClientID/SetClientIDConfirm was done upon the first Open, since that was when it was needed. NFSv4.1/4.2 acquires the clientid during mount (via ExchangeID/CreateSession), since the associated session is required during mount. This patch modifies the NFSv4.0 mount so that it acquires the clientid during mount. This simplifies the code and makes it easy to implement "find the highest minor version supported by the NFSv4 server", which will be done for the default minorversion in a future commit. The "start_renewthread" argument for nfscl_getcl() is replaced by "tryminvers", which will be used by the aforementioned future commit. (cherry picked from commit aed98fa5acb1a62bb79fc0e182b2151b239d6239) --- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clrpcops.c | 29 ++--------------------------- sys/fs/nfsclient/nfs_clstate.c | 19 ++++++------------- sys/fs/nfsclient/nfs_clvfsops.c | 8 ++++---- 4 files changed, 13 insertions(+), 45 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 9db8b92f44e7..5c474d97ad04 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -574,7 +574,7 @@ int nfscl_getstateid(vnode_t, u_int8_t *, int, u_int32_t, int, struct ucred *, NFSPROC_T *, nfsv4stateid_t *, void **); void nfscl_ownerrelease(struct nfsmount *, struct nfsclowner *, int, int, int); void nfscl_openrelease(struct nfsmount *, struct nfsclopen *, int, int); -int nfscl_getcl(struct mount *, struct ucred *, NFSPROC_T *, int, +int nfscl_getcl(struct mount *, struct ucred *, NFSPROC_T *, bool, struct nfsclclient **); struct nfsclclient *nfscl_findcl(struct nfsmount *); void nfscl_clientrelease(struct nfsclclient *); diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index ef345dc391e5..d74b2dedaa23 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -936,12 +936,10 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp, int reclaim, u_int32_t *tl; struct nfsrv_descript nfsd; struct nfsrv_descript *nd = &nfsd; - nfsattrbit_t attrbits; u_int8_t *cp = NULL, *cp2, addr[INET6_ADDRSTRLEN + 9]; u_short port; int error, isinet6 = 0, callblen; nfsquad_t confirm; - u_int32_t lease; static u_int32_t rev = 0; struct nfsclds *dsp, *odsp; struct in6_addr a6; @@ -1171,29 +1169,6 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp, int reclaim, return (error); m_freem(nd->nd_mrep); nd->nd_mrep = NULL; - if (nd->nd_repstat == 0) { - nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, nmp->nm_fh, - nmp->nm_fhsize, NULL, NULL, 0, 0); - NFSZERO_ATTRBIT(&attrbits); - NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_LEASETIME); - (void) nfsrv_putattrbit(nd, &attrbits); - nd->nd_flag |= ND_USEGSSNAME; - error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, - cred, NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL); - if (error) - return (error); - if (nd->nd_repstat == 0) { - error = nfsv4_loadattr(nd, NULL, NULL, NULL, NULL, 0, NULL, - NULL, NULL, NULL, NULL, 0, NULL, &lease, NULL, p, cred); - if (error) - goto nfsmout; - clp->nfsc_renew = NFSCL_RENEW(lease); - clp->nfsc_expire = NFSD_MONOSEC + clp->nfsc_renew; - clp->nfsc_clientidrev++; - if (clp->nfsc_clientidrev == 0) - clp->nfsc_clientidrev++; - } - } } error = nd->nd_repstat; nfsmout: @@ -3984,7 +3959,7 @@ nfsrpc_advlock(vnode_t vp, off_t size, int op, struct flock *fl, do { nd->nd_repstat = 0; if (op == F_GETLK) { - error = nfscl_getcl(vp->v_mount, cred, p, 1, &clp); + error = nfscl_getcl(vp->v_mount, cred, p, false, &clp); if (error) return (error); error = nfscl_lockt(vp, clp, off, len, fl, p, id, flags); @@ -4001,7 +3976,7 @@ nfsrpc_advlock(vnode_t vp, off_t size, int op, struct flock *fl, * We must loop around for all lockowner cases. */ callcnt = 0; - error = nfscl_getcl(vp->v_mount, cred, p, 1, &clp); + error = nfscl_getcl(vp->v_mount, cred, p, false, &clp); if (error) return (error); do { diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 0659e77289e9..fb90c80c69e7 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -246,7 +246,7 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, int fhlen, u_int32_t amode, int usedeleg, fhlen - 1, M_NFSCLOPEN, M_WAITOK); nop->nfso_hash.le_prev = NULL; } - ret = nfscl_getcl(vp->v_mount, cred, p, 1, &clp); + ret = nfscl_getcl(vp->v_mount, cred, p, false, &clp); if (ret != 0) { free(nowp, M_NFSCLOWNER); if (nop != NULL) @@ -823,13 +823,11 @@ nfscl_openrelease(struct nfsmount *nmp, struct nfsclopen *op, int error, * If the "cred" argument is NULL, a new clientid should not be created. * If the "p" argument is NULL, a SetClientID/SetClientIDConfirm cannot * be done. - * The start_renewthread argument tells nfscl_getcl() to start a renew - * thread if this creates a new clp. * It always clpp with a reference count on it, unless returning an error. */ int nfscl_getcl(struct mount *mp, struct ucred *cred, NFSPROC_T *p, - int start_renewthread, struct nfsclclient **clpp) + bool tryminvers, struct nfsclclient **clpp) { struct nfsclclient *clp; struct nfsclclient *newclp = NULL; @@ -888,15 +886,10 @@ nfscl_getcl(struct mount *mp, struct ucred *cred, NFSPROC_T *p, LIST_INSERT_HEAD(&nfsclhead, clp, nfsc_list); nmp->nm_clp = clp; clp->nfsc_nmp = nmp; - NFSUNLOCKCLSTATE(); - if (start_renewthread != 0) - nfscl_start_renewthread(clp); } else { - NFSUNLOCKCLSTATE(); if (newclp != NULL) free(newclp, M_NFSCLCLIENT); } - NFSLOCKCLSTATE(); while ((clp->nfsc_flags & NFSCLFLAGS_HASCLIENTID) == 0 && !igotlock && !NFSCL_FORCEDISM(mp)) igotlock = nfsv4_lock(&clp->nfsc_lock, 1, NULL, @@ -1085,7 +1078,7 @@ nfscl_getbytelock(vnode_t vp, u_int64_t off, u_int64_t len, if (recovery) clp = rclp; else - error = nfscl_getcl(vp->v_mount, cred, p, 1, &clp); + error = nfscl_getcl(vp->v_mount, cred, p, false, &clp); } if (error) { free(nlp, M_NFSCLLOCKOWNER); @@ -1416,7 +1409,7 @@ nfscl_checkwritelocked(vnode_t vp, struct flock *fl, end = NFS64BITSSET; } - error = nfscl_getcl(vp->v_mount, cred, p, 1, &clp); + error = nfscl_getcl(vp->v_mount, cred, p, false, &clp); if (error) return (1); nfscl_filllockowner(id, own, flags); @@ -3209,7 +3202,7 @@ nfscl_getclose(vnode_t vp, struct nfsclclient **clpp) struct nfsfh *nfhp; int error, notdecr; - error = nfscl_getcl(vp->v_mount, NULL, NULL, 1, &clp); + error = nfscl_getcl(vp->v_mount, NULL, NULL, false, &clp); if (error) return (error); *clpp = clp; @@ -3283,7 +3276,7 @@ nfscl_doclose(vnode_t vp, struct nfsclclient **clpp, NFSPROC_T *p) struct nfsclrecalllayout *recallp; int error; - error = nfscl_getcl(vp->v_mount, NULL, NULL, 1, &clp); + error = nfscl_getcl(vp->v_mount, NULL, NULL, false, &clp); if (error) return (error); *clpp = clp; diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c index 08a25c6fe632..5abd41dee1a1 100644 --- a/sys/fs/nfsclient/nfs_clvfsops.c +++ b/sys/fs/nfsclient/nfs_clvfsops.c @@ -1571,10 +1571,10 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, if ((error = newnfs_connect(nmp, &nmp->nm_sockreq, cred, td, 0, false))) goto bad; - /* For NFSv4.1, get the clientid now. */ - if (nmp->nm_minorvers > 0) { + /* For NFSv4, get the clientid now. */ + if ((argp->flags & NFSMNT_NFSV4) != 0) { NFSCL_DEBUG(3, "at getcl\n"); - error = nfscl_getcl(mp, cred, td, 0, &clp); + error = nfscl_getcl(mp, cred, td, false, &clp); NFSCL_DEBUG(3, "aft getcl=%d\n", error); if (error != 0) goto bad; @@ -1644,7 +1644,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, lease = 60; } (void) nfscl_loadattrcache(vpp, &nfsva, NULL, NULL, 0, 1); - if (nmp->nm_minorvers > 0) { + if ((argp->flags & NFSMNT_NFSV4) != 0) { NFSCL_DEBUG(3, "lease=%d\n", (int)lease); NFSLOCKCLSTATE(); clp->nfsc_renew = NFSCL_RENEW(lease); From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 05:08:12 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 13D2965A9AD; Wed, 30 Jun 2021 05:08: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 4GF8Vz6xdzz3vJd; Wed, 30 Jun 2021 05:08: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 D2C2226B58; Wed, 30 Jun 2021 05:08: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 15U58Bln097054; Wed, 30 Jun 2021 05:08:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U58BNF097053; Wed, 30 Jun 2021 05:08:11 GMT (envelope-from git) Date: Wed, 30 Jun 2021 05:08:11 GMT Message-Id: <202106300508.15U58BNF097053@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: af9521f635ef - stable/13 - vdso gettimeofday: minor restructuring 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: af9521f635ef8f7223ddb68b33928d4320dc2357 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 05:08:12 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=af9521f635ef8f7223ddb68b33928d4320dc2357 commit af9521f635ef8f7223ddb68b33928d4320dc2357 Author: Konstantin Belousov AuthorDate: 2021-06-22 23:58:32 +0000 Commit: Konstantin Belousov CommitDate: 2021-06-30 04:41:58 +0000 vdso gettimeofday: minor restructuring (cherry picked from commit e912fbe1675714aab0179999923c171615e78c07) --- lib/libc/sys/__vdso_gettimeofday.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/libc/sys/__vdso_gettimeofday.c b/lib/libc/sys/__vdso_gettimeofday.c index 32c416a54392..4c1f4bda23e1 100644 --- a/lib/libc/sys/__vdso_gettimeofday.c +++ b/lib/libc/sys/__vdso_gettimeofday.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -59,7 +60,7 @@ tc_delta(const struct vdso_timehands *th, u_int *delta) * is based on the kernel implementation. */ static int -binuptime(struct bintime *bt, struct vdso_timekeep *tk, int abs) +binuptime(struct bintime *bt, struct vdso_timekeep *tk, bool abs) { struct vdso_timehands *th; uint32_t curr, gen; @@ -123,7 +124,7 @@ __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) } if (tk->tk_ver != VDSO_TK_VER_CURR) return (ENOSYS); - error = binuptime(&bt, tk, 1); + error = binuptime(&bt, tk, true); if (error != 0) return (error); bintime2timeval(&bt, tv); @@ -135,7 +136,7 @@ int __vdso_clock_gettime(clockid_t clock_id, struct timespec *ts) { struct bintime bt; - int abs, error; + int error; if (tk == NULL) { error = _elf_aux_info(AT_TIMEKEEP, &tk, sizeof(tk)); @@ -149,7 +150,7 @@ __vdso_clock_gettime(clockid_t clock_id, struct timespec *ts) case CLOCK_REALTIME_PRECISE: case CLOCK_REALTIME_FAST: case CLOCK_SECOND: - abs = 1; + error = binuptime(&bt, tk, true); break; case CLOCK_MONOTONIC: case CLOCK_MONOTONIC_PRECISE: @@ -157,12 +158,12 @@ __vdso_clock_gettime(clockid_t clock_id, struct timespec *ts) case CLOCK_UPTIME: case CLOCK_UPTIME_PRECISE: case CLOCK_UPTIME_FAST: - abs = 0; + error = getnanouptime(&bt, tk); break; default: - return (ENOSYS); + error = ENOSYS; + break; } - error = binuptime(&bt, tk, abs); if (error != 0) return (error); bintime2timespec(&bt, ts); From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 05:08:13 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2528C65A9B0; Wed, 30 Jun 2021 05:08: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 4GF8W10HQFz3vFv; Wed, 30 Jun 2021 05:08: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 E713F26928; Wed, 30 Jun 2021 05:08: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 15U58Chs097082; Wed, 30 Jun 2021 05:08:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U58CDJ097081; Wed, 30 Jun 2021 05:08:12 GMT (envelope-from git) Date: Wed, 30 Jun 2021 05:08:12 GMT Message-Id: <202106300508.15U58CDJ097081@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: f027b4f41fb1 - stable/13 - vdso: lower precision of vdso implementation of CLOCK_MONOTONIC_FAST and CLOCK_UPTIME_FAST 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: f027b4f41fb1b748070928175cdf2f57baf66c3a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 05:08:13 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f027b4f41fb1b748070928175cdf2f57baf66c3a commit f027b4f41fb1b748070928175cdf2f57baf66c3a Author: Konstantin Belousov AuthorDate: 2021-06-22 23:24:08 +0000 Commit: Konstantin Belousov CommitDate: 2021-06-30 04:42:06 +0000 vdso: lower precision of vdso implementation of CLOCK_MONOTONIC_FAST and CLOCK_UPTIME_FAST (cherry picked from commit 60b0ad10dd0fc7ff6892ecc7ba3458482fcc064c) --- lib/libc/sys/__vdso_gettimeofday.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/lib/libc/sys/__vdso_gettimeofday.c b/lib/libc/sys/__vdso_gettimeofday.c index 4c1f4bda23e1..c1457a54d37e 100644 --- a/lib/libc/sys/__vdso_gettimeofday.c +++ b/lib/libc/sys/__vdso_gettimeofday.c @@ -106,6 +106,30 @@ binuptime(struct bintime *bt, struct vdso_timekeep *tk, bool abs) return (0); } +static int +getnanouptime(struct bintime *bt, struct vdso_timekeep *tk) +{ + struct vdso_timehands *th; + uint32_t curr, gen; + + do { + if (!tk->tk_enabled) + return (ENOSYS); + + curr = atomic_load_acq_32(&tk->tk_current); + th = &tk->tk_th[curr]; + gen = atomic_load_acq_32(&th->th_gen); + *bt = th->th_offset; + + /* + * Ensure that the load of th_offset is completed + * before the load of th_gen. + */ + atomic_thread_fence_acq(); + } while (curr != tk->tk_current || gen == 0 || gen != th->th_gen); + return (0); +} + static struct vdso_timekeep *tk; #pragma weak __vdso_gettimeofday @@ -154,9 +178,11 @@ __vdso_clock_gettime(clockid_t clock_id, struct timespec *ts) break; case CLOCK_MONOTONIC: case CLOCK_MONOTONIC_PRECISE: - case CLOCK_MONOTONIC_FAST: case CLOCK_UPTIME: case CLOCK_UPTIME_PRECISE: + error = binuptime(&bt, tk, false); + break; + case CLOCK_MONOTONIC_FAST: case CLOCK_UPTIME_FAST: error = getnanouptime(&bt, tk); break; From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 05:08:14 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D1EB65A2F8; Wed, 30 Jun 2021 05:08: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 4GF8W22xgvz3vD4; Wed, 30 Jun 2021 05:08: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 23BEF26929; Wed, 30 Jun 2021 05:08: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 15U58EMb097114; Wed, 30 Jun 2021 05:08:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U58EdK097113; Wed, 30 Jun 2021 05:08:14 GMT (envelope-from git) Date: Wed, 30 Jun 2021 05:08:14 GMT Message-Id: <202106300508.15U58EdK097113@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: 99c12760d07d - stable/13 - amd64: do not touch BIOS reset flag halfword, unless we boot through BIOS 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: 99c12760d07df9dba7bc69f1ae0d915badc7ee17 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 05:08:14 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=99c12760d07df9dba7bc69f1ae0d915badc7ee17 commit 99c12760d07df9dba7bc69f1ae0d915badc7ee17 Author: Konstantin Belousov AuthorDate: 2021-06-20 14:58:11 +0000 Commit: Konstantin Belousov CommitDate: 2021-06-30 04:42:13 +0000 amd64: do not touch BIOS reset flag halfword, unless we boot through BIOS (cherry picked from commit 33e1287b6a54672860d6646111ef0e544a00c569) --- sys/amd64/amd64/locore.S | 3 --- sys/amd64/amd64/machdep.c | 12 ++++++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index 3addc3fb10cd..ce37288f4400 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -56,9 +56,6 @@ */ NON_GPROF_ENTRY(btext) - /* Tell the bios to warmboot next time */ - movw $0x1234,0x472 - /* Don't trust what the loader gives for rflags. */ pushq $PSL_KERNEL popfq diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 2901ef15e69a..0098e926d0f0 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1613,11 +1613,20 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) struct region_descriptor r_gdt; size_t kstack0_sz; int late_console; + bool efi_boot; TSRAW(&thread0, TS_ENTER, __func__, NULL); kmdp = init_ops.parse_preload_data(modulep); + efi_boot = preload_search_info(kmdp, MODINFO_METADATA | + MODINFOMD_EFI_MAP) != NULL; + + if (!efi_boot) { + /* Tell the bios to warmboot next time */ + atomic_store_short((u_short *)0x472, 0x1234); + } + physfree += ucode_load_bsp(physfree + KERNBASE); physfree = roundup2(physfree, PAGE_SIZE); @@ -1769,8 +1778,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) * Once bootblocks have updated, we can test directly for * efi_systbl != NULL here... */ - if (preload_search_info(kmdp, MODINFO_METADATA | MODINFOMD_EFI_MAP) - != NULL) + if (efi_boot) vty_set_preferred(VTY_VT); TUNABLE_INT_FETCH("hw.ibrs_disable", &hw_ibrs_disable); From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:24:50 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D388965E787; Wed, 30 Jun 2021 07:24: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 4GFCXf5hh4z4d9s; Wed, 30 Jun 2021 07:24: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 AB7853DB; Wed, 30 Jun 2021 07:24: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 15U7Oo76084055; Wed, 30 Jun 2021 07:24:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7OoUT084054; Wed, 30 Jun 2021 07:24:50 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:24:50 GMT Message-Id: <202106300724.15U7OoUT084054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: aeae6708886b - stable/13 - pkgbase: Move libicp in utilities MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: aeae6708886bf8aaca8378c48fee770abdde37b2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:24:50 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=aeae6708886bf8aaca8378c48fee770abdde37b2 commit aeae6708886bf8aaca8378c48fee770abdde37b2 Author: Emmanuel Vadot AuthorDate: 2021-03-16 06:12:40 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:29 +0000 pkgbase: Move libicp in utilities libicp is used by zdb zhack zinject zstream ztest libzpool.so.2 which are all in FreeBSD-utilities. Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D29164 MFC after: 2 weeks --- cddl/lib/libicp/Makefile | 2 +- cddl/lib/libicp_rescue/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile index 36858338ac6b..253b252bc2d4 100644 --- a/cddl/lib/libicp/Makefile +++ b/cddl/lib/libicp/Makefile @@ -2,7 +2,7 @@ .PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp -PACKAGE= runtime +PACKAGE= utilities LIB= icp LIBADD= diff --git a/cddl/lib/libicp_rescue/Makefile b/cddl/lib/libicp_rescue/Makefile index 1ebe1b0ff649..a46fd6db3877 100644 --- a/cddl/lib/libicp_rescue/Makefile +++ b/cddl/lib/libicp_rescue/Makefile @@ -2,7 +2,7 @@ .PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp -PACKAGE= runtime +PACKAGE= utilities LIB= icp_rescue LIBADD= From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:24:53 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28C2665E71D; Wed, 30 Jun 2021 07:24: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 4GFCXj0hzGz4dQQ; Wed, 30 Jun 2021 07:24: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 EA9DD91E; Wed, 30 Jun 2021 07:24: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 15U7OqVR084107; Wed, 30 Jun 2021 07:24:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7OqQe084106; Wed, 30 Jun 2021 07:24:52 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:24:52 GMT Message-Id: <202106300724.15U7OqQe084106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 577dfb1ca15f - stable/13 - pkgbase: Install all cam includes with INCS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 577dfb1ca15f6b1c2adfedf20f05ef27185420a8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:24:53 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=577dfb1ca15f6b1c2adfedf20f05ef27185420a8 commit 577dfb1ca15f6b1c2adfedf20f05ef27185420a8 Author: Emmanuel Vadot AuthorDate: 2021-03-16 06:12:49 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:29 +0000 pkgbase: Install all cam includes with INCS Now they are correctly taggued and put into the -dev package Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D29166 MFC after: 2 weeks --- include/Makefile | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/include/Makefile b/include/Makefile index 1e592de2bb09..8d50aeea864f 100644 --- a/include/Makefile +++ b/include/Makefile @@ -38,11 +38,10 @@ PHDRS= sched.h _semaphore.h LHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdatomic.h stdint.h \ syslog.h ucontext.h -LDIRS= cam geom net net80211 netgraph netinet netinet6 \ +LDIRS= geom net net80211 netgraph netinet netinet6 \ netipsec netsmb nfs nfsclient nfsserver sys vm -LSUBDIRS= cam/ata cam/mmc cam/nvme cam/scsi \ - dev/acpica dev/agp dev/an dev/ciss dev/filemon dev/firewire \ +LSUBDIRS= dev/acpica dev/agp dev/an dev/ciss dev/filemon dev/firewire \ dev/hwpmc dev/hyperv \ dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \ @@ -94,6 +93,53 @@ SECAUDIT= audit.h \ SECAUDITPACKAGE= libbsm SECAUDITDIR= ${INCLUDEDIR}/security/audit +.PATH: ${SRCTOP}/sys/cam +CAM= cam.h \ + cam_ccb.h \ + cam_compat.h \ + cam_debug.h \ + cam_iosched.h \ + cam_periph.h \ + cam_queue.h \ + cam_sim.h \ + cam_xpt.h \ + cam_xpt_internal.h \ + cam_xpt_periph.h \ + cam_xpt_sim.h +CAMDIR= ${INCLUDEDIR}/cam + +.PATH: ${SRCTOP}/sys/cam/ata +CAMATA= ata_all.h +CAMATADIR= ${INCLUDEDIR}/cam/ata + +.PATH: ${SRCTOP}/sys/cam/mmc +CAMMMC= mmc.h \ + mmc_bus.h \ + mmc_all.h +CAMMMCDIR= ${INCLUDEDIR}/cam/mmc + +.PATH: ${SRCTOP}/sys/cam/nvme +CAMNVME= nvme_all.h +CAMNVMEDIR= ${INCLUDEDIR}/cam/nvme + +.PATH: ${SRCTOP}/sys/cam/scsi +CAMSCSI= scsi_all.h \ + scsi_cd.h \ + scsi_ch.h \ + scsi_da.h \ + scsi_enc.h \ + scsi_enc_internal.h \ + scsi_iu.h \ + scsi_message.h \ + scsi_pass.h \ + scsi_pt.h \ + scsi_sa.h \ + scsi_ses.h \ + scsi_sg.h \ + scsi_targetio.h \ + smp_all.h +CAMSCSIDIR= ${INCLUDEDIR}/cam/scsi + .PATH: ${SRCTOP}/sys/fs/cd9660 FS9660= cd9660_mount.h \ cd9660_node.h \ @@ -177,6 +223,11 @@ MLX5DIR= ${INCLUDEDIR}/dev/mlx5 INCSGROUPS= INCS \ ACPICA \ AGP \ + CAM \ + CAMATA \ + CAMMMC \ + CAMNVME \ + CAMSCSI \ CRYPTO \ EVDEV \ FS9660 \ From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:24:52 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18B6665E3EE; Wed, 30 Jun 2021 07:24: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 4GFCXg6nY2z4dRy; Wed, 30 Jun 2021 07:24: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 CDB165FC; Wed, 30 Jun 2021 07:24: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 15U7OpsT084079; Wed, 30 Jun 2021 07:24:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7OprV084078; Wed, 30 Jun 2021 07:24:51 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:24:51 GMT Message-Id: <202106300724.15U7OprV084078@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 4074502552f0 - stable/13 - pkgbase: Install all BSM includes with INCS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4074502552f0dabd5438b50749d46d2e8e25ba65 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:24:52 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=4074502552f0dabd5438b50749d46d2e8e25ba65 commit 4074502552f0dabd5438b50749d46d2e8e25ba65 Author: Emmanuel Vadot AuthorDate: 2021-03-16 06:12:46 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:29 +0000 pkgbase: Install all BSM includes with INCS Now they are correctly taggued and put them into the libbsm package Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D29165 MFC after: 2 weeks --- include/Makefile | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/include/Makefile b/include/Makefile index ffa0b1c01f6a..1e592de2bb09 100644 --- a/include/Makefile +++ b/include/Makefile @@ -38,7 +38,7 @@ PHDRS= sched.h _semaphore.h LHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdatomic.h stdint.h \ syslog.h ucontext.h -LDIRS= bsm cam geom net net80211 netgraph netinet netinet6 \ +LDIRS= cam geom net net80211 netgraph netinet netinet6 \ netipsec netsmb nfs nfsclient nfsserver sys vm LSUBDIRS= cam/ata cam/mmc cam/nvme cam/scsi \ @@ -58,7 +58,6 @@ LSUBDIRS= cam/ata cam/mmc cam/nvme cam/scsi \ netinet/cc \ netinet/netdump \ netinet/tcp_stacks \ - security/audit \ security/mac_biba security/mac_bsdextended security/mac_lomac \ security/mac_mls security/mac_partition \ security/mac_veriexec \ @@ -76,6 +75,25 @@ ACPICADIR= ${INCLUDEDIR}/dev/acpica AGP= agpreg.h AGPDIR= ${INCLUDEDIR}/dev/agp +.PATH: ${SRCTOP}/sys/bsm +BSM= audit.h \ + audit_errno.h \ + audit_internal.h \ + audit_record.h \ + audit_domain.h \ + audit_fcntl.h \ + audit_kevents.h \ + audit_socket_type.h +BSMPACKAGE= libbsm +BSMDIR= ${INCLUDEDIR}/bsm + +.PATH: ${SRCTOP}/sys/security/audit +SECAUDIT= audit.h \ + audit_ioctl.h \ + audit_private.h +SECAUDITPACKAGE= libbsm +SECAUDITDIR= ${INCLUDEDIR}/security/audit + .PATH: ${SRCTOP}/sys/fs/cd9660 FS9660= cd9660_mount.h \ cd9660_node.h \ @@ -170,6 +188,11 @@ INCSGROUPS= INCS \ TEKEN \ VERIEXEC +.if ${MK_AUDIT} != "no" +INCSGROUPS+= BSM +INCSGROUPS+= SECAUDIT +.endif + .if ${MK_IPFILTER} != "no" INCSGROUPS+= IPFILTER .endif From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:24:54 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66B5665E1D7; Wed, 30 Jun 2021 07:24: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 4GFCXk1mKQz4d59; Wed, 30 Jun 2021 07:24: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 1C358892; Wed, 30 Jun 2021 07:24: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 15U7OsY5084134; Wed, 30 Jun 2021 07:24:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7OseC084133; Wed, 30 Jun 2021 07:24:54 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:24:54 GMT Message-Id: <202106300724.15U7OseC084133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: a86ba45ed731 - stable/13 - pkgbase: Remove case for runtime and jail package ucl generation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a86ba45ed73193f39f49111670a8bb9bbaec6e97 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:24:54 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=a86ba45ed73193f39f49111670a8bb9bbaec6e97 commit a86ba45ed73193f39f49111670a8bb9bbaec6e97 Author: Emmanuel Vadot AuthorDate: 2021-03-16 06:12:56 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:30 +0000 pkgbase: Remove case for runtime and jail package ucl generation They aren't needed and produce wrong package comments : We use to have "runtime-dev package" instead of "FreeBSD Base System (Development Files)" for example Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D29168 MFC after: 2 weeks --- release/packages/generate-ucl.sh | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh index b3d76eb4019d..e900f9991912 100755 --- a/release/packages/generate-ucl.sh +++ b/release/packages/generate-ucl.sh @@ -44,21 +44,6 @@ main() { runtime) outname="runtime" uclfile="${uclfile}" - ;; - runtime_manuals) - outname="${origname}" - pkgdeps="runtime" - ;; - runtime_*) - outname="${origname}" - uclfile="${outname##*}${uclfile}" - pkgdeps="runtime" - _descr="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESCR)" - ;; - jail_*) - outname="${origname}" - uclfile="${outname##*}${uclfile}" - pkgdeps="runtime" _descr="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESCR)" ;; *_lib32_dev) From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:24:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D66C65E791; Wed, 30 Jun 2021 07:24: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 4GFCXm5gLDz4dVS; Wed, 30 Jun 2021 07:24: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 6E4553DC; Wed, 30 Jun 2021 07:24: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 15U7Ou0F084182; Wed, 30 Jun 2021 07:24:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7Oul9084181; Wed, 30 Jun 2021 07:24:56 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:24:56 GMT Message-Id: <202106300724.15U7Oul9084181@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 41b278bd7181 - stable/13 - Convert libs with pc files to use PCFILES MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 41b278bd71817ba237a643fcd396dd3021873012 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:24:57 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=41b278bd71817ba237a643fcd396dd3021873012 commit 41b278bd71817ba237a643fcd396dd3021873012 Author: Emmanuel Vadot AuthorDate: 2021-03-16 06:13:07 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:30 +0000 Convert libs with pc files to use PCFILES Now the .pc ends up in the correct package (-dev) Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D29172 MFC after: 2 weeks --- lib/liblzma/Makefile | 3 +-- lib/libmagic/Makefile | 3 +-- lib/libusb/Makefile | 3 +-- lib/libz/Makefile | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/liblzma/Makefile b/lib/liblzma/Makefile index 63424bd3dcc2..4f38ef391e4a 100644 --- a/lib/liblzma/Makefile +++ b/lib/liblzma/Makefile @@ -154,8 +154,7 @@ CFLAGS+= -DSYMBOL_VERSIONING CLEANFILES+= liblzma.pc -FILES= liblzma.pc -FILESDIR= ${LIBDATADIR}/pkgconfig +PCFILES= liblzma.pc liblzma.pc: liblzma.pc.in sed -e 's,@prefix@,/usr,g ; \ diff --git a/lib/libmagic/Makefile b/lib/libmagic/Makefile index e390ff1261c6..5f967102fe02 100644 --- a/lib/libmagic/Makefile +++ b/lib/libmagic/Makefile @@ -86,7 +86,6 @@ ${inc}: ${inc}.in sed -e 's,X.YY,${FILEVER:S,",,g:S,.,,g},g' ${.ALLSRC} > ${.TARGET} .endfor -FILES+= libmagic.pc -FILESDIR_libmagic.pc= ${LIBDATADIR}/pkgconfig +PCFILES= libmagic.pc .include diff --git a/lib/libusb/Makefile b/lib/libusb/Makefile index cf263b732c35..83c9f1ade075 100644 --- a/lib/libusb/Makefile +++ b/lib/libusb/Makefile @@ -38,8 +38,7 @@ SRCS+= libusb10_io.c CFLAGS+= -DCOMPAT_32BIT .endif -FILES= libusb-0.1.pc libusb-1.0.pc libusb-2.0.pc -FILESDIR= ${LIBDATADIR}/pkgconfig +PCFILES= libusb-0.1.pc libusb-1.0.pc libusb-2.0.pc # # Cross platform support diff --git a/lib/libz/Makefile b/lib/libz/Makefile index 48e57ccc2a1a..4ece3e3e059f 100644 --- a/lib/libz/Makefile +++ b/lib/libz/Makefile @@ -75,7 +75,6 @@ test: example minigzip (export LD_LIBRARY_PATH=. ; \ echo hello world | ./minigzip | ./minigzip -d ) -FILES= zlib.pc -FILESDIR= ${LIBDATADIR}/pkgconfig +PCFILES= zlib.pc .include From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:24:55 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A438A65E729; Wed, 30 Jun 2021 07:24: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 4GFCXl3C8Lz4dB0; Wed, 30 Jun 2021 07:24: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 36EC25FD; Wed, 30 Jun 2021 07:24: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 15U7OtFG084158; Wed, 30 Jun 2021 07:24:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7OtJK084157; Wed, 30 Jun 2021 07:24:55 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:24:55 GMT Message-Id: <202106300724.15U7OtJK084157@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 8c80fd34167c - stable/13 - bsd.lib.mk: Add a install target for .pc files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8c80fd34167cc4f4f344eadbce405d581a802ed5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:24:55 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=8c80fd34167cc4f4f344eadbce405d581a802ed5 commit 8c80fd34167cc4f4f344eadbce405d581a802ed5 Author: Emmanuel Vadot AuthorDate: 2021-03-16 06:13:03 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:30 +0000 bsd.lib.mk: Add a install target for .pc files That way the files are correctly taggued for pkgbase Reviewed by: bapt, emaste (both earlier version) Differential Revision: https://reviews.freebsd.org/D29171 MFC after: 2 weeks --- share/mk/bsd.lib.mk | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 9a31c72255f7..db54055b7ae0 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -449,8 +449,20 @@ _SHLINSTALLSYMLINKFLAGS:= ${SHLINSTALLSYMLINKFLAGS} _SHLINSTALLFLAGS:= ${_SHLINSTALLFLAGS${ie}} .endfor +.if defined(PCFILES) +.for pcfile in ${PCFILES} +installpcfiles: installpcfiles-${pcfile} + +installpcfiles-${pcfile}: ${pcfile} + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${_INSTALLFLAGS} \ + ${.ALLSRC} ${DESTDIR}${LIBDATADIR}/pkgconfig +.endfor +.endif +installpcfiles: .PHONY + .if !defined(INTERNALLIB) -realinstall: _libinstall +realinstall: _libinstall installpcfiles .ORDER: beforeinstall _libinstall _libinstall: .if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:25:01 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4465F65E2D8; Wed, 30 Jun 2021 07:25: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 4GFCXs0PVcz4dQl; Wed, 30 Jun 2021 07:25: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 DF094893; Wed, 30 Jun 2021 07:25: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 15U7P0ex084290; Wed, 30 Jun 2021 07:25:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7P0vx084289; Wed, 30 Jun 2021 07:25:00 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:25:00 GMT Message-Id: <202106300725.15U7P0vx084289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: d130523e840c - stable/13 - pkgbase: Put chio in utilities MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d130523e840c269240c38b4f84c46035294651af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:25:01 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=d130523e840c269240c38b4f84c46035294651af commit d130523e840c269240c38b4f84c46035294651af Author: Emmanuel Vadot AuthorDate: 2021-06-19 15:49:44 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:32 +0000 pkgbase: Put chio in utilities No need to bloat runtime with this utility. Differential Revision: https://reviews.freebsd.org/D30753 Sponsored by: Diablotin Systems --- bin/chio/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/chio/Makefile b/bin/chio/Makefile index ddb07d968129..a88e7df4604c 100644 --- a/bin/chio/Makefile +++ b/bin/chio/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 -PACKAGE=runtime +PACKAGE=utilities PROG= chio .include From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:24:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4171265E3FC; Wed, 30 Jun 2021 07:24: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 4GFCXn6MGcz4dcs; Wed, 30 Jun 2021 07:24: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 83079575; Wed, 30 Jun 2021 07:24: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 15U7Ovjr084206; Wed, 30 Jun 2021 07:24:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7Ovg5084205; Wed, 30 Jun 2021 07:24:57 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:24:57 GMT Message-Id: <202106300724.15U7Ovg5084205@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 4eab15539de8 - stable/13 - pkgbase: Move librt to clibs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4eab15539de822826512555153a9b4dd27049317 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:24:58 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=4eab15539de822826512555153a9b4dd27049317 commit 4eab15539de822826512555153a9b4dd27049317 Author: Emmanuel Vadot AuthorDate: 2021-05-03 08:12:26 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:31 +0000 pkgbase: Move librt to clibs librt implement the POSIX realtime extension library. Move it to clibs instead of utilities as a number of ports uses it so avoid a dependancy on FreeBSD-utilities. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D30088 --- lib/librt/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librt/Makefile b/lib/librt/Makefile index 6a751b7a3aa3..00ae29bab26b 100644 --- a/lib/librt/Makefile +++ b/lib/librt/Makefile @@ -2,6 +2,7 @@ .include +PACKAGE=clibs LIB=rt SHLIB_MAJOR= 1 CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR} From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:24:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CC3C65E739; Wed, 30 Jun 2021 07:24: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 4GFCXp6vttz4dXL; Wed, 30 Jun 2021 07:24: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 9E95D9A1; Wed, 30 Jun 2021 07:24: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 15U7Owvm084230; Wed, 30 Jun 2021 07:24:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7OweC084229; Wed, 30 Jun 2021 07:24:58 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:24:58 GMT Message-Id: <202106300724.15U7OweC084229@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 632e3f2f3a66 - stable/13 - pkgbase: Put openssl in its own package MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 632e3f2f3a66cea437a93169b0f907931348ffb5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:24:59 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=632e3f2f3a66cea437a93169b0f907931348ffb5 commit 632e3f2f3a66cea437a93169b0f907931348ffb5 Author: Emmanuel Vadot AuthorDate: 2021-05-02 15:46:17 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:31 +0000 pkgbase: Put openssl in its own package This is useful for upgrade and also to make tiny jail so they won't depend on FreeBSD-utilities (where openssl was packaged before). MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D30081 --- release/packages/Makefile.package | 2 ++ secure/lib/libcrypto/Makefile | 2 +- secure/lib/libssl/Makefile | 1 + secure/usr.bin/openssl/Makefile | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index 125732267008..dd7ce63d78a1 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -57,6 +57,8 @@ kernel_COMMENT= FreeBSD Kernel kernel_DESC= FreeBSD Kernel manuals_COMMENT= Manual Pages manuals_DESC= Manual Pages +openssl_COMMENT= OpenSSL Library and Utility +openssl_DESC= OpenSSL Library and Utility rc_COMMENT= RC Scripts rc_DESC= RC Scripts rcmds_COMMENT= Remote Command Utilities diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index b82b5c8d84b1..ff9303c9edae 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -6,7 +6,7 @@ SUBDIR= engines .include .include -PACKAGE= runtime +PACKAGE= openssl LIB= crypto SHLIB_MAJOR= 111 VERSION_MAP= ${.CURDIR}/Version.map diff --git a/secure/lib/libssl/Makefile b/secure/lib/libssl/Makefile index 74856aaa3b1f..893ea6ebed79 100644 --- a/secure/lib/libssl/Makefile +++ b/secure/lib/libssl/Makefile @@ -5,6 +5,7 @@ LIB= ssl SHLIB_MAJOR= 111 VERSION_MAP= ${.CURDIR}/Version.map +PACKAGE= openssl NO_LINT= diff --git a/secure/usr.bin/openssl/Makefile b/secure/usr.bin/openssl/Makefile index e71be39bae56..5f3bf395a149 100644 --- a/secure/usr.bin/openssl/Makefile +++ b/secure/usr.bin/openssl/Makefile @@ -3,6 +3,7 @@ CONFS= openssl.cnf CONFSDIR= /etc/ssl PROG= openssl +PACKAGE= openssl LIBADD= ssl crypto From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:25:05 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9EAA865E2DE; Wed, 30 Jun 2021 07:25: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 4GFCXx0k5Yz4dk2; Wed, 30 Jun 2021 07:25: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 452C5638; Wed, 30 Jun 2021 07:25: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 15U7P4gs084362; Wed, 30 Jun 2021 07:25:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7P4IG084361; Wed, 30 Jun 2021 07:25:04 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:25:04 GMT Message-Id: <202106300725.15U7P4IG084361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: e39af9bedaa0 - stable/13 - pkgbase: Put the mibs and defs in the bnsmp package MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e39af9bedaa086d38c19de5618450021d3a07668 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:25:05 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=e39af9bedaa086d38c19de5618450021d3a07668 commit e39af9bedaa086d38c19de5618450021d3a07668 Author: Emmanuel Vadot AuthorDate: 2021-06-19 15:50:03 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:33 +0000 pkgbase: Put the mibs and defs in the bnsmp package Differential Revision: https://reviews.freebsd.org/D30756 Sponsored by: Diablotin Systems --- lib/libbsnmp/libbsnmp/Makefile | 1 + share/mk/bsd.snmpmod.mk | 3 +++ share/snmp/mibs/Makefile | 2 ++ usr.sbin/bsnmpd/bsnmpd/Makefile | 3 +++ 4 files changed, 9 insertions(+) diff --git a/lib/libbsnmp/libbsnmp/Makefile b/lib/libbsnmp/libbsnmp/Makefile index aac554b3bc74..d4c48a879303 100644 --- a/lib/libbsnmp/libbsnmp/Makefile +++ b/lib/libbsnmp/libbsnmp/Makefile @@ -137,5 +137,6 @@ MLINKS+= bsnmplib.3 snmp_value_parse.3 FILESGROUPS+= DEFS DEFS= tc.def DEFSDIR?= ${SHAREDIR}/snmp/defs +DEFSPACKAGE= bsnmp .include diff --git a/share/mk/bsd.snmpmod.mk b/share/mk/bsd.snmpmod.mk index 6ecbbcf09bf7..7956b89382b5 100644 --- a/share/mk/bsd.snmpmod.mk +++ b/share/mk/bsd.snmpmod.mk @@ -32,6 +32,9 @@ FILESGROUPS+= BMIBS BMIBSDIR?= ${SHAREDIR}/snmp/mibs .endif +DEFSPACKAGE= bsnmp +BMIBSPACKAGE= bsnmp + .if !target(smilint) && !empty(BMIBS) LOCALBASE?= /usr/local diff --git a/share/snmp/mibs/Makefile b/share/snmp/mibs/Makefile index 8bee4c85624e..e4cc1d1d6fb0 100644 --- a/share/snmp/mibs/Makefile +++ b/share/snmp/mibs/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= bsnmp + FILES= FREEBSD-MIB.txt FILESDIR= ${SHAREDIR}/snmp/mibs diff --git a/usr.sbin/bsnmpd/bsnmpd/Makefile b/usr.sbin/bsnmpd/bsnmpd/Makefile index 8555eaee67b8..05d617279ff0 100644 --- a/usr.sbin/bsnmpd/bsnmpd/Makefile +++ b/usr.sbin/bsnmpd/bsnmpd/Makefile @@ -120,6 +120,9 @@ MLINKS+= snmpmod.3 usm_user.3 FILESGROUPS= BMIBS DEFS +DEFSPACKAGE= bsnmp +BMIBSPACKAGE= bsnmp + BMIBS= FOKUS-MIB.txt BEGEMOT-MIB.txt BEGEMOT-SNMPD.txt BMIBSDIR= ${SHAREDIR}/snmp/mibs DEFS= tree.def From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:25:01 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 082F065E882; Wed, 30 Jun 2021 07:25: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 4GFCXr140Qz4dQj; Wed, 30 Jun 2021 07:25: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 C02AC637; Wed, 30 Jun 2021 07:24: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 15U7OxtZ084260; Wed, 30 Jun 2021 07:24:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7OxX0084259; Wed, 30 Jun 2021 07:24:59 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:24:59 GMT Message-Id: <202106300724.15U7OxX0084259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 9e4940840d79 - stable/13 - pkgbase: Put dtrace in its own package MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9e4940840d798201905edc5f3c5792f9051e376e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:25:01 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=9e4940840d798201905edc5f3c5792f9051e376e commit 9e4940840d798201905edc5f3c5792f9051e376e Author: Emmanuel Vadot AuthorDate: 2021-06-19 15:49:31 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:32 +0000 pkgbase: Put dtrace in its own package While dtrace is usefull some people might not want it. Differential Revision: https://reviews.freebsd.org/D30752 Sponsored by: Diablotin Systems --- cddl/lib/drti/Makefile | 1 + cddl/lib/libdtrace/Makefile | 1 + cddl/usr.sbin/dtrace/Makefile | 1 + cddl/usr.sbin/lockstat/Makefile | 1 + cddl/usr.sbin/plockstat/Makefile | 1 + release/packages/Makefile.package | 2 ++ share/dtrace/Makefile | 1 + 7 files changed, 8 insertions(+) diff --git a/cddl/lib/drti/Makefile b/cddl/lib/drti/Makefile index b38949d1d5fe..321352c7100c 100644 --- a/cddl/lib/drti/Makefile +++ b/cddl/lib/drti/Makefile @@ -2,6 +2,7 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/common +PACKAGE= dtrace SRCS= drti.c FILES= ${SRCS:R:S/$/.o/g} FILESOWN= ${LIBOWN} diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index 45ca1692cf48..26ff06b46c40 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -3,6 +3,7 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/common .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libgen/common +PACKAGE= dtrace LIB= dtrace SRCS= dt_aggregate.c \ dt_as.c \ diff --git a/cddl/usr.sbin/dtrace/Makefile b/cddl/usr.sbin/dtrace/Makefile index f1248f419bee..d8510e62fb29 100644 --- a/cddl/usr.sbin/dtrace/Makefile +++ b/cddl/usr.sbin/dtrace/Makefile @@ -4,6 +4,7 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/dtrace +PACKAGE= dtrace PROG= dtrace SRCS= dtrace.c BINDIR?= /usr/sbin diff --git a/cddl/usr.sbin/lockstat/Makefile b/cddl/usr.sbin/lockstat/Makefile index 9b5886bf2061..a4bec42df367 100644 --- a/cddl/usr.sbin/lockstat/Makefile +++ b/cddl/usr.sbin/lockstat/Makefile @@ -2,6 +2,7 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/lockstat +PACKAGE= dtrace PROG= lockstat SRCS= lockstat.c sym.c BINDIR?= /usr/sbin diff --git a/cddl/usr.sbin/plockstat/Makefile b/cddl/usr.sbin/plockstat/Makefile index c267a2135c3b..22610870c846 100644 --- a/cddl/usr.sbin/plockstat/Makefile +++ b/cddl/usr.sbin/plockstat/Makefile @@ -2,6 +2,7 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/plockstat +PACKAGE= dtrace PROG= plockstat SRCS= plockstat.c BINDIR?= /usr/sbin diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index dd7ce63d78a1..459dfdabf590 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -34,6 +34,8 @@ dma_COMMENT= DMA Mail Agent Utilities dma_DESC= DMA Mail Agent Utilities docs_COMMENT= Documentation docs_DESC= Documentation +dtrace_COMMENT= Dtrace Utilities +dtrace_DESC= Dtrace Utilities ee_COMMENT= Easy Editor Utilities ee_DESC= Easy Editor Utilities gdb_COMMENT= GDB Utilities diff --git a/share/dtrace/Makefile b/share/dtrace/Makefile index 95e0b4fee4e3..45b173565796 100644 --- a/share/dtrace/Makefile +++ b/share/dtrace/Makefile @@ -6,6 +6,7 @@ .include +PACKAGE= dtrace SCRIPTS= blocking \ disklatency \ disklatencycmd \ From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:25:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EFE5965E81A; Wed, 30 Jun 2021 07:25: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 4GFCXt2x8Lz4dZp; Wed, 30 Jun 2021 07:25: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 0E93F5FE; Wed, 30 Jun 2021 07:25: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 15U7P1YZ084314; Wed, 30 Jun 2021 07:25:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7P1xY084313; Wed, 30 Jun 2021 07:25:01 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:25:01 GMT Message-Id: <202106300725.15U7P1xY084313@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 624d52af5b36 - stable/13 - pkgbase: Create a FreeBSD-nfs package MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 624d52af5b364388d9ff11117df985cfd4c0415d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:25:03 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=624d52af5b364388d9ff11117df985cfd4c0415d commit 624d52af5b364388d9ff11117df985cfd4c0415d Author: Emmanuel Vadot AuthorDate: 2021-06-19 15:49:50 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:32 +0000 pkgbase: Create a FreeBSD-nfs package And move all the nfs related commands there. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D30754 Sponsored by: Diablotin Systems --- libexec/rpc.rquotad/Makefile | 2 ++ release/packages/Makefile.package | 2 ++ usr.bin/nfsstat/Makefile | 2 ++ usr.sbin/clear_locks/Makefile | 2 ++ usr.sbin/nfscbd/Makefile | 2 ++ usr.sbin/nfsd/Makefile | 2 ++ usr.sbin/nfsdumpstate/Makefile | 2 ++ usr.sbin/nfsrevoke/Makefile | 2 ++ usr.sbin/nfsuserd/Makefile | 2 ++ usr.sbin/pnfsdscopymr/Makefile | 2 ++ usr.sbin/pnfsdsfile/Makefile | 2 ++ usr.sbin/pnfsdskill/Makefile | 2 ++ usr.sbin/rpc.lockd/Makefile | 2 ++ usr.sbin/rpc.umntall/Makefile | 2 ++ 14 files changed, 28 insertions(+) diff --git a/libexec/rpc.rquotad/Makefile b/libexec/rpc.rquotad/Makefile index 21cb45d18ad0..52f302e0f00b 100644 --- a/libexec/rpc.rquotad/Makefile +++ b/libexec/rpc.rquotad/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= nfs + PROG = rpc.rquotad SRCS = rquotad.c MAN = rpc.rquotad.8 diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index 459dfdabf590..eef58af542e4 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -59,6 +59,8 @@ kernel_COMMENT= FreeBSD Kernel kernel_DESC= FreeBSD Kernel manuals_COMMENT= Manual Pages manuals_DESC= Manual Pages +nfs_COMMENT= NFS Utilities +nfs_DESC= NFS Utilities openssl_COMMENT= OpenSSL Library and Utility openssl_DESC= OpenSSL Library and Utility rc_COMMENT= RC Scripts diff --git a/usr.bin/nfsstat/Makefile b/usr.bin/nfsstat/Makefile index 76b701f73c7d..0e5d53a95dde 100644 --- a/usr.bin/nfsstat/Makefile +++ b/usr.bin/nfsstat/Makefile @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +PACKAGE= nfs + PROG= nfsstat CFLAGS+=-DNFS diff --git a/usr.sbin/clear_locks/Makefile b/usr.sbin/clear_locks/Makefile index 6906bf0c7e8a..a9355ed2ba29 100644 --- a/usr.sbin/clear_locks/Makefile +++ b/usr.sbin/clear_locks/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= nfs + PROG= clear_locks MAN= clear_locks.8 LIBADD= rpcsvc diff --git a/usr.sbin/nfscbd/Makefile b/usr.sbin/nfscbd/Makefile index 1e11e3a81711..668914a88154 100644 --- a/usr.sbin/nfscbd/Makefile +++ b/usr.sbin/nfscbd/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= nfs + PROG= nfscbd MAN= nfscbd.8 diff --git a/usr.sbin/nfsd/Makefile b/usr.sbin/nfsd/Makefile index 592a1e429cc7..e9d9b31fd168 100644 --- a/usr.sbin/nfsd/Makefile +++ b/usr.sbin/nfsd/Makefile @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ +PACKAGE= nfs + PROG= nfsd MAN= nfsd.8 nfsv4.4 stablerestart.5 pnfs.4 pnfsserver.4 diff --git a/usr.sbin/nfsdumpstate/Makefile b/usr.sbin/nfsdumpstate/Makefile index 66dd94a71f4a..49f14d7ba4ab 100644 --- a/usr.sbin/nfsdumpstate/Makefile +++ b/usr.sbin/nfsdumpstate/Makefile @@ -2,6 +2,8 @@ .include +PACKAGE= nfs + PROG= nfsdumpstate MAN= nfsdumpstate.8 diff --git a/usr.sbin/nfsrevoke/Makefile b/usr.sbin/nfsrevoke/Makefile index ab78aa3300c3..3583d5e8a67a 100644 --- a/usr.sbin/nfsrevoke/Makefile +++ b/usr.sbin/nfsrevoke/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= nfs + PROG= nfsrevoke MAN= nfsrevoke.8 diff --git a/usr.sbin/nfsuserd/Makefile b/usr.sbin/nfsuserd/Makefile index aef51aa4c54d..c8a3553191a7 100644 --- a/usr.sbin/nfsuserd/Makefile +++ b/usr.sbin/nfsuserd/Makefile @@ -2,6 +2,8 @@ .include +PACKAGE= nfs + PROG= nfsuserd MAN= nfsuserd.8 WARNS?= 3 diff --git a/usr.sbin/pnfsdscopymr/Makefile b/usr.sbin/pnfsdscopymr/Makefile index 9fd3952198f6..4cefca6af690 100644 --- a/usr.sbin/pnfsdscopymr/Makefile +++ b/usr.sbin/pnfsdscopymr/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= nfs + PROG= pnfsdscopymr MAN= pnfsdscopymr.8 diff --git a/usr.sbin/pnfsdsfile/Makefile b/usr.sbin/pnfsdsfile/Makefile index 83d82eb6ec69..2a85baf33fc1 100644 --- a/usr.sbin/pnfsdsfile/Makefile +++ b/usr.sbin/pnfsdsfile/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= nfs + PROG= pnfsdsfile MAN= pnfsdsfile.8 diff --git a/usr.sbin/pnfsdskill/Makefile b/usr.sbin/pnfsdskill/Makefile index 603ab18a4167..49b1c3b00d67 100644 --- a/usr.sbin/pnfsdskill/Makefile +++ b/usr.sbin/pnfsdskill/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= nfs + PROG= pnfsdskill MAN= pnfsdskill.8 diff --git a/usr.sbin/rpc.lockd/Makefile b/usr.sbin/rpc.lockd/Makefile index db812a6c48fd..71c68a2d0ced 100644 --- a/usr.sbin/rpc.lockd/Makefile +++ b/usr.sbin/rpc.lockd/Makefile @@ -1,6 +1,8 @@ # $NetBSD: Makefile,v 1.12 2000/08/07 16:23:31 thorpej Exp $ # $FreeBSD$ +PACKAGE= nfs + PROG= rpc.lockd MAN= rpc.lockd.8 MLINKS= rpc.lockd.8 lockd.8 diff --git a/usr.sbin/rpc.umntall/Makefile b/usr.sbin/rpc.umntall/Makefile index fc4a3998c07c..c44441a6de1a 100644 --- a/usr.sbin/rpc.umntall/Makefile +++ b/usr.sbin/rpc.umntall/Makefile @@ -1,6 +1,8 @@ # @(#)Makefile 8.4 (Berkeley) 6/22/95 # $FreeBSD$ +PACKAGE= nfs + PROG= rpc.umntall MAN= rpc.umntall.8 SRCS= rpc.umntall.c mounttab.c From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:25:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6EAAD65E2DC; Wed, 30 Jun 2021 07:25: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 4GFCXv260rz4ddL; Wed, 30 Jun 2021 07:25: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 24C139A2; Wed, 30 Jun 2021 07:25: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 15U7P3nb084338; Wed, 30 Jun 2021 07:25:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7P3as084337; Wed, 30 Jun 2021 07:25:03 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:25:03 GMT Message-Id: <202106300725.15U7P3as084337@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 35466a69bb00 - stable/13 - pkgbase: Move ctld/ctladm to iscsi package MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 35466a69bb00e1124c9db5eb286be0dbc445a464 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:25:03 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=35466a69bb00e1124c9db5eb286be0dbc445a464 commit 35466a69bb00e1124c9db5eb286be0dbc445a464 Author: Emmanuel Vadot AuthorDate: 2021-06-19 15:49:57 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:33 +0000 pkgbase: Move ctld/ctladm to iscsi package While here only compile both of them if WITH_ISCSI is set (this is the default). Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D30755 Sponsored by: Diablotin Systems --- usr.sbin/Makefile | 4 +--- usr.sbin/ctladm/Makefile | 1 + usr.sbin/ctld/Makefile | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 259ab72f2281..a961d0626568 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -15,8 +15,6 @@ SUBDIR= adduser \ clear_locks \ crashinfo \ cron \ - ctladm \ - ctld \ daemon \ dconschat \ devctl \ @@ -153,7 +151,7 @@ SUBDIR.${MK_INET6}+= rtsold SUBDIR.${MK_INET6}+= traceroute6 SUBDIR.${MK_INETD}+= inetd SUBDIR.${MK_IPFW}+= ipfwpcap -SUBDIR.${MK_ISCSI}+= iscsid +SUBDIR.${MK_ISCSI}+= ctladm ctld iscsid SUBDIR.${MK_JAIL}+= jail SUBDIR.${MK_JAIL}+= jexec SUBDIR.${MK_JAIL}+= jls diff --git a/usr.sbin/ctladm/Makefile b/usr.sbin/ctladm/Makefile index 9f7386bdc36c..c98643b50dcb 100644 --- a/usr.sbin/ctladm/Makefile +++ b/usr.sbin/ctladm/Makefile @@ -2,6 +2,7 @@ .include +PACKAGE= iscsi PROG= ctladm SRCS= ctladm.c util.c ctl_util.c ctl_scsi_all.c .PATH: ${SRCTOP}/sys/cam/ctl diff --git a/usr.sbin/ctld/Makefile b/usr.sbin/ctld/Makefile index 08dcb79d0d84..ec207f024ab1 100644 --- a/usr.sbin/ctld/Makefile +++ b/usr.sbin/ctld/Makefile @@ -5,6 +5,7 @@ CFLAGS+=-I${SRCTOP}/contrib/libucl/include .PATH: ${SRCTOP}/contrib/libucl/include +PACKAGE= iscsi PROG= ctld SRCS= chap.c ctld.c discovery.c isns.c kernel.c keys.c log.c SRCS+= login.c parse.y pdu.c token.l y.tab.h uclparse.c From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:25:06 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C86F265E1E9; Wed, 30 Jun 2021 07:25: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 4GFCXy07qPz4dgd; Wed, 30 Jun 2021 07:25: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 6CAC63DD; Wed, 30 Jun 2021 07:25: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 15U7P5qV084392; Wed, 30 Jun 2021 07:25:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7P5lJ084391; Wed, 30 Jun 2021 07:25:05 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:25:05 GMT Message-Id: <202106300725.15U7P5lJ084391@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 45b6969c67b5 - stable/13 - pkgbase: Put the last sendmail files in the sendmail package MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 45b6969c67b5e9970c12bb7bf076bdc87335150c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:25:07 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=45b6969c67b5e9970c12bb7bf076bdc87335150c commit 45b6969c67b5e9970c12bb7bf076bdc87335150c Author: Emmanuel Vadot AuthorDate: 2021-06-19 15:50:11 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:24:33 +0000 pkgbase: Put the last sendmail files in the sendmail package Differential Revision: https://reviews.freebsd.org/D30757 Sponsored by: Diablotin Systems --- etc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/Makefile b/etc/Makefile index 8ca259b10a17..104e40b6e345 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -76,10 +76,10 @@ distribution: .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - -T "package=runtime" ${ETCMAIL} ${DESTDIR}/etc/mail + -T "package=sendmail" ${ETCMAIL} ${DESTDIR}/etc/mail if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ ! -f ${DESTDIR}/etc/aliases ]; then \ - ${INSTALL_SYMLINK} -T "package=runtime" \ + ${INSTALL_SYMLINK} -T "package=sendmail" \ mail/aliases ${DESTDIR}/etc/aliases; \ fi .endif From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 07:27:18 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60E4965ED25; Wed, 30 Jun 2021 07:27: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 4GFCbV2GlHz4f7V; Wed, 30 Jun 2021 07:27: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 326895FF; Wed, 30 Jun 2021 07:27: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 15U7RIeu084703; Wed, 30 Jun 2021 07:27:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U7RIcR084702; Wed, 30 Jun 2021 07:27:18 GMT (envelope-from git) Date: Wed, 30 Jun 2021 07:27:18 GMT Message-Id: <202106300727.15U7RIcR084702@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 5ff72ce7113f - stable/13 - UPDATING: Add a note for pkgbase user for commit 632e3f2f3a66 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5ff72ce7113fd505ec90c7373151fb2d3a27203d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 07:27:18 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=5ff72ce7113fd505ec90c7373151fb2d3a27203d commit 5ff72ce7113fd505ec90c7373151fb2d3a27203d Author: Emmanuel Vadot AuthorDate: 2021-06-30 07:27:03 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-30 07:27:03 +0000 UPDATING: Add a note for pkgbase user for commit 632e3f2f3a66 --- UPDATING | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/UPDATING b/UPDATING index 7c7dcae62587..8dd158f0a05c 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,15 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20210630: + Commit ca179c4d74f2/632e3f2f3a66 changed the package in which + the OpenSSL libraries and utilities are packaged. + It is recommended for pkgbase user to do: + pkg install -f FreeBSD-openssl + before pkg upgrade otherwise some dependencies might not be met + and pkg will stop working as libssl will not be present anymore + on the system. + 20210626: Commit 841006678745 changed the internal KAPI between the krpc and nfsd modules. As such, they must both be rebuilt from From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 09:08:46 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44236660620; Wed, 30 Jun 2021 09:08: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 4GFFrZ1BGWz4q3Q; Wed, 30 Jun 2021 09:08: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 0D8021D11; Wed, 30 Jun 2021 09:08: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 15U98j9e018247; Wed, 30 Jun 2021 09:08:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U98jPx018246; Wed, 30 Jun 2021 09:08:45 GMT (envelope-from git) Date: Wed, 30 Jun 2021 09:08:45 GMT Message-Id: <202106300908.15U98jPx018246@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 7f101ca7d1d9 - stable/13 - zfs: merge openzfs/zfs@508fff0e4 (zfs-2.1-release) into stable/13 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 7f101ca7d1d9eca4e42b43a474ee7b7f78d51116 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 09:08:46 -0000 The branch stable/13 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=7f101ca7d1d9eca4e42b43a474ee7b7f78d51116 commit 7f101ca7d1d9eca4e42b43a474ee7b7f78d51116 Merge: 5ff72ce7113f 508fff0e4b06 Author: Martin Matuska AuthorDate: 2021-06-30 08:55:27 +0000 Commit: Martin Matuska CommitDate: 2021-06-30 08:56:20 +0000 zfs: merge openzfs/zfs@508fff0e4 (zfs-2.1-release) into stable/13 Notable upstream pull request merges: #12253 module/zfs: simplify ddt_stat_add() loop #12280 Help compiller optimize out abd_verify() #12288 Avoid 64bit division in multilist index functions Obtained from: OpenZFS OpenZFS commit: 508fff0e4b0653744fd6ae7857cc860e4d0d80af OpenZFS tag: zfs-2.1.0-rc8 sys/contrib/openzfs/META | 4 ++-- sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh | 2 +- .../openzfs/contrib/dracut/90zfs/zfs-lib.sh.in | 4 ++-- sys/contrib/openzfs/module/zfs/abd.c | 4 ++-- sys/contrib/openzfs/module/zfs/arc.c | 5 +++-- sys/contrib/openzfs/module/zfs/dbuf.c | 5 +++-- sys/contrib/openzfs/module/zfs/dmu_objset.c | 10 +++++++++- sys/contrib/openzfs/module/zfs/metaslab.c | 7 ++++++- sys/contrib/openzfs/module/zstd/zfs_zstd.c | 19 +++++++++++++++++++ sys/modules/zfs/zfs_config.h | 6 +++--- 10 files changed, 50 insertions(+), 16 deletions(-) diff --cc sys/modules/zfs/zfs_config.h index 0080a6c775e9,000000000000..92fb0571934e mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,774 -1,0 +1,774 @@@ +/* + * $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_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_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_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 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 */ + +/* 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_*_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_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 */ + +/* 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_init() is available */ +/* #undef HAVE_IOV_ITER_INIT */ + +/* iov_iter_init() is available */ +/* #undef HAVE_IOV_ITER_INIT_LEGACY */ + +/* 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 */ + +/* kernel has large stacks */ +/* #undef HAVE_LARGE_STACKS */ + +/* 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->create()/mkdir()/mknod() take 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_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 */ +/* #undef HAVE_SETATTR_PREPARE */ + +/* iops->set_acl() exists */ +/* #undef HAVE_SET_ACL */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* 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 */ + +/* 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 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 */ + +/* __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 */ + +/* 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 */ + +/* 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.0-FreeBSD_gaee26af27" ++#define ZFS_META_ALIAS "zfs-2.1.0-FreeBSD_g508fff0e4" + +/* 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.12" ++#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_gaee26af27" ++#define ZFS_META_RELEASE "FreeBSD_g508fff0e4" + +/* Define the project version. */ +#define ZFS_META_VERSION "2.1.0" + +/* count is located in percpu_ref.data */ +/* #undef ZFS_PERCPU_REF_COUNT_IN_DATA */ + From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 12:18:17 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36CF1663A6B; Wed, 30 Jun 2021 12: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 4GFL3F0zp0z3jhJ; Wed, 30 Jun 2021 12: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 0659A4AC2; Wed, 30 Jun 2021 12: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 15UCIGZY071715; Wed, 30 Jun 2021 12:18:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UCIG4A071713; Wed, 30 Jun 2021 12:18:16 GMT (envelope-from git) Date: Wed, 30 Jun 2021 12:18:16 GMT Message-Id: <202106301218.15UCIG4A071713@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: 2d4eba7f8e08 - stable/13 - mdconfig tests: Correct a copy-pasted test description 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: 2d4eba7f8e08ffb84521fbca30ee82f71e33078c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 12:18:17 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2d4eba7f8e08ffb84521fbca30ee82f71e33078c commit 2d4eba7f8e08ffb84521fbca30ee82f71e33078c Author: Mark Johnston AuthorDate: 2021-06-23 14:37:40 +0000 Commit: Mark Johnston CommitDate: 2021-06-30 12:18:00 +0000 mdconfig tests: Correct a copy-pasted test description Sponsored by: The FreeBSD Foundation (cherry picked from commit 4420bb6a8642e3a24f30c2917dc994cf5800ea6f) --- sbin/mdconfig/tests/mdconfig_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/mdconfig/tests/mdconfig_test.sh b/sbin/mdconfig/tests/mdconfig_test.sh index 0dd520826056..92ba0342447c 100755 --- a/sbin/mdconfig/tests/mdconfig_test.sh +++ b/sbin/mdconfig/tests/mdconfig_test.sh @@ -171,7 +171,7 @@ attach_vnode_larger_than_file_cleanup() atf_test_case attach_vnode_sector_size cleanup attach_vnode_sector_size_head() { - atf_set "descr" "Tests mdconfig -s with size greater than the file size" + atf_set "descr" "Tests mdconfig -S with a backing file" } attach_vnode_sector_size_body() { From owner-dev-commits-src-branches@freebsd.org Wed Jun 30 12:18:18 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4155B663BBF; Wed, 30 Jun 2021 12:18: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 4GFL3G1LyDz3jYS; Wed, 30 Jun 2021 12:18: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 157C24635; Wed, 30 Jun 2021 12:18: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 15UCII7v071740; Wed, 30 Jun 2021 12:18:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UCIIKt071739; Wed, 30 Jun 2021 12:18:18 GMT (envelope-from git) Date: Wed, 30 Jun 2021 12:18:18 GMT Message-Id: <202106301218.15UCIIKt071739@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: 6aee78551801 - stable/13 - rpc.lockd: Use libc strnlen() instead of reimplementing it 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: 6aee785518019fbadef7b6ac50c6c9037d4e6b03 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 12:18:18 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6aee785518019fbadef7b6ac50c6c9037d4e6b03 commit 6aee785518019fbadef7b6ac50c6c9037d4e6b03 Author: Mark Johnston AuthorDate: 2021-06-23 14:06:57 +0000 Commit: Mark Johnston CommitDate: 2021-06-30 12:18:09 +0000 rpc.lockd: Use libc strnlen() instead of reimplementing it No functional change intended. Sponsored by: The FreeBSD Foundation (cherry picked from commit 2bbeada0f75a78c24ef9eaeb97c24a672425791d) --- usr.sbin/rpc.lockd/lockd_lock.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/usr.sbin/rpc.lockd/lockd_lock.c b/usr.sbin/rpc.lockd/lockd_lock.c index 25e74ed6a7de..1fc4ce23597a 100644 --- a/usr.sbin/rpc.lockd/lockd_lock.c +++ b/usr.sbin/rpc.lockd/lockd_lock.c @@ -217,7 +217,6 @@ enum nlm_stats do_test(struct file_lock *fl, enum nlm_stats do_unlock(struct file_lock *fl); enum nlm_stats do_lock(struct file_lock *fl); void do_clear(const char *hostname); -size_t strnlen(const char *, size_t); void debuglog(char const *fmt, ...) @@ -373,17 +372,6 @@ copy_nlm4_lock_to_nlm4_holder(src, exclusive, dest) dest->l_len = src->l_len; } - -size_t -strnlen(const char *s, size_t len) -{ - size_t n; - - for (n = 0; s[n] != 0 && n < len; n++) - ; - return n; -} - /* * allocate_file_lock: Create a lock with the given parameters */ From owner-dev-commits-src-branches@freebsd.org Fri Jul 2 05:13:23 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1CEFE65E2A7; Fri, 2 Jul 2021 05: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 4GGNX30Gklz4dy9; Fri, 2 Jul 2021 05: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 E5D626155; Fri, 2 Jul 2021 05: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 1625DMwe064941; Fri, 2 Jul 2021 05: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 1625DMbC064940; Fri, 2 Jul 2021 05:13:22 GMT (envelope-from git) Date: Fri, 2 Jul 2021 05:13:22 GMT Message-Id: <202107020513.1625DMbC064940@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Wing Subject: git: 3f65cb8fda02 - stable/13 - bhyvectl: print a better error message when vm_open() fails 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 3f65cb8fda02c4f643c476f04655de843e31e563 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 05:13:23 -0000 The branch stable/13 has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=3f65cb8fda02c4f643c476f04655de843e31e563 commit 3f65cb8fda02c4f643c476f04655de843e31e563 Author: Marko AuthorDate: 2021-03-07 06:19:30 +0000 Commit: Robert Wing CommitDate: 2021-07-02 03:17:12 +0000 bhyvectl: print a better error message when vm_open() fails libvmm: explicitly save and restore errno in vm_open() Use errno to print a more descriptive error message when vm_open() fails PR: 250671 Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D29109 (cherry picked from commit 6bb140e3ca895a148f32c93d50f93619bf735f73) (cherry picked from commit a7f81b488df2d4a5dcd785b4112e04ffb6ca0442) --- lib/libvmmapi/vmmapi.c | 5 ++++- usr.sbin/bhyvectl/bhyvectl.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index 39732f448023..5810274c9a73 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -118,6 +118,7 @@ struct vmctx * vm_open(const char *name) { struct vmctx *vm; + int saved_errno; vm = malloc(sizeof(struct vmctx) + strlen(name) + 1); assert(vm != NULL); @@ -133,7 +134,9 @@ vm_open(const char *name) return (vm); err: - vm_destroy(vm); + saved_errno = errno; + free(vm); + errno = saved_errno; return (NULL); } diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index c54aa1f33dc1..1b882e1e0504 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -1960,7 +1960,9 @@ main(int argc, char *argv[]) if (!error) { ctx = vm_open(vmname); if (ctx == NULL) { - printf("VM:%s is not created.\n", vmname); + fprintf(stderr, + "vm_open: %s could not be opened: %s\n", + vmname, strerror(errno)); exit (1); } } From owner-dev-commits-src-branches@freebsd.org Fri Jul 2 05:24:23 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27D6365F17D; Fri, 2 Jul 2021 05:24: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 4GGNml0cSJz4gGx; Fri, 2 Jul 2021 05:24: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 F18F263CB; Fri, 2 Jul 2021 05: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 1625OM3m078129; Fri, 2 Jul 2021 05: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 1625OMcR078128; Fri, 2 Jul 2021 05:24:22 GMT (envelope-from git) Date: Fri, 2 Jul 2021 05:24:22 GMT Message-Id: <202107020524.1625OMcR078128@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Wing Subject: git: e63372af7107 - stable/12 - bhyvectl: print a better error message when vm_open() fails 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/stable/12 X-Git-Reftype: branch X-Git-Commit: e63372af710790e6d583a0f1f7d0a3a6e55b5369 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 05:24:23 -0000 The branch stable/12 has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=e63372af710790e6d583a0f1f7d0a3a6e55b5369 commit e63372af710790e6d583a0f1f7d0a3a6e55b5369 Author: Marko AuthorDate: 2021-03-07 06:19:30 +0000 Commit: Robert Wing CommitDate: 2021-07-02 03:18:54 +0000 bhyvectl: print a better error message when vm_open() fails libvmm: explicitly save and restore errno in vm_open() Use errno to print a more descriptive error message when vm_open() fails PR: 250671 Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D29109 (cherry picked from commit 6bb140e3ca895a148f32c93d50f93619bf735f73) (cherry picked from commit a7f81b488df2d4a5dcd785b4112e04ffb6ca0442) --- lib/libvmmapi/vmmapi.c | 5 ++++- usr.sbin/bhyvectl/bhyvectl.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index 2bf034ee7f4d..a8ce5377b26d 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -111,6 +111,7 @@ struct vmctx * vm_open(const char *name) { struct vmctx *vm; + int saved_errno; vm = malloc(sizeof(struct vmctx) + strlen(name) + 1); assert(vm != NULL); @@ -126,7 +127,9 @@ vm_open(const char *name) return (vm); err: - vm_destroy(vm); + saved_errno = errno; + free(vm); + errno = saved_errno; return (NULL); } diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index 2f5e2c5c8c94..1da6dab3e14e 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -1849,7 +1849,9 @@ main(int argc, char *argv[]) if (!error) { ctx = vm_open(vmname); if (ctx == NULL) { - printf("VM:%s is not created.\n", vmname); + fprintf(stderr, + "vm_open: %s could not be opened: %s\n", + vmname, strerror(errno)); exit (1); } } From owner-dev-commits-src-branches@freebsd.org Fri Jul 2 13:05:15 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 804D066C5BB for ; Fri, 2 Jul 2021 13:05:15 +0000 (UTC) (envelope-from hello@nuggclub.com) Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (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 4GGb0W2nwsz4Yrh for ; Fri, 2 Jul 2021 13:05:15 +0000 (UTC) (envelope-from hello@nuggclub.com) Received: by mail-pj1-x102d.google.com with SMTP id ie21so4577576pjb.0 for ; Fri, 02 Jul 2021 06:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuggclub-com.20150623.gappssmtp.com; s=20150623; h=auto-submitted:from:to:reply-to:in-reply-to:references:subject :message-id:date:mime-version; bh=+kPyKNKKKNTL4Osou06d/RekCkQ4fmT9BzkZDfSW23Q=; b=vNdo1d7zvPjjWeXRFQeZT5P4PFIMv9MAFng4TlYz8tKj+R9ASShZr3yODyhS+XPEz7 GJLqBz8+/3g4unK5uSRT+Cy2U84msCTcjqDEL9aNlKqWvSQuCEPDQZrnvenSQUMEjT3t a4bzFmJewYXo27X/9NivQVmvbND3Hay6z12Ucbm7ktuFci858PMVtaI2+N+YTwOdaz5z YXtAeKGKeJS8Qkq6iaHyWlienWR/VqUXYS98aAzYb24+8T1+b5IaYRj5pHoRH6fb1Uwj t5AoUUKcchfTCYCHC6kaHqf4b1Le3pZBqidelUREd7eWsLny1fRj0rUKQaUJnJyrzUaz 9YpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:auto-submitted:from:to:reply-to:in-reply-to :references:subject:message-id:date:mime-version; bh=+kPyKNKKKNTL4Osou06d/RekCkQ4fmT9BzkZDfSW23Q=; b=gEwwp+nYpK1Kl0Orjet0pz/6zP6fZksvXI32VGqq0J0S78ZU8RGFqWO1SWrZh2QPW/ lamXpkiITvSUF/e5+Mc+ALdzxji9Qd3JD6FKTOOSqCyzCmvcfuegds+GtdNYfJ55C4z3 is6GS8pdYjkLIdr7On9w5tYrL4CZTm64FG1vDeDyLbtvtjqAwMR8xWSLlgNw75Cpdfr0 O/iOu1C3nPzna96idSzN4WQBnkjIme7fqQzWbNXyZKF43BLyBhlOPn25MTpWdr43VzGi c17jCWaeJuVR9JXg/Dph7BES4mqLZcDKRe0z+CaoEoBmHFQ/Es9DbhROdcV9z9UCrDhU Z4bg== X-Gm-Message-State: AOAM531UA8DTnhi4PuuL8nEsX6vDtxa/8fsIWkqV0penJtFhjoLH6qa4 1If5h++vz7AQImK9C6NXjU0W20qgfQvfmhVi X-Google-Smtp-Source: ABdhPJyE3i35vQXbErYYMdUWQGh8kaCNjRrYsNCErJ8bCArniPXRZrwIkUCPbMF/SUrAcuRXB0Vtiw== X-Received: by 2002:a17:90a:a101:: with SMTP id s1mr15299543pjp.31.1625231114107; Fri, 02 Jul 2021 06:05:14 -0700 (PDT) Received: from out.frontapp.com (out-6.frontapp.com. [52.53.85.146]) by smtp.gmail.com with ESMTPSA id 20sm2431829pfu.5.2021.07.02.06.05.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 06:05:13 -0700 (PDT) X-Front-ID: 903b392e1aef3258ebdd61e0a9b23368@frontapp.com X-Front-Transactional: yes X-Front-Autoreply: yes Auto-Submitted: auto-replied From: hello@nuggclub.com To: dev-commits-src-branches@freebsd.org Reply-To: hello@nuggclub.com In-Reply-To: References: <903b392e1aef3258ebdd61e0a9b23368@frontapp.com> Subject: Thanks for Contacting Nugg Club! Message-ID: <903b392e1aef3258ebdd61e0a9b23368@frontapp.com> X-Mailer: nodemailer (2.6.4; +https://nodemailer.com/; SMTP/2.7.2[client:2.12.0]) Date: Fri, 02 Jul 2021 13:05:12 +0000 MIME-Version: 1.0 X-Rspamd-Queue-Id: 4GGb0W2nwsz4Yrh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 13:05:15 -0000 Hi there,=20 Thanks for reaching out to the Nugg Club support team!=20 A member of our team will be in contact with you within 24 - 48 hours. If = you need to modify, reschedule, or delay your upcoming delivery, you will = have the option to do so online from your Nugg Club profile.=20 If you need immediate assistance, please reach out to our support team = using the live chat feature on our website. Please also feel free to visit = our Frequently Asked Questions page for more helpful information.=20 We'll be in touch soon!=20 Best,=20 Nugg Club Support From owner-dev-commits-src-branches@freebsd.org Sat Jul 3 00:28:29 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34CE0674CB6; Sat, 3 Jul 2021 00: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 4GGt8s0Z0Jz4gWr; Sat, 3 Jul 2021 00: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 EBB171DB35; Sat, 3 Jul 2021 00:28: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 1630SSX4096404; Sat, 3 Jul 2021 00:28:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1630SSh0096403; Sat, 3 Jul 2021 00:28:28 GMT (envelope-from git) Date: Sat, 3 Jul 2021 00:28:28 GMT Message-Id: <202107030028.1630SSh0096403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 65d3d8496536 - stable/13 - ofed: quiet gcc -Wint-in-bool-context MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 65d3d849653629885bd1e5de13c99f22ca03b68e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 00:28:29 -0000 The branch stable/13 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=65d3d849653629885bd1e5de13c99f22ca03b68e commit 65d3d849653629885bd1e5de13c99f22ca03b68e Author: Ryan Libby AuthorDate: 2021-02-24 23:56:16 +0000 Commit: Ryan Libby CommitDate: 2021-07-02 21:12:18 +0000 ofed: quiet gcc -Wint-in-bool-context The int in the argument to the ternary triggered -Wint-in-bool-context from gcc. Upstream linux has a larger and more entangled patch, 12f727721eee61b3d19dedb95cb893b2baa9fe41, which doesn't apply cleanly. When we eventually sync that, we can just drop this change. Reviewed by: hselasky, imp, kib MFC after: 3 days Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28762 (cherry picked from commit bf667f282a7b98e7456d11e1cb46d9707ab8e774) --- sys/ofed/drivers/infiniband/core/uverbs.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/ofed/drivers/infiniband/core/uverbs.h b/sys/ofed/drivers/infiniband/core/uverbs.h index 6c8d9632b0dc..0db0d47cc691 100644 --- a/sys/ofed/drivers/infiniband/core/uverbs.h +++ b/sys/ofed/drivers/infiniband/core/uverbs.h @@ -64,8 +64,10 @@ #define INIT_UDATA_BUF_OR_NULL(udata, ibuf, obuf, ilen, olen) \ do { \ - (udata)->inbuf = (ilen) ? (const void __user *) (ibuf) : NULL; \ - (udata)->outbuf = (olen) ? (void __user *) (obuf) : NULL; \ + (udata)->inbuf = ((ilen) != 0) ? \ + (const void __user *) (ibuf) : NULL; \ + (udata)->outbuf = ((olen) != 0) ? \ + (void __user *) (obuf) : NULL; \ (udata)->inlen = (ilen); \ (udata)->outlen = (olen); \ } while (0) From owner-dev-commits-src-branches@freebsd.org Sat Jul 3 00:28:30 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38196675281; Sat, 3 Jul 2021 00: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 4GGt8t18yKz4gWt; Sat, 3 Jul 2021 00: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 106D01DB36; Sat, 3 Jul 2021 00: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 1630STot096428; Sat, 3 Jul 2021 00: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 1630STKh096427; Sat, 3 Jul 2021 00:28:29 GMT (envelope-from git) Date: Sat, 3 Jul 2021 00:28:29 GMT Message-Id: <202107030028.1630STKh096427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 4544f2ea7dd9 - stable/13 - ddb: reliably fail with ambiguous commands MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4544f2ea7dd98ad1f216b212a304817ee3bba1db Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 00:28:30 -0000 The branch stable/13 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=4544f2ea7dd98ad1f216b212a304817ee3bba1db commit 4544f2ea7dd98ad1f216b212a304817ee3bba1db Author: Ryan Libby AuthorDate: 2021-02-24 23:56:16 +0000 Commit: Ryan Libby CommitDate: 2021-07-02 21:13:24 +0000 ddb: reliably fail with ambiguous commands db_cmd_match had an even/odd bug, where if a third command was partially matched (or any odd number greater than one) the search result would be set back from CMD_AMBIGUOUS to CMD_FOUND, causing the last command in the list to be executed instead of failing the match. Reported by: mlaier Reviewed by: markj, mlaier, vangyzen Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28659 (cherry picked from commit d85c9cef1380f4f135aee95ad8c1f4d3eca74c5b) --- sys/ddb/db_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 21ff75f78e6a..bfd6c700dc22 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -293,7 +293,7 @@ db_cmd_match(char *name, struct command *cmd, struct command **cmdp, *resultp = CMD_AMBIGUOUS; /* but keep looking for a full match - this lets us match single letters */ - } else { + } else if (*resultp == CMD_NONE) { *cmdp = cmd; *resultp = CMD_FOUND; } From owner-dev-commits-src-branches@freebsd.org Sat Jul 3 00:28:31 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5CB6F675087; Sat, 3 Jul 2021 00: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 4GGt8v1k0Lz4glD; Sat, 3 Jul 2021 00: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 2330E1DDB2; Sat, 3 Jul 2021 00: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 1630SVnH096452; Sat, 3 Jul 2021 00: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 1630SVmi096451; Sat, 3 Jul 2021 00:28:31 GMT (envelope-from git) Date: Sat, 3 Jul 2021 00:28:31 GMT Message-Id: <202107030028.1630SVmi096451@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 16d43e560229 - stable/13 - shared shadow vm object invalidation regression test MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 16d43e5602296bcaa7a7a4fdaf6e8e336d6a795f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 00:28:31 -0000 The branch stable/13 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=16d43e5602296bcaa7a7a4fdaf6e8e336d6a795f commit 16d43e5602296bcaa7a7a4fdaf6e8e336d6a795f Author: Ryan Libby AuthorDate: 2021-04-07 19:39:05 +0000 Commit: Ryan Libby CommitDate: 2021-07-02 21:14:32 +0000 shared shadow vm object invalidation regression test Add a regression test for a scenario where a shadow vm object is shared by multiple mappings. If a page COW occurs through one of the mappings, then the virtual-to-physical mapping may become invalidated. This tests the scenario from CVE-2021-29626 which was fixed by 982693bb729badac4e65ecd59772979f2849a2b2. Reviewed by: markj Sponsored by: Dell EMC Isilon (cherry picked from commit 13d4f96130b64b42f74dfc484305b08c4da54669) --- tests/sys/vm/Makefile | 3 +- tests/sys/vm/shared_shadow_inval_test.c | 360 ++++++++++++++++++++++++++++++++ 2 files changed, 362 insertions(+), 1 deletion(-) diff --git a/tests/sys/vm/Makefile b/tests/sys/vm/Makefile index c2c95d25407f..8ef8a45e5f39 100644 --- a/tests/sys/vm/Makefile +++ b/tests/sys/vm/Makefile @@ -6,6 +6,7 @@ TESTSDIR= ${TESTSBASE}/sys/vm ATF_TESTS_C+= mlock_test \ mmap_test \ - page_fault_signal + page_fault_signal \ + shared_shadow_inval_test .include diff --git a/tests/sys/vm/shared_shadow_inval_test.c b/tests/sys/vm/shared_shadow_inval_test.c new file mode 100644 index 000000000000..75e3655e3bd8 --- /dev/null +++ b/tests/sys/vm/shared_shadow_inval_test.c @@ -0,0 +1,360 @@ +/* + * Copyright (c) 2021 Dell Inc. or its subsidiaries. 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. + */ + +/* + * Test behavior when a mapping of a shared shadow vm object is + * invalidated by COW from another mapping. + * + * This is a regression test for an issue isolated by rlibby@FreeBSD.org + * from an issue detected by stress2's collapse.sh by jeff@FreeBSD.org. + * The issue became CVE-2021-29626. + * + * This file is written as an ATF test suite but may be compiled as a + * standalone program with -DSTANDALONE (and optionally -DDEBUG). + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifdef STANDALONE +#define ATF_REQUIRE(x) do { \ + if (!(x)) \ + errx(1, "%s", #x); \ +} while (0) +#else +#include +#endif + +#ifdef DEBUG +#define dprintf(...) printf(__VA_ARGS__) +#else +#define dprintf(...) +#endif + +#define DEPTH 5 + +struct shared_state { + void *p; + size_t len; + size_t modlen; + bool collapse; + bool block_xfer; + bool okay; + volatile bool exiting[DEPTH]; + volatile bool exit; + volatile bool p3_did_write; +}; + +static long g_pagesize; + +/* + * Program flow. There are three or four processes that are descendants + * of the process running the test (P0), where arrows go from parents to + * children, and thicker arrows indicate sharing a certain memory region + * without COW semantics: + * P0 -> P1 -> P2 => P3 + * \=> P4 + * The main idea is that P1 maps a memory region, and that region is + * shared with P2/P3, but with COW semantics. When P3 modifies the + * memory, P2 ought to see that modification. P4 optionally exists to + * defeat a COW optimization. + */ + +#define child_err(...) do { \ + ss->exit = true; \ + err(1, __VA_ARGS__); \ +} while (0) + +#define child_errx(...) do { \ + ss->exit = true; \ + errx(1, __VA_ARGS__); \ +} while (0) + +#define SLEEP_TIME_US 1000 + +static void child(struct shared_state *ss, int depth); + +static pid_t +child_fork(struct shared_state *ss, int depth) +{ + pid_t pid = fork(); + if (pid == -1) + child_err("fork"); + else if (pid == 0) + child(ss, depth); + return pid; +} + +static void +child_fault(struct shared_state *ss) +{ + size_t i; + + for (i = 0; i < ss->len; i += g_pagesize) + (void)((volatile char *)ss->p)[i]; +} + +static void +child_write(struct shared_state *ss, int val, size_t len) +{ + size_t i; + + for (i = 0; i < len; i += g_pagesize) + ((int *)ss->p)[i / sizeof(int)] = val; + atomic_thread_fence_rel(); +} + +static void +child_wait_p3_write(struct shared_state *ss) +{ + while (!ss->p3_did_write) { + if (ss->exit) + exit(1); + usleep(SLEEP_TIME_US); + } + atomic_thread_fence_acq(); +} + +static void +child_verify(struct shared_state *ss, int depth, int newval, int oldval) +{ + size_t i; + int expectval, foundval; + + for (i = 0; i < ss->len; i += g_pagesize) { + expectval = i < ss->modlen ? newval : oldval; + foundval = ((int *)ss->p)[i / sizeof(int)]; + if (foundval == expectval) + continue; + child_errx("P%d saw %d but expected %d, %d was the old value", + depth, foundval, expectval, oldval); + } +} + +static void +child(struct shared_state *ss, int depth) +{ + pid_t mypid, oldval, pid; + + if (depth < 1 || depth >= DEPTH) + child_errx("Bad depth %d", depth); + mypid = getpid(); + dprintf("P%d (pid %d) started\n", depth, mypid); + switch (depth) { + case 1: + /* Shared memory undergoing test. */ + ss->p = mmap(NULL, ss->len, PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_ANON, -1, 0); + if (ss->p == MAP_FAILED) + child_err("mmap"); + /* P1 stamps the shared memory. */ + child_write(ss, mypid, ss->len); + if (ss->block_xfer) { + /* + * P4 is forked so that its existence blocks a page COW + * path where the page is simply transferred between + * objects, rather than being copied. + */ + child_fork(ss, 4); + } + /* + * P1 specifies that modifications from its child processes not + * be shared with P1. Child process reads can be serviced from + * pages in P1's object, but writes must be COW'd. + */ + if (minherit(ss->p, ss->len, INHERIT_COPY) != 0) + child_err("minherit"); + /* Fork P2. */ + child_fork(ss, depth + 1); + /* P1 and P4 wait for P3's writes before exiting. */ + child_wait_p3_write(ss); + child_verify(ss, depth, mypid, mypid); + if (!ss->collapse) { + /* Hang around to prevent collapse. */ + while (!ss->exit) + usleep(SLEEP_TIME_US); + } + /* Exit so the P2 -> P1/P4 shadow chain can collapse. */ + break; + case 2: + /* + * P2 now specifies that modifications from its child processes + * be shared. P2 and P3 will share a shadow object. + */ + if (minherit(ss->p, ss->len, INHERIT_SHARE) != 0) + child_err("minherit"); + /* + * P2 faults a page in P1's object before P1 exits and the + * shadow chain is collapsed. + */ + child_fault(ss); + oldval = atomic_load_acq_int(ss->p); + /* Fork P3. */ + pid = child_fork(ss, depth + 1); + if (ss->collapse) { + /* Wait for P1 and P4 to exit, triggering collapse. */ + while (!ss->exiting[1] || + (ss->block_xfer && !ss->exiting[4])) + usleep(SLEEP_TIME_US); + /* + * This is racy, just guess at how long it may take + * them to finish exiting. + */ + usleep(100 * 1000); + } + /* P2 waits for P3's modification. */ + child_wait_p3_write(ss); + child_verify(ss, depth, pid, oldval); + ss->okay = true; + ss->exit = true; + break; + case 3: + /* + * P3 writes the memory. A page is faulted into the shared + * P2/P3 shadow object. P2's mapping of the page in P1's + * object must now be shot down, or else P2 will wrongly + * continue to have that page mapped. + */ + child_write(ss, mypid, ss->modlen); + ss->p3_did_write = true; + dprintf("P3 (pid %d) wrote its pid\n", mypid); + break; + case 4: + /* Just hang around until P3 is done writing. */ + oldval = atomic_load_acq_int(ss->p); + child_wait_p3_write(ss); + child_verify(ss, depth, oldval, oldval); + break; + default: + child_errx("Bad depth %d", depth); + } + + dprintf("P%d (pid %d) exiting\n", depth, mypid); + ss->exiting[depth] = true; + exit(0); +} + +static void +do_shared_shadow_inval(bool collapse, bool block_xfer, bool full_mod) +{ + struct shared_state *ss; + pid_t pid; + + pid = getpid(); + + dprintf("P0 (pid %d) %s(collapse=%d, block_xfer=%d, full_mod=%d)\n", + pid, __func__, (int)collapse, (int)block_xfer, (int)full_mod); + + g_pagesize = sysconf(_SC_PAGESIZE); + ATF_REQUIRE(g_pagesize > 0); + + ATF_REQUIRE(procctl(P_PID, pid, PROC_REAP_ACQUIRE, NULL) == 0); + + /* Shared memory for coordination. */ + ss = mmap(NULL, sizeof(*ss), PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_ANON, -1, 0); + ATF_REQUIRE(ss != MAP_FAILED); + + ss->len = 2 * 1024 * 1024 + g_pagesize; /* 2 MB + page size */ + ss->modlen = full_mod ? ss->len : ss->len / 2; + ss->collapse = collapse; + ss->block_xfer = block_xfer; + + pid = fork(); + ATF_REQUIRE(pid != -1); + if (pid == 0) + child(ss, 1); + + /* Wait for all descendants to exit. */ + do { + pid = wait(NULL); + } while (pid != -1 || errno != ECHILD); + + atomic_thread_fence_acq(); + ATF_REQUIRE(ss->okay); + + ATF_REQUIRE(munmap(ss, sizeof(*ss)) == 0); + ATF_REQUIRE(procctl(P_PID, getpid(), PROC_REAP_RELEASE, NULL) == 0); +} + +#ifdef STANDALONE +int +main(void) +{ + + do_shared_shadow_inval(false, false, false); + do_shared_shadow_inval(false, false, true); + do_shared_shadow_inval(false, true, false); + do_shared_shadow_inval(false, true, true); + do_shared_shadow_inval(true, false, false); + do_shared_shadow_inval(true, false, true); + do_shared_shadow_inval(true, true, false); + do_shared_shadow_inval(true, true, true); + printf("pass\n"); +} +#else + +#define SHARED_SHADOW_INVAL_TC(suffix, collapse, block_xfer, full_mod) \ +ATF_TC_WITHOUT_HEAD(shared_shadow_inval__##suffix); \ +ATF_TC_BODY(shared_shadow_inval__##suffix, tc) \ +{ \ + do_shared_shadow_inval(collapse, block_xfer, full_mod); \ +} + +SHARED_SHADOW_INVAL_TC(nocollapse_noblockxfer_nofullmod, false, false, false); +SHARED_SHADOW_INVAL_TC(nocollapse_noblockxfer_fullmod, false, false, true); +SHARED_SHADOW_INVAL_TC(nocollapse_blockxfer_nofullmod, false, true, false); +SHARED_SHADOW_INVAL_TC(nocollapse_blockxfer_fullmod, false, true, true); +SHARED_SHADOW_INVAL_TC(collapse_noblockxfer_nofullmod, true, false, false); +SHARED_SHADOW_INVAL_TC(collapse_noblockxfer_fullmod, true, false, true); +SHARED_SHADOW_INVAL_TC(collapse_blockxfer_nofullmod, true, true, false); +SHARED_SHADOW_INVAL_TC(collapse_blockxfer_fullmod, true, true, true); + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, + shared_shadow_inval__nocollapse_noblockxfer_nofullmod); + ATF_TP_ADD_TC(tp, shared_shadow_inval__nocollapse_noblockxfer_fullmod); + ATF_TP_ADD_TC(tp, shared_shadow_inval__nocollapse_blockxfer_nofullmod); + ATF_TP_ADD_TC(tp, shared_shadow_inval__nocollapse_blockxfer_fullmod); + ATF_TP_ADD_TC(tp, shared_shadow_inval__collapse_noblockxfer_nofullmod); + ATF_TP_ADD_TC(tp, shared_shadow_inval__collapse_noblockxfer_fullmod); + ATF_TP_ADD_TC(tp, shared_shadow_inval__collapse_blockxfer_nofullmod); + ATF_TP_ADD_TC(tp, shared_shadow_inval__collapse_blockxfer_fullmod); + + return atf_no_error(); +} +#endif From owner-dev-commits-src-branches@freebsd.org Sat Jul 3 08:20:24 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B38264E662; Sat, 3 Jul 2021 08:20: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 4GH4dN36NZz4Wb0; Sat, 3 Jul 2021 08:20: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 52D3C240AD; Sat, 3 Jul 2021 08:20: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 1638KOc5031373; Sat, 3 Jul 2021 08:20:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1638KOu8031372; Sat, 3 Jul 2021 08:20:24 GMT (envelope-from git) Date: Sat, 3 Jul 2021 08:20:24 GMT Message-Id: <202107030820.1638KOu8031372@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: ba56ee36eb96 - stable/13 - Fix build with WITHOUT_AUDIT=yes in src.conf MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ba56ee36eb966ac43cc51b52db5fbe568bf2ff3f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 08:20:24 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ba56ee36eb966ac43cc51b52db5fbe568bf2ff3f commit ba56ee36eb966ac43cc51b52db5fbe568bf2ff3f Author: Emmanuel Vadot AuthorDate: 2021-04-15 12:11:13 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-03 08:20:02 +0000 Fix build with WITHOUT_AUDIT=yes in src.conf Always install the audit related includes are some part of the source always requires them. Reported by: many Fixes: 8c3eaf244a417a4 (cherry picked from commit f41efc453ab5563cde214cb19273d87e6e4aa2d4) --- include/Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/Makefile b/include/Makefile index 8d50aeea864f..b444184ab8c6 100644 --- a/include/Makefile +++ b/include/Makefile @@ -223,6 +223,7 @@ MLX5DIR= ${INCLUDEDIR}/dev/mlx5 INCSGROUPS= INCS \ ACPICA \ AGP \ + BSM \ CAM \ CAMATA \ CAMMMC \ @@ -236,14 +237,10 @@ INCSGROUPS= INCS \ OPENCRYPTO \ PCI \ RPC \ + SECAUDIT \ TEKEN \ VERIEXEC -.if ${MK_AUDIT} != "no" -INCSGROUPS+= BSM -INCSGROUPS+= SECAUDIT -.endif - .if ${MK_IPFILTER} != "no" INCSGROUPS+= IPFILTER .endif From owner-dev-commits-src-branches@freebsd.org Sat Jul 3 23:29:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EEF3365A805; Sat, 3 Jul 2021 23:29: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 4GHSps6JwHz3CKY; Sat, 3 Jul 2021 23:29: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 BD1863B; Sat, 3 Jul 2021 23:29: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 163NTvda028589; Sat, 3 Jul 2021 23:29:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 163NTvgh028588; Sat, 3 Jul 2021 23:29:57 GMT (envelope-from git) Date: Sat, 3 Jul 2021 23:29:57 GMT Message-Id: <202107032329.163NTvgh028588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: bc997ea6b81e - stable/13 - id: sanitize arguments better 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/stable/13 X-Git-Reftype: branch X-Git-Commit: bc997ea6b81eace14f999e782502ae060687db2c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 23:29:58 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=bc997ea6b81eace14f999e782502ae060687db2c commit bc997ea6b81eace14f999e782502ae060687db2c Author: Alan Somers AuthorDate: 2021-06-11 16:38:07 +0000 Commit: Alan Somers CommitDate: 2021-07-03 23:29:41 +0000 id: sanitize arguments better The -[AMc] flags ignore the user argument. Better if id rejects invocations that include a user argument along with any of those flags. PR: 256554 Reviewed by: trasz Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D30734 (cherry picked from commit 4a06e9377398b34922f8a67d7cb3ea980b95bde8) --- usr.bin/id/id.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c index 5abfb655c948..b8988dedd6f6 100644 --- a/usr.bin/id/id.c +++ b/usr.bin/id/id.c @@ -144,6 +144,8 @@ main(int argc, char *argv[]) if (iswhoami && argc > 0) usage(); + if ((cflag || Aflag || Mflag) && argc > 0) + usage(); switch(Aflag + Gflag + Mflag + Pflag + gflag + pflag + uflag) { case 1: From owner-dev-commits-src-branches@freebsd.org Sat Jul 3 23:39:17 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD80B65A7E3; Sat, 3 Jul 2021 23: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 4GHT1d4K4tz3Cwm; Sat, 3 Jul 2021 23: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 75350257; Sat, 3 Jul 2021 23: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 163NdHCQ042312; Sat, 3 Jul 2021 23: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 163NdHIi042311; Sat, 3 Jul 2021 23:39:17 GMT (envelope-from git) Date: Sat, 3 Jul 2021 23:39:17 GMT Message-Id: <202107032339.163NdHIi042311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: d6e8b20898e1 - stable/13 - vn_fullpath.9: update args after rev 364633 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/stable/13 X-Git-Reftype: branch X-Git-Commit: d6e8b20898e1e478719b7a8696771b75d8c256bf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 23:39:17 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d6e8b20898e1e478719b7a8696771b75d8c256bf commit d6e8b20898e1e478719b7a8696771b75d8c256bf Author: Alan Somers AuthorDate: 2021-06-15 20:21:05 +0000 Commit: Alan Somers CommitDate: 2021-07-03 23:39:03 +0000 vn_fullpath.9: update args after rev 364633 Sponsored by: Axcient Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D30779 (cherry picked from commit fcb5a0a2add19ab070944483a04dc4272f118721) --- share/man/man9/vn_fullpath.9 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/share/man/man9/vn_fullpath.9 b/share/man/man9/vn_fullpath.9 index f961fbbd1559..9f7287c287dd 100644 --- a/share/man/man9/vn_fullpath.9 +++ b/share/man/man9/vn_fullpath.9 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 23, 2008 +.Dd June 15, 2021 .Dt VN_FULLPATH 9 .Os .Sh NAME @@ -38,7 +38,7 @@ .In sys/vnode.h .Ft int .Fo vn_fullpath -.Fa "struct thread *td" "struct vnode *vp" "char **retbuf" "char **freebuf" +.Fa "struct vnode *vp" "char **retbuf" "char **freebuf" .Fc .Sh DESCRIPTION The @@ -68,10 +68,6 @@ properly handle) failure. .Pp Its arguments are: .Bl -tag -width ".Fa freebuf" -.It Fa td -The thread performing the call; this pointer will be dereferenced to find -the process and its file descriptor structure, in order to identify the -root vnode to use. .It Fa vp The vnode to search for. No need to be locked by the caller. From owner-dev-commits-src-branches@freebsd.org Sat Jul 3 23:50:53 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD51065AC0B; Sat, 3 Jul 2021 23: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 4GHTH15FJ7z3DbB; Sat, 3 Jul 2021 23: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 9D846901; Sat, 3 Jul 2021 23: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 163NorXf063519; Sat, 3 Jul 2021 23:50:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 163NorXU063518; Sat, 3 Jul 2021 23:50:53 GMT (envelope-from git) Date: Sat, 3 Jul 2021 23:50:53 GMT Message-Id: <202107032350.163NorXU063518@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 39b5d593b7bd - stable/13 - fusefs: delete dead code 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 39b5d593b7bd90e65e38bdf2dbee0957b036ecd5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 23:50:53 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=39b5d593b7bd90e65e38bdf2dbee0957b036ecd5 commit 39b5d593b7bd90e65e38bdf2dbee0957b036ecd5 Author: Alan Somers AuthorDate: 2021-06-15 19:34:01 +0000 Commit: Alan Somers CommitDate: 2021-07-03 23:40:55 +0000 fusefs: delete dead code Delete two fields in the per-mountpoint struct that have never been used. Sponsored by: Axcient (cherry picked from commit d63e6bc256016c7f5223ff5541671e5a96c4c6c4) --- sys/fs/fuse/fuse_ipc.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/fs/fuse/fuse_ipc.h b/sys/fs/fuse/fuse_ipc.h index 2ed75b3319e3..71562d9193ec 100644 --- a/sys/fs/fuse/fuse_ipc.h +++ b/sys/fs/fuse/fuse_ipc.h @@ -204,8 +204,6 @@ struct fuse_data { uint32_t max_readahead_blocks; uint32_t max_write; uint32_t max_read; - uint32_t subtype; - char volname[MAXPATHLEN]; struct selinfo ks_rsel; From owner-dev-commits-src-branches@freebsd.org Sat Jul 3 23:57:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9995665AB4E; Sat, 3 Jul 2021 23:57: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 4GHTQ43cFhz3Dpc; Sat, 3 Jul 2021 23:57: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 5F8D191D; Sat, 3 Jul 2021 23:57: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 163Nv0c9068010; Sat, 3 Jul 2021 23:57:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 163Nv0DI068009; Sat, 3 Jul 2021 23:57:00 GMT (envelope-from git) Date: Sat, 3 Jul 2021 23:57:00 GMT Message-Id: <202107032357.163Nv0DI068009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: cc5020854d96 - stable/13 - fusefs: improve warnings about buggy FUSE servers 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/stable/13 X-Git-Reftype: branch X-Git-Commit: cc5020854d9616f0c99f75a700eb41b473b1380f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 23:57:00 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=cc5020854d9616f0c99f75a700eb41b473b1380f commit cc5020854d9616f0c99f75a700eb41b473b1380f Author: Alan Somers AuthorDate: 2021-06-15 20:24:05 +0000 Commit: Alan Somers CommitDate: 2021-07-03 23:53:58 +0000 fusefs: improve warnings about buggy FUSE servers The fusefs driver will print warning messages about FUSE servers that commit protocol violations. Previously it would print those warnings on every violation, but that could spam the console. Now it will print each warning no more than once per lifetime of the mount. There is also now a dtrace probe for each violation. Sponsored by: Axcient Reviewed by: emaste, pfg Differential Revision: https://reviews.freebsd.org/D30780 (cherry picked from commit 0b9a5c6fa1733e600dcdb3b9df3b3d0ad5996920) --- sys/fs/fuse/fuse_internal.c | 19 ++++++++----------- sys/fs/fuse/fuse_io.c | 8 ++++---- sys/fs/fuse/fuse_ipc.c | 14 ++++++++++++++ sys/fs/fuse/fuse_ipc.h | 8 ++++++++ sys/fs/fuse/fuse_vfsops.c | 23 ++++++++++++++++++++--- sys/fs/fuse/fuse_vnops.c | 18 +++++++++--------- 6 files changed, 63 insertions(+), 27 deletions(-) diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index a5f646e5f449..82e37ed5a466 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -870,9 +870,6 @@ fuse_internal_forget_send(struct mount *mp, fdisp_destroy(&fdi); } -SDT_PROBE_DEFINE2(fusefs, , internal, getattr_cache_incoherent, - "struct vnode*", "struct fuse_attr_out*"); - /* Fetch the vnode's attributes from the daemon*/ int fuse_internal_do_getattr(struct vnode *vp, struct vattr *vap, @@ -922,14 +919,14 @@ fuse_internal_do_getattr(struct vnode *vp, struct vattr *vap, * The server changed the file's size even though we had it * cached! That's a server bug. */ - SDT_PROBE2(fusefs, , internal, getattr_cache_incoherent, vp, - fao); - printf("%s: cache incoherent on %s! " - "Buggy FUSE server detected. To prevent data corruption, " - "disable the data cache by mounting with -o direct_io, or " - "as directed otherwise by your FUSE server's " - "documentation\n", __func__, - vnode_mount(vp)->mnt_stat.f_mntonname); + struct mount *mp = vnode_mount(vp); + struct fuse_data *data = fuse_get_mpdata(mp); + + fuse_warn(data, FSESS_WARN_CACHE_INCOHERENT, + "cache incoherent! " + "To prevent data corruption, disable the data cache " + "by mounting with -o direct_io, or as directed " + "otherwise by your FUSE server's documentation."); int iosize = fuse_iosize(vp); v_inval_buf_range(vp, 0, INT64_MAX, iosize); } diff --git a/sys/fs/fuse/fuse_io.c b/sys/fs/fuse/fuse_io.c index 3f23a35a8626..58adfde88871 100644 --- a/sys/fs/fuse/fuse_io.c +++ b/sys/fs/fuse/fuse_io.c @@ -576,16 +576,16 @@ retry: fvdat->flag &= ~FN_SIZECHANGE; if (diff < 0) { - printf("WARNING: misbehaving FUSE filesystem " - "wrote more data than we provided it\n"); + fuse_warn(data, FSESS_WARN_WROTE_LONG, + "wrote more data than we provided it."); err = EINVAL; break; } else if (diff > 0) { /* Short write */ if (!direct_io) { - printf("WARNING: misbehaving FUSE filesystem: " + fuse_warn(data, FSESS_WARN_SHORT_WRITE, "short writes are only allowed with " - "direct_io\n"); + "direct_io."); } if (ioflag & IO_DIRECT) { /* Return early */ diff --git a/sys/fs/fuse/fuse_ipc.c b/sys/fs/fuse/fuse_ipc.c index 791ee9f38444..6b4a29214a96 100644 --- a/sys/fs/fuse/fuse_ipc.c +++ b/sys/fs/fuse/fuse_ipc.c @@ -1073,3 +1073,17 @@ fuse_ipc_destroy(void) counter_u64_free(fuse_ticket_count); uma_zdestroy(ticket_zone); } + +SDT_PROBE_DEFINE3(fusefs,, ipc, warn, "struct fuse_data*", "unsigned", "char*"); +void +fuse_warn(struct fuse_data *data, unsigned flag, const char *msg) +{ + SDT_PROBE3(fusefs, , ipc, warn, data, flag, msg); + if (!(data->dataflags & flag)) { + printf("WARNING: FUSE protocol violation for server mounted at " + "%s: %s " + "This warning will not be repeated.\n", + data->mp->mnt_stat.f_mntonname, msg); + data->dataflags |= flag; + } +} diff --git a/sys/fs/fuse/fuse_ipc.h b/sys/fs/fuse/fuse_ipc.h index 71562d9193ec..1351499c0712 100644 --- a/sys/fs/fuse/fuse_ipc.h +++ b/sys/fs/fuse/fuse_ipc.h @@ -233,6 +233,11 @@ struct fuse_data { #define FSESS_POSIX_LOCKS 0x2000 /* daemon supports POSIX locks */ #define FSESS_EXPORT_SUPPORT 0x10000 /* daemon supports NFS-style lookups */ #define FSESS_INTR 0x20000 /* interruptible mounts */ +#define FSESS_WARN_SHORT_WRITE 0x40000 /* Short write without direct_io */ +#define FSESS_WARN_WROTE_LONG 0x80000 /* Wrote more data than provided */ +#define FSESS_WARN_LSEXTATTR_LONG 0x100000 /* Returned too many extattrs */ +#define FSESS_WARN_CACHE_INCOHERENT 0x200000 /* Read cache incoherent */ +#define FSESS_WARN_WB_CACHE_INCOHERENT 0x400000 /* WB cache incoherent */ #define FSESS_MNTOPTS_MASK ( \ FSESS_DAEMON_CAN_SPY | FSESS_PUSH_SYMLINKS_IN | \ FSESS_DEFAULT_PERMISSIONS | FSESS_INTR) @@ -394,6 +399,9 @@ fuse_libabi_geq(struct fuse_data *data, uint32_t abi_maj, uint32_t abi_min) data->fuse_libabi_minor >= abi_min)); } +/* Print msg as a warning to the console, but no more than once per session */ +void fuse_warn(struct fuse_data *data, unsigned flag, const char *msg); + struct fuse_data *fdata_alloc(struct cdev *dev, struct ucred *cred); void fdata_trydestroy(struct fuse_data *data); void fdata_set_dead(struct fuse_data *data); diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index 7f47f8800994..b188996066d5 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -592,9 +592,26 @@ fuse_vfsop_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp) if (vnode_isreg(*vpp) && filesize != fvdat->cached_attrs.va_size && fvdat->flag & FN_SIZECHANGE) { - printf("%s: WB cache incoherent on %s!\n", __func__, - vnode_mount(*vpp)->mnt_stat.f_mntonname); - + if (data->cache_mode == fuse_data_cache_mode) { + const char *msg; + + if (fuse_libabi_geq(data, 7, 23)) { + msg = "writeback cache incoherent!." + "To prevent data corruption, disable " + "the writeback cache according to your " + "FUSE server's documentation."; + } else { + msg = "writeback cache incoherent!." + "To prevent data corruption, disable " + "the writeback cache by setting " + "vfs.fusefs.data_cache_mode to 0 or 1."; + } + fuse_warn(data, FSESS_WARN_WB_CACHE_INCOHERENT, msg); + } else { + /* If we get here, it's likely a fusefs kernel bug */ + printf("%s: WB cache incoherent on %s!\n", __func__, + vnode_mount(*vpp)->mnt_stat.f_mntonname); + } fvdat->flag &= ~FN_SIZECHANGE; } diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index a51c1b15e7f0..c79d8d5b5223 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -1177,8 +1177,6 @@ fuse_lookup_alloc(struct mount *mp, void *arg, int lkflags, struct vnode **vpp) SDT_PROBE_DEFINE3(fusefs, , vnops, cache_lookup, "int", "struct timespec*", "struct timespec*"); -SDT_PROBE_DEFINE2(fusefs, , vnops, lookup_cache_incoherent, - "struct vnode*", "struct fuse_entry_out*"); /* struct vnop_lookup_args { struct vnodeop_desc *a_desc; @@ -1388,20 +1386,19 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) ((vap = VTOVA(vp)) && filesize != vap->va_size))) { - SDT_PROBE2(fusefs, , vnops, lookup_cache_incoherent, vp, feo); fvdat->flag &= ~FN_SIZECHANGE; /* * The server changed the file's size even * though we had it cached, or had dirty writes * in the WB cache! */ - printf("%s: cache incoherent on %s! " - "Buggy FUSE server detected. To prevent " + fuse_warn(data, FSESS_WARN_CACHE_INCOHERENT, + "cache incoherent! " + "To prevent " "data corruption, disable the data cache " "by mounting with -o direct_io, or as " "directed otherwise by your FUSE server's " - "documentation\n", __func__, - vnode_mount(vp)->mnt_stat.f_mntonname); + "documentation."); int iosize = fuse_iosize(vp); v_inval_buf_range(vp, 0, INT64_MAX, iosize); } @@ -2595,9 +2592,12 @@ fuse_vnop_listextattr(struct vop_listextattr_args *ap) linux_list = fdi.answ; /* FUSE doesn't allow the server to return more data than requested */ if (fdi.iosize > linux_list_len) { - printf("WARNING: FUSE protocol violation. Server returned " + struct fuse_data *data = fuse_get_mpdata(mp); + + fuse_warn(data, FSESS_WARN_LSEXTATTR_LONG, + "server returned " "more extended attribute data than requested; " - "should've returned ERANGE instead"); + "should've returned ERANGE instead."); } else { /* But returning less data is fine */ linux_list_len = fdi.iosize; From owner-dev-commits-src-branches@freebsd.org Sat Jul 3 23:59:10 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B16A65AED3; Sat, 3 Jul 2021 23:59: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 4GHTSZ1c52z3F7W; Sat, 3 Jul 2021 23:59: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 1F790A04; Sat, 3 Jul 2021 23:59: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 163NxATh068257; Sat, 3 Jul 2021 23:59:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 163NxAQN068256; Sat, 3 Jul 2021 23:59:10 GMT (envelope-from git) Date: Sat, 3 Jul 2021 23:59:10 GMT Message-Id: <202107032359.163NxAQN068256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 7b096a997fad - stable/13 - fusefs: support EVFILT_WRITE on /dev/fuse 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 7b096a997fad199eddccfb6784e4b85184d9af17 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 23:59:10 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=7b096a997fad199eddccfb6784e4b85184d9af17 commit 7b096a997fad199eddccfb6784e4b85184d9af17 Author: Alan Somers AuthorDate: 2021-06-15 23:17:28 +0000 Commit: Alan Somers CommitDate: 2021-07-03 23:57:51 +0000 fusefs: support EVFILT_WRITE on /dev/fuse /dev/fuse is always ready for writing, so it's kind of dumb to poll it. But some applications do it anyway. Better to return ready than EINVAL. Reviewed by: emaste, pfg Differential Revision: https://reviews.freebsd.org/D30784 (cherry picked from commit 7b8622fa220b9c08041102f638f848c48e022644) Simplify fuse_device_filt_write It always returns 1, so why bother having a variable. Pull Request: https://github.com/freebsd/freebsd-src/pull/478 (cherry picked from commit 9b876fbd504e5c718d8d0275b32d806ab14558c8) --- sys/fs/fuse/fuse_device.c | 20 +++++++++++++++++++- tests/sys/fs/fusefs/mockfs.cc | 20 +++++++++++++++++--- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/sys/fs/fuse/fuse_device.c b/sys/fs/fuse/fuse_device.c index cab5925c91de..f8807d6d1c26 100644 --- a/sys/fs/fuse/fuse_device.c +++ b/sys/fs/fuse/fuse_device.c @@ -119,6 +119,7 @@ static struct cdevsw fuse_device_cdevsw = { }; static int fuse_device_filt_read(struct knote *kn, long hint); +static int fuse_device_filt_write(struct knote *kn, long hint); static void fuse_device_filt_detach(struct knote *kn); struct filterops fuse_device_rfiltops = { @@ -127,6 +128,11 @@ struct filterops fuse_device_rfiltops = { .f_event = fuse_device_filt_read, }; +struct filterops fuse_device_wfiltops = { + .f_isfd = 1, + .f_event = fuse_device_filt_write, +}; + /**************************** * * >>> Fuse device op defs @@ -180,12 +186,14 @@ fuse_device_filter(struct cdev *dev, struct knote *kn) error = devfs_get_cdevpriv((void **)&data); - /* EVFILT_WRITE is not supported; the device is always ready to write */ if (error == 0 && kn->kn_filter == EVFILT_READ) { kn->kn_fop = &fuse_device_rfiltops; kn->kn_hook = data; knlist_add(&data->ks_rsel.si_note, kn, 0); error = 0; + } else if (error == 0 && kn->kn_filter == EVFILT_WRITE) { + kn->kn_fop = &fuse_device_wfiltops; + error = 0; } else if (error == 0) { error = EINVAL; kn->kn_data = error; @@ -231,6 +239,16 @@ fuse_device_filt_read(struct knote *kn, long hint) return (ready); } +static int +fuse_device_filt_write(struct knote *kn, long hint) +{ + + kn->kn_data = 0; + + /* The device is always ready to write, so we return 1*/ + return (1); +} + /* * Resources are set up on a per-open basis */ diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index 7e4991fb7bb9..7003472ca52b 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -867,8 +867,8 @@ void MockFS::read_request(mockfs_buf_in &in, ssize_t &res) { timeout_ts.tv_sec = 0; timeout_ts.tv_nsec = timeout_ms * 1'000'000; while (nready == 0) { - EV_SET(&changes[0], m_fuse_fd, EVFILT_READ, EV_ADD, 0, - 0, 0); + EV_SET(&changes[0], m_fuse_fd, EVFILT_READ, + EV_ADD | EV_ONESHOT, 0, 0, 0); nready = kevent(m_kq, &changes[0], 1, &events[0], 1, &timeout_ts); if (m_quit) @@ -930,12 +930,26 @@ void MockFS::read_request(mockfs_buf_in &in, ssize_t &res) { void MockFS::write_response(const mockfs_buf_out &out) { fd_set writefds; pollfd fds[1]; + struct kevent changes[1]; + struct kevent events[1]; int nready, nfds; ssize_t r; switch (m_pm) { case BLOCKING: - case KQ: /* EVFILT_WRITE is not supported */ + break; + case KQ: + EV_SET(&changes[0], m_fuse_fd, EVFILT_WRITE, + EV_ADD | EV_ONESHOT, 0, 0, 0); + nready = kevent(m_kq, &changes[0], 1, &events[0], 1, + NULL); + ASSERT_LE(0, nready) << strerror(errno); + ASSERT_EQ(events[0].ident, (uintptr_t)m_fuse_fd); + if (events[0].flags & EV_ERROR) + FAIL() << strerror(events[0].data); + else if (events[0].flags & EV_EOF) + FAIL() << strerror(events[0].fflags); + m_nready = events[0].data; break; case POLL: fds[0].fd = m_fuse_fd; From owner-dev-commits-src-branches@freebsd.org Sun Jul 4 00:03:44 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9317F65B25C; Sun, 4 Jul 2021 00:03: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 4GHTYr3ndXz3Fm8; Sun, 4 Jul 2021 00:03: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 6ABBAB19; Sun, 4 Jul 2021 00:03: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 16403in2082303; Sun, 4 Jul 2021 00:03:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16403iYJ082302; Sun, 4 Jul 2021 00:03:44 GMT (envelope-from git) Date: Sun, 4 Jul 2021 00:03:44 GMT Message-Id: <202107040003.16403iYJ082302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: beeaeb6cc566 - stable/13 - fusefs: delete dead code 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/stable/13 X-Git-Reftype: branch X-Git-Commit: beeaeb6cc566207f80e3a6ff043694f264aaf653 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 00:03:44 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=beeaeb6cc566207f80e3a6ff043694f264aaf653 commit beeaeb6cc566207f80e3a6ff043694f264aaf653 Author: Alan Somers AuthorDate: 2021-06-18 00:14:57 +0000 Commit: Alan Somers CommitDate: 2021-07-03 23:59:54 +0000 fusefs: delete dead code It was always dead, accidentally included in SVN r345876. Reviewed by: pfg (cherry picked from commit b97c7abc1a1cee72ef62109add860c1e8e618efd) --- sys/fs/fuse/fuse_ipc.c | 6 ------ sys/fs/fuse/fuse_ipc.h | 2 -- 2 files changed, 8 deletions(-) diff --git a/sys/fs/fuse/fuse_ipc.c b/sys/fs/fuse/fuse_ipc.c index 6b4a29214a96..209c509124fd 100644 --- a/sys/fs/fuse/fuse_ipc.c +++ b/sys/fs/fuse/fuse_ipc.c @@ -976,12 +976,6 @@ fdisp_refresh_vp(struct fuse_dispatcher *fdip, enum fuse_opcode op, td->td_proc->p_pid, cred); } -void -fdisp_refresh(struct fuse_dispatcher *fdip) -{ - fticket_refresh(fdip->tick); -} - SDT_PROBE_DEFINE2(fusefs, , ipc, fdisp_wait_answ_error, "char*", "int"); int diff --git a/sys/fs/fuse/fuse_ipc.h b/sys/fs/fuse/fuse_ipc.h index 1351499c0712..7b27fd97e212 100644 --- a/sys/fs/fuse/fuse_ipc.h +++ b/sys/fs/fuse/fuse_ipc.h @@ -439,8 +439,6 @@ fdisp_destroy(struct fuse_dispatcher *fdisp) #endif } -void fdisp_refresh(struct fuse_dispatcher *fdip); - void fdisp_make(struct fuse_dispatcher *fdip, enum fuse_opcode op, struct mount *mp, uint64_t nid, struct thread *td, struct ucred *cred); From owner-dev-commits-src-branches@freebsd.org Sun Jul 4 00:05:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0E8065B26C; Sun, 4 Jul 2021 00:05: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 4GHTbJ6Xb8z3Fmc; Sun, 4 Jul 2021 00:05: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 C8C137B9; Sun, 4 Jul 2021 00:05: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 164050Q1082502; Sun, 4 Jul 2021 00:05:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164050m4082501; Sun, 4 Jul 2021 00:05:00 GMT (envelope-from git) Date: Sun, 4 Jul 2021 00:05:00 GMT Message-Id: <202107040005.164050m4082501@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: fd9bab551b3f - stable/13 - fusefs: also debug INIT operations in the test suite 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/stable/13 X-Git-Reftype: branch X-Git-Commit: fd9bab551b3f49afe9d879f69307596b34a012f0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 00:05:01 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=fd9bab551b3f49afe9d879f69307596b34a012f0 commit fd9bab551b3f49afe9d879f69307596b34a012f0 Author: Alan Somers AuthorDate: 2021-06-17 22:06:43 +0000 Commit: Alan Somers CommitDate: 2021-07-04 00:03:54 +0000 fusefs: also debug INIT operations in the test suite Reviewed by: pfg (cherry picked from commit 77b040c993ba9d4844e36f1f5b057066a5b4015a) --- tests/sys/fs/fusefs/mockfs.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index 7003472ca52b..c25501eb9785 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -702,6 +702,8 @@ void MockFS::init(uint32_t flags) { std::unique_ptr out(new mockfs_buf_out); read_request(*in, buflen); + if (verbosity > 0) + debug_request(*in, buflen); audit_request(*in, buflen); ASSERT_EQ(FUSE_INIT, in->header.opcode); From owner-dev-commits-src-branches@freebsd.org Sun Jul 4 00:05:35 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89ABA65B736; Sun, 4 Jul 2021 00:05: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 4GHTbz3VnDz3Fq6; Sun, 4 Jul 2021 00:05: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 607CCB1A; Sun, 4 Jul 2021 00:05: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 16405ZIP082657; Sun, 4 Jul 2021 00:05:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16405Z2H082656; Sun, 4 Jul 2021 00:05:35 GMT (envelope-from git) Date: Sun, 4 Jul 2021 00:05:35 GMT Message-Id: <202107040005.16405Z2H082656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 27d55441668a - stable/13 - fusefs: ensure that FUSE ops' headers' unique values are actually unique 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 27d55441668afdab219c1f464df3ff035ff5d96c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 00:05:35 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=27d55441668afdab219c1f464df3ff035ff5d96c commit 27d55441668afdab219c1f464df3ff035ff5d96c Author: Alan Somers AuthorDate: 2021-06-18 00:04:59 +0000 Commit: Alan Somers CommitDate: 2021-07-04 00:05:13 +0000 fusefs: ensure that FUSE ops' headers' unique values are actually unique Every FUSE operation has a unique value in its header. As the name implies, these values are supposed to be unique among all outstanding operations. And since FUSE_INTERRUPT is asynchronous and racy, it is desirable that the unique values be unique among all operations that are "close in time". Ensure that they are actually unique by incrementing them whenever we reuse a fuse_dispatcher object, for example during fsync, write, and listextattr. PR: 244686 Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D30810 (cherry picked from commit 5403f2c163f7e3d1adb9431d216f88d57cf9d74b) --- sys/fs/fuse/fuse_ipc.c | 34 ++++++++++++++-------------------- tests/sys/fs/fusefs/mockfs.cc | 9 +++++++++ tests/sys/fs/fusefs/mockfs.hh | 3 +++ 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/sys/fs/fuse/fuse_ipc.c b/sys/fs/fuse/fuse_ipc.c index 209c509124fd..0042de602739 100644 --- a/sys/fs/fuse/fuse_ipc.c +++ b/sys/fs/fuse/fuse_ipc.c @@ -103,6 +103,7 @@ static void fdisp_make_pid(struct fuse_dispatcher *fdip, enum fuse_opcode op, static void fuse_interrupt_send(struct fuse_ticket *otick, int err); static struct fuse_ticket *fticket_alloc(struct fuse_data *data); static void fticket_refresh(struct fuse_ticket *ftick); +static inline void fticket_reset(struct fuse_ticket *ftick); static void fticket_destroy(struct fuse_ticket *ftick); static int fticket_wait_answer(struct fuse_ticket *ftick); static inline int @@ -318,20 +319,12 @@ fticket_ctor(void *mem, int size, void *arg, int flags) FUSE_ASSERT_AW_DONE(ftick); ftick->tk_data = data; - - if (ftick->tk_unique != 0) - fticket_refresh(ftick); - - /* May be truncated to 32 bits */ - ftick->tk_unique = atomic_fetchadd_long(&data->ticketer, 1); - if (ftick->tk_unique == 0) - ftick->tk_unique = atomic_fetchadd_long(&data->ticketer, 1); - ftick->irq_unique = 0; - refcount_init(&ftick->tk_refcount, 1); counter_u64_add(fuse_ticket_count, 1); + fticket_refresh(ftick); + return 0; } @@ -385,26 +378,22 @@ fticket_destroy(struct fuse_ticket *ftick) return uma_zfree(ticket_zone, ftick); } -static inline -void +/* Prepare the ticket to be reused and clear its data buffers */ +static inline void fticket_refresh(struct fuse_ticket *ftick) { - FUSE_ASSERT_MS_DONE(ftick); - FUSE_ASSERT_AW_DONE(ftick); + fticket_reset(ftick); fiov_refresh(&ftick->tk_ms_fiov); - - bzero(&ftick->tk_aw_ohead, sizeof(struct fuse_out_header)); - fiov_refresh(&ftick->tk_aw_fiov); - ftick->tk_aw_errno = 0; - ftick->tk_flag = 0; } -/* Prepar the ticket to be reused, but don't clear its data buffers */ +/* Prepare the ticket to be reused, but don't clear its data buffers */ static inline void fticket_reset(struct fuse_ticket *ftick) { + struct fuse_data *data = ftick->tk_data; + FUSE_ASSERT_MS_DONE(ftick); FUSE_ASSERT_AW_DONE(ftick); @@ -412,6 +401,11 @@ fticket_reset(struct fuse_ticket *ftick) ftick->tk_aw_errno = 0; ftick->tk_flag = 0; + + /* May be truncated to 32 bits on LP32 arches */ + ftick->tk_unique = atomic_fetchadd_long(&data->ticketer, 1); + if (ftick->tk_unique == 0) + ftick->tk_unique = atomic_fetchadd_long(&data->ticketer, 1); } static int diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index c25501eb9785..4d0724b9c227 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -408,6 +408,7 @@ MockFS::MockFS(int max_readahead, bool allow_other, bool default_permissions, m_pm = pm; m_time_gran = time_gran; m_quit = false; + m_last_unique = 0; if (m_pm == KQ) m_kq = kqueue(); else @@ -693,6 +694,14 @@ void MockFS::audit_request(const mockfs_buf_in &in, ssize_t buflen) { default: FAIL() << "Unknown opcode " << in.header.opcode; } + /* + * Check that the ticket's unique value is sequential. Technically it + * doesn't need to be sequential, merely unique. But the current + * fusefs driver _does_ make it sequential, and that's easy to check + * for. + */ + if (in.header.unique != ++m_last_unique) + FAIL() << "Non-sequential unique value"; } void MockFS::init(uint32_t flags) { diff --git a/tests/sys/fs/fusefs/mockfs.hh b/tests/sys/fs/fusefs/mockfs.hh index a7a6a55922c7..24ca017dcdb1 100644 --- a/tests/sys/fs/fusefs/mockfs.hh +++ b/tests/sys/fs/fusefs/mockfs.hh @@ -297,6 +297,9 @@ class MockFS { /* pid of the test process */ pid_t m_pid; + /* The unique value of the header of the last received operation */ + uint64_t m_last_unique; + /* Method the daemon should use for I/O to and from /dev/fuse */ enum poll_method m_pm; From owner-dev-commits-src-branches@freebsd.org Sun Jul 4 02:30:24 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D49A465C4F6; Sun, 4 Jul 2021 02:30: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 4GHXq45SjBz3jFF; Sun, 4 Jul 2021 02:30: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 A469D26D3; Sun, 4 Jul 2021 02:30: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 1642UOkC076838; Sun, 4 Jul 2021 02:30:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1642UOI4076837; Sun, 4 Jul 2021 02:30:24 GMT (envelope-from git) Date: Sun, 4 Jul 2021 02:30:24 GMT Message-Id: <202107040230.1642UOI4076837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: fd5b08977630 - stable/13 - periodic: by default, skip 221.backup-gpart in jails 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/stable/13 X-Git-Reftype: branch X-Git-Commit: fd5b08977630dc8279cfa7ab955f90c4d723a1b7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 02:30:24 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=fd5b08977630dc8279cfa7ab955f90c4d723a1b7 commit fd5b08977630dc8279cfa7ab955f90c4d723a1b7 Author: Alan Somers AuthorDate: 2021-06-18 14:33:08 +0000 Commit: Alan Somers CommitDate: 2021-07-04 02:30:05 +0000 periodic: by default, skip 221.backup-gpart in jails It can still be enabled as usual in /etc/periodic.conf PR: 256253 Reported by: delphij Submitted by: Miroslav Lachman <000.fbsd@quip.cz> (cherry picked from commit fcf2227a557552e45646bbcf2422a98baab5c8a8) --- usr.sbin/periodic/periodic.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.sbin/periodic/periodic.conf b/usr.sbin/periodic/periodic.conf index d2d59fb783b0..4429c8d48eea 100644 --- a/usr.sbin/periodic/periodic.conf +++ b/usr.sbin/periodic/periodic.conf @@ -78,7 +78,12 @@ daily_backup_passwd_enable="YES" # Backup passwd & group daily_backup_aliases_enable="YES" # Backup mail aliases # 221.backup-gpart -daily_backup_gpart_enable="YES" # Backup partition table/boot partition/MBR +if [ $(sysctl -n security.jail.jailed) = 0 ]; then + # Backup partition table/boot partition/MBR + daily_backup_gpart_enable="YES" +else + daily_backup_gpart_enable="NO" +fi daily_backup_gpart_verbose="NO" # Be verbose if new backup differs from the old one daily_backup_efi_enable="NO" # Backup EFI system partition (ESP) From owner-dev-commits-src-branches@freebsd.org Sun Jul 4 04:14:49 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9738265E2A3; Sun, 4 Jul 2021 04:14: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 4GHb7Y3R5yz3q8d; Sun, 4 Jul 2021 04:14: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 5C62D3F6F; Sun, 4 Jul 2021 04:14: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 1644EnD2015992; Sun, 4 Jul 2021 04:14:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1644Eno1015991; Sun, 4 Jul 2021 04:14:49 GMT (envelope-from git) Date: Sun, 4 Jul 2021 04:14:49 GMT Message-Id: <202107040414.1644Eno1015991@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 5d7ae6fbb117 - stable/12 - id: sanitize arguments better 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/stable/12 X-Git-Reftype: branch X-Git-Commit: 5d7ae6fbb117fde20189db763a9561e97c2af35c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 04:14:49 -0000 The branch stable/12 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=5d7ae6fbb117fde20189db763a9561e97c2af35c commit 5d7ae6fbb117fde20189db763a9561e97c2af35c Author: Alan Somers AuthorDate: 2021-06-11 16:38:07 +0000 Commit: Alan Somers CommitDate: 2021-07-04 04:14:06 +0000 id: sanitize arguments better The -[AMc] flags ignore the user argument. Better if id rejects invocations that include a user argument along with any of those flags. PR: 256554 Reviewed by: trasz Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D30734 (cherry picked from commit 4a06e9377398b34922f8a67d7cb3ea980b95bde8) --- usr.bin/id/id.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c index 5abfb655c948..b8988dedd6f6 100644 --- a/usr.bin/id/id.c +++ b/usr.bin/id/id.c @@ -144,6 +144,8 @@ main(int argc, char *argv[]) if (iswhoami && argc > 0) usage(); + if ((cflag || Aflag || Mflag) && argc > 0) + usage(); switch(Aflag + Gflag + Mflag + Pflag + gflag + pflag + uflag) { case 1: From owner-dev-commits-src-branches@freebsd.org Sun Jul 4 17:16:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D88F667E3E; Sun, 4 Jul 2021 17:16: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 4GHwV33B42z3j5l; Sun, 4 Jul 2021 17:16: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 516451680E; Sun, 4 Jul 2021 17:16: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 164HGxrw050832; Sun, 4 Jul 2021 17:16:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164HGxVZ050831; Sun, 4 Jul 2021 17:16:59 GMT (envelope-from git) Date: Sun, 4 Jul 2021 17:16:59 GMT Message-Id: <202107041716.164HGxVZ050831@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 454becae2c43 - stable/12 - fusefs: delete dead code 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/stable/12 X-Git-Reftype: branch X-Git-Commit: 454becae2c437e473092d69ee614c480b9f27076 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 17:16:59 -0000 The branch stable/12 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=454becae2c437e473092d69ee614c480b9f27076 commit 454becae2c437e473092d69ee614c480b9f27076 Author: Alan Somers AuthorDate: 2021-06-15 19:34:01 +0000 Commit: Alan Somers CommitDate: 2021-07-04 04:15:19 +0000 fusefs: delete dead code Delete two fields in the per-mountpoint struct that have never been used. Sponsored by: Axcient (cherry picked from commit d63e6bc256016c7f5223ff5541671e5a96c4c6c4) --- sys/fs/fuse/fuse_ipc.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/fs/fuse/fuse_ipc.h b/sys/fs/fuse/fuse_ipc.h index 281a0f357359..bedecefd157a 100644 --- a/sys/fs/fuse/fuse_ipc.h +++ b/sys/fs/fuse/fuse_ipc.h @@ -211,8 +211,6 @@ struct fuse_data { uint32_t max_readahead_blocks; uint32_t max_write; uint32_t max_read; - uint32_t subtype; - char volname[MAXPATHLEN]; struct selinfo ks_rsel;